libquvi
 All Files Functions Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Media property

Functions

void quvi_media_free (quvi_media_t handle)
 Free all of memory used by a media handle.
void quvi_media_get (quvi_media_t handle, QuviMediaProperty property,...)
 Return a media property.
quvi_media_t quvi_media_new (quvi_t handle, const char *url)
 Parse media properties for URL.
void quvi_media_stream_choose_best (quvi_media_t handle)
 Selects the Media stream that was determined to be of the "best quality".
QuviBoolean quvi_media_stream_next (quvi_media_t handle)
 Traverse to next available Media stream.
void quvi_media_stream_reset (quvi_media_t handle)
 Resets to the first available Media stream.
void quvi_media_stream_select (quvi_media_t handle, const char *id)
 Select a Media stream matching a Media stream ID.

Detailed Description

Function Documentation

void quvi_media_free ( quvi_media_t  handle)

Free all of memory used by a media handle.

Note
If handle is NULL the function simply returns
See Also
Parsing media properties
void quvi_media_get ( quvi_media_t  handle,
QuviMediaProperty  property,
  ... 
)

Return a media property.

See Also
Parsing media properties
Note
  • Accessing any of the QUVI_MEDIA_STREAM_PROPERTY_* values using this function will cause the library to advance to the first stream in the list, this will conflict with quvi_media_stream_next, causing quvi_media_stream_next to advance from the second stream, not the first stream
  • URLs will be returned in the escaped form
quvi_media_t quvi_media_new ( quvi_t  handle,
const char *  url 
)

Parse media properties for URL.

Returns
New handle, quvi_media_free it when done using it
Note
  • Calling this function restores the current libcURL session handle to its initial state (cookies cleared, custom headers cleared, default user-agent string restored, ...)
  • Use quvi_ok for checking if an error occurred
See Also
Parsing media properties
void quvi_media_stream_choose_best ( quvi_media_t  handle)

Selects the Media stream that was determined to be of the "best quality".

Note
  • Only useful when there are >1 media streams available, otherwise the function falls back to the first available Media stream (the default)
  • The Media script determines the best quality Media stream
See Also
Parsing media properties
QuviBoolean quvi_media_stream_next ( quvi_media_t  handle)

Traverse to next available Media stream.

Returns
QUVI_TRUE if succeeded, otherwise QUVI_FALSE
See Also
Parsing media properties
void quvi_media_stream_reset ( quvi_media_t  handle)

Resets to the first available Media stream.

See Also
Parsing media properties
void quvi_media_stream_select ( quvi_media_t  handle,
const char *  id 
)

Select a Media stream matching a Media stream ID.

Matches the Media stream ID (pattern) to the available media stream IDs and selects the stream. This function returns immediately if a matching ID was found. The ID value may be a comma-separated value (e.g. "foo,bar,baz"). The ID may also contain the keywords 'croak' and 'best' (see the notes below).

Note
  • ID value is used as regular expression pattern
  • ID may contain the reserved keyword 'best'
  • ID may contain the reserved keyword 'croak'
    • This will cause the function to exit immediately when it is reached
    • The result may be checked with quvi_ok
      • The code may be retrieved using quvi_get
      • The error message may be retrieved using quvi_errmsg
  • If nothing matched (and the 'croak' keyword was specified) the function will return the first (default) available language
  • Always confirm the result with quvi_ok
See Also
Parsing media properties