| 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 */ |
| 11 | 11 |
| 12 #include "webrtc/modules/video_coding/codecs/vp9/vp9_impl.h" | 12 #include "webrtc/modules/video_coding/codecs/vp9/vp9_impl.h" |
| 13 | 13 |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 #include <string.h> | 15 #include <string.h> |
| 16 #include <time.h> | 16 #include <time.h> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "vpx/vpx_encoder.h" | 19 #include "vpx/vpx_encoder.h" |
| 20 #include "vpx/vpx_decoder.h" | 20 #include "vpx/vpx_decoder.h" |
| 21 #include "vpx/vp8cx.h" | 21 #include "vpx/vp8cx.h" |
| 22 #include "vpx/vp8dx.h" | 22 #include "vpx/vp8dx.h" |
| 23 | 23 |
| 24 #include "webrtc/base/bind.h" | 24 #include "webrtc/base/bind.h" |
| 25 #include "webrtc/base/checks.h" | 25 #include "webrtc/base/checks.h" |
| 26 #include "webrtc/base/trace_event.h" | 26 #include "webrtc/base/trace_event.h" |
| 27 #include "webrtc/common.h" | 27 #include "webrtc/common.h" |
| 28 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 28 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 29 #include "webrtc/modules/interface/module_common_types.h" | 29 #include "webrtc/modules/include/module_common_types.h" |
| 30 #include "webrtc/system_wrappers/include/logging.h" | 30 #include "webrtc/system_wrappers/include/logging.h" |
| 31 #include "webrtc/system_wrappers/include/tick_util.h" | 31 #include "webrtc/system_wrappers/include/tick_util.h" |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 // VP9DecoderImpl::ReturnFrame helper function used with WrappedI420Buffer. | 35 // VP9DecoderImpl::ReturnFrame helper function used with WrappedI420Buffer. |
| 36 static void WrappedI420BufferNoLongerUsedCb( | 36 static void WrappedI420BufferNoLongerUsedCb( |
| 37 webrtc::Vp9FrameBufferPool::Vp9FrameBuffer* img_buffer) { | 37 webrtc::Vp9FrameBufferPool::Vp9FrameBuffer* img_buffer) { |
| 38 img_buffer->Release(); | 38 img_buffer->Release(); |
| 39 } | 39 } |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 decoder_ = NULL; | 815 decoder_ = NULL; |
| 816 } | 816 } |
| 817 // Releases buffers from the pool. Any buffers not in use are deleted. Buffers | 817 // Releases buffers from the pool. Any buffers not in use are deleted. Buffers |
| 818 // still referenced externally are deleted once fully released, not returning | 818 // still referenced externally are deleted once fully released, not returning |
| 819 // to the pool. | 819 // to the pool. |
| 820 frame_buffer_pool_.ClearPool(); | 820 frame_buffer_pool_.ClearPool(); |
| 821 inited_ = false; | 821 inited_ = false; |
| 822 return WEBRTC_VIDEO_CODEC_OK; | 822 return WEBRTC_VIDEO_CODEC_OK; |
| 823 } | 823 } |
| 824 } // namespace webrtc | 824 } // namespace webrtc |
| OLD | NEW |