Twitch SDK (Internal)
Public Member Functions | List of all members
ttv::broadcast::IMuxer Class Referenceabstract

#include <imuxer.h>

Inheritance diagram for ttv::broadcast::IMuxer:
ttv::broadcast::FlvMuxer

Public Member Functions

virtual ~IMuxer ()=default
 
virtual TTV_ErrorCode Start (const MuxerParameters &parameters)=0
 
virtual TTV_ErrorCode WriteVideoPacket (const Packet &packet)=0
 
virtual TTV_ErrorCode WriteAudioPacket (const Packet &packet)=0
 
virtual TTV_ErrorCode WriteVideoSpsPps (const std::vector< uint8_t > &sps, const std::vector< uint8_t > &pps)=0
 
virtual TTV_ErrorCode Stop ()=0
 

Detailed Description

Interface for implementations that can handle post-encoded stream data.

Constructor & Destructor Documentation

◆ ~IMuxer()

virtual ttv::broadcast::IMuxer::~IMuxer ( )
virtualdefault

Member Function Documentation

◆ Start()

virtual TTV_ErrorCode ttv::broadcast::IMuxer::Start ( const MuxerParameters parameters)
pure virtual

Specifies that the encoding has begun.

Parameters
parametersThe parameters of the encoding.
Returns
  • TTV_EC_SUCCESS if the start is successful.
  • Any other error code otherwise. This will prevent the encoding stream from continuing if this is the only muxer.

Implemented in ttv::broadcast::FlvMuxer.

◆ Stop()

virtual TTV_ErrorCode ttv::broadcast::IMuxer::Stop ( )
pure virtual

Specifies that the encoding has stopped.

Returns
TTV_EC_SUCCESS if the stop is successful. Any errors returned from this will be ignored.

Implemented in ttv::broadcast::FlvMuxer.

◆ WriteAudioPacket()

virtual TTV_ErrorCode ttv::broadcast::IMuxer::WriteAudioPacket ( const Packet packet)
pure virtual

Writes an audio packet to the stream.

Parameters
packetThe audio data.
Returns
  • TTV_EC_SUCCESS if the writing is successful.
  • Any other error code otherwise. This will stop the encoding stream if this is the only muxer.

Implemented in ttv::broadcast::FlvMuxer.

◆ WriteVideoPacket()

virtual TTV_ErrorCode ttv::broadcast::IMuxer::WriteVideoPacket ( const Packet packet)
pure virtual

Writes a video packet to the stream.

Parameters
packetThe video data.
Returns
  • TTV_EC_SUCCESS if the writing is successful.
  • Any other error code otherwise. This will stop the encoding stream if this is the only muxer.

Implemented in ttv::broadcast::FlvMuxer.

◆ WriteVideoSpsPps()

virtual TTV_ErrorCode ttv::broadcast::IMuxer::WriteVideoSpsPps ( const std::vector< uint8_t > &  sps,
const std::vector< uint8_t > &  pps 
)
pure virtual

Writes the video SPS and PPS to the stream. This needs to be done before an IDR frame that it applies to.

Parameters
spsThe video SPS data.
ppsThe video PPS data.
Returns
  • TTV_EC_SUCCESS if the writing is successful.
  • Any other error code otherwise. This will stop the encoding stream if this is the only muxer.

Implemented in ttv::broadcast::FlvMuxer.


The documentation for this class was generated from the following file: