Loading...
Searching...
No Matches
OpusTags Struct Reference

The metadata from an Ogg Opus stream. More...

`#include <opusfile.h>`

## Data Fields

char ** | user_comments
| The array of comment string vectors.
int * | comment_lengths
| An array of the corresponding length of each vector, in bytes.
int | comments
| The total number of comment streams.
char * | vendor
| The null-terminated vendor string.

## Detailed Description

The metadata from an Ogg Opus stream.

This structure holds the in-stream metadata corresponding to the 'comment' header packet of an Ogg Opus stream. The comment header is meant to be used much like someone jotting a quick note on the label of a CD. It should be a short, to the point text note that can be more than a couple words, but not more than a short paragraph.

The metadata is stored as a series of (tag, value) pairs, in length-encoded string vectors, using the same format as Vorbis (without the final "framing bit"), Theora, and Speex, except for the packet header. The first occurrence of the '=' character delimits the tag and value. A particular tag may occur more than once, and order is significant. The character set encoding for the strings is always UTF-8, but the tag names are limited to ASCII, and treated as case-insensitive. See the Vorbis comment header specification for details.

In filling in this structure, libopusfile will null-terminate the user_comments strings for safety. However, the bitstream format itself treats them as 8-bit clean vectors, possibly containing NUL characters, so the comment_lengths array should be treated as their authoritative length.

This structure is binary and source-compatible with a `vorbis_comment`, and pointers to it may be freely cast to `vorbis_comment` pointers, and vice versa. It is provided as a separate type to avoid introducing a compile-time dependency on the libvorbis headers.

## Field Documentation

## vendor

char* OpusTags::vendor

The null-terminated vendor string.

This identifies the software used to encode the stream.

The documentation for this struct was generated from the following file:

- opusfile.h