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

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

Issue 13890012: Integrate VDA with WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add VDA and gpu_factories mocks. Update unittest. Created 7 years, 7 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698