|
Twitch SDK (Internal)
|
#include <ivideoencoder.h>
Public Member Functions | |
| virtual | ~IVideoEncoder () |
| virtual std::string | GetName () const =0 |
| virtual bool | SupportsBitRateAdjustment () const =0 |
| virtual TTV_ErrorCode | Initialize ()=0 |
| virtual TTV_ErrorCode | Shutdown ()=0 |
| virtual TTV_ErrorCode | SetFrameWriter (const std::shared_ptr< IFrameWriter > &frameWriter)=0 |
| virtual TTV_ErrorCode | ValidateVideoParams (const VideoParams &videoParams) const =0 |
| virtual TTV_ErrorCode | Start (uint32_t streamIndex, const VideoParams &videoParams)=0 |
| virtual TTV_ErrorCode | SubmitFrame (const std::shared_ptr< VideoFrame > &videoFrame)=0 |
| virtual TTV_ErrorCode | Stop ()=0 |
| virtual TTV_ErrorCode | GetSpsPps (std::vector< uint8_t > &sps, std::vector< uint8_t > &pps)=0 |
| virtual TTV_ErrorCode | ValidateFrame (const std::shared_ptr< VideoFrame > &videoframe)=0 |
| virtual TTV_ErrorCode | SetTargetBitRate (uint32_t kbps)=0 |
| template<typename T > | |
| bool | SupportsReceiverProtocol () const |
| virtual bool | SupportsReceiverProtocol (IVideoFrameReceiver::ReceiverTypeId typeId) const =0 |
| virtual std::shared_ptr< IVideoFrameReceiver > | GetReceiverImplementation (IVideoFrameReceiver::ReceiverTypeId typeId)=0 |
The interface for a video encoder.
The following methods should be called by the client. Initialize() should be called by the client prior to adding it to the system. Shutdown() should be called after removing from the system.
The following methods will be called by the system during use. SetFrameWriter() will be called prior to starting encoding. Start() and Stop() will be called by the system when capture is to be started and stopped. SubmitFrame() will be called periodically to kick off an encode of a frame.
|
virtual |
|
pure virtual |
Retrieves the name for logging purposes.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Obtains the receiver for the given protocol. If not implemented, null will be returned.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Called by the system to get the Sps/Pps data from the encoder.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Initializes the encoder. The client is responsible for calling this before
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Called by the system before encoding begins.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Sets the desired bitrate in 1000s of bits per second. This will only have an effect if SupportsBitrateAdjustment() returns true. TTV_EC_UNSUPPORTED will be returned if not supported.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Called by the system when the stream is stopping.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
This will be called periodically to kick off an encode of a frame. This should not block to encode the frame synchronously.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Determines whether or not the encoder supports changing the target bitrate on the fly.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
inline |
Determines if the concrete implementation supports the given protocol. The template parameter must be known to derive from IVideoFrameReceiver.
|
pure virtual |
Determines if the concrete implementation supports the given protocol.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
Called by the system to validate each frame as it is processed.
Implemented in ttv::broadcast::PassThroughVideoEncoder, ttv::broadcast::IntelVideoEncoder, and ttv::broadcast::AppleVideoEncoder.
|
pure virtual |
1.8.13