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

Unified Diff: media/muxers/webm_muxer.h

Issue 2612403002: Release video frames earlier in MediaRecorder (Closed)
Patch Set: mcasas@ nits. Created 3 years, 11 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/muxers/webm_muxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/muxers/webm_muxer.h
diff --git a/media/muxers/webm_muxer.h b/media/muxers/webm_muxer.h
index afd8176b4fe2c36d9c2e2220a5fa984d7fd67765..e01998334949330b0b8a42f22a730aaee96e2a4b 100644
--- a/media/muxers/webm_muxer.h
+++ b/media/muxers/webm_muxer.h
@@ -20,6 +20,7 @@
#include "media/base/media_export.h"
#include "media/base/video_codecs.h"
#include "third_party/libwebm/source/mkvmuxer.hpp"
+#include "ui/gfx/geometry/size.h"
namespace gfx {
class Size;
@@ -47,6 +48,15 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// either any file header or a SingleBlock.
using WriteDataCB = base::Callback<void(base::StringPiece)>;
+ // Container for the parameters that muxer uses that is extracted from
+ // media::VideoFrame.
+ struct MEDIA_EXPORT VideoParameters {
+ VideoParameters(scoped_refptr<media::VideoFrame> frame);
+ ~VideoParameters();
+ gfx::Size visible_rect_size;
+ double frame_rate;
+ };
+
// |codec| can be VP8 or VP9 and should coincide with whatever is sent in
// OnEncodedVideo().
WebmMuxer(VideoCodec codec,
@@ -57,7 +67,7 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// Functions to add video and audio frames with |encoded_data.data()|
// to WebM Segment.
- void OnEncodedVideo(const scoped_refptr<VideoFrame>& video_frame,
+ void OnEncodedVideo(const VideoParameters& params,
std::unique_ptr<std::string> encoded_data,
base::TimeTicks timestamp,
bool is_key_frame);
« no previous file with comments | « content/renderer/media/video_track_recorder_unittest.cc ('k') | media/muxers/webm_muxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698