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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 RTC_DCHECK(!callback_); | 161 RTC_DCHECK(!callback_); |
162 callback_ = callback; | 162 callback_ = callback; |
163 return WEBRTC_VIDEO_CODEC_OK; | 163 return WEBRTC_VIDEO_CODEC_OK; |
164 } | 164 } |
165 | 165 |
166 int H264VideoToolboxDecoder::Release() { | 166 int H264VideoToolboxDecoder::Release() { |
167 callback_ = nullptr; | 167 callback_ = nullptr; |
168 return WEBRTC_VIDEO_CODEC_OK; | 168 return WEBRTC_VIDEO_CODEC_OK; |
169 } | 169 } |
170 | 170 |
171 int H264VideoToolboxDecoder::Reset() { | |
172 ResetDecompressionSession(); | |
173 return WEBRTC_VIDEO_CODEC_OK; | |
174 } | |
175 | |
176 int H264VideoToolboxDecoder::ResetDecompressionSession() { | 171 int H264VideoToolboxDecoder::ResetDecompressionSession() { |
177 DestroyDecompressionSession(); | 172 DestroyDecompressionSession(); |
178 | 173 |
179 // Need to wait for the first SPS to initialize decoder. | 174 // Need to wait for the first SPS to initialize decoder. |
180 if (!video_format_) { | 175 if (!video_format_) { |
181 return WEBRTC_VIDEO_CODEC_OK; | 176 return WEBRTC_VIDEO_CODEC_OK; |
182 } | 177 } |
183 | 178 |
184 // Set keys for OpenGL and IOSurface compatibilty, which makes the encoder | 179 // Set keys for OpenGL and IOSurface compatibilty, which makes the encoder |
185 // create pixel buffers with GPU backed memory. The intent here is to pass | 180 // create pixel buffers with GPU backed memory. The intent here is to pass |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 } | 256 } |
262 } | 257 } |
263 | 258 |
264 const char* H264VideoToolboxDecoder::ImplementationName() const { | 259 const char* H264VideoToolboxDecoder::ImplementationName() const { |
265 return "VideoToolbox"; | 260 return "VideoToolbox"; |
266 } | 261 } |
267 | 262 |
268 } // namespace webrtc | 263 } // namespace webrtc |
269 | 264 |
270 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) | 265 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) |
OLD | NEW |