Home | History | Annotate | Download | only in include
      1 /*
      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 
     11 #ifndef WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_EXTERNAL_CODEC_H_
     12 #define WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_EXTERNAL_CODEC_H_
     13 
     14 #include "webrtc/common_types.h"
     15 
     16 namespace webrtc {
     17 
     18 class VideoDecoder;
     19 class VideoEncoder;
     20 class VideoEngine;
     21 
     22 class WEBRTC_DLLEXPORT ViEExternalCodec {
     23  public:
     24   static ViEExternalCodec* GetInterface(VideoEngine* video_engine);
     25 
     26   virtual int Release() = 0;
     27 
     28   virtual int RegisterExternalSendCodec(const int video_channel,
     29                                         const unsigned char pl_type,
     30                                         VideoEncoder* encoder,
     31                                         bool internal_source) = 0;
     32 
     33   virtual int DeRegisterExternalSendCodec(const int video_channel,
     34                                           const unsigned char pl_type) = 0;
     35 
     36   virtual int RegisterExternalReceiveCodec(const int video_channel,
     37                                            const unsigned int pl_type,
     38                                            VideoDecoder* decoder,
     39                                            bool decoder_render = false,
     40                                            int render_delay = 0) = 0;
     41 
     42   virtual int DeRegisterExternalReceiveCodec(const int video_channel,
     43                                              const unsigned char pl_type) = 0;
     44 
     45  protected:
     46   ViEExternalCodec() {}
     47   virtual ~ViEExternalCodec() {}
     48 };
     49 
     50 }  // namespace webrtc
     51 
     52 #endif  // WEBRTC_VIDEO_ENGINE_INCLUDE_VIE_EXTERNAL_CODEC_H_
     53