namespace AVEncoder { enum ECodecType { Undefined, H264, MPEG4, VP8, } }


namespace AVEncoder { enum EH264Profile { UNKNOWN, CONSTRAINED_BASELINE, BASELINE, MAIN, CONSTRAINED_HIGH, HIGH, } }


namespace AVEncoder { enum EVideoFrameFormat { Undefined, YUV420P, D3D11_R8G8B8A8_UNORM, D3D12_R8G8B8A8_UNORM, CUDA_R8G8B8A8_UNORM, VULKAN_R8G8B8A8_UNORM, } }


namespace AVEncoder { enum EPacketType { Audio, Video, Invalid, } }


namespace AVEncoder { [FString](API\Runtime\Core\Containers\FString) AVEncoder::ToString ( [EVideoFrameFormat](API\Runtime\AVEncoder\AVEncoder__EVideoFrameFormat) Format ) }


One sample - one sample byte * NumberBytesPerSample One frame - one sample * NumberChannels One second - one frame * SampleRate The number of samples per seconds - one sample byte * NumberBytesPerSample * NumberChannels * SampleRate

typedef [TArrayView](API\Runtime\Core\Containers\TArrayView)< const uint8_t > FAudioByteBuffer


There is the declaration of the single audio sample


void Encode ( const [FAudioFrame](API\Runtime\AVEncoder\FAudioFrame) & Frame )


bool Initialize ( const [FAudioConfig](API\Runtime\AVEncoder\FAudioConfig) & Config )


void OnEncodedAudioFrame ( const [FMediaPacket](API\Runtime\AVEncoder\FMediaPacket) & Packet )


virtual void RegisterListener ( [IAudioEncoderListener](API\Runtime\AVEncoder\IAudioEncoderListener) & Listener )


Shutdown MUST be called before destruction


virtual void UnregisterListener ( [IAudioEncoderListener](API\Runtime\AVEncoder\IAudioEncoderListener) & Listener )


[TUniquePtr](API\Runtime\Core\Templates\TUniquePtr)< [FAudioEncoder](API\Runtime\AVEncoder\FAudioEncoder) > CreateEncoder ( const [FString](API\Runtime\Core\Containers\FString) & Codec )


static [TArray](API\Runtime\Core\Containers\TArray)< [FAudioEncoderFactory](API\Runtime\AVEncoder\FAudioEncoderFactory) * > Factories;


static [FAudioEncoderFactory](API\Runtime\AVEncoder\FAudioEncoderFactory) * FindFactory ( const [FString](API\Runtime\Core\Containers\FString) & Codec )


static const [TArray](API\Runtime\Core\Containers\TArray)< [FAudioEncoderFactory](API\Runtime\AVEncoder\FAudioEncoderFactory) * > GetAllFactories()


[TArray](API\Runtime\Core\Containers\TArray)< [FString](API\Runtime\Core\Containers\FString) > GetSupportedCodecs() const


static void RegisterFactory ( [FAudioEncoderFactory](API\Runtime\AVEncoder\FAudioEncoderFactory) & Factory )


static void UnregisterFactory ( [FAudioEncoderFactory](API\Runtime\AVEncoder\FAudioEncoderFactory) & Factory )


One frame - one sample * NumberChannels One second - one frame * SampleRate The number of samples per seconds - one sample byte * NumberBytesPerSample * NumberChannels * SampleRate

AudioSamples

The sequence of audio samples

AudioStreamFormat

The format of audio samples


Describes the data format of the audio stream

NumberChannels

The number of channels in the stream

SampleRate

The number of samples per seconds


static [FCodecPacket](API\Runtime\AVEncoder\FCodecPacket) Create ( const uint8 * InData, uint32 InDataSize )


No constructors are accessible with public or protected access.


Encoding/Decoding latency


static kDefaultStunServerUrl = TEXT("stun:stun.l.google.com:19302");


static [FData](API\Runtime\AVEncoder\FConfiguration\FData) & Get()


Output buffer plane description.

ByteOffsetBetweenPixels

Offset in bytes between two pixels.

ByteOffsetBetweenRows

Offset in bytes between the same column in the next row.

ByteOffsetToFirstPixel

Offset in bytes from the allocated buffer start address to the first pixel of this plane.

BytesPerPixel

Bytes per pixel.

Height

Height of the allocated buffer plane in pixels, including necessary padding.

Width

Width of the allocated buffer plane in pixels, including necessary padding.


Information which is used to initialize the incoming audio channel


FMediaPacket ( [EPacketType](API\Runtime\AVEncoder\AVEncoder__EPacketType) TypeIn )


Information which is used to initialize the outgoing audio channel

