|
-
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(). |