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

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

Issue 2449353003: Stop using webrtc::VideoCodec.codecSpecific (Closed)
Patch Set: Created 4 years, 1 month 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
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void RTCVideoDecoder::Destroy(webrtc::VideoDecoder* decoder, 140 void RTCVideoDecoder::Destroy(webrtc::VideoDecoder* decoder,
141 media::GpuVideoAcceleratorFactories* factories) { 141 media::GpuVideoAcceleratorFactories* factories) {
142 factories->GetTaskRunner()->DeleteSoon(FROM_HERE, decoder); 142 factories->GetTaskRunner()->DeleteSoon(FROM_HERE, decoder);
143 } 143 }
144 144
145 int32_t RTCVideoDecoder::InitDecode(const webrtc::VideoCodec* codecSettings, 145 int32_t RTCVideoDecoder::InitDecode(const webrtc::VideoCodec* codecSettings,
146 int32_t /*numberOfCores*/) { 146 int32_t /*numberOfCores*/) {
147 DVLOG(2) << "InitDecode"; 147 DVLOG(2) << "InitDecode";
148 DCHECK_EQ(video_codec_type_, codecSettings->codecType); 148 DCHECK_EQ(video_codec_type_, codecSettings->codecType);
149 if (codecSettings->codecType == webrtc::kVideoCodecVP8 && 149 if (codecSettings->codecType == webrtc::kVideoCodecVP8 &&
150 codecSettings->codecSpecific.VP8.feedbackModeOn) { 150 codecSettings->VP8().feedbackModeOn) {
151 LOG(ERROR) << "Feedback mode not supported"; 151 LOG(ERROR) << "Feedback mode not supported";
152 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_ERROR); 152 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_ERROR);
153 } 153 }
154 154
155 base::AutoLock auto_lock(lock_); 155 base::AutoLock auto_lock(lock_);
156 if (state_ == UNINITIALIZED || state_ == DECODE_ERROR) { 156 if (state_ == UNINITIALIZED || state_ == DECODE_ERROR) {
157 LOG(ERROR) << "VDA is not initialized. state=" << state_; 157 LOG(ERROR) << "VDA is not initialized. state=" << state_;
158 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_UNINITIALIZED); 158 return RecordInitDecodeUMA(WEBRTC_VIDEO_CODEC_UNINITIALIZED);
159 } 159 }
160 160
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 } 886 }
887 887
888 void RTCVideoDecoder::ClearPendingBuffers() { 888 void RTCVideoDecoder::ClearPendingBuffers() {
889 // Delete WebRTC input buffers. 889 // Delete WebRTC input buffers.
890 for (const auto& pending_buffer : pending_buffers_) 890 for (const auto& pending_buffer : pending_buffers_)
891 delete[] pending_buffer.first._buffer; 891 delete[] pending_buffer.first._buffer;
892 pending_buffers_.clear(); 892 pending_buffers_.clear();
893 } 893 }
894 894
895 } // namespace content 895 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698