RB.Encoder

g GObject.GInterface GObject.GInterface RB.Encoder RB.Encoder GObject.GInterface->RB.Encoder

Implementations:

None

Methods

class

new ()

cancel ()

encode (entry, dest, overwrite, profile)

get_missing_plugins (profile)

Virtual Methods

do_cancel ()

do_completed (dest_size, mediatype, error)

do_encode (entry, dest, overwrite, profile)

do_get_missing_plugins (profile)

do_progress (fraction)

Properties

None

Signals

Name

Short Description

completed

Emitted when the encoding process is complete, or when a fatal error has occurred.

progress

Emitted regularly during the encoding process to provide progress updates.

Fields

None

Class Details

class RB.Encoder
Bases:

GObject.GInterface

Structure:

RB.EncoderIface

classmethod new()
Returns:

the new RB.Encoder

Return type:

RB.Encoder

Creates a new RB.Encoder instance.

cancel()

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

encode(entry, dest, overwrite, profile)
Parameters:

Initiates encoding, transcoding to the specified profile if specified.

Encoding and error reporting takes place asynchronously. The caller should wait for the ‘completed’ signal which indicates it has either completed or failed.

get_missing_plugins(profile)
Parameters:

profile (GstPbutils.EncodingProfile) – an encoding profile

Returns:

True if some detail strings are returned, False otherwise

details:

returns plugin installer detail strings

descriptions:

returns plugin descriptions

Return type:

(bool, details: str, descriptions: str)

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

do_cancel() virtual

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

do_completed(dest_size, mediatype, error) virtual
Parameters:
do_encode(entry, dest, overwrite, profile) virtual
Parameters:

Initiates encoding, transcoding to the specified profile if specified.

Encoding and error reporting takes place asynchronously. The caller should wait for the ‘completed’ signal which indicates it has either completed or failed.

do_get_missing_plugins(profile) virtual
Parameters:

profile (GstPbutils.EncodingProfile) – an encoding profile

Returns:

True if some detail strings are returned, False otherwise

details:

returns plugin installer detail strings

descriptions:

returns plugin descriptions

Return type:

(bool, details: str, descriptions: str)

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

do_progress(fraction) virtual
Parameters:

fraction (float) –

Signal Details

RB.Encoder.signals.completed(encoder, dest_uri, dest_size, mediatype, error)
Signal Name:

completed

Flags:

RUN_LAST

Parameters:
  • encoder (RB.Encoder) – The object which received the signal

  • dest_uri (str) – destination URI

  • dest_size (int) – size of the output file

  • mediatype (str) – output media type

  • error (object or None) – encoding error, or None if successful

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.signals.progress(encoder, fraction)
Signal Name:

progress

Flags:

RUN_LAST

Parameters:
  • encoder (RB.Encoder) – The object which received the signal

  • fraction (float) – progress as a fraction (0..1)

Emitted regularly during the encoding process to provide progress updates.