Chromium Code Reviews| 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 27 matching lines...) Expand all Loading... | |
| 38 static MediaRecorder* create(ExecutionContext*, MediaStream*, ExceptionState &); | 38 static MediaRecorder* create(ExecutionContext*, MediaStream*, ExceptionState &); |
| 39 static MediaRecorder* create(ExecutionContext*, MediaStream*, const MediaRec orderOptions&, ExceptionState&); | 39 static MediaRecorder* create(ExecutionContext*, MediaStream*, const MediaRec orderOptions&, ExceptionState&); |
| 40 | 40 |
| 41 virtual ~MediaRecorder() {} | 41 virtual ~MediaRecorder() {} |
| 42 | 42 |
| 43 MediaStream* stream() const { return m_stream.get(); } | 43 MediaStream* stream() const { return m_stream.get(); } |
| 44 const String& mimeType() const { return m_mimeType; } | 44 const String& mimeType() const { return m_mimeType; } |
| 45 String state() const; | 45 String state() const; |
| 46 bool ignoreMutedMedia() const { return m_ignoreMutedMedia; } | 46 bool ignoreMutedMedia() const { return m_ignoreMutedMedia; } |
| 47 void setIgnoreMutedMedia(bool ignoreMutedMedia) { m_ignoreMutedMedia = ignor eMutedMedia; } | 47 void setIgnoreMutedMedia(bool ignoreMutedMedia) { m_ignoreMutedMedia = ignor eMutedMedia; } |
| 48 unsigned long videoBitsPerSecond() const { return m_videoBitsPerSecond; } | |
| 49 unsigned long audioBitsPerSecond() const { return m_audioBitsPerSecond; } | |
| 48 | 50 |
| 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(start); | 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(start); |
| 50 DEFINE_ATTRIBUTE_EVENT_LISTENER(stop); | 52 DEFINE_ATTRIBUTE_EVENT_LISTENER(stop); |
| 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(dataavailable); | 53 DEFINE_ATTRIBUTE_EVENT_LISTENER(dataavailable); |
| 52 DEFINE_ATTRIBUTE_EVENT_LISTENER(pause); | 54 DEFINE_ATTRIBUTE_EVENT_LISTENER(pause); |
| 53 DEFINE_ATTRIBUTE_EVENT_LISTENER(resume); | 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(resume); |
| 54 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 56 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 55 | 57 |
| 56 void start(ExceptionState&); | 58 void start(ExceptionState&); |
| 57 void start(int timeSlice, ExceptionState&); | 59 void start(int timeSlice, ExceptionState&); |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 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 size_t m_streamAmountOfTracks; | 93 size_t m_streamAmountOfTracks; |
| 92 String m_mimeType; | 94 String m_mimeType; |
| 93 bool m_stopped; | 95 bool m_stopped; |
| 94 bool m_ignoreMutedMedia; | 96 bool m_ignoreMutedMedia; |
| 97 int32_t m_audioBitsPerSecond; | |
|
philipj_slow
2016/02/03 03:31:05
Why int32_t here and in WebMediaRecorderHandler? P
mcasas
2016/02/03 23:50:27
Replaced throughout.
| |
| 98 int32_t m_videoBitsPerSecond; | |
| 95 | 99 |
| 96 State m_state; | 100 State m_state; |
| 97 | 101 |
| 98 OwnPtr<BlobData> m_blobData; | 102 OwnPtr<BlobData> m_blobData; |
| 99 | 103 |
| 100 OwnPtr<WebMediaRecorderHandler> m_recorderHandler; | 104 OwnPtr<WebMediaRecorderHandler> m_recorderHandler; |
| 101 | 105 |
| 102 Member<AsyncMethodRunner<MediaRecorder>> m_dispatchScheduledEventRunner; | 106 Member<AsyncMethodRunner<MediaRecorder>> m_dispatchScheduledEventRunner; |
| 103 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; | 107 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; |
| 104 }; | 108 }; |
| 105 | 109 |
| 106 } // namespace blink | 110 } // namespace blink |
| 107 | 111 |
| 108 #endif // MediaRecorder_h | 112 #endif // MediaRecorder_h |
| OLD | NEW |