Redirector support
Decoding of multimedia streams

Redirector support. More...

## Functions

BGAV_PUBLIC int | bgav_is_redirector (bgav_t *bgav)
| Query if the decoder opened a redirector. More...
BGAV_PUBLIC int | bgav_redirector_get_num_urls (bgav_t *bgav)
| Get the number of URLs found in the redirector. More...
BGAV_PUBLIC const char * | bgav_redirector_get_url (bgav_t *bgav, int index)
| Get the address of an URL. More...
BGAV_PUBLIC const char * | bgav_redirector_get_name (bgav_t *bgav, int index)
| Get the address of an URL. More...

## Detailed Description

Redirector support.

After opening the decoder with bgav_open, you must check if the opened stream is actually a redirector with bgav_is_redirector. If this returns 1, get the number of urls with bgav_redirector_get_num_urls. Then, for each URL, get the address with bgav_redirector_get_url and the title of the URL with bgav_redirector_get_name. After you have this info, close and destroy the decoder with bgav_close and open a newly created decoder with one of the URLs you got.

## Function Documentation

## bgav_is_redirector()

BGAV_PUBLIC int bgav_is_redirector | ( | bgav_t * | bgav | ) |

Query if the decoder opened a redirector.

Parameters

  bgav | A decoder instance

Returns
  1 if the decoder opened a redirector, 0 else

This function MUST be called after bgav_open to query if we openend a redirector.

## bgav_redirector_get_num_urls()

BGAV_PUBLIC int bgav_redirector_get_num_urls | ( | bgav_t * | bgav | ) |

Get the number of URLs found in the redirector.

Parameters

  bgav | A decoder instance

Returns
  The number of URLs.

## bgav_redirector_get_url()

BGAV_PUBLIC const char* bgav_redirector_get_url | ( | bgav_t * | bgav,
|  | int | index
| ) |  |

Get the address of an URL.

Parameters

  bgav | A decoder instance
  index | Index of the url (starting with 0)

Returns
  The URL (can be passed to a subsequent bgav_open)

## bgav_redirector_get_name()

BGAV_PUBLIC const char* bgav_redirector_get_name | ( | bgav_t * | bgav,
|  | int | index
| ) |  |

Get the address of an URL.

Parameters

  bgav | A decoder instance
  index | Index of the url (starting with 0)

Returns
  The name of the stream or NULL if this information is not present.