OGMRip Reference Manual: OGMRipLavc

## OGMRipLavc OGMRipLavc — Base class for lavc video codecs |

## Functions

void | ogmrip_init_lavc_plugin ()
void | ogmrip_lavc_set_cmp ()
void | ogmrip_lavc_get_cmp ()
void | ogmrip_lavc_set_dia ()
void | ogmrip_lavc_get_dia ()
void | ogmrip_lavc_set_header ()
gint | ogmrip_lavc_get_header ()
void | ogmrip_lavc_set_buf_size ()
gint | ogmrip_lavc_get_buf_size ()
void | ogmrip_lavc_set_dc ()
gint | ogmrip_lavc_get_dc ()
void | ogmrip_lavc_set_keyint ()
gint | ogmrip_lavc_get_keyint ()
void | ogmrip_lavc_set_last_pred ()
gint | ogmrip_lavc_get_last_pred ()
void | ogmrip_lavc_set_max_rate ()
gint | ogmrip_lavc_get_max_rate ()
void | ogmrip_lavc_set_mbd ()
gint | ogmrip_lavc_get_mbd ()
void | ogmrip_lavc_set_min_rate ()
gint | ogmrip_lavc_get_min_rate ()
void | ogmrip_lavc_set_mv0 ()
gboolean | ogmrip_lavc_get_mv0 ()
void | ogmrip_lavc_set_preme ()
gint | ogmrip_lavc_get_preme ()
void | ogmrip_lavc_set_qns ()
gint | ogmrip_lavc_get_qns ()
void | ogmrip_lavc_set_strict ()
gint | ogmrip_lavc_get_strict ()
void | ogmrip_lavc_set_vb_strategy ()
gint | ogmrip_lavc_get_vb_strategy ()
void | ogmrip_lavc_set_vqcomp ()
gdouble | ogmrip_lavc_get_vqcomp ()

## Types and Values

struct | OGMRipLavc
struct | OGMRipLavcClass
enum | OGMRipLavcHeaderType

## Includes

    #include <ogmrip-lavc.h>

## Description

## Functions

### 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

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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.

#### Parameters

lavc | An OGMRipLavc |
header | The OGMRipLavcHeaderType |

### ogmrip_lavc_get_header ()

    gint
    ogmrip_lavc_get_header (OGMRipLavc *lavc);

Gets the global video header type.

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
dc | A precision |

### ogmrip_lavc_get_dc ()

    gint
    ogmrip_lavc_get_dc (OGMRipLavc *lavc);

Gets the intra DC precision in bits

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
keyint | An intervale |

### ogmrip_lavc_get_keyint ()

    gint
    ogmrip_lavc_get_keyint (OGMRipLavc *lavc);

Gets the maximum interval between key frames

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
mbd | The mbd |

### ogmrip_lavc_get_mbd ()

    gint
    ogmrip_lavc_get_mbd (OGMRipLavc *lavc);

Gets the macroblock decision algorithm

#### Parameters

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

#### Parameters

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

#### Parameters

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>

#### Parameters

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>

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
preme | The estimation |

### ogmrip_lavc_get_preme ()

    gint
    ogmrip_lavc_get_preme (OGMRipLavc *lavc);

Gets the motion estimation pre-pass

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
qns | The shaping |

### ogmrip_lavc_get_qns ()

    gint
    ogmrip_lavc_get_qns (OGMRipLavc *lavc);

Gets the quantizer noise shaping

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
strict | The strictness |

### ogmrip_lavc_get_strict ()

    gint
    ogmrip_lavc_get_strict (OGMRipLavc *lavc);

Gets the strict standard compliancy

#### Parameters

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

#### Parameters

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

#### Parameters

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

#### Parameters

lavc | An OGMRipLavc |
vqcomp | The vqcomp |

### ogmrip_lavc_get_vqcomp ()

    gdouble
    ogmrip_lavc_get_vqcomp (OGMRipLavc *lavc);

Gets the quantizer compression

#### Parameters

lavc | An OGMRipLavc |

#### Returns

The compression, or -1

## Types and Values

### struct OGMRipLavc

    struct OGMRipLavc {
      OGMRipVideoCodec parent_instance;

      OGMRipLavcPriv *priv;
    };

### struct OGMRipLavcClass

    struct OGMRipLavcClass {
      OGMRipVideoCodecClass parent_class;

      /* vtable */
      const gchar * (* get_codec) (void);
    };

### enum OGMRipLavcHeaderType

Controls writing global video headers.

#### Members

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` . |