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

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: set ss data if not 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.ss_data_available =
47 info->codecSpecific.VP9.ss_data_available;
48 rtp->codecHeader.VP9.picture_id = info->codecSpecific.VP9.picture_id;
49 rtp->codecHeader.VP9.tl0_pic_idx = info->codecSpecific.VP9.tl0_pic_idx;
50 rtp->codecHeader.VP9.temporal_idx = info->codecSpecific.VP9.temporal_idx;
51 rtp->codecHeader.VP9.spatial_idx = info->codecSpecific.VP9.spatial_idx;
52 rtp->codecHeader.VP9.temporal_up_switch =
53 info->codecSpecific.VP9.temporal_up_switch;
54 rtp->codecHeader.VP9.inter_layer_predicted =
55 info->codecSpecific.VP9.inter_layer_predicted;
56 rtp->codecHeader.VP9.gof_idx = info->codecSpecific.VP9.gof_idx;
57
58 if (info->codecSpecific.VP9.ss_data_available) {
59 rtp->codecHeader.VP9.num_spatial_layers =
60 info->codecSpecific.VP9.num_spatial_layers;
61 rtp->codecHeader.VP9.spatial_layer_resolution_present =
62 info->codecSpecific.VP9.spatial_layer_resolution_present;
63 if (info->codecSpecific.VP9.spatial_layer_resolution_present) {
64 for (size_t i = 0; i < info->codecSpecific.VP9.num_spatial_layers;
65 ++i) {
66 rtp->codecHeader.VP9.width[i] = info->codecSpecific.VP9.width[i];
67 rtp->codecHeader.VP9.height[i] = info->codecSpecific.VP9.height[i];
68 }
69 }
70 rtp->codecHeader.VP9.gof.CopyGofInfoVP9(info->codecSpecific.VP9.gof);
71 }
72 return;
73 }
39 case kVideoCodecH264: 74 case kVideoCodecH264:
40 rtp->codec = kRtpVideoH264; 75 rtp->codec = kRtpVideoH264;
41 return; 76 return;
42 case kVideoCodecGeneric: 77 case kVideoCodecGeneric:
43 rtp->codec = kRtpVideoGeneric; 78 rtp->codec = kRtpVideoGeneric;
44 rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx; 79 rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx;
45 return; 80 return;
46 default: 81 default:
47 return; 82 return;
48 } 83 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 328 }
294 329
295 void 330 void
296 VCMEncodedFrameCallback::SetMediaOpt( 331 VCMEncodedFrameCallback::SetMediaOpt(
297 media_optimization::MediaOptimization *mediaOpt) 332 media_optimization::MediaOptimization *mediaOpt)
298 { 333 {
299 _mediaOpt = mediaOpt; 334 _mediaOpt = mediaOpt;
300 } 335 }
301 336
302 } // namespace webrtc 337 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/source/encoded_frame.cc ('k') | webrtc/modules/video_coding/main/source/jitter_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698