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

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

Issue 418193003: Using PROFILE_ANY for vp8 and vp9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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
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/rtc_video_decoder.h" 5 #include "content/renderer/media/rtc_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // static 112 // static
113 scoped_ptr<RTCVideoDecoder> RTCVideoDecoder::Create( 113 scoped_ptr<RTCVideoDecoder> RTCVideoDecoder::Create(
114 webrtc::VideoCodecType type, 114 webrtc::VideoCodecType type,
115 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories) { 115 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories) {
116 scoped_ptr<RTCVideoDecoder> decoder; 116 scoped_ptr<RTCVideoDecoder> decoder;
117 // Convert WebRTC codec type to media codec profile. 117 // Convert WebRTC codec type to media codec profile.
118 media::VideoCodecProfile profile; 118 media::VideoCodecProfile profile;
119 switch (type) { 119 switch (type) {
120 case webrtc::kVideoCodecVP8: 120 case webrtc::kVideoCodecVP8:
121 profile = media::VP8PROFILE_MAIN; 121 profile = media::VP8PROFILE_ANY;
122 break; 122 break;
123 default: 123 default:
124 DVLOG(2) << "Video codec not supported:" << type; 124 DVLOG(2) << "Video codec not supported:" << type;
125 return decoder.Pass(); 125 return decoder.Pass();
126 } 126 }
127 127
128 base::WaitableEvent waiter(true, false); 128 base::WaitableEvent waiter(true, false);
129 decoder.reset(new RTCVideoDecoder(factories)); 129 decoder.reset(new RTCVideoDecoder(factories));
130 decoder->factories_->GetTaskRunner()->PostTask( 130 decoder->factories_->GetTaskRunner()->PostTask(
131 FROM_HERE, 131 FROM_HERE,
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeSuccess", sample); 801 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeSuccess", sample);
802 return status; 802 return status;
803 } 803 }
804 804
805 void RTCVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 805 void RTCVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
806 const { 806 const {
807 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 807 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
808 } 808 }
809 809
810 } // namespace content 810 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/v4l2_video_encode_accelerator.cc ('k') | content/renderer/media/rtc_video_encoder_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698