Detailed Description
This API layer allows you to read compressed media packets from the stream bypassing the codecs. You can read some streams of a file as compressed packets while decoding others. You can however not mix read calls for compressed packets and decompressed frames in a single stream. Reading compressed packets is supported only for a subset of codecs, which are defined by the gavl_codec_id_t. If your application supports compressed packets, you can first get the compression info with bgav_get_audio_compression_info or bgav_get_video_compression_info. If you support this compression, set the stream mode to BGAV_STREAM_READRAW. Before reading you must call bgav_start. Packets are then read with bgav_read_audio_packet and bgav_read_video_packet.
Function Documentation
Get audio compression info.
- Parameters:
-
| bgav | A decoder instance - Parameters:
-
| stream | Stream index (starting with 0) - Parameters:
-
| info | Returns the compression info - Returns:
- 1 if a compression info was returned, 0 else
This function must be called after bgav_select_track. Before selecting the track the compression info might not be complete. Free the returned compression info with gavl_compression_info_free. |
|
|
Get video compression info.
- Parameters:
-
| bgav | A decoder instance - Parameters:
-
| stream | Stream index (starting with 0) - Parameters:
-
| info | Returns the compression info - Returns:
- 1 if a compression info was returned, 0 else
This function must be called after bgav_select_track. Before selecting the track the compression info might not be complete. Free the returned compression info with gavl_compression_info_free. |
|
|
Read compressed audio packet.
- Parameters:
-
| bgav | A decoder instance - Parameters:
-
| stream | Stream index (starting with 0) - Parameters:
-
| p | Returns the packet - Returns:
- 1 if a packet was read, 0 else
You can pass the same packet multiple times to a read fuction. Use gavl_packet_free when it's no longer used. |
|
|
Read compressed video packet.
- Parameters:
-
| bgav | A decoder instance - Parameters:
-
| stream | Stream index (starting with 0) - Parameters:
-
| p | Returns the packet - Returns:
- 1 if a packet was read, 0 else
You can pass the same packet multiple times to a read fuction. Use gavl_packet_free when it's no longer used. |
|
|