gmerlin-avdecoder
Typedefs | Functions
Standalone stream decoders

Typedefs

typedef struct bgav_stream_decoder_s bgav_stream_decoder_t
 Forward declaration for a stream decoder.
 

Functions

BGAV_PUBLIC bgav_stream_decoder_tbgav_stream_decoder_create ()
 Create a stream decoder.
 
BGAV_PUBLIC bgav_options_tbgav_stream_decoder_get_options (bgav_stream_decoder_t *dec)
 Get options for a stream decoder.
 
BGAV_PUBLIC gavl_audio_source_t * bgav_stream_decoder_connect_audio (bgav_stream_decoder_t *dec, gavl_packet_source_t *src, const gavl_compression_info_t *ci, const gavl_audio_format_t *fmt, gavl_dictionary_t *m)
 Connect an audio stream decoder.
 
BGAV_PUBLIC gavl_video_source_t * bgav_stream_decoder_connect_video (bgav_stream_decoder_t *dec, gavl_packet_source_t *src, const gavl_compression_info_t *ci, const gavl_video_format_t *fmt, gavl_dictionary_t *m)
 Connect a video stream decoder.
 
BGAV_PUBLIC gavl_video_source_t * bgav_stream_decoder_connect_overlay (bgav_stream_decoder_t *dec, gavl_packet_source_t *src, const gavl_compression_info_t *ci, const gavl_video_format_t *fmt, gavl_dictionary_t *m)
 Connect an overlay stream decoder.
 
BGAV_PUBLIC int64_t bgav_stream_decoder_skip (bgav_stream_decoder_t *dec, int64_t t, int scale)
 Skip to a specified time.
 
BGAV_PUBLIC void bgav_stream_decoder_reset (bgav_stream_decoder_t *dec)
 Reset a stream decoder.
 
BGAV_PUBLIC void bgav_stream_decoder_destroy (bgav_stream_decoder_t *dec)
 Destroy a stream decoder.
 
BGAV_PUBLIC gavl_codec_id_tbgav_supported_audio_compressions ()
 Get supported audio compressions.
 
BGAV_PUBLIC gavl_codec_id_tbgav_supported_video_compressions ()
 Get supported video compressions.
 
BGAV_PUBLIC int bgav_set_stream_action_all (bgav_t *bgav, int idx, bgav_stream_action_t action)
 

Detailed Description

The standalone decoders can be used for the decompression of elemtary A/V streams (bypassing the demultiplexer stage). They obtain compressed packets via a gavl_packet_source_t and provide a gavl_audio_source_t or gavl_video_source_t for reading the uncompressed frames.

Typedef Documentation

◆ bgav_stream_decoder_t

typedef struct bgav_stream_decoder_s bgav_stream_decoder_t

Forward declaration for a stream decoder.

You don't want to know, what's inside here

Function Documentation

◆ bgav_stream_decoder_create()

BGAV_PUBLIC bgav_stream_decoder_t * bgav_stream_decoder_create ( )

Create a stream decoder.

Returns
A newly allocated stream decoder

◆ bgav_stream_decoder_get_options()

BGAV_PUBLIC bgav_options_t * bgav_stream_decoder_get_options ( bgav_stream_decoder_t dec)

Get options for a stream decoder.

Parameters
decA stream decoder
Returns
Options for decoding the stream

◆ bgav_stream_decoder_connect_audio()

BGAV_PUBLIC gavl_audio_source_t * bgav_stream_decoder_connect_audio ( bgav_stream_decoder_t dec,
gavl_packet_source_t *  src,
const gavl_compression_info_t ci,
const gavl_audio_format_t fmt,
gavl_dictionary_t *  m 
)

Connect an audio stream decoder.

Parameters
decA stream decoder
srcPacket source
ciCompression info
fmtFormat (possibly incomplete)
mStream metadata (might get changed)
Returns
Source for reading the uncompressed frames

You can call either bgav_stream_decoder_connect_audio or bgav_stream_decoder_connect_video for a decoder instance, not both.

The updated audio format can be ontained by calling gavl_audio_source_get_src_format with the returned source.

◆ bgav_stream_decoder_connect_video()

BGAV_PUBLIC gavl_video_source_t * bgav_stream_decoder_connect_video ( bgav_stream_decoder_t dec,
gavl_packet_source_t *  src,
const gavl_compression_info_t ci,
const gavl_video_format_t fmt,
gavl_dictionary_t *  m 
)

Connect a video stream decoder.

Parameters
decA stream decoder
srcPacket source
ciCompression info
fmtFormat (possibly incomplete)
mStream metadata (might get changed)
Returns
Source for reading the uncompressed frames

You can call either bgav_stream_decoder_connect_audio or bgav_stream_decoder_connect_video for a decoder instance, not both.

The updated video format can be ontained by calling gavl_video_source_get_src_format with the returned source.

◆ bgav_stream_decoder_connect_overlay()

BGAV_PUBLIC gavl_video_source_t * bgav_stream_decoder_connect_overlay ( bgav_stream_decoder_t dec,
gavl_packet_source_t *  src,
const gavl_compression_info_t ci,
const gavl_video_format_t fmt,
gavl_dictionary_t *  m 
)

Connect an overlay stream decoder.

Parameters
decA stream decoder
srcPacket source
ciCompression info
fmtFormat (possibly incomplete)
mStream metadata (might get changed)
Returns
Source for reading the uncompressed overlays

You can call either bgav_stream_decoder_connect_audio or bgav_stream_decoder_connect_video for a decoder instance, not both.

The updated video format can be ontained by calling gavl_video_source_get_src_format with the returned source.

◆ bgav_stream_decoder_skip()

BGAV_PUBLIC int64_t bgav_stream_decoder_skip ( bgav_stream_decoder_t dec,
int64_t  t,
int  scale 
)

Skip to a specified time.

Parameters
decA stream decoder
tTime to skip to
Returns
True time skipped

This skips to a certain time in the stream. For audio stream the time is scaled by the samplerate. For video streams it is in timescale unit of the video format.

◆ bgav_stream_decoder_reset()

BGAV_PUBLIC void bgav_stream_decoder_reset ( bgav_stream_decoder_t dec)

Reset a stream decoder.

Parameters
decA stream decoder

Reset the decoder to a state as if no packet was read so far.

◆ bgav_stream_decoder_destroy()

BGAV_PUBLIC void bgav_stream_decoder_destroy ( bgav_stream_decoder_t dec)

Destroy a stream decoder.

Parameters
decA stream decoder

◆ bgav_supported_audio_compressions()

BGAV_PUBLIC gavl_codec_id_t * bgav_supported_audio_compressions ( )

Get supported audio compressions.

Returns
The supported audio compressions

Compressions are returned as an array terminated with GAVL_CODEC_ID_NONE. The returned array must be free()d by the caller.

◆ bgav_supported_video_compressions()

BGAV_PUBLIC gavl_codec_id_t * bgav_supported_video_compressions ( )

Get supported video compressions.

Returns
The supported video compressions

Compressions are returned as an array terminated with GAVL_CODEC_ID_NONE. The returned array must be free()d by the caller.