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

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: chcunningham@s comments: better |smooth| marking and rebase. 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by 142 // Used to retrieve incoming opaque VideoFrames (i.e. VideoFrames backed by
143 // textures). Created on-demand on |main_task_runner_|. 143 // textures). Created on-demand on |main_task_runner_|.
144 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_; 144 std::unique_ptr<media::SkCanvasVideoRenderer> video_renderer_;
145 SkBitmap bitmap_; 145 SkBitmap bitmap_;
146 std::unique_ptr<cc::PaintCanvas> canvas_; 146 std::unique_ptr<cc::PaintCanvas> canvas_;
147 147
148 DISALLOW_COPY_AND_ASSIGN(Encoder); 148 DISALLOW_COPY_AND_ASSIGN(Encoder);
149 }; 149 };
150 150
151 static CodecId GetPreferredCodecId(); 151 static CodecId GetPreferredCodecId();
152 static bool CanUseAcceleratedEncoder(CodecId codec,
153 size_t width,
154 size_t height);
152 155
153 VideoTrackRecorder(CodecId codec, 156 VideoTrackRecorder(CodecId codec,
154 const blink::WebMediaStreamTrack& track, 157 const blink::WebMediaStreamTrack& track,
155 const OnEncodedVideoCB& on_encoded_video_cb, 158 const OnEncodedVideoCB& on_encoded_video_cb,
156 int32_t bits_per_second); 159 int32_t bits_per_second);
157 ~VideoTrackRecorder() override; 160 ~VideoTrackRecorder() override;
158 161
159 void Pause(); 162 void Pause();
160 void Resume(); 163 void Resume();
161 164
(...skipping 27 matching lines...) Expand all
189 // Used to track the paused state during the initialization process. 192 // Used to track the paused state during the initialization process.
190 bool paused_before_init_; 193 bool paused_before_init_;
191 194
192 base::WeakPtrFactory<VideoTrackRecorder> weak_ptr_factory_; 195 base::WeakPtrFactory<VideoTrackRecorder> weak_ptr_factory_;
193 196
194 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder); 197 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder);
195 }; 198 };
196 199
197 } // namespace content 200 } // namespace content
198 #endif // CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_ 201 #endif // CONTENT_RENDERER_MEDIA_RECORDER_VIDEO_TRACK_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698