Magnus Jedvert | 244ad80 | 2017-09-28 21:19:18 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #include "media/engine/webrtcvideodecoderfactory.h" |
| 12 | |
| 13 | namespace cricket { |
| 14 | |
Magnus Jedvert | 244ad80 | 2017-09-28 21:19:18 +0200 | [diff] [blame] | 15 | webrtc::VideoDecoder* WebRtcVideoDecoderFactory::CreateVideoDecoderWithParams( |
| 16 | const VideoCodec& codec, |
| 17 | VideoDecoderParams params) { |
| 18 | // Default implementation that delegates to old version in order to preserve |
| 19 | // backwards-compatability. |
| 20 | webrtc::VideoCodecType type = webrtc::PayloadStringToCodecType(codec.name); |
| 21 | return CreateVideoDecoderWithParams(type, params); |
| 22 | } |
| 23 | |
| 24 | webrtc::VideoDecoder* WebRtcVideoDecoderFactory::CreateVideoDecoder( |
| 25 | webrtc::VideoCodecType type) { |
| 26 | RTC_NOTREACHED(); |
| 27 | return nullptr; |
| 28 | } |
| 29 | |
| 30 | webrtc::VideoDecoder* WebRtcVideoDecoderFactory::CreateVideoDecoderWithParams( |
| 31 | webrtc::VideoCodecType type, |
| 32 | VideoDecoderParams params) { |
| 33 | return CreateVideoDecoder(type); |
| 34 | } |
| 35 | |
| 36 | } // namespace cricket |