bIsMuted

Initial muted state of the audio channel


EFrameBufferAllocReturn AllocateOutputFrameBuffer ( [FVideoDecoderAllocFrameBufferResult](API\Runtime\AVEncoder\FVideoDecoderAllocFrameBufferRes-) * OutBuffer, const [FVideoDecoderAllocFrameBufferParams](API\Runtime\AVEncoder\FVideoDecoderAllocFrameBufferPar-) * InAllocParams )


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(void *, void **)> CreateDecoderAllocationInterfaceCallback


[EDecodeResult](API\Runtime\AVEncoder\FVideoDecoder\EDecodeResult) Decode ( const [FVideoDecoderInput](API\Runtime\AVEncoder\FVideoDecoderInput) * InInput )


enum EDecodeResult { Success, Failure, }


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(void *, void **)> ReleaseDecoderAllocationInterfaceCallback


virtual void SetOnDecodedFrame ( [OnDecodedFrameCallback](API\Runtime\AVEncoder\FVideoDecoder\OnDecodedFrameCallback) InCallback )


Shuts the decoder down AND destroys it. Do not store a pointer to this decoder in a smart pointer!


Setup

bool Setup ( const [FInit](API\Runtime\AVEncoder\FVideoDecoder\FInit) & InInit )


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(const [FVideoDecoderOutput](API\Runtime\AVEncoder\FVideoDecoderOutput) *)> OnDecodedFrameCallback


Video frame buffer allocation parameters.

AllocSize

Number of bytes to allocate with the specified alignment.

ExtraCustomParameters

Extra custom parameters (platform specific)

FrameBufferType

Type of output frame buffer to allocate

Width

Dimensions to allocate raw buffer for.


Result structure to be filled in by the application.

AllocatedBuffer

The buffer the application has allocated.

AllocatedPlanesNum

Information of the allocated buffer planes, if applicable (depending on frame buffer type to allocate).

AllocatedSize

The actual buffer size the application has allocated.

CallbackValue

Buffer callback user value (a 'this' pointer to something within the application) for the retain and release callbacks.

ReleaseCallback

Callback within the application to release the allocated buffer.

RetainCallback

Callback within the application to retain the allocated buffer.


static bool bDebugDontRegisterDefaultCodecs = false;


Decoder creation create a decoder instance. If not nullptr it must be destroyed through invoking its Shutdown() method!

[FVideoDecoder](API\Runtime\AVEncoder\FVideoDecoder) * Create ( uint32 InID, const FVideoDecoder::FInit & InInit )


The callback type used to create a registered decoder

typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< [FVideoDecoder](API\Runtime\AVEncoder\FVideoDecoder) *()> CreateDecoderCallback


static [FVideoDecoderFactory](API\Runtime\AVEncoder\FVideoDecoderFactory) & Get()


Get a list of registered decoders

const [TArray](API\Runtime\Core\Containers\TArray)< [FVideoDecoderInfo](API\Runtime\AVEncoder\FVideoDecoderInfo) > & GetAvailable() const


bool GetInfo ( uint32 InID, [FVideoDecoderInfo](API\Runtime\AVEncoder\FVideoDecoderInfo) & OutInfo ) const


static [FThreadSafeCounter](API\Runtime\Core\HAL\FThreadSafeCounter) NextID = 1;


Register a decoder so that it can be iterated and created

void Register ( const [FVideoDecoderInfo](API\Runtime\AVEncoder\FVideoDecoderInfo) & InInfo, const [CreateDecoderCallback](API\Runtime\AVEncoder\FVideoDecoderFactory\CreateDecoderCallback) & InCreateDecoder )


No destructors are accessible with public or protected access.


static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoDecoderInput](API\Runtime\AVEncoder\FVideoDecoderInput) > Create ( const [FInputData](API\Runtime\AVEncoder\FVideoDecoderInput\FInputData) & InInputData )


[FVideoDecoderInput](API\Runtime\AVEncoder\FVideoDecoderInput) & operator= ( const [FVideoDecoderInput](API\Runtime\AVEncoder\FVideoDecoderInput) & )


FVideoDecoderInput ( const [FVideoDecoderInput](API\Runtime\AVEncoder\FVideoDecoderInput) & )


const [FVideoDecoderAllocFrameBufferResult](API\Runtime\AVEncoder\FVideoDecoderAllocFrameBufferRes-) * GetAllocatedBuffer() const


FVideoDecoderOutput ( const [FVideoDecoderOutput](API\Runtime\AVEncoder\FVideoDecoderOutput) & )


