| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific, | 478 void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific, |
| 479 const vpx_codec_cx_pkt& pkt, | 479 const vpx_codec_cx_pkt& pkt, |
| 480 uint32_t timestamp) { | 480 uint32_t timestamp) { |
| 481 assert(codec_specific != NULL); | 481 assert(codec_specific != NULL); |
| 482 codec_specific->codecType = kVideoCodecVP9; | 482 codec_specific->codecType = kVideoCodecVP9; |
| 483 CodecSpecificInfoVP9 *vp9_info = &(codec_specific->codecSpecific.VP9); | 483 CodecSpecificInfoVP9 *vp9_info = &(codec_specific->codecSpecific.VP9); |
| 484 // TODO(asapersson): Set correct values. | 484 // TODO(asapersson): Set correct values. |
| 485 vp9_info->inter_pic_predicted = | 485 vp9_info->inter_pic_predicted = |
| 486 (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? false : true; | 486 (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? false : true; |
| 487 vp9_info->flexible_mode = codec_.codecSpecific.VP9.flexibleMode; | 487 vp9_info->flexible_mode = codec_.codecSpecific.VP9.flexibleMode; |
| 488 vp9_info->ss_data_available = | 488 vp9_info->ss_data_available = ((pkt.data.frame.flags & VPX_FRAME_IS_KEY) && |
| 489 (pkt.data.frame.flags & VPX_FRAME_IS_KEY) ? true : false; | 489 !codec_.codecSpecific.VP9.flexibleMode) |
| 490 ? true |
| 491 : false; |
| 490 if (pkt.data.frame.flags & VPX_FRAME_IS_KEY) { | 492 if (pkt.data.frame.flags & VPX_FRAME_IS_KEY) { |
| 491 gof_idx_ = 0; | 493 gof_idx_ = 0; |
| 492 } | 494 } |
| 493 | 495 |
| 494 vpx_svc_layer_id_t layer_id = {0}; | 496 vpx_svc_layer_id_t layer_id = {0}; |
| 495 vpx_codec_control(encoder_, VP9E_GET_SVC_LAYER_ID, &layer_id); | 497 vpx_codec_control(encoder_, VP9E_GET_SVC_LAYER_ID, &layer_id); |
| 496 | 498 |
| 497 assert(num_temporal_layers_ > 0); | 499 assert(num_temporal_layers_ > 0); |
| 498 assert(num_spatial_layers_ > 0); | 500 assert(num_spatial_layers_ > 0); |
| 499 if (num_temporal_layers_ == 1) { | 501 if (num_temporal_layers_ == 1) { |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 decoder_ = NULL; | 776 decoder_ = NULL; |
| 775 } | 777 } |
| 776 // Releases buffers from the pool. Any buffers not in use are deleted. Buffers | 778 // Releases buffers from the pool. Any buffers not in use are deleted. Buffers |
| 777 // still referenced externally are deleted once fully released, not returning | 779 // still referenced externally are deleted once fully released, not returning |
| 778 // to the pool. | 780 // to the pool. |
| 779 frame_buffer_pool_.ClearPool(); | 781 frame_buffer_pool_.ClearPool(); |
| 780 inited_ = false; | 782 inited_ = false; |
| 781 return WEBRTC_VIDEO_CODEC_OK; | 783 return WEBRTC_VIDEO_CODEC_OK; |
| 782 } | 784 } |
| 783 } // namespace webrtc | 785 } // namespace webrtc |
| OLD | NEW |