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 CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // All methods are called on the same thread as construction and destruction, | 40 // All methods are called on the same thread as construction and destruction, |
41 // i.e. the Main Render thread. (Note that a BindToCurrentLoop is used to | 41 // i.e. the Main Render thread. (Note that a BindToCurrentLoop is used to |
42 // guarantee this, since VideoTrackRecorder sends back frames on IO thread.) | 42 // guarantee this, since VideoTrackRecorder sends back frames on IO thread.) |
43 class CONTENT_EXPORT MediaRecorderHandler final | 43 class CONTENT_EXPORT MediaRecorderHandler final |
44 : public NON_EXPORTED_BASE(blink::WebMediaRecorderHandler) { | 44 : public NON_EXPORTED_BASE(blink::WebMediaRecorderHandler) { |
45 public: | 45 public: |
46 MediaRecorderHandler(); | 46 MediaRecorderHandler(); |
47 ~MediaRecorderHandler() override; | 47 ~MediaRecorderHandler() override; |
48 | 48 |
49 // blink::WebMediaRecorderHandler. | 49 // blink::WebMediaRecorderHandler. |
50 bool canSupportMimeType(const blink::WebString& mimeType) override; | 50 bool canSupportMimeType(const blink::WebString& web_type, |
| 51 const blink::WebString& web_codecs) override; |
51 bool initialize(blink::WebMediaRecorderHandlerClient* client, | 52 bool initialize(blink::WebMediaRecorderHandlerClient* client, |
52 const blink::WebMediaStream& media_stream, | 53 const blink::WebMediaStream& media_stream, |
53 const blink::WebString& mimeType) override; | 54 const blink::WebString& type, |
| 55 const blink::WebString& codecs) override; |
54 bool start() override; | 56 bool start() override; |
55 bool start(int timeslice) override; | 57 bool start(int timeslice) override; |
56 void stop() override; | 58 void stop() override; |
57 void pause() override; | 59 void pause() override; |
58 void resume() override; | 60 void resume() override; |
59 | 61 |
60 private: | 62 private: |
61 friend class MediaRecorderHandlerTest; | 63 friend class MediaRecorderHandlerTest; |
62 | 64 |
63 void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame, | 65 void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Worker class doing the actual Webm Muxing work. | 101 // Worker class doing the actual Webm Muxing work. |
100 scoped_ptr<media::WebmMuxer> webm_muxer_; | 102 scoped_ptr<media::WebmMuxer> webm_muxer_; |
101 | 103 |
102 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; | 104 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; |
103 | 105 |
104 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); | 106 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); |
105 }; | 107 }; |
106 | 108 |
107 } // namespace content | 109 } // namespace content |
108 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ | 110 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ |
OLD | NEW |