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

Unified Diff: content/renderer/media/video_track_recorder.h

Issue 1892673002: VideoTrackRecorder: add support for more codecs on construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: emircan@ nits Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_recorder_handler.cc ('k') | content/renderer/media/video_track_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_track_recorder.h
diff --git a/content/renderer/media/video_track_recorder.h b/content/renderer/media/video_track_recorder.h
index 971257bf7263470b1014d5d23eb96de6f0522555..6478873e6327ad1196d99528d937a7cfaf2dc148 100644
--- a/content/renderer/media/video_track_recorder.h
+++ b/content/renderer/media/video_track_recorder.h
@@ -28,14 +28,18 @@ namespace content {
class CONTENT_EXPORT VideoTrackRecorder
: NON_EXPORTED_BASE(public MediaStreamVideoSink) {
public:
+ enum class CodecId {
+ VP8,
+ VP9,
+ };
+
using OnEncodedVideoCB =
base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
std::unique_ptr<std::string> encoded_data,
base::TimeTicks capture_timestamp,
bool is_key_frame)>;
- // |use_vp9| forces using VP9, otherwise VP8 will be used by default.
- VideoTrackRecorder(bool use_vp9,
+ VideoTrackRecorder(CodecId codec,
const blink::WebMediaStreamTrack& track,
const OnEncodedVideoCB& on_encoded_video_cb,
int32_t bits_per_second);
@@ -55,7 +59,7 @@ class CONTENT_EXPORT VideoTrackRecorder
// We need to hold on to the Blink track to remove ourselves on dtor.
blink::WebMediaStreamTrack track_;
- // Forward declaration and member of an inner class to encode using VPx.
+ // Inner class to encode using whichever codec is configured.
class VpxEncoder;
const scoped_refptr<VpxEncoder> encoder_;
« no previous file with comments | « content/renderer/media/media_recorder_handler.cc ('k') | content/renderer/media/video_track_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698