Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: content/renderer/media_recorder/video_track_recorder.h

Issue 2832273002: Media Capabilities encoding: wire the hardware encoding support (Closed)
Patch Set: moved base::SysInfo::IsLowEndDevice back inside a method Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by 147 // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by
148 // textures). Created on-demand on |main_task_runner_|. 148 // textures). Created on-demand on |main_task_runner_|.
149 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_; 149 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_;
150 SkBitmap bitmap_; 150 SkBitmap bitmap_;
151 std::unique_ptr<cc::PaintCanvas> canvas_; 151 std::unique_ptr<cc::PaintCanvas> canvas_;
152 152
153 DISALLOW_COPY_AND_ASSIGN(Encoder); 153 DISALLOW_COPY_AND_ASSIGN(Encoder);
154 }; 154 };
155 155
156 static CodecId GetPreferredCodecId(); 156 static CodecId GetPreferredCodecId();
157 static bool CanUseAcceleratedEncoder(CodecId codec,
158 size_t width,
159 size_t height);
157 160
158 VideoTrackRecorder(CodecId codec, 161 VideoTrackRecorder(CodecId codec,
159 const blink::WebMediaStreamTrack& track, 162 const blink::WebMediaStreamTrack& track,
160 const OnEncodedVideoCB& on_encoded_video_cb, 163 const OnEncodedVideoCB& on_encoded_video_cb,
161 int32_t bits_per_second); 164 int32_t bits_per_second);
162 ~VideoTrackRecorder() override; 165 ~VideoTrackRecorder() override;
163 166
164 void Pause(); 167 void Pause();
165 void Resume(); 168 void Resume();
166 169
(...skipping 27 matching lines...) Expand all
194 // Used to track the paused state during the initialization process. 197 // Used to track the paused state during the initialization process.
195 bool paused_before_init_; 198 bool paused_before_init_;
196 199
197 base::WeakPtrFactory<VideoTrackRecorder> weak_ptr_factory_; 200 base::WeakPtrFactory<VideoTrackRecorder> weak_ptr_factory_;
198 201
199 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder); 202 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder);
200 }; 203 };
201 204
202 } // namespace content 205 } // namespace content
203 #endif // CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ 206 #endif // CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_
OLDNEW
« no previous file with comments | « content/renderer/media_recorder/media_recorder_handler.cc ('k') | content/renderer/media_recorder/video_track_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698