Main Page   Modules   Data Structures   Data Fields   Related Pages  

Context


Data Structures

struct  rte_context_info

rte_context_info flags

#define RTE_FLAG_SEEKS   (1 << 0)

Typedefs

typedef struct rte_context rte_context

Functions

rte_codecrte_get_codec (rte_context *context, rte_stream_type stream_type, int stream_index)
void rte_remove_codec (rte_context *context, rte_stream_type stream_type, unsigned int stream_index)
rte_context_inforte_context_info_enum (unsigned int index)
rte_context_inforte_context_info_by_keyword (const char *keyword)
rte_context_inforte_context_info_by_context (rte_context *context)
rte_contextrte_context_new (const char *keyword, void *user_data, char **errstr)
void rte_context_delete (rte_context *context)
void* rte_context_user_data (rte_context *context)

Define Documentation

#define RTE_FLAG_SEEKS   (1 << 0)
 

The context needs to seek back, i. e. it is not possible to stream the output, it must be stored on a rewritable medium until encoding is stopped. For instance this applies to the RIFF-WAVE format.


Typedef Documentation

typedef struct rte_context rte_context
 

Opaque rte_context object. You can allocate an rte_context with rte_context_new().


Function Documentation

rte_codec * rte_get_codec ( rte_context * context,
rte_stream_type stream_type,
int stream_index )
 

Parameters:
context   Initialized rte_context as returned by rte_context_new().
stream_type   RTE_STREAM_VIDEO, RTE_STREAM_AUDIO, ...
stream_index   Elementary stream number.

Returns a pointer to the rte_codec assigned with rte_set_codec() to encode this elementary stream type and index.

Returns:
Static pointer to an opaque rte_codec object, NULL if no codec has been assigned or the codec has been removed with rte_remove_codec() or rte_codec_delete().

void rte_remove_codec ( rte_context * context,
rte_stream_type stream_type,
unsigned int stream_index )
 

Parameters:
context   Initialized rte_context as returned by rte_context_new().
stream_type   RTE_STREAM_VIDEO, RTE_STREAM_AUDIO, ...
stream_index   Elementary stream number.

Removes the codec previously assigned with rte_set_codec() to encode the given elementary stream type and number.

rte_context_info* rte_context_info_enum ( unsigned int index )
 

Parameters:
index   Index into the context format table.

Enumerates available contexts (backends/file formats/multiplexers). You should start at index 0, incrementing.

Some codecs may depend on machine features such as SIMD instructions or the presence of certain libraries, thus the list can vary from session to session.

Returns:
Static pointer, data not to be freed, to a rte_context_info structure. NULL if the index is out of bounds.

rte_context_info* rte_context_info_by_keyword ( const char * keyword )
 

Parameters:
keyword   Context format identifier as in rte_context_info and rte_context_new().

Similar to rte_context_info_enum(), but this function attempts to find a context info by keyword.

Returns:
Static pointer to a rte_context_info structure, NULL if the named context format has not been found.

rte_context_info* rte_context_info_by_context ( rte_context * context )
 

Parameters:
context   Initialized rte_context as returned by rte_context_new().

Returns the context info for the given context.

Returns:
Static pointer to a rte_context_info structure, NULL if the context is NULL.

rte_context* rte_context_new ( const char * keyword,
void * user_data,
char ** errstr )
 

Parameters:
keyword   Context format identifier as in rte_context_info.
user_data   Pointer stored in the context, can be retrieved with rte_context_user_data().
errstr   If non-zero and the function fails, a pointer to an error description will be stored here. You must free() this string when no longer needed.

Creates a new rte context encoding files in the format specified by keyword. As a special service you can initialize context options by appending to the keyword like this:

 rte_context_new ("keyword; quality=75.5, comment=\"example\"", NULL, NULL);  

RTE is thread aware: Multiple threads can allocate contexts but sharing the same context between threads is not safe unless you implement your own mutual exclusion mechanism.

Returns:
Pointer to a newly allocated rte_context structure, which must be freed by calling rte_context_delete(). NULL is returned when the named context format is unavailable, the option string or option values are incorrect or some other error occurred. See also rte_errstr().

void rte_context_delete ( rte_context * context )
 

Parameters:
context   Initialized rte_context previously allocated with rte_context_new().

This function stops encoding if active, then frees all resources associated with the context.

void* rte_context_user_data ( rte_context * context )
 

Parameters:
context   Initialized rte_context as returned by rte_context_new().

Retrieves the pointer stored in the user data field of the context.

Returns:
User pointer.


Generated at Wed Mar 22 23:35:36 2006 for RTE Library by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001