libquvi
Functions
media_stream_select.c File Reference
#include "config.h"
#include <glib/gi18n-lib.h>
#include <glib.h>
#include "quvi.h"
#include "_quvi_s.h"
#include "_quvi_media_s.h"
#include "misc/re.h"

Functions

void quvi_media_stream_select (quvi_media_t handle, const char *id)
 Select a m_stream matching a m_stream_id. More...
 

Function Documentation

void quvi_media_stream_select ( quvi_media_t  handle,
const char *  id 
)

Select a m_stream matching a m_stream_id.

Matches the m_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
parse_media