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

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

Issue 14247018: Implement WebRTC in Chrome for TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dwkang's comment 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_tv.h"
6
7 #include "content/renderer/media/rtc_video_decoder_bridge_tv.h"
8
9 namespace content {
10
11 RTCVideoDecoderFactoryTv::RTCVideoDecoderFactoryTv(
12 const MediaStreamDependencyFactory* media_stream_dependency_factory)
13 : media_stream_dependency_factory_(media_stream_dependency_factory) {}
14
15 webrtc::VideoDecoder* RTCVideoDecoderFactoryTv::CreateVideoDecoder(
16 webrtc::VideoCodecType type) {
17 if (type == webrtc::kVideoCodecVP8) {
18 RTCVideoDecoderBridgeTv* bridge =
19 RTCVideoDecoderBridgeTv::Get();
20 if (bridge->AcquireOwnership(media_stream_dependency_factory_))
21 return bridge;
22 }
23 // returning NULL will make WebRTC fall back to SW decoder.
24 return NULL;
25 }
26
27 void RTCVideoDecoderFactoryTv::DestroyVideoDecoder(
28 webrtc::VideoDecoder* decoder) {
29 DCHECK(RTCVideoDecoderBridgeTv::Get() == decoder);
30 RTCVideoDecoderBridgeTv::Get()->ReleaseOwnership(
31 media_stream_dependency_factory_);
32 }
33
34 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698