gmerlin-avdecoder
Functions

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_PUBLIC int bgav_is_redirector ( bgav_t bgav)

Query if the decoder opened a redirector.

Parameters
bgavA 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_PUBLIC int bgav_redirector_get_num_urls ( bgav_t bgav)

Get the number of URLs found in the redirector.

Parameters
bgavA decoder instance
Returns
The number of URLs.
BGAV_PUBLIC const char* bgav_redirector_get_url ( bgav_t bgav,
int  index 
)

Get the address of an URL.

Parameters
bgavA decoder instance
indexIndex of the url (starting with 0)
Returns
The URL (can be passed to a subsequent bgav_open)
BGAV_PUBLIC const char* bgav_redirector_get_name ( bgav_t bgav,
int  index 
)

Get the address of an URL.

Parameters
bgavA decoder instance
indexIndex of the url (starting with 0)
Returns
The name of the stream or NULL if this information is not present.