upipe/upipe_helper_iconv.h header reference
Upipe helper functions handling iconv (required by biTStream) More
Header inclusion
Members
Macro
Description
Upipe helper functions handling iconv (required by biTStream)
Members detail
This macro is declared in upipe/upipe_helper_iconv.h source file, line 83.
This macro declares four functions handling iconv (required by biTStream).
You must add two members to your private pipe structure, for instance:
const char *current_encoding;
iconv_t iconv_handle;
You must also declare UPIPE_HELPER_UPIPE prior to using this macro.
Supposing the name of your structure is upipe_foo, it declares:
void upipe_foo_init_iconv(struct upipe *upipe)
Initializes the fields.
char *upipe_foo_iconv_append_null(const char *string, size_t length)
Called internally in cases where no conversion is needed.
char *upipe_foo_iconv_wrapper(void *_upipe, const char *encoding,
char *string, size_t length)Wraps around iconv in biTStream calls. The returned string must be freed by the user.
void upipe_foo_clean_iconv(struct upipe *upipe)
Releases the iconv handle.
Parameter list:
- STRUCTURE: name of your private upipe structure
- NATIVE_ENCODING: native encoding to convert to ("UTF-8")
- CURRENT_ENCODING: name of the const char * field of your private upipe structure
- ICONV_HANDLE: name of the iconv_t field of your private upipe structure
This macro is declared in upipe/upipe_helper_iconv.h source file, line 31.