OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 info->codecSpecific.VP9.ss_data_available; | 47 info->codecSpecific.VP9.ss_data_available; |
48 rtp->codecHeader.VP9.picture_id = info->codecSpecific.VP9.picture_id; | 48 rtp->codecHeader.VP9.picture_id = info->codecSpecific.VP9.picture_id; |
49 rtp->codecHeader.VP9.tl0_pic_idx = info->codecSpecific.VP9.tl0_pic_idx; | 49 rtp->codecHeader.VP9.tl0_pic_idx = info->codecSpecific.VP9.tl0_pic_idx; |
50 rtp->codecHeader.VP9.temporal_idx = info->codecSpecific.VP9.temporal_idx; | 50 rtp->codecHeader.VP9.temporal_idx = info->codecSpecific.VP9.temporal_idx; |
51 rtp->codecHeader.VP9.spatial_idx = info->codecSpecific.VP9.spatial_idx; | 51 rtp->codecHeader.VP9.spatial_idx = info->codecSpecific.VP9.spatial_idx; |
52 rtp->codecHeader.VP9.temporal_up_switch = | 52 rtp->codecHeader.VP9.temporal_up_switch = |
53 info->codecSpecific.VP9.temporal_up_switch; | 53 info->codecSpecific.VP9.temporal_up_switch; |
54 rtp->codecHeader.VP9.inter_layer_predicted = | 54 rtp->codecHeader.VP9.inter_layer_predicted = |
55 info->codecSpecific.VP9.inter_layer_predicted; | 55 info->codecSpecific.VP9.inter_layer_predicted; |
56 rtp->codecHeader.VP9.gof_idx = info->codecSpecific.VP9.gof_idx; | 56 rtp->codecHeader.VP9.gof_idx = info->codecSpecific.VP9.gof_idx; |
57 | |
58 // Packetizer needs to know the number of spatial layers to correctly set | |
59 // the marker bit, even when the number won't be written in the packet. | |
60 rtp->codecHeader.VP9.num_spatial_layers = | 57 rtp->codecHeader.VP9.num_spatial_layers = |
61 info->codecSpecific.VP9.num_spatial_layers; | 58 info->codecSpecific.VP9.num_spatial_layers; |
| 59 |
62 if (info->codecSpecific.VP9.ss_data_available) { | 60 if (info->codecSpecific.VP9.ss_data_available) { |
63 rtp->codecHeader.VP9.spatial_layer_resolution_present = | 61 rtp->codecHeader.VP9.spatial_layer_resolution_present = |
64 info->codecSpecific.VP9.spatial_layer_resolution_present; | 62 info->codecSpecific.VP9.spatial_layer_resolution_present; |
65 if (info->codecSpecific.VP9.spatial_layer_resolution_present) { | 63 if (info->codecSpecific.VP9.spatial_layer_resolution_present) { |
66 for (size_t i = 0; i < info->codecSpecific.VP9.num_spatial_layers; | 64 for (size_t i = 0; i < info->codecSpecific.VP9.num_spatial_layers; |
67 ++i) { | 65 ++i) { |
68 rtp->codecHeader.VP9.width[i] = info->codecSpecific.VP9.width[i]; | 66 rtp->codecHeader.VP9.width[i] = info->codecSpecific.VP9.width[i]; |
69 rtp->codecHeader.VP9.height[i] = info->codecSpecific.VP9.height[i]; | 67 rtp->codecHeader.VP9.height[i] = info->codecSpecific.VP9.height[i]; |
70 } | 68 } |
71 } | 69 } |
72 rtp->codecHeader.VP9.gof.CopyGofInfoVP9(info->codecSpecific.VP9.gof); | 70 rtp->codecHeader.VP9.gof.CopyGofInfoVP9(info->codecSpecific.VP9.gof); |
73 } | 71 } |
| 72 |
| 73 rtp->codecHeader.VP9.num_ref_pics = info->codecSpecific.VP9.num_ref_pics; |
| 74 for (int i = 0; i < info->codecSpecific.VP9.num_ref_pics; ++i) |
| 75 rtp->codecHeader.VP9.pid_diff[i] = info->codecSpecific.VP9.p_diff[i]; |
74 return; | 76 return; |
75 } | 77 } |
76 case kVideoCodecH264: | 78 case kVideoCodecH264: |
77 rtp->codec = kRtpVideoH264; | 79 rtp->codec = kRtpVideoH264; |
78 return; | 80 return; |
79 case kVideoCodecGeneric: | 81 case kVideoCodecGeneric: |
80 rtp->codec = kRtpVideoGeneric; | 82 rtp->codec = kRtpVideoGeneric; |
81 rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx; | 83 rtp->simulcastIdx = info->codecSpecific.generic.simulcast_idx; |
82 return; | 84 return; |
83 default: | 85 default: |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 291 } |
290 | 292 |
291 void | 293 void |
292 VCMEncodedFrameCallback::SetMediaOpt( | 294 VCMEncodedFrameCallback::SetMediaOpt( |
293 media_optimization::MediaOptimization *mediaOpt) | 295 media_optimization::MediaOptimization *mediaOpt) |
294 { | 296 { |
295 _mediaOpt = mediaOpt; | 297 _mediaOpt = mediaOpt; |
296 } | 298 } |
297 | 299 |
298 } // namespace webrtc | 300 } // namespace webrtc |
OLD | NEW |