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

Unified Diff: media/base/video_frame.cc

Issue 1752243002: Modifying video_frame.cc to copy all metadata values, instead of only END_OF_STREAM, and updating u… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | media/base/video_frame_unittest.cc » ('j') | media/base/video_frame_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 4dedd82d10b20633d091bd24aebd31b203c32719..a1c88a781626f901bd1eb84015bf914fe7421982 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -516,10 +516,11 @@ scoped_refptr<VideoFrame> VideoFrame::WrapVideoFrame(
scoped_refptr<VideoFrame> wrapping_frame(new VideoFrame(
frame->format(), frame->storage_type(), frame->coded_size(), visible_rect,
natural_size, frame->timestamp()));
- if (frame->metadata()->IsTrue(VideoFrameMetadata::END_OF_STREAM)) {
- wrapping_frame->metadata()->SetBoolean(VideoFrameMetadata::END_OF_STREAM,
- true);
- }
+
+ // Copy all metada to the wrapped frame
watk 2016/03/02 21:25:16 s/metada/metadata Full stop/period at the end of
tguilbert 2016/03/03 21:42:04 Done.
+ base::DictionaryValue temp_metadata_values;
+ frame->metadata()->MergeInternalValuesInto(&temp_metadata_values);
+ wrapping_frame->metadata()->MergeInternalValuesFrom(temp_metadata_values);
watk 2016/03/02 21:25:16 WDYT about adding a VideoFrameMetadata::MergeMetad
tguilbert 2016/03/03 21:42:04 I am fine with the idea. Should I pro-actively mod
watk 2016/03/03 22:54:33 Nice, I think a follow up CL to clean those up mak
for (size_t i = 0; i < NumPlanes(frame->format()); ++i) {
wrapping_frame->strides_[i] = frame->stride(i);
« no previous file with comments | « no previous file | media/base/video_frame_unittest.cc » ('j') | media/base/video_frame_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698