gmerlin-avdecoder
Functions
Opening a media stream

Various methods of opening a media stream. More...

Functions

BGAV_PUBLIC int bgav_open (bgav_t *bgav, const char *location)
 Open a file or URL. More...
 
BGAV_PUBLIC int bgav_open_vcd (bgav_t *bgav, const char *location)
 Open a VCD device. More...
 
BGAV_PUBLIC int bgav_open_dvd (bgav_t *bgav, const char *location)
 Open a DVD device. More...
 
BGAV_PUBLIC int bgav_open_dvb (bgav_t *bgav, const char *location)
 Open a DVB device. More...
 
BGAV_PUBLIC int bgav_open_fd (bgav_t *bgav, int fd, int64_t total_size, const char *mimetype)
 Open a decoder from a filedescriptor. More...
 
BGAV_PUBLIC 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, int64_t total_bytes)
 Open a decoder with callbacks. More...
 

Detailed Description

Various methods of opening a media stream.

Function Documentation

BGAV_PUBLIC int bgav_open ( bgav_t bgav,
const char *  location 
)

Open a file or URL.

Parameters
bgavA decoder instance
locationThe URL or path to open
Returns
1 if the location was successfully openend, 0 else.
BGAV_PUBLIC int bgav_open_vcd ( bgav_t bgav,
const char *  location 
)

Open a VCD device.

Parameters
bgavA decoder instance
locationThe device node
Returns
1 if the VCD device was successfully openend, 0 else.
BGAV_PUBLIC int bgav_open_dvd ( bgav_t bgav,
const char *  location 
)

Open a DVD device.

Parameters
bgavA decoder instance
locationThe device node
Returns
1 if the DVD device was successfully openend, 0 else.
BGAV_PUBLIC int bgav_open_dvb ( bgav_t bgav,
const char *  location 
)

Open a DVB device.

Parameters
bgavA decoder instance
locationThe device directory
Returns
1 if the DVB device was successfully openend, 0 else.

This function will search your system for channel configuration files, which are created by other tools. The channels are then available as normal tracks.

BGAV_PUBLIC int bgav_open_fd ( bgav_t bgav,
int  fd,
int64_t  total_size,
const char *  mimetype 
)

Open a decoder from a filedescriptor.

Parameters
bgavA decoder instance
fdThe filedescriptor
total_sizeThe total number of available bytes or 0 if this info is not known.
mimetypeThe mimetype of the input or NULL if this info is not known.
Returns
1 if the filedescriptor was successfully openend, 0 else.
BGAV_PUBLIC int bgav_open_callbacks ( bgav_t bgav,
int(*)(void *priv, uint8_t *data, int len)  read_callback,
int64_t(*)(void *priv, uint64_t pos, int whence)  seek_callback,
void *  priv,
const char *  filename,
const char *  mimetype,
int64_t  total_bytes 
)

Open a decoder with callbacks.

Parameters
bgavA decoder instance
read_callbackCallback for reading data
seek_callbackCallback for seeking
privPrivate argument for the callbacks
filenameThe filename of the input or NULL if this info is not known.
mimetypeThe mimetype of the input or NULL if this info is not known.
total_bytesFile size in bytes or 0 if this info is not known.
Returns
1 on success, 0 else.