Opening a media stream
Decoding of multimedia streams

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_callbacks (bgav_t *bgav, int(*read_callback)(void *priv, uint8_t *data, int len), int64_t(*seek_callback)(void *priv, int64_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_open()

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

Open a file or URL.

Parameters

  bgav | A decoder instance
  location | The URL or path to open

Returns
  1 if the location was successfully openend, 0 else.

## bgav_open_vcd()

BGAV_PUBLIC int bgav_open_vcd | ( | bgav_t * | bgav,
|  | const char * | location
| ) |  |

Open a VCD device.

Parameters

  bgav | A decoder instance
  location | The device node

Returns
  1 if the VCD device was successfully openend, 0 else.

## bgav_open_dvd()

BGAV_PUBLIC int bgav_open_dvd | ( | bgav_t * | bgav,
|  | const char * | location
| ) |  |

Open a DVD device.

Parameters

  bgav | A decoder instance
  location | The device node

Returns
  1 if the DVD device was successfully openend, 0 else.

## bgav_open_dvb()

BGAV_PUBLIC int bgav_open_dvb | ( | bgav_t * | bgav,
|  | const char * | location
| ) |  |

Open a DVB device.

Parameters

  bgav | A decoder instance
  location | The 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_open_callbacks()

BGAV_PUBLIC int bgav_open_callbacks | ( | bgav_t * | bgav,
|  | int(*)(void *priv, uint8_t *data, int len) | read_callback,
|  | int64_t(*)(void *priv, int64_t pos, int whence) | seek_callback,
|  | void * | priv,
|  | const char * | filename,
|  | const char * | mimetype,
|  | int64_t | total_bytes
| ) |  |

Open a decoder with callbacks.

Parameters

  bgav | A decoder instance
  read_callback | Callback for reading data
  seek_callback | Callback for seeking
  priv | Private argument for the callbacks
  filename | The filename of the input or NULL if this info is not known.
  mimetype | The mimetype of the input or NULL if this info is not known.
  total_bytes | File size in bytes or 0 if this info is not known.

Returns
  1 on success, 0 else.