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

Side by Side Diff: webrtc/modules/video_coding/main/source/generic_encoder.cc

Issue 1211353002: Integration of VP9 packetization. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 18 matching lines...) Expand all
29 rtp->codecHeader.VP8.pictureId = info->codecSpecific.VP8.pictureId; 29 rtp->codecHeader.VP8.pictureId = info->codecSpecific.VP8.pictureId;
30 rtp->codecHeader.VP8.nonReference = 30 rtp->codecHeader.VP8.nonReference =
31 info->codecSpecific.VP8.nonReference; 31 info->codecSpecific.VP8.nonReference;
32 rtp->codecHeader.VP8.temporalIdx = info->codecSpecific.VP8.temporalIdx; 32 rtp->codecHeader.VP8.temporalIdx = info->codecSpecific.VP8.temporalIdx;
33 rtp->codecHeader.VP8.layerSync = info->codecSpecific.VP8.layerSync; 33 rtp->codecHeader.VP8.layerSync = info->codecSpecific.VP8.layerSync;
34 rtp->codecHeader.VP8.tl0PicIdx = info->codecSpecific.VP8.tl0PicIdx; 34 rtp->codecHeader.VP8.tl0PicIdx = info->codecSpecific.VP8.tl0PicIdx;
35 rtp->codecHeader.VP8.keyIdx = info->codecSpecific.VP8.keyIdx; 35 rtp->codecHeader.VP8.keyIdx = info->codecSpecific.VP8.keyIdx;
36 rtp->simulcastIdx = info->codecSpecific.VP8.simulcastIdx; 36 rtp->simulcastIdx = info->codecSpecific.VP8.simulcastIdx;
37 return; 37 return;
38 } 38 }
39 case kVideoCodecVP9: {
40 rtp->codec = kRtpVideoVp9;
41 rtp->codecHeader.VP9.InitRTPVideoHeaderVP9();
42 rtp->codecHeader.VP9.inter_pic_predicted =
43 info->codecSpecific.VP9.inter_pic_predicted;
44 rtp->codecHeader.VP9.flexible_mode =
45 info->codecSpecific.VP9.flexible_mode;
46 rtp->codecHeader.VP9.beginning_of_frame =
47 info->codecSpecific.VP9.beginning_of_frame;
48 rtp->codecHeader.VP9.end_of_frame = info->codecSpecific.VP9.end_of_frame;
49 rtp->codecHeader.VP9.ss_data_available =
50 info->codecSpecific.VP9.ss_data_available;
51 rtp->codecHeader.VP9.picture_id = info->codecSpecific.VP9.picture_id;
52 rtp->codecHeader.VP9.tl0_pic_idx = info->codecSpecific.VP9.tl0_pic_idx;
53 rtp->codecHeader.VP9.temporal_idx = info->codecSpecific.VP9.temporal_idx;
54 rtp->codecHeader.VP9.spatial_idx = info->codecSpecific.VP9.spatial_idx;
55 rtp->codecHeader.VP9.temporal_up_switch =
56 info->codecSpecific.VP9.temporal_up_switch;
57 rtp->codecHeader.VP9.inter_layer_predicted =
58 info->codecSpecific.VP9.inter_layer_predicted;
59 rtp->codecHeader.VP9.gof_idx = info->codecSpecific.VP9.gof_idx;
60
61 if (info->codecSpecific.VP9.ss_data_available) {
62 rtp->codecHeader.VP9.num_spatial_layers =
63 info->codecSpecific.VP9.num_spatial_layers;
64 rtp->codecHeader.VP9.spatial_layer_resolution_present =
65 info->codecSpecific.VP9.spatial_layer_resolution_present;
66 if (info->codecSpecific.VP9.spatial_layer_resolution_present) {
67 for (size_t i = 0; i < info->codecSpecific.VP9.num_spatial_layers;
68 ++i) {
69 rtp->codecHeader.VP9.width[i] = info->codecSpecific.VP9.width[i];
70 rtp->codecHeader.VP9.height[i] = info->codecSpecific.VP9.height[i];
71 }
72 }
73 rtp->codecHeader.VP9.gof.CopyGofInfoVP9(info->codecSpecific.VP9.gof);
74 }
75 return;
76 }
39 case kVideoCodecH264: 77 case kVideoCodecH264:
40 rtp->codec = kRtpVideoH264; 78 rtp->codec = kRtpVideoH264;
41 return; 79 return;
42 case kVideoCodecGeneric: 80 case kVideoCodecGeneric:
43 rtp->codec = kRtpVideoGeneric; 81 rtp->codec = kRtpVideoGeneric;
44 rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx; 82 rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx;
45 return; 83 return;
46 default: 84 default:
47 return; 85 return;
48 } 86 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 331 }
294 332
295 void 333 void
296 VCMEncodedFrameCallback::SetMediaOpt( 334 VCMEncodedFrameCallback::SetMediaOpt(
297 media_optimization::MediaOptimization *mediaOpt) 335 media_optimization::MediaOptimization *mediaOpt)
298 { 336 {
299 _mediaOpt = mediaOpt; 337 _mediaOpt = mediaOpt;
300 } 338 }
301 339
302 } // namespace webrtc 340 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698