OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "platform/mediastream/MediaStreamSource.h" | 34 #include "platform/mediastream/MediaStreamSource.h" |
35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class AudioSourceProvider; | 39 class AudioSourceProvider; |
40 class ExceptionState; | 40 class ExceptionState; |
41 class MediaStreamComponent; | 41 class MediaStreamComponent; |
42 class MediaStreamTrackSourcesCallback; | 42 class MediaStreamTrackSourcesCallback; |
43 | 43 |
44 class MODULES_EXPORT MediaStreamTrack final | 44 class MODULES_EXPORT MediaStreamTrack |
45 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrac
k> | 45 : public RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrac
k> |
46 , public ActiveDOMObject | 46 , public ActiveDOMObject |
47 , public MediaStreamSource::Observer { | 47 , public MediaStreamSource::Observer { |
48 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaStreamTrack); | 48 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(MediaStreamTrack); |
49 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamTrack); | 49 USING_GARBAGE_COLLECTED_MIXIN(MediaStreamTrack); |
50 DEFINE_WRAPPERTYPEINFO(); | 50 DEFINE_WRAPPERTYPEINFO(); |
51 public: | 51 public: |
52 static MediaStreamTrack* create(ExecutionContext*, MediaStreamComponent*); | 52 static MediaStreamTrack* create(ExecutionContext*, MediaStreamComponent*); |
53 ~MediaStreamTrack() override; | 53 ~MediaStreamTrack() override; |
54 | 54 |
(...skipping 29 matching lines...) Expand all Loading... |
84 ExecutionContext* executionContext() const override; | 84 ExecutionContext* executionContext() const override; |
85 | 85 |
86 // ActiveDOMObject | 86 // ActiveDOMObject |
87 void stop() override; | 87 void stop() override; |
88 | 88 |
89 PassOwnPtr<AudioSourceProvider> createWebAudioSource(); | 89 PassOwnPtr<AudioSourceProvider> createWebAudioSource(); |
90 | 90 |
91 DECLARE_VIRTUAL_TRACE(); | 91 DECLARE_VIRTUAL_TRACE(); |
92 | 92 |
93 private: | 93 private: |
| 94 friend class CanvasCaptureMediaStreamTrack; |
| 95 |
94 MediaStreamTrack(ExecutionContext*, MediaStreamComponent*); | 96 MediaStreamTrack(ExecutionContext*, MediaStreamComponent*); |
95 | 97 |
96 // MediaStreamSourceObserver | 98 // MediaStreamSourceObserver |
97 void sourceChangedState() override; | 99 void sourceChangedState() override; |
98 | 100 |
99 void propagateTrackEnded(); | 101 void propagateTrackEnded(); |
100 | 102 |
101 MediaStreamSource::ReadyState m_readyState; | 103 MediaStreamSource::ReadyState m_readyState; |
102 HeapHashSet<Member<MediaStream>> m_registeredMediaStreams; | 104 HeapHashSet<Member<MediaStream>> m_registeredMediaStreams; |
103 bool m_isIteratingRegisteredMediaStreams; | 105 bool m_isIteratingRegisteredMediaStreams; |
104 bool m_stopped; | 106 bool m_stopped; |
105 Member<MediaStreamComponent> m_component; | 107 Member<MediaStreamComponent> m_component; |
106 }; | 108 }; |
107 | 109 |
108 typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector; | 110 typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector; |
109 | 111 |
110 } // namespace blink | 112 } // namespace blink |
111 | 113 |
112 #endif // MediaStreamTrack_h | 114 #endif // MediaStreamTrack_h |
OLD | NEW |