upipe/upipe_helper_iconv.h header reference
Upipe helper functions handling iconv (required by biTStream) More
Header inclusion [link]
Members [link]
Macro [link]
Description [link]
Upipe helper functions handling iconv (required by biTStream)
Members detail [link]
#define UPIPE_HELPER_ICONV(STRUCTURE, NATIVE_ENCODING, CURRENT_ENCODING, ICONV_HANDLE) [link]
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:
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.
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
#define _UPIPE_UPIPE_HELPER_ICONV_H_ [link]
This macro is declared in upipe/upipe_helper_iconv.h source file, line 31.