OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 CMTime duration) { | 57 CMTime duration) { |
58 std::unique_ptr<FrameDecodeParams> decode_params( | 58 std::unique_ptr<FrameDecodeParams> decode_params( |
59 reinterpret_cast<FrameDecodeParams*>(params)); | 59 reinterpret_cast<FrameDecodeParams*>(params)); |
60 if (status != noErr) { | 60 if (status != noErr) { |
61 LOG(LS_ERROR) << "Failed to decode frame. Status: " << status; | 61 LOG(LS_ERROR) << "Failed to decode frame. Status: " << status; |
62 return; | 62 return; |
63 } | 63 } |
64 // TODO(tkchin): Handle CVO properly. | 64 // TODO(tkchin): Handle CVO properly. |
65 rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer = | 65 rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer = |
66 new rtc::RefCountedObject<webrtc::CoreVideoFrameBuffer>(image_buffer); | 66 new rtc::RefCountedObject<webrtc::CoreVideoFrameBuffer>(image_buffer); |
67 webrtc::VideoFrame decoded_frame(buffer, decode_params->timestamp, | 67 webrtc::VideoFrame decoded_frame( |
68 CMTimeGetSeconds(timestamp) * kMsPerSec, | 68 buffer, decode_params->timestamp, CMTimeGetSeconds(timestamp) * kMsPerSec, |
69 webrtc::kVideoRotation_0); | 69 webrtc::kVideoRotation_0, webrtc::kVideoContent_Default); |
70 decode_params->callback->Decoded(decoded_frame); | 70 decode_params->callback->Decoded(decoded_frame); |
71 } | 71 } |
72 | 72 |
73 } // namespace internal | 73 } // namespace internal |
74 | 74 |
75 namespace webrtc { | 75 namespace webrtc { |
76 | 76 |
77 H264VideoToolboxDecoder::H264VideoToolboxDecoder() | 77 H264VideoToolboxDecoder::H264VideoToolboxDecoder() |
78 : callback_(nullptr), | 78 : callback_(nullptr), |
79 video_format_(nullptr), | 79 video_format_(nullptr), |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 if (video_format_) { | 269 if (video_format_) { |
270 CFRetain(video_format_); | 270 CFRetain(video_format_); |
271 } | 271 } |
272 } | 272 } |
273 | 273 |
274 const char* H264VideoToolboxDecoder::ImplementationName() const { | 274 const char* H264VideoToolboxDecoder::ImplementationName() const { |
275 return "VideoToolbox"; | 275 return "VideoToolbox"; |
276 } | 276 } |
277 | 277 |
278 } // namespace webrtc | 278 } // namespace webrtc |
OLD | NEW |