| 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_VIDEO_TRACK_RECORDER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by | 153 // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by |
| 154 // textures). Created on-demand on |main_task_runner_|. | 154 // textures). Created on-demand on |main_task_runner_|. |
| 155 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_; | 155 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_; |
| 156 SkBitmap bitmap_; | 156 SkBitmap bitmap_; |
| 157 std::unique_ptr<cc::PaintCanvas> canvas_; | 157 std::unique_ptr<cc::PaintCanvas> canvas_; |
| 158 | 158 |
| 159 DISALLOW_COPY_AND_ASSIGN(Encoder); | 159 DISALLOW_COPY_AND_ASSIGN(Encoder); |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 static CodecId GetPreferredCodecId(); | 162 static CodecId GetPreferredCodecId(); |
| 163 static bool IsEncodingLikelyAccelerated(CodecId codec, |
| 164 size_t width, |
| 165 size_t height); |
| 163 | 166 |
| 164 VideoTrackRecorder(CodecId codec, | 167 VideoTrackRecorder(CodecId codec, |
| 165 const blink::WebMediaStreamTrack& track, | 168 const blink::WebMediaStreamTrack& track, |
| 166 const OnEncodedVideoCB& on_encoded_video_cb, | 169 const OnEncodedVideoCB& on_encoded_video_cb, |
| 167 int32_t bits_per_second); | 170 int32_t bits_per_second); |
| 168 ~VideoTrackRecorder() override; | 171 ~VideoTrackRecorder() override; |
| 169 | 172 |
| 170 void Pause(); | 173 void Pause(); |
| 171 void Resume(); | 174 void Resume(); |
| 172 | 175 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 200 // Used to track the paused state during the initialization process. | 203 // Used to track the paused state during the initialization process. |
| 201 bool paused_before_init_; | 204 bool paused_before_init_; |
| 202 | 205 |
| 203 base::WeakPtrFactory<VideoTrackRecorder> weak_ptr_factory_; | 206 base::WeakPtrFactory<VideoTrackRecorder> weak_ptr_factory_; |
| 204 | 207 |
| 205 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder); | 208 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder); |
| 206 }; | 209 }; |
| 207 | 210 |
| 208 } // namespace content | 211 } // namespace content |
| 209 #endif // CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ | 212 #endif // CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ |
| OLD | NEW |