72 "Too old or unsupported Theora (%x)\n", thp->
version);
96 if (!(timebase.
num > 0 && timebase.
den > 0)) {
139 *cdp++ = os->
psize >> 8;
140 *cdp++ = os->
psize & 0xff;
153 uint64_t iframe, pframe;
159 pframe = gp & thp->
gpmask;
168 *dts = iframe + pframe;
170 return iframe + pframe;
175 struct ogg *
ogg =
s->priv_data;
189 for (seg = os->
segp; seg < os->
nsegs; seg++) {
199 s->streams[idx]->start_time = os->
lastpts;
200 if (
s->streams[idx]->duration > 0)
201 s->streams[idx]->duration =
av_sat_sub64(
s->streams[idx]->duration,
s->streams[idx]->start_time);
214 .magic =
"\200theora",
static AVFormatContext * ctx
bitstream reader API header.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_reallocp(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
#define AV_NOPTS_VALUE
Undefined timestamp value.
Macro definitions for various function/variable attributes.
Memory handling functions.
int ff_vorbis_stream_comment(AVFormatContext *as, AVStream *st, const uint8_t *buf, int size)
Parse Vorbis comments and add metadata to an AVStream.
const struct ogg_codec ff_theora_codec
static int theora_packet(AVFormatContext *s, int idx)
static uint64_t theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts)
static int theora_header(AVFormatContext *s, int idx)
int extradata_size
Size of the extradata content in bytes.
int height
The height of the video frame in pixels.
int width
The width of the video frame in pixels.
enum AVMediaType codec_type
General type of the encoded data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
enum AVStreamParseType need_parsing
Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi.
Copyright (C) 2005 Michael Ahlberg, Måns Rullgård.
struct ogg_stream * streams