Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc

Issue 1690193003: Remove Reset from conditionally-compiled decoders. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698