OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MediaRecorder_h | 5 #ifndef MediaRecorder_h |
6 #define MediaRecorder_h | 6 #define MediaRecorder_h |
7 | 7 |
8 #include "core/dom/ActiveDOMObject.h" | 8 #include "core/dom/ActiveDOMObject.h" |
9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
10 #include "modules/EventTargetModules.h" | 10 #include "modules/EventTargetModules.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void stop() override; | 72 void stop() override; |
73 bool hasPendingActivity() const override { return !m_stopped; } | 73 bool hasPendingActivity() const override { return !m_stopped; } |
74 | 74 |
75 // WebMediaRecorderHandlerClient | 75 // WebMediaRecorderHandlerClient |
76 void writeData(const char* data, size_t length, bool lastInSlice) override; | 76 void writeData(const char* data, size_t length, bool lastInSlice) override; |
77 void onError(const WebString& message) override; | 77 void onError(const WebString& message) override; |
78 | 78 |
79 DECLARE_VIRTUAL_TRACE(); | 79 DECLARE_VIRTUAL_TRACE(); |
80 | 80 |
81 private: | 81 private: |
| 82 class TrackEventListener; |
| 83 |
82 MediaRecorder(ExecutionContext*, MediaStream*, const MediaRecorderOptions&,
ExceptionState&); | 84 MediaRecorder(ExecutionContext*, MediaStream*, const MediaRecorderOptions&,
ExceptionState&); |
83 | 85 |
84 void createBlobEvent(Blob*); | 86 void createBlobEvent(Blob*); |
85 | 87 |
86 void stopRecording(); | 88 void stopRecording(); |
87 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); | 89 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
88 void dispatchScheduledEvent(); | 90 void dispatchScheduledEvent(); |
89 | 91 |
90 Member<MediaStream> m_stream; | 92 Member<MediaStream> m_stream; |
91 String m_mimeType; | 93 String m_mimeType; |
92 bool m_stopped; | 94 bool m_stopped; |
93 bool m_ignoreMutedMedia; | 95 bool m_ignoreMutedMedia; |
94 | 96 |
95 State m_state; | 97 State m_state; |
96 | 98 |
97 OwnPtr<BlobData> m_blobData; | 99 OwnPtr<BlobData> m_blobData; |
98 | 100 |
99 OwnPtr<WebMediaRecorderHandler> m_recorderHandler; | 101 OwnPtr<WebMediaRecorderHandler> m_recorderHandler; |
| 102 RefPtrWillBePersistent<EventListener> m_addOrRemoveTrackListener; |
100 | 103 |
101 AsyncMethodRunner<MediaRecorder> m_dispatchScheduledEventRunner; | 104 AsyncMethodRunner<MediaRecorder> m_dispatchScheduledEventRunner; |
102 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; | 105 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; |
103 }; | 106 }; |
104 | 107 |
105 } // namespace blink | 108 } // namespace blink |
106 | 109 |
107 #endif // MediaRecorder_h | 110 #endif // MediaRecorder_h |
OLD | NEW |