MP4BinaryToBase64 - Man Page

Convert binary data to a base 64 string

Syntax

#include <mp4.h>

char* MP4BinaryToBase64(
const u_int8_t* pData,
u_int32_t dataSize
)

Arguments

pData

Specifies the pointer to the binary data.

dataSize

Specifies the size in bytes of the binary data.

Return Values

Upon success, a null terminated string representing the data in base 64. Upon error, NULL.

Description

MP4BinaryToBase64 converts binary data to a base 64 string. This encoding maps groups of 6 bits into the character set [A-Za-z0-9+/=]. The string is in malloc'd memory, so the caller is responsible for free'ing the memory.

This utility is useful for generating the SDP descriptions for some RTP payloads.

Example: 0x12, 0xAB -> "Eqs="

See Also

MP4(3)

Info

Version 0.9 Cisco Systems Inc. MP4 File Format Library