|
Twitch SDK (Internal)
|
#include <iaudioencoder.h>
Public Member Functions | |
| IAudioEncoder () | |
| virtual | ~IAudioEncoder () |
| virtual TTV_ErrorCode | SetFrameWriter (const std::shared_ptr< IFrameWriter > &frameWriter)=0 |
| virtual TTV_ErrorCode | GetAudioEncodingFormat (AudioFormat &result)=0 |
| virtual std::string | GetName () const =0 |
| virtual TTV_ErrorCode | Initialize ()=0 |
| virtual TTV_ErrorCode | Start (uint32_t streamIndex, const AudioParams &audioParams)=0 |
| virtual TTV_ErrorCode | GetNumInputSamplesPerEncodeFrame (uint32_t &result)=0 |
| virtual TTV_ErrorCode | Stop ()=0 |
| virtual TTV_ErrorCode | Shutdown ()=0 |
| virtual TTV_ErrorCode | SubmitFrame (const std::shared_ptr< AudioFrame > &audioFrame)=0 |
| template<typename T > | |
| bool | SupportsReceiverProtocol () const |
| virtual bool | SupportsReceiverProtocol (IAudioFrameReceiver::ReceiverTypeId typeId) const =0 |
| virtual std::shared_ptr< IAudioFrameReceiver > | GetReceiverImplementation (IAudioFrameReceiver::ReceiverTypeId typeId)=0 |
Initialize() should be called by the client prior to adding it to the system. Shutdown() should be called after removing from the system. Start() and Stop() will be called by the system when capture is to be started and stopped.
| ttv::broadcast::IAudioEncoder::IAudioEncoder | ( | ) |
|
virtual |
|
pure virtual |
|
pure virtual |
Retrieves the name for logging purposes.
Implemented in ttv::broadcast::PassThroughAudioEncoder, ttv::broadcast::LameAudioEncoder, and ttv::broadcast::AppleAacEncoder.
|
pure virtual |
Assuming the encoder requires a data frame of constant size this is the number of samples in the frame. If it does not need to be constant then result will be 0.
Implemented in ttv::broadcast::PassThroughAudioEncoder, ttv::broadcast::LameAudioEncoder, and ttv::broadcast::AppleAacEncoder.
|
pure virtual |
Obtains the receiver for the given protocol. If not implemented, null will be returned.
Implemented in ttv::broadcast::PassThroughAudioEncoder, ttv::broadcast::LameAudioEncoder, and ttv::broadcast::AppleAacEncoder.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Submits the given audio frame. It should have been created by using the IAudioFrameReceiver implementation returned by GetReceiverImplementation().
Implemented in ttv::broadcast::PassThroughAudioEncoder, ttv::broadcast::LameAudioEncoder, and ttv::broadcast::AppleAacEncoder.
|
inline |
Determines if the concrete implementation supports the given protocol. The template parameter must be known to derive from IAudioFrameReceiver.
|
pure virtual |
Determines if the concrete implementation supports the given protocol.
Implemented in ttv::broadcast::PassThroughAudioEncoder, ttv::broadcast::LameAudioEncoder, and ttv::broadcast::AppleAacEncoder.
1.8.13