Chromium Code Reviews| 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_tv.h" | |
| 6 | |
| 7 #include "content/renderer/media/rtc_video_decoder_bridge_tv.h" | |
| 8 | |
| 9 namespace content { | |
| 10 | |
| 11 RTCVideoDecoderFactoryTv::RTCVideoDecoderFactoryTv() { | |
| 12 } | |
| 13 | |
| 14 webrtc::VideoDecoder* RTCVideoDecoderFactoryTv::CreateVideoDecoder( | |
| 15 webrtc::VideoCodecType type) { | |
| 16 if (type == webrtc::kVideoCodecVP8) { | |
| 17 RTCVideoDecoderBridgeTv* bridge = | |
| 18 RTCVideoDecoderBridgeTv::Get(); | |
| 19 if (bridge->AcquireOwnership()) { | |
|
ycheo (away)
2013/04/29 13:18:13
Remove {} for the single line.
wonsik
2013/05/01 14:15:38
Done.
| |
| 20 return bridge; | |
| 21 } | |
| 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 } | |
| 32 | |
| 33 } // namespace content | |
| OLD | NEW |