blob: a2e686a9f6e9b6a9a416701fd87e0fb7b1b2fc99 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
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.
9 */
10
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000011#ifndef WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_EXTERNAL_CODEC_H_
12#define WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_EXTERNAL_CODEC_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
14#include "common_types.h"
15
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000016namespace webrtc {
17
niklase@google.com470e71d2011-07-07 08:21:25 +000018class VideoDecoder;
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000019class VideoEncoder;
20class VideoEngine;
niklase@google.com470e71d2011-07-07 08:21:25 +000021
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000022class WEBRTC_DLLEXPORT ViEExternalCodec {
23 public:
24 static ViEExternalCodec* GetInterface(VideoEngine* video_engine);
niklase@google.com470e71d2011-07-07 08:21:25 +000025
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000026 virtual int Release() = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000027
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000028 virtual int RegisterExternalSendCodec(const int video_channel,
29 const unsigned char pl_type,
30 VideoEncoder* encoder) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000031
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000032 virtual int DeRegisterExternalSendCodec(const int video_channel,
33 const unsigned char pl_type) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000034
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000035 virtual int RegisterExternalReceiveCodec(const int video_channel,
36 const unsigned int pl_type,
37 VideoDecoder* decoder,
38 bool decoder_render = false,
39 int render_delay = 0) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000040
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000041 virtual int DeRegisterExternalReceiveCodec(const int video_channel,
42 const unsigned char pl_type) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000043
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000044 protected:
45 ViEExternalCodec() {}
46 virtual ~ViEExternalCodec() {}
niklase@google.com470e71d2011-07-07 08:21:25 +000047};
mflodman@webrtc.orgd5a4d9b2012-01-02 13:04:05 +000048
49} // namespace webrtc
50
51#endif // WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_EXTERNAL_CODEC_H_