OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 23 matching lines...) Expand all Loading... |
34 class MediaStreamComponent; | 34 class MediaStreamComponent; |
35 class WebAudioSourceProvider; | 35 class WebAudioSourceProvider; |
36 class WebMediaStream; | 36 class WebMediaStream; |
37 class WebMediaStreamSource; | 37 class WebMediaStreamSource; |
38 class WebString; | 38 class WebString; |
39 | 39 |
40 class WebMediaStreamTrack { | 40 class WebMediaStreamTrack { |
41 public: | 41 public: |
42 class ExtraData { | 42 class ExtraData { |
43 public: | 43 public: |
44 ExtraData() { } | 44 ExtraData() : m_owner(0) { } |
45 virtual ~ExtraData() { } | 45 virtual ~ExtraData() { } |
| 46 |
| 47 BLINK_PLATFORM_EXPORT WebMediaStreamTrack owner(); |
| 48 |
| 49 #if INSIDE_BLINK |
| 50 BLINK_PLATFORM_EXPORT void setOwner(MediaStreamComponent*); |
| 51 #endif |
| 52 |
| 53 private: |
| 54 MediaStreamComponent* m_owner; |
46 }; | 55 }; |
47 | 56 |
48 WebMediaStreamTrack() { } | 57 WebMediaStreamTrack() { } |
49 WebMediaStreamTrack(const WebMediaStreamTrack& other) { assign(other); } | 58 WebMediaStreamTrack(const WebMediaStreamTrack& other) { assign(other); } |
50 ~WebMediaStreamTrack() { reset(); } | 59 ~WebMediaStreamTrack() { reset(); } |
51 | 60 |
52 WebMediaStreamTrack& operator=(const WebMediaStreamTrack& other) | 61 WebMediaStreamTrack& operator=(const WebMediaStreamTrack& other) |
53 { | 62 { |
54 assign(other); | 63 assign(other); |
55 return *this; | 64 return *this; |
(...skipping 18 matching lines...) Expand all Loading... |
74 // extra data pointer to be deleted. | 83 // extra data pointer to be deleted. |
75 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; | 84 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; |
76 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 85 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
77 | 86 |
78 // The lifetime of the WebAudioSourceProvider should outlive the | 87 // The lifetime of the WebAudioSourceProvider should outlive the |
79 // WebMediaStreamTrack, and clients are responsible for calling | 88 // WebMediaStreamTrack, and clients are responsible for calling |
80 // setSourceProvider(0) before the WebMediaStreamTrack is going away. | 89 // setSourceProvider(0) before the WebMediaStreamTrack is going away. |
81 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); | 90 BLINK_PLATFORM_EXPORT void setSourceProvider(WebAudioSourceProvider*); |
82 | 91 |
83 #if INSIDE_BLINK | 92 #if INSIDE_BLINK |
| 93 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(PassRefPtr<MediaStreamComponent>); |
84 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(MediaStreamComponent*); | 94 BLINK_PLATFORM_EXPORT WebMediaStreamTrack(MediaStreamComponent*); |
85 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(MediaStreamComponent*); | 95 BLINK_PLATFORM_EXPORT WebMediaStreamTrack& operator=(MediaStreamComponent*); |
| 96 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamComponent>() const
; |
86 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; | 97 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; |
87 #endif | 98 #endif |
88 | 99 |
89 private: | 100 private: |
90 WebPrivatePtr<MediaStreamComponent> m_private; | 101 WebPrivatePtr<MediaStreamComponent> m_private; |
91 }; | 102 }; |
92 | 103 |
93 } // namespace blink | 104 } // namespace blink |
94 | 105 |
95 #endif // WebMediaStreamTrack_h | 106 #endif // WebMediaStreamTrack_h |
OLD | NEW |