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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
| 12 | #define MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 13 | |
Steve Anton | e78bcb9 | 2017-10-31 09:53:08 -0700 | [diff] [blame] | 14 | #include <string> |
| 15 | |
Mirko Bonadei | 7120742 | 2017-09-15 13:58:09 +0200 | [diff] [blame] | 16 | #include "common_types.h" // NOLINT(build/include) |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 17 | #include "media/base/codec.h" |
| 18 | #include "rtc_base/refcount.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | class VideoDecoder; |
| 22 | } |
| 23 | |
| 24 | namespace cricket { |
| 25 | |
sakal | 1fd9595 | 2016-06-22 00:46:15 -0700 | [diff] [blame] | 26 | struct VideoDecoderParams { |
| 27 | std::string receive_stream_id; |
| 28 | }; |
| 29 | |
Magnus Jedvert | d4b0c05 | 2017-09-14 10:24:54 +0200 | [diff] [blame] | 30 | // Deprecated. Use webrtc::VideoDecoderFactory instead. |
| 31 | // https://bugs.chromium.org/p/webrtc/issues/detail?id=7925 |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 32 | class WebRtcVideoDecoderFactory { |
| 33 | public: |
| 34 | // Caller takes the ownership of the returned object and it should be released |
| 35 | // by calling DestroyVideoDecoder(). |
kthelgason | ebd4f79 | 2017-09-04 04:36:21 -0700 | [diff] [blame] | 36 | virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( |
| 37 | const VideoCodec& codec, |
Magnus Jedvert | 244ad80 | 2017-09-28 21:19:18 +0200 | [diff] [blame] | 38 | VideoDecoderParams params); |
| 39 | |
kthelgason | ebd4f79 | 2017-09-04 04:36:21 -0700 | [diff] [blame] | 40 | // DEPRECATED. |
| 41 | // These methods should not be used by new code and will eventually be |
| 42 | // removed. See http://crbug.com/webrtc/8140. |
Magnus Jedvert | 244ad80 | 2017-09-28 21:19:18 +0200 | [diff] [blame] | 43 | virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type); |
kthelgason | ebd4f79 | 2017-09-04 04:36:21 -0700 | [diff] [blame] | 44 | |
sakal | 1fd9595 | 2016-06-22 00:46:15 -0700 | [diff] [blame] | 45 | virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( |
| 46 | webrtc::VideoCodecType type, |
Magnus Jedvert | 244ad80 | 2017-09-28 21:19:18 +0200 | [diff] [blame] | 47 | VideoDecoderParams params); |
| 48 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 49 | virtual ~WebRtcVideoDecoderFactory() {} |
| 50 | |
| 51 | virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0; |
| 52 | }; |
| 53 | |
| 54 | } // namespace cricket |
| 55 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 56 | #endif // MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ |