libavcodec/libtheoraenc.c File Reference

Theora encoder using libtheora. More...

#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/base64.h"
#include "avcodec.h"
#include "internal.h"
#include <theora/theoraenc.h>

Go to the source code of this file.

Data Structures

struct  TheoraContext

Functions

static int concatenate_packet (unsigned int *offset, AVCodecContext *avc_context, const ogg_packet *packet)
 Concatenate an ogg_packet into the extradata.
static int get_stats (AVCodecContext *avctx, int eos)
static int submit_stats (AVCodecContext *avctx)
static av_cold int encode_init (AVCodecContext *avc_context)
static int encode_frame (AVCodecContext *avc_context, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static av_cold int encode_close (AVCodecContext *avc_context)

Variables

AVCodec ff_libtheora_encoder
 AVCodec struct exposed to libavcodec.


Detailed Description

Theora encoder using libtheora.

Author:
Paul Richards <paul.richards@gmail.com>
A lot of this is copy / paste from other output codecs in libavcodec or pure guesswork (or both).

I have used t_ prefixes on variables which are libtheora types and o_ prefixes on variables which are libogg types.

Definition in file libtheoraenc.c.


Function Documentation

static int concatenate_packet ( unsigned int *  offset,
AVCodecContext avc_context,
const ogg_packet *  packet 
) [static]

Concatenate an ogg_packet into the extradata.

Definition at line 54 of file libtheoraenc.c.

Referenced by encode_init().

static av_cold int encode_close ( AVCodecContext avc_context  )  [static]

Definition at line 346 of file libtheoraenc.c.

static int encode_frame ( AVCodecContext avc_context,
AVPacket pkt,
const AVFrame frame,
int *  got_packet 
) [static]

Definition at line 264 of file libtheoraenc.c.

static av_cold int encode_init ( AVCodecContext avc_context  )  [static]

Definition at line 153 of file libtheoraenc.c.

static int get_stats ( AVCodecContext avctx,
int  eos 
) [static]

Definition at line 87 of file libtheoraenc.c.

Referenced by encode_frame(), and encode_init().

static int submit_stats ( AVCodecContext avctx  )  [static]

Definition at line 120 of file libtheoraenc.c.

Referenced by encode_frame(), and encode_init().


Variable Documentation

Initial value:

 {
    .name           = "libtheora",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_THEORA,
    .priv_data_size = sizeof(TheoraContext),
    .init           = encode_init,
    .close          = encode_close,
    .encode2        = encode_frame,
    .capabilities   = CODEC_CAP_DELAY, 
    .pix_fmts       = (const enum PixelFormat[]){
        PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_NONE
    },
    .long_name      = NULL_IF_CONFIG_SMALL("libtheora Theora"),
}
AVCodec struct exposed to libavcodec.

Definition at line 361 of file libtheoraenc.c.


Generated on Fri Oct 26 02:47:57 2012 for FFmpeg by  doxygen 1.5.8