OGMRipCodec

## OGMRipCodec OGMRipCodec — Base class for codecs |

## Synopsis

    #include <ogmrip-codec.h>

    struct              OGMRipCodec;
    struct              OGMRipCodecClass;
    void                ogmrip_codec_set_options            (OGMRipCodec *codec,
                                                             const gchar *section);
    const gchar *       ogmrip_codec_get_output             (OGMRipCodec *codec);
    void                ogmrip_codec_set_output             (OGMRipCodec *codec,
                                                             const gchar *output);
    OGMDvdTitle *       ogmrip_codec_get_input              (OGMRipCodec *codec);
    void                ogmrip_codec_set_input              (OGMRipCodec *codec,
                                                             OGMDvdTitle *title);
    gdouble             ogmrip_codec_get_length             (OGMRipCodec *codec,
                                                             OGMDvdTime *length);
    gboolean            ogmrip_codec_get_telecine           (OGMRipCodec *codec);
    void                ogmrip_codec_set_telecine           (OGMRipCodec *codec,
                                                             gboolean telecine);
    gboolean            ogmrip_codec_get_progressive        (OGMRipCodec *codec);
    void                ogmrip_codec_set_progressive        (OGMRipCodec *codec,
                                                             gboolean progressive);
    void                ogmrip_codec_set_edl                (OGMRipCodec *codec,
                                                             OGMRipEdl *edl);
    OGMRipEdl *         ogmrip_codec_get_edl                (OGMRipCodec *codec);
    void                ogmrip_codec_set_chapters           (OGMRipCodec *codec,
                                                             guint start,
                                                             gint end);
    void                ogmrip_codec_get_chapters           (OGMRipCodec *codec,
                                                             guint *start,
                                                             guint *end);
    void                ogmrip_codec_set_framerate          (OGMRipCodec *codec,
                                                             guint numerator,
                                                             guint denominator);
    void                ogmrip_codec_get_framerate          (OGMRipCodec *codec,
                                                             guint *numerator,
                                                             guint *denominator);
    void                ogmrip_codec_set_framestep          (OGMRipCodec *codec,
                                                             guint framestep);
    gint                ogmrip_codec_get_framestep          (OGMRipCodec *codec);
    void                ogmrip_codec_set_play_length        (OGMRipCodec *codec,
                                                             gdouble length);
    gdouble             ogmrip_codec_get_play_length        (OGMRipCodec *codec);
    void                ogmrip_codec_set_start              (OGMRipCodec *codec,
                                                             gdouble start);
    gdouble             ogmrip_codec_get_start              (OGMRipCodec *codec);
    void                ogmrip_codec_set_unlink_on_unref    (OGMRipCodec *codec,
                                                             gboolean do_unlink);
    gboolean            ogmrip_codec_get_unlink_on_unref    (OGMRipCodec *codec);

## Object Hierarchy

      GObject
       +----OGMJobSpawn
             +----OGMJobContainer
                   +----OGMJobBin
                         +----OGMRipCodec
                               +----OGMRipAudioCodec
                               +----OGMRipChapters
                               +----OGMRipDvdCpy
                               +----OGMRipSubpCodec
                               +----OGMRipVideoCodec

## Properties

      "end-chapter"              gint                  : Read / Write
      "framestep"                guint                 : Read / Write
      "input"                    gpointer              : Read / Write
      "length"                   gdouble               : Read
      "output"                   gchar*                : Read / Write
      "progressive"              gboolean              : Read / Write
      "start-chapter"            gint                  : Read / Write
      "telecine"                 gboolean              : Read / Write

## Description

## Details

### struct OGMRipCodec

    struct OGMRipCodec;

### struct OGMRipCodecClass

    struct OGMRipCodecClass {
      OGMJobBinClass parent_class;

      /* vtable */
      void (* set_options) (OGMRipCodec *codec,
                            const gchar *section);
    };

