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

Unified Diff: media/muxers/webm_muxer.h

Issue 2691373005: Support alpha channel recording for VPX in MediaRecorder (Closed)
Patch Set: Created 3 years, 9 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_recorder/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 e8ac3a4a855b38d501fd59e438d5eda01d23b9c4..70668909563edb1a12f1ee6255672772773ac17d 100644
--- a/media/muxers/webm_muxer.h
+++ b/media/muxers/webm_muxer.h
@@ -67,8 +67,11 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// Functions to add video and audio frames with |encoded_data.data()|
// to WebM Segment. Either one returns true on success.
+ // |encoded_alpha| represents the encode output of alpha channel when
+ // available, can be nullptr otherwise.
bool OnEncodedVideo(const VideoParameters& params,
std::unique_ptr<std::string> encoded_data,
+ std::unique_ptr<std::string> encoded_alpha,
base::TimeTicks timestamp,
bool is_key_frame);
bool OnEncodedAudio(const media::AudioParameters& params,
@@ -101,6 +104,7 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// Helper to simplify saving frames. Returns true on success.
bool AddFrame(std::unique_ptr<std::string> encoded_data,
+ std::unique_ptr<std::string> encoded_alpha_data,
uint8_t track_index,
base::TimeDelta timestamp,
bool is_key_frame);
@@ -145,11 +149,13 @@ class MEDIA_EXPORT WebmMuxer : public NON_EXPORTED_BASE(mkvmuxer::IMkvWriter) {
// received, if expected, since WebM headers can only be written once.
struct EncodedVideoFrame {
EncodedVideoFrame(std::unique_ptr<std::string> data,
+ std::unique_ptr<std::string> alpha_data,
base::TimeTicks timestamp,
bool is_keyframe);
~EncodedVideoFrame();
std::unique_ptr<std::string> data;
+ std::unique_ptr<std::string> alpha_data;
base::TimeTicks timestamp;
bool is_keyframe;
« no previous file with comments | « content/renderer/media_recorder/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