OGMRipLavc

OGMRipLavc — Base class for lavc video codecs

Synopsis


#include <ogmrip-lavc.h>

                    OGMRipLavc;
                    OGMRipLavcClass;
enum                OGMRipLavcHeaderType;
void                ogmrip_init_lavc_plugin             (void);
void                ogmrip_lavc_set_cmp                 (OGMRipLavc *lavc,
                                                         guint cmp,
                                                         guint precmp,
                                                         guint subcmp);
void                ogmrip_lavc_get_cmp                 (OGMRipLavc *lavc,
                                                         guint *cmp,
                                                         guint *precmp,
                                                         guint *subcmp);
void                ogmrip_lavc_set_dia                 (OGMRipLavc *lavc,
                                                         gint dia,
                                                         gint predia);
void                ogmrip_lavc_get_dia                 (OGMRipLavc *lavc,
                                                         gint *dia,
                                                         gint *predia);
void                ogmrip_lavc_set_header              (OGMRipLavc *lavc,
                                                         OGMRipLavcHeaderType header);
gint                ogmrip_lavc_get_header              (OGMRipLavc *lavc);
void                ogmrip_lavc_set_buf_size            (OGMRipLavc *lavc,
                                                         guint buf_size);
gint                ogmrip_lavc_get_buf_size            (OGMRipLavc *lavc);
void                ogmrip_lavc_set_dc                  (OGMRipLavc *lavc,
                                                         guint dc);
gint                ogmrip_lavc_get_dc                  (OGMRipLavc *lavc);
void                ogmrip_lavc_set_keyint              (OGMRipLavc *lavc,
                                                         guint keyint);
gint                ogmrip_lavc_get_keyint              (OGMRipLavc *lavc);
void                ogmrip_lavc_set_last_pred           (OGMRipLavc *lavc,
                                                         guint last_pred);
gint                ogmrip_lavc_get_last_pred           (OGMRipLavc *lavc);
void                ogmrip_lavc_set_max_rate            (OGMRipLavc *lavc,
                                                         guint max_rate);
gint                ogmrip_lavc_get_max_rate            (OGMRipLavc *lavc);
void                ogmrip_lavc_set_mbd                 (OGMRipLavc *lavc,
                                                         guint mbd);
gint                ogmrip_lavc_get_mbd                 (OGMRipLavc *lavc);
void                ogmrip_lavc_set_min_rate            (OGMRipLavc *lavc,
                                                         guint min_rate);
gint                ogmrip_lavc_get_min_rate            (OGMRipLavc *lavc);
void                ogmrip_lavc_set_mv0                 (OGMRipLavc *lavc,
                                                         gboolean mv0);
gboolean            ogmrip_lavc_get_mv0                 (OGMRipLavc *lavc);
void                ogmrip_lavc_set_preme               (OGMRipLavc *lavc,
                                                         guint preme);
gint                ogmrip_lavc_get_preme               (OGMRipLavc *lavc);
void                ogmrip_lavc_set_qns                 (OGMRipLavc *lavc,
                                                         guint qns);
gint                ogmrip_lavc_get_qns                 (OGMRipLavc *lavc);
void                ogmrip_lavc_set_strict              (OGMRipLavc *lavc,
                                                         guint strict);
gint                ogmrip_lavc_get_strict              (OGMRipLavc *lavc);
void                ogmrip_lavc_set_vb_strategy         (OGMRipLavc *lavc,
                                                         guint vb_strategy);
gint                ogmrip_lavc_get_vb_strategy         (OGMRipLavc *lavc);
void                ogmrip_lavc_set_vqcomp              (OGMRipLavc *lavc,
                                                         gdouble vqcomp);
gdouble             ogmrip_lavc_get_vqcomp              (OGMRipLavc *lavc);

Description

Details

OGMRipLavc

typedef struct {
  OGMRipVideoCodec parent_instance;

  OGMRipLavcPriv *priv;
} OGMRipLavc;


OGMRipLavcClass

typedef struct {
  OGMRipVideoCodecClass parent_class;

  /* vtable */
  G_CONST_RETURN gchar * (* get_codec) (void);
} OGMRipLavcClass;


enum OGMRipLavcHeaderType

typedef enum
{
  OGMRIP_LAVC_HEADER_AUTO,
  OGMRIP_LAVC_HEADER_EXTRADATA,
  OGMRIP_LAVC_HEADER_KEYFRAMES,
  OGMRIP_LAVC_HEADER_COMBINE
} OGMRipLavcHeaderType;

Controls writing global video headers.

OGMRIP_LAVC_HEADER_AUTO

Codec decides where to write global headers.

OGMRIP_LAVC_HEADER_EXTRADATA

Write global headers only in extradata.