### ogmrip_codec_set_options ()

    void                ogmrip_codec_set_options            (OGMRipCodec *codec,
                                                             const gchar *section);

Sets codec specific options from the specified profile.

`codec` : | An OGMRipCodec
`section` : | A profile

### ogmrip_codec_get_output ()

    const gchar *       ogmrip_codec_get_output             (OGMRipCodec *codec);

Gets the name of the output file.

`codec` : | an OGMRipCodec
Returns : | the filename, or NULL

### ogmrip_codec_set_output ()

    void                ogmrip_codec_set_output             (OGMRipCodec *codec,
                                                             const gchar *output);

Sets the name of the output file.

`codec` : | an OGMRipCodec
`output` : | the name of the output file

### ogmrip_codec_get_input ()

    OGMDvdTitle *       ogmrip_codec_get_input              (OGMRipCodec *codec);

Gets the input DVD title.

`codec` : | an OGMRipCodec
Returns : | an OGMDvdTitle, or NULL

### ogmrip_codec_set_input ()

    void                ogmrip_codec_set_input              (OGMRipCodec *codec,
                                                             OGMDvdTitle *title);

Sets the input DVD title.

`codec` : | an OGMRipCodec
`title` : | an OGMDvdTitle

### ogmrip_codec_get_length ()

    gdouble             ogmrip_codec_get_length             (OGMRipCodec *codec,
                                                             OGMDvdTime *length);

Returns the length of the encoding in seconds. If `length` is not NULL, the data structure will be filled with the length in hours, minutes seconds and frames.

`codec` : | an OGMRipCodec
`length` : | a pointer to store an OGMDvdTime, or NULL
Returns : | the length in seconds, or -1.0

### ogmrip_codec_get_telecine ()

    gboolean            ogmrip_codec_get_telecine           (OGMRipCodec *codec);

Gets whether an inverse telecine filter will be applied

`codec` : | an OGMRipCodec
Returns : | `TRUE` if inverse telecine

### ogmrip_codec_set_telecine ()

    void                ogmrip_codec_set_telecine           (OGMRipCodec *codec,
                                                             gboolean telecine);

Sets whether an inverse telecine filter will be applied

`codec` : | an OGMRipCodec
`telecine` : | `TRUE` to inverse telecine

### ogmrip_codec_get_progressive ()

    gboolean            ogmrip_codec_get_progressive        (OGMRipCodec *codec);

Gets whether an inverse progressive filter will be applied

`codec` : | an OGMRipCodec
Returns : | `TRUE` if inverse progressive

### ogmrip_codec_set_progressive ()

    void                ogmrip_codec_set_progressive        (OGMRipCodec *codec,
                                                             gboolean progressive);

Sets whether an inverse progressive filter will be applied

`codec` : | an OGMRipCodec
`progressive` : | `TRUE` to inverse progressive

### ogmrip_codec_set_edl ()

    void                ogmrip_codec_set_edl                (OGMRipCodec *codec,
                                                             OGMRipEdl *edl);

Sets an edit decision list file.

`codec` : | an OGMRipCodec
`edl` : | an OGMRipEdl

### ogmrip_codec_get_edl ()

    OGMRipEdl *         ogmrip_codec_get_edl                (OGMRipCodec *codec);

Gets the edit decision list if any.

`codec` : | an OGMRipCodec
Returns : | an OGMRipEdl, or NULL

### ogmrip_codec_set_chapters ()

    void                ogmrip_codec_set_chapters           (OGMRipCodec *codec,
                                                             guint start,
                                                             gint end);

Sets which chapters to start and end at.

`codec` : | an OGMRipCodec
`start` : | the start chapter
`end` : | the end chapter

### ogmrip_codec_get_chapters ()

    void                ogmrip_codec_get_chapters           (OGMRipCodec *codec,
                                                             guint *start,
                                                             guint *end);

Gets which chapters to start and end at.

`codec` : | an OGMRipCodec
`start` : | a pointer to set the start chapter
`end` : | a pointer to set the end chapter

