#include <gavl/gavl.h>
Go to the source code of this file.
Data Structures | |
struct | bgav_device_info_t |
Info structure for a device. More... | |
struct | bgav_edl_segment_t |
One segment of a physical stream to appear in a logical stream. More... | |
struct | bgav_edl_stream_t |
A locical stream. More... | |
struct | bgav_edl_track_t |
A locical track. More... | |
struct | bgav_edl_s |
EDL structure. More... | |
Defines | |
#define | BGAV_TIMESTAMP_UNDEFINED 0x8000000000000000LL |
Time value indicating an invalid time. | |
Typedefs | |
typedef struct bgav_edl_s | bgav_edl_t |
Forward declaration. | |
typedef struct bgav_s | bgav_t |
Opaque decoder structure. | |
typedef struct bgav_metadata_s | bgav_metadata_t |
Opaque metadata container. | |
typedef struct bgav_options_s | bgav_options_t |
Opaque option container. | |
typedef void(* | bgav_log_callback )(void *data, bgav_log_level_t level, const char *log_domain, const char *message) |
Function to be called for loggins messages. | |
typedef void(* | bgav_name_change_callback )(void *data, const char *name) |
Function to be called if the track name changes. | |
typedef void(* | bgav_metadata_change_callback )(void *data, const bgav_metadata_t *metadata) |
Function to be called if the metadata change. | |
typedef void(* | bgav_track_change_callback )(void *data, int track) |
Function to be called if the track number changes. | |
typedef void(* | bgav_buffer_callback )(void *data, float percentage) |
Function to be called if the input module is buffering data. | |
typedef int(* | bgav_user_pass_callback )(void *data, const char *resource, char **username, char **password) |
Function to be called if the input module needs authentication data. | |
typedef void(* | bgav_aspect_callback )(void *data, int stream, int pixel_width, int pixel_height) |
Function to be called if a change of the aspect ratio was detected. | |
typedef void(* | bgav_index_callback )(void *data, float percentage) |
Function to be called periodically while an index is built. | |
Enumerations | |
enum | bgav_log_level_t { BGAV_LOG_DEBUG, BGAV_LOG_WARNING, BGAV_LOG_ERROR, BGAV_LOG_INFO } |
Enumeration for log levels. More... | |
enum | bgav_stream_action_t { BGAV_STREAM_MUTE = 0, BGAV_STREAM_DECODE = 1, BGAV_STREAM_PARSE = 2 } |
Stream action. More... | |
Functions | |
bgav_t * | bgav_create () |
Create a decoder instance. | |
const char * | bgav_metadata_get_author (const bgav_metadata_t *metadata) |
Get the author (or composer) of the track. | |
const char * | bgav_metadata_get_title (const bgav_metadata_t *metadata) |
Get the title of the track. | |
const char * | bgav_metadata_get_comment (const bgav_metadata_t *metadata) |
Get an additional comment of the track. | |
const char * | bgav_metadata_get_copyright (const bgav_metadata_t *metadata) |
Get the copyright notice of the track. | |
const char * | bgav_metadata_get_album (const bgav_metadata_t *metadata) |
Get the album this track comes from. | |
const char * | bgav_metadata_get_artist (const bgav_metadata_t *metadata) |
Get the artist (or performer) of this track. | |
const char * | bgav_metadata_get_genre (const bgav_metadata_t *metadata) |
Get the genre this track belongs to. | |
const char * | bgav_metadata_get_date (const bgav_metadata_t *metadata) |
Get the date of the recording. | |
int | bgav_metadata_get_track (const bgav_metadata_t *metadata) |
Get the track index. | |
bgav_options_t * | bgav_get_options (bgav_t *bgav) |
Get the options of a decoder instance. | |
bgav_options_t * | bgav_options_create () |
Create an options container. | |
void | bgav_options_destroy (bgav_options_t *opt) |
Destroy option cotainer. | |
void | bgav_options_copy (bgav_options_t *dst, const bgav_options_t *src) |
Copy options. | |
void | bgav_options_set_connect_timeout (bgav_options_t *opt, int timeout) |
Set connect timeout. | |
void | bgav_options_set_read_timeout (bgav_options_t *opt, int timeout) |
Set read timeout. | |
void | bgav_options_set_network_bandwidth (bgav_options_t *opt, int bandwidth) |
Set network bandwidth. | |
void | bgav_options_set_network_buffer_size (bgav_options_t *opt, int size) |
Set network buffer size. | |
void | bgav_options_set_http_use_proxy (bgav_options_t *opt, int enable) |
Set proxy usage. | |
void | bgav_options_set_http_proxy_host (bgav_options_t *opt, const char *host) |
Set proxy host. | |
void | bgav_options_set_http_proxy_port (bgav_options_t *opt, int port) |
Set proxy port. | |
void | bgav_options_set_http_proxy_auth (bgav_options_t *opt, int enable) |
Enable or disable proxy authentication. | |
void | bgav_options_set_http_proxy_user (bgav_options_t *opt, const char *user) |
Set proxy username. | |
void | bgav_options_set_http_proxy_pass (bgav_options_t *opt, const char *pass) |
Set proxy password. | |
void | bgav_options_set_http_shoutcast_metadata (bgav_options_t *opt, int enable) |
Enable or disable shoutcast metadata streaming. | |
void | bgav_options_set_ftp_anonymous (bgav_options_t *opt, int enable) |
Enable or disable anonymous ftp login. | |
void | bgav_options_set_ftp_anonymous_password (bgav_options_t *opt, const char *pass) |
Set anonymous password. | |
void | bgav_options_set_default_subtitle_encoding (bgav_options_t *opt, const char *encoding) |
Set default subtitle encoding. | |
void | bgav_options_set_audio_dynrange (bgav_options_t *opt, int audio_dynrange) |
Enable dynamic range control. | |
void | bgav_options_set_seamless (bgav_options_t *opt, int seamless) |
Enable seamless playback. | |
void | bgav_options_set_sample_accurate (bgav_options_t *opt, int enable) |
Try to be sample accurate. | |
void | bgav_options_set_cache_time (bgav_options_t *opt, int t) |
Set the index creation time for caching. | |
void | bgav_options_set_cache_size (bgav_options_t *opt, int s) |
Set the maximum total size of the index cache. | |
void | bgav_options_set_seek_subtitles (bgav_options_t *opt, int seek_subtitles) |
Enable external subtitle files. | |
void | bgav_options_set_pp_level (bgav_options_t *opt, int pp_level) |
Set postprocessing level. | |
void | bgav_options_set_dvb_channels_file (bgav_options_t *opt, const char *file) |
Set DVB channels file. | |
void | bgav_options_set_prefer_ffmpeg_demuxers (bgav_options_t *opt, int prefer) |
Preference of ffmpeg demultiplexers. | |
void | bgav_options_set_log_callback (bgav_options_t *opt, bgav_log_callback callback, void *data) |
Set the callback for log messages. | |
void | bgav_options_set_name_change_callback (bgav_options_t *opt, bgav_name_change_callback callback, void *data) |
Set the callback for name change events. | |
void | bgav_options_set_metadata_change_callback (bgav_options_t *opt, bgav_metadata_change_callback callback, void *data) |
Set the callback for metadata change events. | |
void | bgav_options_set_track_change_callback (bgav_options_t *opt, bgav_track_change_callback callback, void *data) |
Set the callback for track change events. | |
void | bgav_options_set_buffer_callback (bgav_options_t *opt, bgav_buffer_callback callback, void *data) |
Set the callback for buffering notification. | |
void | bgav_options_set_user_pass_callback (bgav_options_t *opt, bgav_user_pass_callback callback, void *data) |
Set the callback for user authentication. | |
void | bgav_options_set_aspect_callback (bgav_options_t *opt, bgav_aspect_callback callback, void *data) |
Set aspect ratio change callback. | |
void | bgav_options_set_index_callback (bgav_options_t *opt, bgav_index_callback callback, void *data) |
Set index build callback. | |
bgav_device_info_t * | bgav_find_devices_vcd () |
Scan for VCD capable devices. | |
int | bgav_check_device_vcd (const char *device, char **name) |
Test if a device is VCD capable. | |
bgav_device_info_t * | bgav_find_devices_dvd () |
Scan for DVD capable devices. | |
int | bgav_check_device_dvd (const char *device, char **name) |
Test if a device is DVD capable. | |
bgav_device_info_t * | bgav_find_devices_dvb () |
Scan for DVB capable devices. | |
int | bgav_check_device_dvb (const char *device, char **name) |
Test if a device is DVB capable. | |
void | bgav_device_info_destroy (bgav_device_info_t *arr) |
Destroy a device info array. | |
int | bgav_eject_disc (const char *device) |
Eject a disc. | |
const char * | bgav_get_disc_name (bgav_t *bgav) |
Get the name of a disc. | |
int | bgav_open (bgav_t *bgav, const char *location) |
Open a file or URL. | |
int | bgav_open_vcd (bgav_t *bgav, const char *location) |
Open a VCD device. | |
int | bgav_open_dvd (bgav_t *bgav, const char *location) |
Open a DVD device. | |
int | bgav_open_dvb (bgav_t *bgav, const char *location) |
Open a DVB device. | |
int | bgav_open_fd (bgav_t *bgav, int fd, int64_t total_size, const char *mimetype) |
Open a decoder from a filedescriptor. | |
int | bgav_open_callbacks (bgav_t *bgav, int(*read_callback)(void *priv, uint8_t *data, int len), int64_t(*seek_callback)(void *priv, uint64_t pos, int whence), void *priv, const char *filename, const char *mimetype) |
Open a decoder with callbacks. | |
void | bgav_close (bgav_t *bgav) |
Close a decoder and free all associated memory. | |
bgav_edl_t * | bgav_get_edl (bgav_t *bgav) |
Get an EDL from an open decoder. | |
void | bgav_edl_dump (const bgav_edl_t *e) |
Dump an EDL to stderr. | |
int | bgav_is_redirector (bgav_t *bgav) |
Query if the decoder opened a redirector. | |
int | bgav_redirector_get_num_urls (bgav_t *bgav) |
Get the number of URLs found in the redirector. | |
const char * | bgav_redirector_get_url (bgav_t *bgav, int index) |
Get the address of an URL. | |
const char * | bgav_redirector_get_name (bgav_t *bgav, int index) |
Get the address of an URL. | |
int | bgav_num_tracks (bgav_t *bgav) |
Get the number of tracks. | |
const char * | bgav_get_description (bgav_t *bgav) |
Get a technical description of the format. | |
gavl_time_t | bgav_get_duration (bgav_t *bgav, int track) |
Get the duration of a track. | |
int | bgav_num_audio_streams (bgav_t *bgav, int track) |
Get the number of audio streams of a track. | |
int | bgav_num_video_streams (bgav_t *bgav, int track) |
Get the number of video streams of a track. | |
int | bgav_num_subtitle_streams (bgav_t *bgav, int track) |
Get the number of subtitle streams of a track. | |
const char * | bgav_get_track_name (bgav_t *bgav, int track) |
Get the name a track. | |
const bgav_metadata_t * | bgav_get_metadata (bgav_t *bgav, int track) |
Get metadata for a track. | |
int | bgav_select_track (bgav_t *bgav, int track) |
Select a track. | |
int | bgav_get_num_chapters (bgav_t *bgav, int track, int *timescale) |
Get the number of chapters. | |
const char * | bgav_get_chapter_name (bgav_t *bgav, int track, int chapter) |
Get the name of a chapter. | |
int64_t | bgav_get_chapter_time (bgav_t *bgav, int track, int chapter) |
Get the name of a chapter. | |
const char * | bgav_get_audio_language (bgav_t *bgav, int stream) |
Get the language of an audio stream. | |
const char * | bgav_get_subtitle_language (bgav_t *bgav, int stream) |
Get the language of an audio stream. | |
int | bgav_set_audio_stream (bgav_t *bgav, int stream, bgav_stream_action_t action) |
Select mode for an audio stream. | |
int | bgav_set_video_stream (bgav_t *bgav, int stream, bgav_stream_action_t action) |
Select mode for a video stream. | |
int | bgav_set_subtitle_stream (bgav_t *bgav, int stream, bgav_stream_action_t action) |
Select mode for a subtitle stream. | |
int | bgav_start (bgav_t *bgav) |
Start all codecs. | |
const gavl_audio_format_t * | bgav_get_audio_format (bgav_t *bgav, int stream) |
Get the format of an audio stream. | |
const gavl_video_format_t * | bgav_get_video_format (bgav_t *bgav, int stream) |
Get the format of a video stream. | |
const gavl_video_format_t * | bgav_get_subtitle_format (bgav_t *bgav, int stream) |
Get the video format of a subtitle stream. | |
int | bgav_subtitle_is_text (bgav_t *bgav, int stream) |
Check if a subtitle is text or graphics based. | |
const char * | bgav_get_audio_description (bgav_t *bgav, int stream) |
Get the description of an audio stream. | |
const char * | bgav_get_audio_info (bgav_t *bgav, int stream) |
Get additional info about an audio stream. | |
const char * | bgav_get_video_description (bgav_t *bgav, int stream) |
Get the description of a video stream. | |
const char * | bgav_get_subtitle_description (bgav_t *bgav, int stream) |
Get the description of a subtitle stream. | |
const char * | bgav_get_subtitle_info (bgav_t *bgav, int stream) |
Get additional info about a subtitle stream. | |
int | bgav_read_video (bgav_t *bgav, gavl_video_frame_t *frame, int stream) |
Decode a video frame. | |
int | bgav_read_audio (bgav_t *bgav, gavl_audio_frame_t *frame, int stream, int num_samples) |
Decode audio samples. | |
int | bgav_has_subtitle (bgav_t *bgav, int stream) |
Check, if a new subtitle is available. | |
int | bgav_read_subtitle_overlay (bgav_t *bgav, gavl_overlay_t *ovl, int stream) |
Decode an overlay subtitle. | |
int | bgav_read_subtitle_text (bgav_t *bgav, char **ret, int *ret_alloc, int64_t *start_time, int64_t *duration, int stream) |
Decode a text subtitle. | |
int | bgav_can_seek (bgav_t *bgav) |
Check if a track is seekabkle. | |
void | bgav_seek (bgav_t *bgav, gavl_time_t *time) |
Seek to a specific time. | |
void | bgav_seek_scaled (bgav_t *bgav, int64_t *time, int scale) |
Seek to a specific stream position. | |
int | bgav_can_seek_sample (bgav_t *bgav) |
Check if a track is seekabkle with sample accuracy. | |
int64_t | bgav_audio_duration (bgav_t *bgav, int stream) |
Get the audio duration. | |
int64_t | bgav_audio_start_time (bgav_t *bgav, int stream) |
Get the audio start time. | |
int64_t | bgav_video_duration (bgav_t *bgav, int stream) |
Get the video duration. | |
int64_t | bgav_video_start_time (bgav_t *bgav, int stream) |
Get the video start time. | |
int64_t | bgav_subtitle_duration (bgav_t *bgav, int stream) |
Get the subtitle duration. | |
void | bgav_seek_audio (bgav_t *bgav, int stream, int64_t sample) |
Seek to a specific audio sample. | |
void | bgav_seek_video (bgav_t *bgav, int stream, int64_t time) |
Seek to a specific video time. | |
int64_t | bgav_video_keyframe_before (bgav_t *bgav, int stream, int64_t time) |
Get the time of the closest keyframe before a given time. | |
int64_t | bgav_video_keyframe_after (bgav_t *bgav, int stream, int64_t time) |
Get the time of the closest keyframe after a given time. | |
void | bgav_seek_subtitle (bgav_t *bgav, int stream, int64_t time) |
Seek to a specific subtitle position. | |
void | bgav_dump (bgav_t *bgav) |
Dump informations of all tracks to stderr. | |
void | bgav_codecs_dump () |
Dump informations about all available codecs to stderr. | |
void | bgav_formats_dump () |
Dump informations about all available format demuxers to stderr. | |
void | bgav_inputs_dump () |
Dump informations about all available input modules to stderr. | |
void | bgav_redirectors_dump () |
Dump informations about all available redirectors to stderr. | |
void | bgav_subreaders_dump () |
Dump informations about all available subtitle readers to stderr. |