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 "base/memory/scoped_ptr.h" |
| 8 #include "content/renderer/media/rtc_video_decoder.h" |
| 9 #include "media/base/video_decoder_config.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 RTCVideoDecoderFactory::RTCVideoDecoderFactory( |
| 14 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories) |
| 15 : gpu_factories_(gpu_factories) { |
| 16 } |
| 17 |
| 18 webrtc::VideoDecoder* RTCVideoDecoderFactory::CreateVideoDecoder( |
| 19 webrtc::VideoCodecType type) { |
| 20 scoped_ptr<RTCVideoDecoder> decoder(new RTCVideoDecoder(gpu_factories_)); |
| 21 if (decoder->Initialize(type)) |
| 22 return decoder.release(); |
| 23 return NULL; |
| 24 } |
| 25 |
| 26 void RTCVideoDecoderFactory::DestroyVideoDecoder( |
| 27 webrtc::VideoDecoder* decoder) { |
| 28 delete decoder; |
| 29 } |
| 30 |
| 31 } // namespace content |
OLD | NEW |