OGMRipAudioCodec

OGMRipAudioCodec — Base class for audio codecs

Synopsis


#include <ogmrip-audio-codec.h>

                    OGMRipAudioCodec;
                    OGMRipAudioCodecClass;
OGMDvdAudioStream*  ogmrip_audio_codec_get_dvd_audio_stream
                                                        (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_dvd_audio_stream
                                                        (OGMRipAudioCodec *audio,
                                                         OGMDvdAudioStream *stream);
gint                ogmrip_audio_codec_get_channels     (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_channels     (OGMRipAudioCodec *audio,
                                                         OGMDvdAudioChannels channels);
gboolean            ogmrip_audio_codec_get_fast         (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_fast         (OGMRipAudioCodec *audio,
                                                         gboolean fast);
gchar*              ogmrip_audio_codec_get_label        (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_label        (OGMRipAudioCodec *audio,
                                                         const gchar *label);
gboolean            ogmrip_audio_codec_get_normalize    (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_normalize    (OGMRipAudioCodec *audio,
                                                         gboolean normalize);
gint                ogmrip_audio_codec_get_quality      (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_quality      (OGMRipAudioCodec *audio,
                                                         guint quality);
gint                ogmrip_audio_codec_get_sample_rate  (OGMRipAudioCodec *audio);
void                ogmrip_audio_codec_set_sample_rate  (OGMRipAudioCodec *audio,
                                                         guint srate);
gint                ogmrip_audio_codec_get_samples_per_frame
                                                        (OGMRipAudioCodec *audio);

Object Hierarchy

  GObject
   +----OGMJobSpawn
         +----OGMJobContainer
               +----OGMJobBin
                     +----OGMRipCodec
                           +----OGMRipAudioCodec

Properties

  "channels"                 guint                 : Read / Write
  "fast"                     gboolean              : Read / Write
  "normalize"                gboolean              : Read / Write
  "quality"                  guint                 : Read / Write
  "samples-per-frame"        guint                 : Read
  "stream"                   gpointer              : Read / Write

Description

Details

OGMRipAudioCodec

typedef struct _OGMRipAudioCodec OGMRipAudioCodec;


OGMRipAudioCodecClass

typedef struct {
  OGMRipCodecClass parent_class;

  /* vtable */
  gint (* get_samples_per_frame) (OGMRipAudioCodec *audio);
} OGMRipAudioCodecClass;


ogmrip_audio_codec_get_dvd_audio_stream ()

OGMDvdAudioStream*  ogmrip_audio_codec_get_dvd_audio_stream
                                                        (OGMRipAudioCodec *audio);

Gets the audio stream to encode.

audio :

an OGMRipAudioCodec

Returns :

an OGMDvdAudioStream, or NULL

ogmrip_audio_codec_set_dvd_audio_stream ()

void                ogmrip_audio_codec_set_dvd_audio_stream
                                                        (OGMRipAudioCodec *audio,
                                                         OGMDvdAudioStream *stream);

Sets the audio stream to encode.

audio :

an OGMRipAudioCodec

stream :

an OGMDvdAudioStream

ogmrip_audio_codec_get_channels ()

gint                ogmrip_audio_codec_get_channels     (OGMRipAudioCodec *audio);

Gets the number of channels of the output file.

audio :

an OGMRipAudioCodec

Returns :

an OGMDvdAudioChannels, or -1

ogmrip_audio_codec_set_channels ()

void                ogmrip_audio_codec_set_channels     (OGMRipAudioCodec *audio,
                                                         OGMDvdAudioChannels channels);

Sets the number of channels of the output file.

audio :

an OGMRipAudioCodec

channels :

an OGMDvdAudioChannels

ogmrip_audio_codec_get_fast ()

gboolean            ogmrip_audio_codec_get_fast         (OGMRipAudioCodec *audio);

Returns whether to encode faster than realtime.

audio :

an OGMRipAudioCodec

Returns :

TRUE if fast encoding is enabled

ogmrip_audio_codec_set_fast ()

void                ogmrip_audio_codec_set_fast         (OGMRipAudioCodec *audio,
                                                         gboolean fast);

Sets whether to encode faster than realtime.

audio :

an OGMRipAudioCodec

fast :

TRUE to enable fast encoding

ogmrip_audio_codec_get_label ()

gchar*              ogmrip_audio_codec_get_label        (OGMRipAudioCodec *audio);

Gets the name of the track.

audio :

an OGMRipAudioCodec

Returns :

the track name

ogmrip_audio_codec_set_label ()

void                ogmrip_audio_codec_set_label        (OGMRipAudioCodec *audio,
                                                         const gchar *label);

Sets the name of the track.

audio :

an OGMRipAudioCodec

label :

the track name

ogmrip_audio_codec_get_normalize ()

gboolean            ogmrip_audio_codec_get_normalize    (OGMRipAudioCodec *audio);

Returns whether the volume of the audio stream should be normalized.

audio :

an OGMRipAudioCodec

Returns :

TRUE if normalization is enabled

ogmrip_audio_codec_set_normalize ()

void                ogmrip_audio_codec_set_normalize    (OGMRipAudioCodec *audio,
                                                         gboolean normalize);

Sets whether to normalize the volume of the audio stream.

audio :

an OGMRipAudioCodec

normalize :

TRUE to enable normalization

ogmrip_audio_codec_get_quality ()

gint                ogmrip_audio_codec_get_quality      (OGMRipAudioCodec *audio);

Gets the quality of the encoding, 0 for lowest, 10 for best.

audio :

an OGMRipAudioCodec

Returns :

the quality, or -1

ogmrip_audio_codec_set_quality ()

void                ogmrip_audio_codec_set_quality      (OGMRipAudioCodec *audio,
                                                         guint quality);

Sets the quality of the encoding, 0 for lowest, 10 for best.

audio :

an OGMRipAudioCodec

quality :

the quality of the encoding

ogmrip_audio_codec_get_sample_rate ()

gint                ogmrip_audio_codec_get_sample_rate  (OGMRipAudioCodec *audio);

Gets the output sample rate.

audio :

an OGMRipAudioCodec

Returns :

the sample rate

ogmrip_audio_codec_set_sample_rate ()

void                ogmrip_audio_codec_set_sample_rate  (OGMRipAudioCodec *audio,
                                                         guint srate);

Sets the output sample rate to be used.

audio :

an OGMRipAudioCodec

srate :

the sample rate

ogmrip_audio_codec_get_samples_per_frame ()

gint                ogmrip_audio_codec_get_samples_per_frame
                                                        (OGMRipAudioCodec *audio);

Gets the number of samples per frame.

audio :

an OGMRipAudioCodec

Returns :

the number of samples per frame, or -1

Property Details

The "channels" property

  "channels"                 guint                 : Read / Write

Set channels.

Allowed values: <= 10

Default value: 1


The "fast" property

  "fast"                     gboolean              : Read / Write

Set fast.

Default value: FALSE


The "normalize" property

  "normalize"                gboolean              : Read / Write

Set normalize.

Default value: FALSE


The "quality" property

  "quality"                  guint                 : Read / Write

Set quality.

Allowed values: <= 10

Default value: 3


The "samples-per-frame" property

  "samples-per-frame"        guint                 : Read

Set samples per frame.

Default value: 512


The "stream" property

  "stream"                   gpointer              : Read / Write

Set audio stream.