OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/renderer/media/rtc_video_decoder_factory.h" | |
6 | |
7 #include "content/renderer/media/rtc_video_decoder.h" | |
8 | |
9 namespace content { | |
10 | |
11 RTCVideoDecoderFactory::RTCVideoDecoderFactory( | |
12 const scoped_refptr<base::MessageLoopProxy>& decoder_message_loop, | |
13 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories) | |
14 : decoder_message_loop_(decoder_message_loop), | |
15 gpu_factories_(gpu_factories) { | |
16 } | |
17 | |
18 webrtc::VideoDecoder* RTCVideoDecoderFactory::CreateVideoDecoder( | |
19 webrtc::VideoCodecType type) { | |
20 if (type == webrtc::kVideoCodecVP8) { | |
Pawel Osciak
2013/05/15 17:26:32
Is there a chance this could be moved to actual de
wuchengli
2013/05/16 16:05:45
From my understanding of the code, I think CreateV
wuchengli
2013/05/23 16:50:47
The decision is moved to actual decoder now.
| |
21 media::VideoDecoder* gpu_video_decoder = | |
22 new media::GpuVideoDecoder(decoder_message_loop_, gpu_factories_); | |
23 return new RTCVideoDecoder(gpu_video_decoder, decoder_message_loop_); | |
24 } | |
25 return NULL; | |
26 } | |
27 | |
28 void RTCVideoDecoderFactory::DestroyVideoDecoder( | |
29 webrtc::VideoDecoder* decoder) { | |
30 delete decoder; | |
31 } | |
32 | |
33 } // namespace content | |
OLD | NEW |