Intel® Collaboration Suite for WebRTC  version 4.3.1
Open WebRTC Toolkit (OWT) Client SDK for Windows*
videoencoderinterface.h
1 // Copyright (C) <2018> Intel Corporation
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 #ifndef OWT_BASE_VIDEOENCODERINTERFACE_H_
5 #define OWT_BASE_VIDEOENCODERINTERFACE_H_
6 #include <memory>
7 #include <vector>
8 #include "owt/base/commontypes.h"
9 namespace owt {
10 namespace base {
17  public:
32  virtual bool InitEncoderContext(Resolution& resolution,
33  uint32_t fps, uint32_t bitrate_kbps, VideoCodec video_codec) = 0;
34 #ifdef WEBRTC_ANDROID
35  virtual uint32_t EncodeOneFrame(bool key_frame, uint8_t** data) = 0;
36 #else
37 
47  virtual bool EncodeOneFrame(std::vector<uint8_t>& buffer, bool key_frame) = 0;
48 #endif
49 
54  virtual bool Release() = 0;
59  virtual VideoEncoderInterface* Copy() = 0;
60 };
61 }
62 }
63 #endif // OWT_BASE_VIDEOENCODERINTERFACE_H_
Video encoder interface.
Definition: videoencoderinterface.h:16
virtual bool InitEncoderContext(Resolution &resolution, uint32_t fps, uint32_t bitrate_kbps, VideoCodec video_codec)=0
Initialize the customized video encoder.
virtual ~VideoEncoderInterface()
Destructor.
Definition: videoencoderinterface.h:21
virtual bool EncodeOneFrame(std::vector< uint8_t > &buffer, bool key_frame)=0
Retrieve byte buffer from encoder that holds one complete frame.
virtual VideoEncoderInterface * Copy()=0
Duplicate the VideoEncoderInterface instance.
Definition: audioplayerinterface.h:8
virtual bool Release()=0
Release the resources that current encoder holds.
This class represents a resolution value.
Definition: commontypes.h:40