blob: 4032aa2a5d3430f4020115f5a4a0580396cdedb6 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellander1afca732016-02-07 20:46:45 -08002 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellander1afca732016-02-07 20:46:45 -08004 * 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.org28e20752013-07-10 00:45:36 +00009 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
12#define MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
Mirko Bonadei71207422017-09-15 13:58:09 +020014#include "common_types.h" // NOLINT(build/include)
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "media/base/codec.h"
16#include "rtc_base/refcount.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000017
18namespace webrtc {
19class VideoDecoder;
20}
21
22namespace cricket {
23
sakal1fd95952016-06-22 00:46:15 -070024struct VideoDecoderParams {
25 std::string receive_stream_id;
26};
27
Magnus Jedvertd4b0c052017-09-14 10:24:54 +020028// Deprecated. Use webrtc::VideoDecoderFactory instead.
29// https://bugs.chromium.org/p/webrtc/issues/detail?id=7925
henrike@webrtc.org28e20752013-07-10 00:45:36 +000030class WebRtcVideoDecoderFactory {
31 public:
32 // Caller takes the ownership of the returned object and it should be released
33 // by calling DestroyVideoDecoder().
kthelgasonebd4f792017-09-04 04:36:21 -070034 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
35 const VideoCodec& codec,
Magnus Jedvert244ad802017-09-28 21:19:18 +020036 VideoDecoderParams params);
37
kthelgasonebd4f792017-09-04 04:36:21 -070038 // DEPRECATED.
39 // These methods should not be used by new code and will eventually be
40 // removed. See http://crbug.com/webrtc/8140.
Magnus Jedvert244ad802017-09-28 21:19:18 +020041 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type);
kthelgasonebd4f792017-09-04 04:36:21 -070042
sakal1fd95952016-06-22 00:46:15 -070043 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
44 webrtc::VideoCodecType type,
Magnus Jedvert244ad802017-09-28 21:19:18 +020045 VideoDecoderParams params);
46
henrike@webrtc.org28e20752013-07-10 00:45:36 +000047 virtual ~WebRtcVideoDecoderFactory() {}
48
49 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0;
50};
51
52} // namespace cricket
53
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020054#endif // MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_