| 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_RECORDER_MEDIA_RECORDER_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 bool Initialize(blink::WebMediaRecorderHandlerClient* client, | 54 bool Initialize(blink::WebMediaRecorderHandlerClient* client, |
| 55 const blink::WebMediaStream& media_stream, | 55 const blink::WebMediaStream& media_stream, |
| 56 const blink::WebString& type, | 56 const blink::WebString& type, |
| 57 const blink::WebString& codecs, | 57 const blink::WebString& codecs, |
| 58 int32_t audio_bits_per_second, | 58 int32_t audio_bits_per_second, |
| 59 int32_t video_bits_per_second) override; | 59 int32_t video_bits_per_second) override; |
| 60 bool Start(int timeslice) override; | 60 bool Start(int timeslice) override; |
| 61 void Stop() override; | 61 void Stop() override; |
| 62 void Pause() override; | 62 void Pause() override; |
| 63 void Resume() override; | 63 void Resume() override; |
| 64 void EncodingInfo( |
| 65 const blink::WebMediaConfiguration& configuration, |
| 66 std::unique_ptr<blink::WebMediaCapabilitiesQueryCallbacks> cb) override; |
| 64 | 67 |
| 65 private: | 68 private: |
| 66 friend class MediaRecorderHandlerTest; | 69 friend class MediaRecorderHandlerTest; |
| 67 | 70 |
| 68 // Called to indicate there is encoded video data available. |encoded_alpha| | 71 // Called to indicate there is encoded video data available. |encoded_alpha| |
| 69 // represents the encode output of alpha channel when available, can be | 72 // represents the encode output of alpha channel when available, can be |
| 70 // nullptr otherwise. | 73 // nullptr otherwise. |
| 71 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params, | 74 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params, |
| 72 std::unique_ptr<std::string> encoded_data, | 75 std::unique_ptr<std::string> encoded_data, |
| 73 std::unique_ptr<std::string> encoded_alpha, | 76 std::unique_ptr<std::string> encoded_alpha, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Worker class doing the actual Webm Muxing work. | 120 // Worker class doing the actual Webm Muxing work. |
| 118 std::unique_ptr<media::WebmMuxer> webm_muxer_; | 121 std::unique_ptr<media::WebmMuxer> webm_muxer_; |
| 119 | 122 |
| 120 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; | 123 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; |
| 121 | 124 |
| 122 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); | 125 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 } // namespace content | 128 } // namespace content |
| 126 #endif // CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ | 129 #endif // CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ |
| OLD | NEW |