| 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 new rtc::RefCountedObject<webrtc::WrappedI420Buffer>( | 953 new rtc::RefCountedObject<webrtc::WrappedI420Buffer>( |
| 954 img->d_w, img->d_h, img->planes[VPX_PLANE_Y], | 954 img->d_w, img->d_h, img->planes[VPX_PLANE_Y], |
| 955 img->stride[VPX_PLANE_Y], img->planes[VPX_PLANE_U], | 955 img->stride[VPX_PLANE_Y], img->planes[VPX_PLANE_U], |
| 956 img->stride[VPX_PLANE_U], img->planes[VPX_PLANE_V], | 956 img->stride[VPX_PLANE_U], img->planes[VPX_PLANE_V], |
| 957 img->stride[VPX_PLANE_V], | 957 img->stride[VPX_PLANE_V], |
| 958 // WrappedI420Buffer's mechanism for allowing the release of its frame | 958 // WrappedI420Buffer's mechanism for allowing the release of its frame |
| 959 // buffer is through a callback function. This is where we should | 959 // buffer is through a callback function. This is where we should |
| 960 // release |img_buffer|. | 960 // release |img_buffer|. |
| 961 rtc::KeepRefUntilDone(img_buffer))); | 961 rtc::KeepRefUntilDone(img_buffer))); |
| 962 | 962 |
| 963 VideoFrame decoded_image(img_wrapped_buffer, timestamp, | 963 VideoFrame decoded_image; |
| 964 0 /* render_time_ms */, webrtc::kVideoRotation_0); | 964 decoded_image.set_video_frame_buffer(img_wrapped_buffer); |
| 965 | 965 decoded_image.set_timestamp(timestamp); |
| 966 int ret = decode_complete_callback_->Decoded(decoded_image); | 966 int ret = decode_complete_callback_->Decoded(decoded_image); |
| 967 if (ret != 0) | 967 if (ret != 0) |
| 968 return ret; | 968 return ret; |
| 969 return WEBRTC_VIDEO_CODEC_OK; | 969 return WEBRTC_VIDEO_CODEC_OK; |
| 970 } | 970 } |
| 971 | 971 |
| 972 int VP9DecoderImpl::RegisterDecodeCompleteCallback( | 972 int VP9DecoderImpl::RegisterDecodeCompleteCallback( |
| 973 DecodedImageCallback* callback) { | 973 DecodedImageCallback* callback) { |
| 974 decode_complete_callback_ = callback; | 974 decode_complete_callback_ = callback; |
| 975 return WEBRTC_VIDEO_CODEC_OK; | 975 return WEBRTC_VIDEO_CODEC_OK; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 991 frame_buffer_pool_.ClearPool(); | 991 frame_buffer_pool_.ClearPool(); |
| 992 inited_ = false; | 992 inited_ = false; |
| 993 return WEBRTC_VIDEO_CODEC_OK; | 993 return WEBRTC_VIDEO_CODEC_OK; |
| 994 } | 994 } |
| 995 | 995 |
| 996 const char* VP9DecoderImpl::ImplementationName() const { | 996 const char* VP9DecoderImpl::ImplementationName() const { |
| 997 return "libvpx"; | 997 return "libvpx"; |
| 998 } | 998 } |
| 999 | 999 |
| 1000 } // namespace webrtc | 1000 } // namespace webrtc |
| OLD | NEW |