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

Side by Side Diff: content/renderer/media/gpu/rtc_video_decoder.cc

Issue 2757913002: Remove feedback mode from RTCVideoDecoder. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | content/renderer/media/gpu/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/gpu/rtc_video_decoder.h" 5 #include "content/renderer/media/gpu/rtc_video_decoder.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // static 142 // static
143 void RTCVideoDecoder::Destroy(webrtc::VideoDecoder* decoder, 143 void RTCVideoDecoder::Destroy(webrtc::VideoDecoder* decoder,
144 media::GpuVideoAcceleratorFactories* factories) { 144 media::GpuVideoAcceleratorFactories* factories) {
145 factories->GetTaskRunner()->DeleteSoon(FROM_HERE, decoder); 145 factories->GetTaskRunner()->DeleteSoon(FROM_HERE, decoder);
146 } 146 }
147 147
148 int32_t RTCVideoDecoder::InitDecode(const webrtc::VideoCodec* codecSettings, 148 int32_t RTCVideoDecoder::InitDecode(const webrtc::VideoCodec* codecSettings,
149 int32_t /*numberOfCores*/) { 149 int32_t /*numberOfCores*/) {
150 DVLOG(2) << "InitDecode"; 150 DVLOG(2) << "InitDecode";
151 DCHECK_EQ(video_codec_type_, codecSettings->codecType); 151 DCHECK_EQ(video_codec_type_, codecSettings->codecType);
152 if (codecSettings->codecType == webrtc::kVideoCodecVP8 &&
153 codecSettings->VP8().feedbackModeOn) {
154 LOG(ERROR) << "Feedback mode not supported";
155 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_ERROR);
156 }
157 152
158 base::AutoLock auto_lock(lock_); 153 base::AutoLock auto_lock(lock_);
159 if (state_ == UNINITIALIZED || state_ == DECODE_ERROR) { 154 if (state_ == UNINITIALIZED || state_ == DECODE_ERROR) {
160 LOG(ERROR) << "VDA is not initialized. state=" << state_; 155 LOG(ERROR) << "VDA is not initialized. state=" << state_;
161 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_UNINITIALIZED); 156 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_UNINITIALIZED);
162 } 157 }
163 158
164 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_OK); 159 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_OK);
165 } 160 }
166 161
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 } 891 }
897 892
898 void RTCVideoDecoder::ClearPendingBuffers() { 893 void RTCVideoDecoder::ClearPendingBuffers() {
899 // Delete WebRTC input buffers. 894 // Delete WebRTC input buffers.
900 for (const auto& pending_buffer : pending_buffers_) 895 for (const auto& pending_buffer : pending_buffers_)
901 delete[] pending_buffer.first._buffer; 896 delete[] pending_buffer.first._buffer;
902 pending_buffers_.clear(); 897 pending_buffers_.clear();
903 } 898 }
904 899
905 } // namespace content 900 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/gpu/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698