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

Unified Diff: media/capture/webm_muxer.h

Issue 1384483005: MediaStream Recorder: Support VP9 encoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sandersd@ comments Created 5 years, 2 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/video_track_recorder_unittest.cc ('k') | media/capture/webm_muxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/webm_muxer.h
diff --git a/media/capture/webm_muxer.h b/media/capture/webm_muxer.h
index 2d25c46a66a40342f8f2e4484dafee2662bf677e..7196d1d4f9f33c95b88548ab8ba92dd3589015c1 100644
--- a/media/capture/webm_muxer.h
+++ b/media/capture/webm_muxer.h
@@ -5,14 +5,13 @@
#ifndef MEDIA_FILTERS_LIBWEBM_MUXER_H_
#define MEDIA_FILTERS_LIBWEBM_MUXER_H_
-#include <set>
-
#include "base/callback.h"
#include "base/numerics/safe_math.h"
#include "base/strings/string_piece.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "media/base/media_export.h"
+#include "media/base/video_codecs.h"
#include "third_party/libwebm/source/mkvmuxer.hpp"
namespace gfx {
@@ -40,7 +39,9 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// either any file header or a SingleBlock.
using WriteDataCB = base::Callback<void(base::StringPiece)>;
- explicit WebmMuxer(const WriteDataCB& write_data_callback);
+ // |codec| can be VP8 or VP9 and should coincide with whatever is sent in
+ // OnEncodedVideo().
+ WebmMuxer(VideoCodec codec, const WriteDataCB& write_data_callback);
~WebmMuxer() override;
// Adds a |video_frame| with |encoded_data.data()| to WebM Segment.
@@ -69,6 +70,9 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// Used to DCHECK that we are called on the correct thread.
base::ThreadChecker thread_checker_;
+ // Video Codec configured: VP9 if true, otherwise VP8 is used by default.
+ const bool use_vp9_;
+
// A caller-side identifier to interact with |segment_|, initialised upon
// first frame arrival by AddVideoTrack().
uint64_t track_index_;
« no previous file with comments | « content/renderer/media/video_track_recorder_unittest.cc ('k') | media/capture/webm_muxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698