OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |