FFmpeg 5.1.6
|
UUID parsing and serialization utilities. More...
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | AV_PRI_UUID |
#define | AV_PRI_URN_UUID |
#define | AV_UUID_ARG(x) |
#define | AV_UUID_LEN 16 |
Typedefs | |
typedef uint8_t | AVUUID[AV_UUID_LEN] |
Functions | |
int | av_uuid_parse (const char *in, AVUUID uu) |
Parses a string representation of a UUID formatted according to IETF RFC 4122 into an AVUUID. More... | |
int | av_uuid_urn_parse (const char *in, AVUUID uu) |
Parses a URN representation of a UUID, as specified at IETF RFC 4122, into an AVUUID. More... | |
int | av_uuid_parse_range (const char *in_start, const char *in_end, AVUUID uu) |
Parses a string representation of a UUID formatted according to IETF RFC 4122 into an AVUUID. More... | |
void | av_uuid_unparse (const AVUUID uu, char *out) |
Serializes a AVUUID into a string representation according to IETF RFC 4122. More... | |
static int | av_uuid_equal (const AVUUID uu1, const AVUUID uu2) |
Compares two UUIDs for equality. More... | |
static void | av_uuid_copy (AVUUID dest, const AVUUID src) |
Copies the bytes of src into dest. More... | |
static void | av_uuid_nil (AVUUID uu) |
Sets a UUID to the nil UUID, i.e. More... | |
UUID parsing and serialization utilities.
The library treats the UUID as an opaque sequence of 16 unsigned bytes, i.e. ignoring the internal layout of the UUID, which depends on the type of the UUID.
Definition in file uuid.h.
#define AV_PRI_UUID |
#define AV_PRI_URN_UUID |
#define AV_UUID_ARG | ( | x | ) |
typedef uint8_t AVUUID[AV_UUID_LEN] |
int av_uuid_parse | ( | const char * | in, |
AVUUID | uu | ||
) |
Parses a string representation of a UUID formatted according to IETF RFC 4122 into an AVUUID.
The parsing is case-insensitive. The string must be 37 characters long, including the terminating NUL character.
Example string representation: "2fceebd0-7017-433d-bafb-d073a7116696"
[in] | in | String representation of a UUID, e.g. 2fceebd0-7017-433d-bafb-d073a7116696 |
[out] | uu | AVUUID |
int av_uuid_urn_parse | ( | const char * | in, |
AVUUID | uu | ||
) |
Parses a URN representation of a UUID, as specified at IETF RFC 4122, into an AVUUID.
The parsing is case-insensitive. The string must be 46 characters long, including the terminating NUL character.
Example string representation: "urn:uuid:2fceebd0-7017-433d-bafb-d073a7116696"
[in] | in | URN UUID |
[out] | uu | AVUUID |
int av_uuid_parse_range | ( | const char * | in_start, |
const char * | in_end, | ||
AVUUID | uu | ||
) |
Parses a string representation of a UUID formatted according to IETF RFC 4122 into an AVUUID.
The parsing is case-insensitive.
[in] | in_start | Pointer to the first character of the string representation |
[in] | in_end | Pointer to the character after the last character of the string representation. That memory location is never accessed. It is an error if in_end - in_start != 36 . |
[out] | uu | AVUUID |
void av_uuid_unparse | ( | const AVUUID | uu, |
char * | out | ||
) |
Serializes a AVUUID into a string representation according to IETF RFC 4122.
The string is lowercase and always 37 characters long, including the terminating NUL character.
[in] | uu | AVUUID |
[out] | out | Pointer to an array of no less than 37 characters. |