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  

#define UPIPE_HELPER_ICONV(STRUCTURE, NATIVE_ENCODING, CURRENT_ENCODING, ICONV_HANDLE)  

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

#define _UPIPE_UPIPE_HELPER_ICONV_H_  

This macro is declared in upipe/upipe_helper_iconv.h source file, line 31.

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc