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

Unified Diff: remoting/protocol/webrtc_dummy_video_encoder.cc

Issue 2837583004: [Remoting Host] Add more codec spec information for VP9 (Closed)
Patch Set: Fix Feedback Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_dummy_video_encoder.cc
diff --git a/remoting/protocol/webrtc_dummy_video_encoder.cc b/remoting/protocol/webrtc_dummy_video_encoder.cc
index 89626f237184d877d70d6df72b957607c1d964c4..184ea930822ae4b3a4ed44fdf20e0418d755d9a0 100644
--- a/remoting/protocol/webrtc_dummy_video_encoder.cc
+++ b/remoting/protocol/webrtc_dummy_video_encoder.cc
@@ -128,17 +128,28 @@ webrtc::EncodedImageCallback::Result WebrtcDummyVideoEncoder::SendEncodedFrame(
codec_specific_info.codecType = codec_type_;
if (codec_type_ == webrtc::kVideoCodecVP8) {
- codec_specific_info.codecSpecific.VP8.simulcastIdx = 0;
- codec_specific_info.codecSpecific.VP8.temporalIdx = webrtc::kNoTemporalIdx;
- codec_specific_info.codecSpecific.VP8.tl0PicIdx = webrtc::kNoTl0PicIdx;
- codec_specific_info.codecSpecific.VP8.pictureId = webrtc::kNoPictureId;
+ webrtc::CodecSpecificInfoVP8* vp8_info =
+ &codec_specific_info.codecSpecific.VP8;
+ vp8_info->simulcastIdx = 0;
+ vp8_info->temporalIdx = webrtc::kNoTemporalIdx;
+ vp8_info->tl0PicIdx = webrtc::kNoTl0PicIdx;
+ vp8_info->pictureId = webrtc::kNoPictureId;
} else if (codec_type_ == webrtc::kVideoCodecVP9) {
- codec_specific_info.codecSpecific.generic.simulcast_idx = 0;
- codec_specific_info.codecSpecific.VP9.gof_idx = webrtc::kNoGofIdx;
- codec_specific_info.codecSpecific.VP9.temporal_idx = webrtc::kNoTemporalIdx;
- codec_specific_info.codecSpecific.VP9.spatial_idx = webrtc::kNoSpatialIdx;
- codec_specific_info.codecSpecific.VP9.tl0_pic_idx = webrtc::kNoTl0PicIdx;
- codec_specific_info.codecSpecific.VP9.picture_id = webrtc::kNoPictureId;
+ webrtc::CodecSpecificInfoVP9* vp9_info =
+ &codec_specific_info.codecSpecific.VP9;
+ vp9_info->inter_pic_predicted = !frame.key_frame;
+ vp9_info->ss_data_available = frame.key_frame;
+ vp9_info->spatial_layer_resolution_present = frame.key_frame;
+ if (frame.key_frame) {
+ vp9_info->width[0] = frame.size.width();
+ vp9_info->height[0] = frame.size.height();
+ }
+ vp9_info->num_spatial_layers = 1;
+ vp9_info->gof_idx = webrtc::kNoGofIdx;
+ vp9_info->temporal_idx = webrtc::kNoTemporalIdx;
+ vp9_info->spatial_idx = webrtc::kNoSpatialIdx;
+ vp9_info->tl0_pic_idx = webrtc::kNoTl0PicIdx;
+ vp9_info->picture_id = webrtc::kNoPictureId;
} else {
NOTREACHED();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698