henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
kjellander | 1afca73 | 2016-02-07 20:46:45 -0800 | [diff] [blame] | 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 3 | * |
kjellander | 1afca73 | 2016-02-07 20:46:45 -0800 | [diff] [blame] | 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. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
kjellander@webrtc.org | 5ad1297 | 2016-02-12 06:39:40 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
| 12 | #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 13 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 14 | #include "webrtc/common_types.h" |
Edward Lemur | c20978e | 2017-07-06 19:44:34 +0200 | [diff] [blame] | 15 | #include "webrtc/rtc_base/refcount.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | class VideoDecoder; |
| 19 | } |
| 20 | |
| 21 | namespace cricket { |
| 22 | |
sakal | 1fd9595 | 2016-06-22 00:46:15 -0700 | [diff] [blame] | 23 | struct VideoDecoderParams { |
| 24 | std::string receive_stream_id; |
| 25 | }; |
| 26 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 27 | class WebRtcVideoDecoderFactory { |
| 28 | public: |
| 29 | // Caller takes the ownership of the returned object and it should be released |
| 30 | // by calling DestroyVideoDecoder(). |
| 31 | virtual webrtc::VideoDecoder* CreateVideoDecoder( |
| 32 | webrtc::VideoCodecType type) = 0; |
sakal | 1fd9595 | 2016-06-22 00:46:15 -0700 | [diff] [blame] | 33 | virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( |
| 34 | webrtc::VideoCodecType type, |
| 35 | VideoDecoderParams params) { |
| 36 | return CreateVideoDecoder(type); |
| 37 | } |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 38 | virtual ~WebRtcVideoDecoderFactory() {} |
| 39 | |
| 40 | virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0; |
| 41 | }; |
| 42 | |
| 43 | } // namespace cricket |
| 44 | |
kjellander@webrtc.org | 5ad1297 | 2016-02-12 06:39:40 +0100 | [diff] [blame] | 45 | #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |