Interface

RBEncoder

Description [src]

interface RB.Encoder : GObject.Object

The RBEncoder interface provides transcoding between audio formats based on encoding profiles. The encoder implementation operates asynchronously and provides status updates in the form of signals emitted on the main thread. A new encoder instance should be created for each file that is transcoded or copied.

Prerequisite

In order to implement Encoder, your type must inherit fromGObject.

Functions

rb_encoder_new

Creates a new RBEncoder instance.

Instance methods

rb_encoder_cancel

Attempts to cancel any in progress encoding. The encoder should delete the destination file, if it created one, and emit the ‘completed’ signal.

rb_encoder_encode

Initiates encoding, transcoding to the specified profile if specified.

rb_encoder_get_missing_plugins

Retrieves the plugin installer detail strings and descriptions for any missing plugins required to use the specified encoding profile.

Signals

RB.Encoder::completed

Emitted when the encoding process is complete, or when a fatal error has occurred. The destination file, if one exists, will be closed and flushed to disk before this signal is emitted.

RB.Encoder::progress

Emitted regularly during the encoding process to provide progress updates.

Interface structure

struct RBEncoderIface {
  GTypeInterface g_iface;
  void (* encode) (
    RBEncoder* encoder,
    RhythmDBEntry* entry,
    const char* dest,
    gboolean overwrite,
    GstEncodingProfile* profile
  );
  void (* cancel) (
    RBEncoder* encoder
  );
  gboolean (* get_missing_plugins) (
    RBEncoder* encoder,
    GstEncodingProfile* profile,
    char*** details,
    char*** descriptions
  );
  void (* progress) (
    RBEncoder* encoder,
    double fraction
  );
  void (* completed) (
    RBEncoder* encoder,
    guint64 dest_size,
    const char* mediatype,
    GError* error
  );
  
}

No description available.

Interface members
g_iface
GTypeInterface
 

No description available.

encode
void (* encode) (
    RBEncoder* encoder,
    RhythmDBEntry* entry,
    const char* dest,
    gboolean overwrite,
    GstEncodingProfile* profile
  )
 

No description available.

cancel
void (* cancel) (
    RBEncoder* encoder
  )
 

No description available.

get_missing_plugins
gboolean (* get_missing_plugins) (
    RBEncoder* encoder,
    GstEncodingProfile* profile,
    char*** details,
    char*** descriptions
  )
 

No description available.

progress
void (* progress) (
    RBEncoder* encoder,
    double fraction
  )
 

No description available.

completed
void (* completed) (
    RBEncoder* encoder,
    guint64 dest_size,
    const char* mediatype,
    GError* error
  )
 

No description available.

Virtual methods

RB.Encoder.cancel

Attempts to cancel any in progress encoding. The encoder should delete the destination file, if it created one, and emit the ‘completed’ signal.

RB.Encoder.completed
No description available.

RB.Encoder.encode

Initiates encoding, transcoding to the specified profile if specified.

RB.Encoder.get_missing_plugins

Retrieves the plugin installer detail strings and descriptions for any missing plugins required to use the specified encoding profile.

RB.Encoder.progress
No description available.