| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebMediaStreamSource_h | 31 #ifndef WebMediaStreamSource_h |
| 32 #define WebMediaStreamSource_h | 32 #define WebMediaStreamSource_h |
| 33 | 33 |
| 34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
| 35 #include "WebNonCopyable.h" | 35 #include "WebNonCopyable.h" |
| 36 #include "WebPrivatePtr.h" | 36 #include "WebPrivatePtr.h" |
| 37 #include "WebVector.h" | 37 #include "WebVector.h" |
| 38 #if INSIDE_BLINK |
| 39 #include "platform/heap/Handle.h" |
| 40 #endif |
| 38 | 41 |
| 39 namespace blink { | 42 namespace blink { |
| 40 | 43 |
| 41 class MediaStreamSource; | 44 class MediaStreamSource; |
| 42 class WebAudioDestinationConsumer; | 45 class WebAudioDestinationConsumer; |
| 43 class WebMediaConstraints; | 46 class WebMediaConstraints; |
| 44 class WebString; | 47 class WebString; |
| 45 | 48 |
| 46 class WebMediaStreamSource { | 49 class WebMediaStreamSource { |
| 47 public: | 50 public: |
| 48 class ExtraData { | 51 class ExtraData { |
| 49 public: | 52 public: |
| 50 ExtraData() : m_owner(0) { } | 53 ExtraData() : m_owner(0) { } |
| 51 virtual ~ExtraData() { } | 54 virtual ~ExtraData() { } |
| 52 | 55 |
| 53 BLINK_PLATFORM_EXPORT WebMediaStreamSource owner(); | 56 BLINK_PLATFORM_EXPORT WebMediaStreamSource owner(); |
| 54 | 57 |
| 55 #if INSIDE_BLINK | 58 #if INSIDE_BLINK |
| 56 BLINK_PLATFORM_EXPORT void setOwner(MediaStreamSource*); | 59 BLINK_PLATFORM_EXPORT void setOwner(MediaStreamSource*); |
| 57 #endif | 60 #endif |
| 58 | 61 |
| 59 private: | 62 private: |
| 63 #if INSIDE_BLINK |
| 64 GC_PLUGIN_IGNORE("http://crbug.com/409526") |
| 65 #endif |
| 60 MediaStreamSource* m_owner; | 66 MediaStreamSource* m_owner; |
| 61 }; | 67 }; |
| 62 | 68 |
| 63 enum Type { | 69 enum Type { |
| 64 TypeAudio, | 70 TypeAudio, |
| 65 TypeVideo | 71 TypeVideo |
| 66 }; | 72 }; |
| 67 | 73 |
| 68 enum ReadyState { | 74 enum ReadyState { |
| 69 ReadyStateLive = 0, | 75 ReadyStateLive = 0, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 BLINK_PLATFORM_EXPORT WebMediaConstraints constraints(); | 112 BLINK_PLATFORM_EXPORT WebMediaConstraints constraints(); |
| 107 | 113 |
| 108 // Only used if if this is a WebAudio source. | 114 // Only used if if this is a WebAudio source. |
| 109 // The WebAudioDestinationConsumer is not owned, and has to be disposed of s
eparately | 115 // The WebAudioDestinationConsumer is not owned, and has to be disposed of s
eparately |
| 110 // after calling removeAudioConsumer. | 116 // after calling removeAudioConsumer. |
| 111 BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const; | 117 BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const; |
| 112 BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*); | 118 BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*); |
| 113 BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*)
; | 119 BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*)
; |
| 114 | 120 |
| 115 #if INSIDE_BLINK | 121 #if INSIDE_BLINK |
| 116 BLINK_PLATFORM_EXPORT WebMediaStreamSource(const WTF::PassRefPtr<MediaStream
Source>&); | 122 BLINK_PLATFORM_EXPORT WebMediaStreamSource(MediaStreamSource*); |
| 117 BLINK_PLATFORM_EXPORT WebMediaStreamSource& operator=(MediaStreamSource*); | 123 BLINK_PLATFORM_EXPORT WebMediaStreamSource& operator=(MediaStreamSource*); |
| 118 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamSource>() const; | 124 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamSource>() const; |
| 119 BLINK_PLATFORM_EXPORT operator MediaStreamSource*() const; | 125 BLINK_PLATFORM_EXPORT operator MediaStreamSource*() const; |
| 120 #endif | 126 #endif |
| 121 | 127 |
| 122 private: | 128 private: |
| 123 WebPrivatePtr<MediaStreamSource> m_private; | 129 WebPrivatePtr<MediaStreamSource> m_private; |
| 124 }; | 130 }; |
| 125 | 131 |
| 126 } // namespace blink | 132 } // namespace blink |
| 127 | 133 |
| 128 #endif // WebMediaStreamSource_h | 134 #endif // WebMediaStreamSource_h |
| OLD | NEW |