[FVideoDecoderOutput](API\Runtime\AVEncoder\FVideoDecoderOutput) & operator= ( const [FVideoDecoderOutput](API\Runtime\AVEncoder\FVideoDecoderOutput) & )


virtual bool AddLayer ( [FLayerConfig](API\Runtime\AVEncoder\FVideoEncoder\FLayerConfig) const & config )


virtual [FLayer](API\Runtime\AVEncoder\FVideoEncoder\FLayer) * CreateLayer ( uint32 layerIdx, [FLayerConfig](API\Runtime\AVEncoder\FVideoEncoder\FLayerConfig) const & config )


virtual void DestroyLayer ( [FLayer](API\Runtime\AVEncoder\FVideoEncoder\FLayer) * layer )


virtual void Encode ( const [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) > frame, [FEncodeOptions](API\Runtime\AVEncoder\FVideoEncoder\FEncodeOptions) const & options )


FLayerConfig const & GetConfig&40;&41; const


void UpdateConfig &40; FLayerConfig const & config &41;


FLayer &40; FLayerConfig const & layerConfig &41;


bool operator&61;&61; &40; FLayerConfig const & other &41; const


bool operator&33;&61; &40; FLayerConfig const & other &41; const


[FLayerConfig](API\Runtime\AVEncoder\FVideoEncoder\FLayerConfig) GetLayerConfig ( uint32 layerIdx ) const


enum MultipassMode { UNKNOWN, DISABLED, QUARTER, FULL, }


enum H264Profile { AUTO, CONSTRAINED_BASELINE, BASELINE, MAIN, CONSTRAINED_HIGH, HIGH, HIGH444, STEREO, SVC_TEMPORAL_SCALABILITY, PROGRESSIVE_HIGH, }


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(uint32, const [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) >, const [FCodecPacket](API\Runtime\AVEncoder\FCodecPacket) &)> OnEncodedPacketCallback


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(const [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) >)> OnFrameEncodedCallback


enum RateControlMode { UNKNOWN, CONSTQP, VBR, CBR, }


void SetOnEncodedPacket ( [OnEncodedPacketCallback](API\Runtime\AVEncoder\FVideoEncoder\OnEncodedPacketCallback) callback )


virtual bool Setup ( [TSharedRef](API\Runtime\Core\Templates\TSharedRef)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > input, [FLayerConfig](API\Runtime\AVEncoder\FVideoEncoder\FLayerConfig) const & config )


void UpdateLayerConfig ( uint32 layerIdx, [FLayerConfig](API\Runtime\AVEncoder\FVideoEncoder\FLayerConfig) const & config )


[TUniquePtr](API\Runtime\Core\Templates\TUniquePtr)< [FVideoEncoder](API\Runtime\AVEncoder\FVideoEncoder) > Create ( uint32 InID, const FVideoEncoder::FLayerConfig & config )


