FFmpeg
Loading...
Searching...
No Matches
theora.c File Reference
#include <stdlib.h>
#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavcodec/get_bits.h"
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavformat/ogg/mapping.h"
#include "libavformat/vorbis/comment.h"

Go to the source code of this file.

Data Structures

struct  TheoraParams
 

Enumerations

enum  TheoraPacketType {
  THEORA_PACKET_DATA , THEORA_PACKET_ID , THEORA_PACKET_COMMENT , THEORA_PACKET_SETUP ,
  THEORA_PACKET_RESERVED
}
 Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi. More...
 

Functions

static int theora_pack_headers (TheoraParams *thp, uint8_t **buf)
 Pack the three headers of a link with Xiph lacing, which carries headers of any size, and free them.
 
static int theora_header (AVFormatContext *s, int idx)
 
static uint64_t theora_gptopts (AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts)
 
static enum TheoraPacketType theora_packet_type (const struct ogg_stream *os)
 
static int theora_check_packet_order (AVFormatContext *s, TheoraParams *thp, enum TheoraPacketType type)
 
static int theora_packet (AVFormatContext *s, int idx)
 
static void theora_cleanup (AVFormatContext *s, int idx)
 

Variables

const struct ogg_codec ff_theora_codec
 

Enumeration Type Documentation

◆ TheoraPacketType

Copyright (C) 2005 Matthieu CASTET, Alex Beregszaszi.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Enumerator
THEORA_PACKET_DATA 
THEORA_PACKET_ID 
THEORA_PACKET_COMMENT 
THEORA_PACKET_SETUP 
THEORA_PACKET_RESERVED 

Definition at line 34 of file theora.c.

Function Documentation

◆ theora_pack_headers()

static int theora_pack_headers ( TheoraParams * thp,
uint8_t ** buf )
static

Pack the three headers of a link with Xiph lacing, which carries headers of any size, and free them.

Definition at line 55 of file theora.c.

Referenced by theora_header(), and theora_packet().

◆ theora_header()

static int theora_header ( AVFormatContext * s,
int idx )
static

Definition at line 81 of file theora.c.

◆ theora_gptopts()

static uint64_t theora_gptopts ( AVFormatContext * ctx,
int idx,
uint64_t gp,
int64_t * dts )
static

Definition at line 195 of file theora.c.

Referenced by theora_packet().

◆ theora_packet_type()

static enum TheoraPacketType theora_packet_type ( const struct ogg_stream * os)
static

Definition at line 221 of file theora.c.

Referenced by theora_packet().

◆ theora_check_packet_order()

static int theora_check_packet_order ( AVFormatContext * s,
TheoraParams * thp,
enum TheoraPacketType type )
static

Definition at line 230 of file theora.c.

Referenced by theora_packet().

◆ theora_packet()

static int theora_packet ( AVFormatContext * s,
int idx )
static

Definition at line 269 of file theora.c.

◆ theora_cleanup()

static void theora_cleanup ( AVFormatContext * s,
int idx )
static

Definition at line 351 of file theora.c.

Variable Documentation

◆ ff_theora_codec

const struct ogg_codec ff_theora_codec
Initial value:
= {
.magic = "\200theora",
.magicsize = 7,
.header = theora_header,
.packet = theora_packet,
.gptopts = theora_gptopts,
.cleanup = theora_cleanup,
.nb_header = 3,
}
static int theora_packet(AVFormatContext *s, int idx)
Definition theora.c:269
static uint64_t theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts)
Definition theora.c:195
static void theora_cleanup(AVFormatContext *s, int idx)
Definition theora.c:351
static int theora_header(AVFormatContext *s, int idx)
Definition theora.c:81

Definition at line 361 of file theora.c.