blob: 7f0921fd12b04165db33ce669e1808240ad6d654 [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
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010011#ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
12#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
Henrik Kjellandera80c16a2017-07-01 16:48:15 +020014#include "webrtc/base/refcount.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000015#include "webrtc/common_types.h"
16
17namespace webrtc {
18class VideoDecoder;
19}
20
21namespace cricket {
22
sakal1fd95952016-06-22 00:46:15 -070023struct VideoDecoderParams {
24 std::string receive_stream_id;
25};
26
henrike@webrtc.org28e20752013-07-10 00:45:36 +000027class 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;
sakal1fd95952016-06-22 00:46:15 -070033 virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
34 webrtc::VideoCodecType type,
35 VideoDecoderParams params) {
36 return CreateVideoDecoder(type);
37 }
henrike@webrtc.org28e20752013-07-10 00:45:36 +000038 virtual ~WebRtcVideoDecoderFactory() {}
39
40 virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0;
41};
42
43} // namespace cricket
44
kjellander@webrtc.org5ad12972016-02-12 06:39:40 +010045#endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_