#include <ogg/ogg.h>
Go to the source code of this file.
Data Structures | |
struct | yuv_buffer |
A YUV buffer for passing uncompressed frames to and from the codec. More... | |
struct | theora_info |
Theora bitstream info. More... | |
struct | theora_state |
Codec internal state and context. More... | |
struct | theora_comment |
Comment header metadata. More... | |
Defines | |
#define | OC_FAULT -1 |
general failure | |
#define | OC_EINVAL -10 |
library encountered invalid internal data | |
#define | OC_DISABLED -11 |
requested action is disabled | |
#define | OC_BADHEADER -20 |
header packet was corrupt/invalid | |
#define | OC_NOTFORMAT -21 |
packet is not a theora packet | |
#define | OC_VERSION -22 |
bitstream version is not handled | |
#define | OC_IMPL -23 |
feature or action not implemented | |
#define | OC_BADPACKET -24 |
packet is corrupt | |
#define | OC_NEWPACKET -25 |
packet is an (ignorable) unhandled extension | |
Typedefs | |
typedef theora_comment | theora_comment |
Comment header metadata. | |
Enumerations | |
enum | theora_colorspace { OC_CS_UNSPECIFIED, OC_CS_ITU_REC_470M, OC_CS_ITU_REC_470BG } |
A Colorspace. More... | |
Functions | |
const char * | theora_version_string (void) |
Retrieve a human-readable string to identify the encoder vendor and version. | |
ogg_uint32_t | theora_version_number (void) |
Retrieve a 32-bit version number. | |
int | theora_encode_init (theora_state *th, theora_info *c) |
Initialize the theora encoder. | |
int | theora_encode_YUVin (theora_state *t, yuv_buffer *yuv) |
Submit a YUV buffer to the theora encoder. | |
int | theora_encode_packetout (theora_state *t, int last_p, ogg_packet *op) |
Request the next packet of encoded video. | |
int | theora_encode_header (theora_state *t, ogg_packet *op) |
Request a packet containing the initial header. | |
int | theora_encode_comment (theora_comment *tc, ogg_packet *op) |
Request a comment header packet from provided metadata. | |
int | theora_encode_tables (theora_state *t, ogg_packet *op) |
Request a packet containing the codebook tables for the stream. | |
int | theora_decode_header (theora_info *ci, theora_comment *cc, ogg_packet *op) |
Decode an Ogg packet, with the expectation that the packet contains an initial header, comment data or codebook tables. | |
int | theora_decode_init (theora_state *th, theora_info *c) |
Initialize a theora_state handle for decoding. | |
int | theora_decode_packetin (theora_state *th, ogg_packet *op) |
Input a packet containing encoded data into the theora decoder. | |
int | theora_decode_YUVout (theora_state *th, yuv_buffer *yuv) |
Output the next available frame of decoded YUV data. | |
int | theora_packet_isheader (ogg_packet *op) |
Report whether a theora packet is a header or not This function does no verification beyond checking the header flag bit so it should not be used for bitstream identification; use theora_decode_header() for that. | |
int | theora_packet_iskeyframe (ogg_packet *op) |
Report whether a theora packet is a keyframe or not. | |
ogg_int64_t | theora_granule_frame (theora_state *th, ogg_int64_t granulepos) |
Convert a granulepos to an absolute frame number. | |
double | theora_granule_time (theora_state *th, ogg_int64_t granulepos) |
Convert a granulepos to absolute time in seconds. | |
void | theora_info_init (theora_info *c) |
Initialize a theora_info structure. | |
void | theora_info_clear (theora_info *c) |
Clear a theora_info structure. | |
void | theora_clear (theora_state *t) |
Free all internal data associated with a theora_state handle. | |
void | theora_comment_init (theora_comment *tc) |
Initialize an allocated theora_comment structure. | |
void | theora_comment_add (theora_comment *tc, char *comment) |
Add a comment to an initialized theora_comment structure. | |
void | theora_comment_add_tag (theora_comment *tc, char *tag, char *value) |
Add a comment to an initialized theora_comment structure. | |
char * | theora_comment_query (theora_comment *tc, char *tag, int count) |
look up a comment value by tag | |
int | theora_comment_query_count (theora_comment *tc, char *tag) |
look up the number of instances of a tag | |
void | theora_comment_clear (theora_comment *tc) |
clears an allocated theora_comment struct so that it can be freed. |
|
Comment header metadata. This structure holds the in-stream metadata corresponding to the 'comment' header packet. Meta data is stored as a series of (tag, value) pairs, in length-encoded string vectors. The first occurence of the '=' character delimits the tag and value. A particular tag may occur more than once. The character set encoding for the strings is always utf-8, but the tag names are limited to case-insensitive ascii. See the spec for details. In filling in this structure, theora_decode_header() will null-terminate the user_comment strings for safety. However, the bitstream format itself treats them as 8-bit clean, and so the length array should be treated as authoritative for their length. |
|
A Colorspace.
|
|
Free all internal data associated with a theora_state handle.
|
|
Add a comment to an initialized theora_comment structure.
|
|
Add a comment to an initialized theora_comment structure.
|
|
look up a comment value by tag
|
|
look up the number of instances of a tag
|
|
Decode an Ogg packet, with the expectation that the packet contains an initial header, comment data or codebook tables.
|
|
Initialize a theora_state handle for decoding.
|
|
Input a packet containing encoded data into the theora decoder.
|
|
Output the next available frame of decoded YUV data.
|
|
Request a comment header packet from provided metadata. A pointer to the comment data is placed in a user-provided ogg_packet structure.
|
|
Request a packet containing the initial header. A pointer to the header data is placed in a user-provided ogg_packet structure.
|
|
Initialize the theora encoder.
|
|
Request the next packet of encoded video. The encoded data is placed in a user-provided ogg_packet structure.
|
|
Request a packet containing the codebook tables for the stream. A pointer to the codebook data is placed in a user-provided ogg_packet structure.
|
|
Submit a YUV buffer to the theora encoder.
|
|
Convert a granulepos to an absolute frame number. The granulepos is interpreted in the context of a given theora_state handle.
|
|
Convert a granulepos to absolute time in seconds. The granulepos is interpreted in the context of a given theora_state handle.
|
|
Clear a theora_info structure. All values within the given theora_info structure are cleared, and associated internal codec setup data is freed.
|
|
Initialize a theora_info structure. All values within the given theora_info structure are initialized, and space is allocated within libtheora for internal codec setup data.
|
|
Report whether a theora packet is a header or not This function does no verification beyond checking the header flag bit so it should not be used for bitstream identification; use theora_decode_header() for that.
|
|
Report whether a theora packet is a keyframe or not.
|
|
Retrieve a 32-bit version number. This number is composed of a 16-bit major version, 8-bit minor version and 8 bit sub-version, composed as follows: (VERSION_MAJOR<<16) + (VERSION_MINOR<<8) + (VERSION_SUB)
|
|
Retrieve a human-readable string to identify the encoder vendor and version.
|