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 |
11 #include "webrtc/base/checks.h" | 11 #include "webrtc/base/checks.h" |
12 #include "webrtc/engine_configurations.h" | 12 #include "webrtc/engine_configurations.h" |
13 #include "webrtc/modules/video_coding/main/source/encoded_frame.h" | 13 #include "webrtc/modules/video_coding/main/source/encoded_frame.h" |
14 #include "webrtc/modules/video_coding/main/source/generic_encoder.h" | 14 #include "webrtc/modules/video_coding/main/source/generic_encoder.h" |
15 #include "webrtc/modules/video_coding/main/source/media_optimization.h" | 15 #include "webrtc/modules/video_coding/main/source/media_optimization.h" |
16 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" | 16 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" |
17 #include "webrtc/system_wrappers/interface/logging.h" | 17 #include "webrtc/system_wrappers/interface/logging.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace { | 20 namespace { |
21 // Map information from info into rtp. If no relevant information is found | 21 // Map information from info into rtp. If no relevant information is found |
22 // in info, rtp is set to NULL. | 22 // in info, rtp is set to NULL. |
23 void CopyCodecSpecific(const CodecSpecificInfo* info, RTPVideoHeader* rtp) { | 23 void CopyCodecSpecific(const CodecSpecificInfo* info, RTPVideoHeader* rtp) { |
24 DCHECK(info); | 24 RTC_DCHECK(info); |
25 switch (info->codecType) { | 25 switch (info->codecType) { |
26 case kVideoCodecVP8: { | 26 case kVideoCodecVP8: { |
27 rtp->codec = kRtpVideoVp8; | 27 rtp->codec = kRtpVideoVp8; |
28 rtp->codecHeader.VP8.InitRTPVideoHeaderVP8(); | 28 rtp->codecHeader.VP8.InitRTPVideoHeaderVP8(); |
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; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } | 330 } |
331 | 331 |
332 void | 332 void |
333 VCMEncodedFrameCallback::SetMediaOpt( | 333 VCMEncodedFrameCallback::SetMediaOpt( |
334 media_optimization::MediaOptimization *mediaOpt) | 334 media_optimization::MediaOptimization *mediaOpt) |
335 { | 335 { |
336 _mediaOpt = mediaOpt; | 336 _mediaOpt = mediaOpt; |
337 } | 337 } |
338 | 338 |
339 } // namespace webrtc | 339 } // namespace webrtc |
OLD | NEW |