OGMRIP_LAVC_HEADER_KEYFRAMES

Write global headers only in front of keyframes.

OGMRIP_LAVC_HEADER_COMBINE

Combine OGMRIP_LAVC_HEADER_EXTRADATA and OGMRIP_LAVC_HEADER_KEYFRAMES.

ogmrip_init_lavc_plugin ()

void                ogmrip_init_lavc_plugin             (void);

Initialises the LAVC plugin. This function should be called when initialising a plugin of the LAVC family.


ogmrip_lavc_set_cmp ()

void                ogmrip_lavc_set_cmp                 (OGMRipLavc *lavc,
                                                         guint cmp,
                                                         guint precmp,
                                                         guint subcmp);

Sets the comparison function for full pel, pre pass and sub pel motion estimation

lavc :

An OGMRipLavc

cmp :

The comparison function for full pel motion estimation

precmp :

The comparison function for motion estimation pre pass

subcmp :

The comparison function for sub pel motion estimation

ogmrip_lavc_get_cmp ()

void                ogmrip_lavc_get_cmp                 (OGMRipLavc *lavc,
                                                         guint *cmp,
                                                         guint *precmp,
                                                         guint *subcmp);

Gets the comparison function for full pel, pre pass and sub pel motion estimation

lavc :

An OGMRipLavc

cmp :

A pointer to store the comparison function for full pel motion estimation

precmp :

A pointer to store the comparison function for motion estimation pre pass

subcmp :

A pointer to store the comparison function for sub pel motion estimation

ogmrip_lavc_set_dia ()

void                ogmrip_lavc_set_dia                 (OGMRipLavc *lavc,
                                                         gint dia,
                                                         gint predia);

Sets the diamond type and size for full pel and pre pass motion estimation

lavc :

An OGMRipLavc

dia :

The diamond type and size for full pel motion estimation

predia :

The diamond type and size for motion estimation pre-pass

ogmrip_lavc_get_dia ()

void                ogmrip_lavc_get_dia                 (OGMRipLavc *lavc,
                                                         gint *dia,
                                                         gint *predia);

Gets the diamond type and size for full pel and pre pass motion estimation

lavc :

An OGMRipLavc

dia :

A pointer to store the diamond type and size for full pel motion estimation

predia :

A pointer to store the diamond type and size for motion estimation pre-pass

ogmrip_lavc_set_header ()

void                ogmrip_lavc_set_header              (OGMRipLavc *lavc,
                                                         OGMRipLavcHeaderType header);

Sets the global video header type.

lavc :

An OGMRipLavc

header :

The OGMRipLavcHeaderType

ogmrip_lavc_get_header ()

gint                ogmrip_lavc_get_header              (OGMRipLavc *lavc);

Gets the global video header type.

lavc :

An OGMRipLavc

Returns :

The current OGMRipLavcHeaderType, or -1

ogmrip_lavc_set_buf_size ()

void                ogmrip_lavc_set_buf_size            (OGMRipLavc *lavc,
                                                         guint buf_size);

Sets the buffer size in kb

lavc :

An OGMRipLavc

buf_size :

A buffer size

ogmrip_lavc_get_buf_size ()

gint                ogmrip_lavc_get_buf_size            (OGMRipLavc *lavc);

Gets the buffer size in kb

lavc :

An OGMRipLavc

Returns :

The buffer size, or -1

ogmrip_lavc_set_dc ()

void                ogmrip_lavc_set_dc                  (OGMRipLavc *lavc,
                                                         guint dc);

Sets the intra DC precision in bits

lavc :

An OGMRipLavc

dc :

A precision

ogmrip_lavc_get_dc ()

gint                ogmrip_lavc_get_dc                  (OGMRipLavc *lavc);

Gets the intra DC precision in bits

lavc :

An OGMRipLavc

Returns :

The precision, or -1

ogmrip_lavc_set_keyint ()

void                ogmrip_lavc_set_keyint              (OGMRipLavc *lavc,
                                                         guint keyint);

Sets the maximum interval between key frames

lavc :

An OGMRipLavc

keyint :

An intervale

ogmrip_lavc_get_keyint ()

gint                ogmrip_lavc_get_keyint              (OGMRipLavc *lavc);

Gets the maximum interval between key frames

lavc :

An OGMRipLavc

Returns :

The interval, or -1

ogmrip_lavc_set_last_pred ()

void                ogmrip_lavc_set_last_pred           (OGMRipLavc *lavc,
                                                         guint last_pred);

Sets the amount of motion predictors from the previous frame

lavc :

An OGMRipLavc

last_pred :

The last_pred

ogmrip_lavc_get_last_pred ()

gint                ogmrip_lavc_get_last_pred           (OGMRipLavc *lavc);

Gets the amount of motion predictors from the previous frame

