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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 64 |
65 private: | 65 private: |
66 friend class MediaRecorderHandlerTest; | 66 friend class MediaRecorderHandlerTest; |
67 | 67 |
68 void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame, | 68 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params, |
69 std::unique_ptr<std::string> encoded_data, | 69 std::unique_ptr<std::string> encoded_data, |
70 base::TimeTicks timestamp, | 70 base::TimeTicks timestamp, |
71 bool is_key_frame); | 71 bool is_key_frame); |
72 void OnEncodedAudio(const media::AudioParameters& params, | 72 void OnEncodedAudio(const media::AudioParameters& params, |
73 std::unique_ptr<std::string> encoded_data, | 73 std::unique_ptr<std::string> encoded_data, |
74 base::TimeTicks timestamp); | 74 base::TimeTicks timestamp); |
75 void WriteData(base::StringPiece data); | 75 void WriteData(base::StringPiece data); |
76 | 76 |
77 void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame, | 77 void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame, |
78 const base::TimeTicks& timestamp); | 78 const base::TimeTicks& timestamp); |
(...skipping 29 matching lines...) Expand all Loading... |
108 // Worker class doing the actual Webm Muxing work. | 108 // Worker class doing the actual Webm Muxing work. |
109 std::unique_ptr<media::WebmMuxer> webm_muxer_; | 109 std::unique_ptr<media::WebmMuxer> webm_muxer_; |
110 | 110 |
111 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; | 111 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); | 113 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace content | 116 } // namespace content |
117 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ | 117 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ |
OLD | NEW |