blob: 016cb09da000f474fadd65622934dd6308a950e0 [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
Steve Antone78bcb92017-10-31 09:53:08 -070014#include <string>
15
Mirko Bonadei71207422017-09-15 13:58:09 +020016#include "common_types.h" // NOLINT(build/include)
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020017#include "media/base/codec.h"
18#include "rtc_base/refcount.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000019
20namespace webrtc {
21class VideoDecoder;
22}
23
24namespace cricket {
25
sakal1fd95952016-06-22 00:46:15 -070026struct VideoDecoderParams {
27 std::string receive_stream_id;
28};
29
Magnus Jedvertd4b0c052017-09-14 10:24:54 +020030// Deprecated. Use webrtc::VideoDecoderFactory instead.
31// https://bugs.chromium.org/p/webrtc/issues/detail?id=7925
henrike@webrtc.org28e20752013-07-10 00:45:36 +000032class WebRtcVideoDecoderFactory {
33 public:
34 // Caller takes the ownership of the returned object and it should be released
35 // by calling DestroyVideoDecoder().
kthelgasonebd4f792017-09-04 04:36:21 -070036 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
37 const VideoCodec& codec,
Magnus Jedvert244ad802017-09-28 21:19:18 +020038 VideoDecoderParams params);
39
kthelgasonebd4f792017-09-04 04:36:21 -070040 // DEPRECATED.
41 // These methods should not be used by new code and will eventually be
42 // removed. See http://crbug.com/webrtc/8140.
Magnus Jedvert244ad802017-09-28 21:19:18 +020043 virtual webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type);
kthelgasonebd4f792017-09-04 04:36:21 -070044
sakal1fd95952016-06-22 00:46:15 -070045 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
46 webrtc::VideoCodecType type,
Magnus Jedvert244ad802017-09-28 21:19:18 +020047 VideoDecoderParams params);
48
henrike@webrtc.org28e20752013-07-10 00:45:36 +000049 virtual ~WebRtcVideoDecoderFactory() {}
50
51 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0;
52};
53
54} // namespace cricket
55
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020056#endif // MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_