Chromium Code Reviews

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Set EncodedImage content_type from vie_encoder Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index 8407451bd4d7658595c28acba9ec04bcb7d1c997..e34304ea0d1dbd937bc0f87db4fb039c91f33047 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -156,13 +156,10 @@ int H264DecoderImpl::AVGetBuffer2(
// TODO(nisse): The VideoFrame's timestamp and rotation info is not used.
// Refactor to do not use a VideoFrame object at all.
av_frame->buf[0] = av_buffer_create(
- av_frame->data[kYPlaneIndex],
- total_size,
- AVFreeBuffer2,
- static_cast<void*>(new VideoFrame(frame_buffer,
- 0 /* timestamp */,
- 0 /* render_time_ms */,
- kVideoRotation_0)),
+ av_frame->data[kYPlaneIndex], total_size, AVFreeBuffer2,
+ static_cast<void*>(new VideoFrame(
+ frame_buffer, 0 /* timestamp */, 0 /* render_time_ms */,
+ kVideoRotation_0, kVideoContent_Default)),
0);
RTC_CHECK(av_frame->buf[0]);
return 0;
@@ -380,7 +377,7 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
rtc::KeepRefUntilDone(buf)));
VideoFrame cropped_frame(
cropped_buf, video_frame->timestamp(), video_frame->render_time_ms(),
- video_frame->rotation());
+ video_frame->rotation(), video_frame->content_type());
// TODO(nisse): Timestamp and rotation are all zero here. Change decoder
// interface to pass a VideoFrameBuffer instead of a VideoFrame?
decoded_image_callback_->Decoded(cropped_frame, rtc::Optional<int32_t>(),

Powered by Google App Engine