lavc :

An OGMRipLavc

Returns :

The amount, or -1

ogmrip_lavc_set_max_rate ()

void                ogmrip_lavc_set_max_rate            (OGMRipLavc *lavc,
                                                         guint max_rate);

Sets the maximum bitrate in kbps

lavc :

An OGMRipLavc

max_rate :

A bitrate

ogmrip_lavc_get_max_rate ()

gint                ogmrip_lavc_get_max_rate            (OGMRipLavc *lavc);

Gets the maximum bitrate in kbps

lavc :

An OGMRipLavc

Returns :

The bitrate, or -1

ogmrip_lavc_set_mbd ()

void                ogmrip_lavc_set_mbd                 (OGMRipLavc *lavc,
                                                         guint mbd);

Sets the macroblock decision algorithm

lavc :

An OGMRipLavc

mbd :

The mbd

ogmrip_lavc_get_mbd ()

gint                ogmrip_lavc_get_mbd                 (OGMRipLavc *lavc);

Gets the macroblock decision algorithm

lavc :

An OGMRipLavc

Returns :

The algorithm, or -1

ogmrip_lavc_set_min_rate ()

void                ogmrip_lavc_set_min_rate            (OGMRipLavc *lavc,
                                                         guint min_rate);

Sets the minimum bitrate in kbps

lavc :

An OGMRipLavc

min_rate :

A bitrate

ogmrip_lavc_get_min_rate ()

gint                ogmrip_lavc_get_min_rate            (OGMRipLavc *lavc);

Gets the minimum bitrate in kbps

lavc :

An OGMRipLavc

Returns :

The bitrate, or -1

ogmrip_lavc_set_mv0 ()

void                ogmrip_lavc_set_mv0                 (OGMRipLavc *lavc,
                                                         gboolean mv0);

Try to encode each MB with MV=<0,0>

lavc :

An OGMRipLavc

mv0 :

TRUE to enable mv0

ogmrip_lavc_get_mv0 ()

gboolean            ogmrip_lavc_get_mv0                 (OGMRipLavc *lavc);

Gets whether to try to encode each MB with MV=<0,0>

lavc :

An OGMRipLavc

Returns :

TRUE if mv0 is enabled

ogmrip_lavc_set_preme ()

void                ogmrip_lavc_set_preme               (OGMRipLavc *lavc,
                                                         guint preme);

Sets the motion estimation pre-pass

lavc :

An OGMRipLavc

preme :

The estimation

ogmrip_lavc_get_preme ()

gint                ogmrip_lavc_get_preme               (OGMRipLavc *lavc);

Gets the motion estimation pre-pass

lavc :

An OGMRipLavc

Returns :

The estimation, or -1

ogmrip_lavc_set_qns ()

void                ogmrip_lavc_set_qns                 (OGMRipLavc *lavc,
                                                         guint qns);

Sets the quantizer noise shaping

lavc :

An OGMRipLavc

qns :

The shaping

ogmrip_lavc_get_qns ()

gint                ogmrip_lavc_get_qns                 (OGMRipLavc *lavc);

Gets the quantizer noise shaping

lavc :

An OGMRipLavc

Returns :

The shaping, or -1

ogmrip_lavc_set_strict ()

void                ogmrip_lavc_set_strict              (OGMRipLavc *lavc,
                                                         guint strict);

Sets the strict standard compliancy

lavc :

An OGMRipLavc

strict :

The strictness

ogmrip_lavc_get_strict ()

gint                ogmrip_lavc_get_strict              (OGMRipLavc *lavc);

Gets the strict standard compliancy

lavc :

An OGMRipLavc

Returns :

The strictness, or -1

ogmrip_lavc_set_vb_strategy ()

void                ogmrip_lavc_set_vb_strategy         (OGMRipLavc *lavc,
                                                         guint vb_strategy);

Sets the strategy to choose between I/P/B-frames

lavc :

An OGMRipLavc

vb_strategy :

A strategy

ogmrip_lavc_get_vb_strategy ()

gint                ogmrip_lavc_get_vb_strategy         (OGMRipLavc *lavc);

Gets the strategy to choose between I/P/B-frames

lavc :

An OGMRipLavc

Returns :

The strategy, or -1

ogmrip_lavc_set_vqcomp ()

void                ogmrip_lavc_set_vqcomp              (OGMRipLavc *lavc,
                                                         gdouble vqcomp);

Sets the quantizer compression

lavc :

An OGMRipLavc

vqcomp :

The vqcomp

ogmrip_lavc_get_vqcomp ()

gdouble             ogmrip_lavc_get_vqcomp              (OGMRipLavc *lavc);

Gets the quantizer compression

lavc :

An OGMRipLavc

Returns :

The compression, or -1