### ogmrip_codec_set_framerate ()

    void                ogmrip_codec_set_framerate          (OGMRipCodec *codec,
                                                             guint numerator,
                                                             guint denominator);

Sets a frames per second (fps) value for the output file, which can be different from that of the source material.

`codec` : | an OGMRipCodec
`numerator` : | the framerate numerator
`denominator` : | the framerate denominator

### ogmrip_codec_get_framerate ()

    void                ogmrip_codec_get_framerate          (OGMRipCodec *codec,
                                                             guint *numerator,
                                                             guint *denominator);

Gets the framerate of the output file in the form of a fraction.

`codec` : | an OGMRipCodec
`numerator` : | a pointer to store the framerate numerator
`denominator` : | a pointer to store the framerate denominator

### ogmrip_codec_set_framestep ()

    void                ogmrip_codec_set_framestep          (OGMRipCodec *codec,
                                                             guint framestep);

Skips `framestep` frames after every frame.

`codec` : | an OGMRipCodec
`framestep` : | the framestep

### ogmrip_codec_get_framestep ()

    gint                ogmrip_codec_get_framestep          (OGMRipCodec *codec);

Gets the number of frames to skip after every frame.

`codec` : | an OGMRipCodec
Returns : | the framestep, or -1

### ogmrip_codec_set_play_length ()

    void                ogmrip_codec_set_play_length        (OGMRipCodec *codec,
                                                             gdouble length);

Encodes only `length` seconds.

`codec` : | an OGMRipCodec
`length` : | the length to encode in seconds

### ogmrip_codec_get_play_length ()

    gdouble             ogmrip_codec_get_play_length        (OGMRipCodec *codec);

Gets the length to encode in seconds.

`codec` : | an OGMRipCodec
Returns : | the length, or -1.0

### ogmrip_codec_set_start ()

    void                ogmrip_codec_set_start              (OGMRipCodec *codec,
                                                             gdouble start);

Seeks to the given time position.

`codec` : | an OGMRipCodec
`start` : | the position to seek in seconds

### ogmrip_codec_get_start ()

    gdouble             ogmrip_codec_get_start              (OGMRipCodec *codec);

Gets the position to seek in seconds.

`codec` : | an OGMRipCodec
Returns : | the position, or -1.0

### ogmrip_codec_set_unlink_on_unref ()

    void                ogmrip_codec_set_unlink_on_unref    (OGMRipCodec *codec,
                                                             gboolean do_unlink);

Whether to unlink the output file on the final unref of the OGMRipCodec data structure.

`codec` : | an OGMRipCodec
`do_unlink` : | `TRUE` to unlink the output file

### ogmrip_codec_get_unlink_on_unref ()

    gboolean            ogmrip_codec_get_unlink_on_unref    (OGMRipCodec *codec);

Returns whether the output file will be unlinked on the final unref of `codec`.

`codec` : | an OGMRipCodec
Returns : | a boolean

## Property Details

### The `"end-chapter"` property

      "end-chapter"              gint                  : Read / Write

Set end chapter.

Allowed values: >= -1

Default value: -1

### The `"framestep"` property

      "framestep"                guint                 : Read / Write

Set framestep.

Default value: 1

### The `"input"` property

      "input"                    gpointer              : Read / Write

Set input title.

### The `"length"` property

      "length"                   gdouble               : Read

Get length.

Allowed values: >= 0

Default value: 0

### The `"output"` property

      "output"                   gchar*                : Read / Write

Set output file.

Default value: NULL

### The `"progressive"` property

      "progressive"              gboolean              : Read / Write

Set progressive.

Default value: FALSE

### The `"start-chapter"` property

      "start-chapter"            gint                  : Read / Write

Set start chapter.

Allowed values: >= 0

Default value: 0

### The `"telecine"` property

      "telecine"                 gboolean              : Read / Write

Set telecine.

Default value: FALSE