Chromium Code Reviews| Index: media/muxers/webm_muxer.h |
| diff --git a/media/muxers/webm_muxer.h b/media/muxers/webm_muxer.h |
| index afd8176b4fe2c36d9c2e2220a5fa984d7fd67765..ec13cd675f47740cd5d254a1ee78bc65af6b4f22 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 frame_size; |
|
mcasas
2017/01/06 01:04:55
nit: s/frame_size/visible_rect_size/ to
preserve t
emircan
2017/01/06 01:19:13
Done.
|
| + 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); |