[TUniquePtr](API\Runtime\Core\Templates\TUniquePtr)< [FVideoEncoder](API\Runtime\AVEncoder\FVideoEncoder) > Create ( uint32 InID, [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > InInput, const FVideoEncoder::FLayerConfig & config )


The callback type used to create a registered encoder

typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< [TUniquePtr](API\Runtime\Core\Templates\TUniquePtr)< [FVideoEncoder](API\Runtime\AVEncoder\FVideoEncoder) >()> CreateEncoderCallback


static [FVideoEncoderFactory](API\Runtime\AVEncoder\FVideoEncoderFactory) & Get()


bool HasEncoderForCodec ( [ECodecType](API\Runtime\AVEncoder\AVEncoder__ECodecType) CodecType ) const


bool GetInfo ( uint32 InID, [FVideoEncoderInfo](API\Runtime\AVEncoder\FVideoEncoderInfo) & OutInfo ) const


static [FThreadSafeCounter](API\Runtime\Core\HAL\FThreadSafeCounter) NextID = 4711;


Register an encoder so that it can be iterated and created

void Register ( const [FVideoEncoderInfo](API\Runtime\AVEncoder\FVideoEncoderInfo) & InInfo, const [CreateEncoderCallback](API\Runtime\AVEncoder\FVideoEncoderFactory\CreateEncoderCallback) & InCreateEncoder )


Get a list of registered encoders

const [TArray](API\Runtime\Core\Containers\TArray)< [FVideoEncoderInfo](API\Runtime\AVEncoder\FVideoEncoderInfo) > & GetAvailable() const


Create a user managed buffer

[FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) * CreateBuffer ( [OnFrameReleasedCallback](API\Runtime\AVEncoder\FVideoEncoderInput\OnFrameReleasedCallback) InOnFrameReleased )


Create input for an encoder that encodes a CUarray

static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > CreateForCUDA ( void * InApplicationCudaContext, bool IsResizable )


Construct video encoder input based on expected input frame format

static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > CreateDummy ( bool isResizable )


Create input for an encoder that encodes a D3D11 texture

static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > CreateForD3D11 ( void * InApplicationD3D11Device, bool IsResizable, bool IsShared )


Create input for an encoder that encodes a D3D12 texture

static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > CreateForD3D12 ( void * InApplicationD3D12Device, bool IsResizable, bool IsShared )


Create input for an encoder that encodes a VkImage

static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > CreateForVulkan ( void * InApplicationVulkanData, bool IsResizable )


static [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) > CreateForYUV420P ( uint32 InWidth, uint32 InHeight, bool isResizable )


Destroy user managed buffer

void DestroyBuffer ( [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) * Buffer )


Destroy/release any frames that are not currently in use


Get a list of supported video encoders

const [TArray](API\Runtime\Core\Containers\TArray)< [FVideoEncoderInfo](API\Runtime\AVEncoder\FVideoEncoderInfo) > & GetAvailableEncoders()


Obtain a video frame that can be used as a buffer for input to a video encoder


New packet callback prototype void(uint32 LayerIndex, const FCodecPacket& Packet)

typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(const [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) *)> OnFrameReleasedCallback


[FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) & operator= ( const [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) & )


Release (free) an input frame and make it available for future use

void ReleaseInputFrame ( [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) * InFrame )


Properties

virtual void SetMaxNumBuffers ( uint32 InMaxNumBuffers )


FVideoEncoderInput ( const [FVideoEncoderInput](API\Runtime\AVEncoder\FVideoEncoderInput) & )


Clone frame - this will create a copy that references the original until destroyed.

const [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) * Clone ( [FCloneDestroyedCallback](API\Runtime\AVEncoder\FVideoEncoderInputFrame\FCloneDestroyedCallback) InCloneDestroyedCallback ) const


enum EUnderlyingRHI { Undefined, D3D11, D3D12, Vulkan, }


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(const [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) *)> FCloneDestroyedCallback


CUDA


typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(CUarray)> FReleaseCUDATextureCallback


const [FCUDA](API\Runtime\AVEncoder\FVideoEncoderInputFrame\FCUDA) & GetCUDA() const


Current format of frame


const [FYUV420P](API\Runtime\AVEncoder\FVideoEncoderInputFrame\FYUV420P) & GetYUV420P() const


Obtain (increase reference count) of this input frame.

const [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) * Obtain() const


Release (decrease reference count) of this input frame.


Height of frame buffer


void SetTexture ( CUarray InTexture, [EUnderlyingRHI](API\Runtime\AVEncoder\FVideoEncoderInputFrame\EUnderlyingRHI) UnderlyingRHI, void * SharedHandle, [FReleaseCUDATextureCallback](API\Runtime\AVEncoder\FVideoEncoderInputFrame\FReleaseCUDATextureCallback) InOnReleaseTexture )


void SetTimestampRTP ( int64 timestampRTP )


void SetTimestampUs ( int64 timestampUs )


Width of frame buffer


void SetYUV420P ( const uint8 * InDataY, const uint8 * InDataU, const uint8 * InDataV, uint32 InStrideY, uint32 InStrideU, uint32 InStrideV )


FVideoEncoderInputFrame ( const [FVideoEncoderInputFrame](API\Runtime\AVEncoder\FVideoEncoderInputFrame) & CloneFrom )


void OnEncodedAudioFrame ( const [FMediaPacket](API\Runtime\AVEncoder\FMediaPacket) & Packet )


TODO this should go elsewhere and be made cross platform.


librtc

namespace LibRtc { enum EAudioMuteReason { Unsupported, Manual, NotListening, AdminDisabled, } }


The undecoded audio byte buffer is not guaranteed to be available after callback finishes. The pointer of the decoded audio sample buffer should be valid until the next decode call will happen.

typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(const [FAudioByteBuffer](API\Runtime\AVEncoder\FAudioByteBuffer) &AudioBytes, const [FAudioSampleBuffer](API\Runtime\AVEncoder\FAudioSampleBuffer) &)> OnAudioDecodeCallback


The unencoded audio sample buffer is not guaranteed to be available after callback finishes. The pointer of the encoded audio byte buffer should be valid until the next encode call will happen.

typedef [TFunction](API\Runtime\Core\GenericPlatform\TFunction)< void(const [FAudioSampleBuffer](API\Runtime\AVEncoder\FAudioSampleBuffer) &, const [FAudioByteBuffer](API\Runtime\AVEncoder\FAudioByteBuffer) &AudioBytes)> OnAudioEncodeCallback