Mirage.Writer¶
- Subclasses:
None
Methods¶
- Inherited:
Mirage.Object (2), GObject.Object (37), Mirage.Contextual (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the image conversion progress reaches a new progress mark. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Mirage.Writer(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
All the fields in the
Mirage.Writer
structure are private to theMirage.Writer
implementation and should never be accessed directly.- add_parameter_boolean(id, name, description, default_value)¶
- Parameters:
Adds a boolean parameter to writer’s parameter sheet.
- add_parameter_int(id, name, description, default_value)¶
- Parameters:
Adds an integer parameter to writer’s parameter sheet.
- add_parameter_string(id, name, description, default_value)¶
- Parameters:
Adds a string parameter to writer’s parameter sheet.
- convert_image(filename, original_disc, parameters, cancellable)¶
- Parameters:
filename (
str
) – filename of output imageoriginal_disc (
Mirage.Disc
) – disc layout obtained from original imageparameters ({
str
:GLib.Variant
}) – writer parameterscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.
- Raises:
- Returns:
- Return type:
Convenience function that converts an already-opened image stored in original_disc and writes it to filename. If conversion progress reporting is enabled via
Mirage.Writer.set_conversion_progress_step
(), theMirage.Writer
::conversion-progress
signal is emitted at specified time intervals during conversion.
- create_fragment(track, role)¶
- Parameters:
track (
Mirage.Track
) – track for which the fragment is to be createdrole (
Mirage.FragmentRole
) – fragment role
- Raises:
- Returns:
pointer to created fragment object on success,
None
on failure- Return type:
Creates a fragment with specified role for given track. The latter needs to already be part of disc’s layout.
The role helps writer implementation determine what kind of fragment to create; for example, some writer implementations create dummy fragments for pregaps.
- finalize_image(disc)¶
- Parameters:
disc (
Mirage.Disc
) – disc object for which the image is being written- Raises:
- Returns:
- Return type:
Finalizes the image, possibly creating the image descriptor file if necessary.
- generate_info(id, name)¶
-
Generates writer information from the input fields. It is intended as a function for creating writer information in writer implementations.
- get_conversion_progress_step()¶
- Returns:
the value of conversion progress step.
- Return type:
Retrieves conversion progress step setting.
- get_info()¶
- Returns:
a pointer to writer information structure. The structure belongs to object and should not be modified.
- Return type:
Retrieves writer information.
- get_parameter_boolean(id)¶
- Parameters:
id (
str
) – parameter ID string- Returns:
user-supplied parameter value.
- Return type:
Looks up the boolean parameter with specified id from user-supplied writer parameters and returns its value. If user did not supply the parameter, its default value is returned instead.
- get_parameter_enum(id)¶
-
Looks up the enum parameter with specified id from user-supplied writer parameters and returns its value. If user did not supply the parameter, its default value is returned instead.
- get_parameter_int(id)¶
-
Looks up the string parameter with specified id from user-supplied writer parameters and returns its value. If user did not supply the parameter, its default value is returned instead.
- get_parameter_string(id)¶
-
Looks up the string parameter with specified id from user-supplied writer parameters and returns its value. If user did not supply the parameter, its default value is returned instead.
- lookup_parameter_ids()¶
- Returns:
the list of parameter IDs. The list and its elements belong to the writer and should not be modified.
- Return type:
[
str
]
Retrieves the list of parameter ID strings from writer’s parameter sheet. The IDs are ordered in the same way as they were inserted into the parameter sheet.
- lookup_parameter_info(id)¶
- Parameters:
id (
str
) – parameter ID string- Returns:
the pointer to parameter’s information structure on success,
None
on failure. The information structure belong to the writer and should not be modified.- Return type:
Looks up the parameter with specified id in writer’s parameter sheet and retrieves the parameter’s information structure.
- open_image(disc, parameters)¶
- Parameters:
disc (
Mirage.Disc
) – disc object for which the image will be createdparameters ({
str
:GLib.Variant
}) – writer parameters
- Raises:
- Returns:
- Return type:
Initializes the image writer to start the writing process for disc. The latter should have set the image filename(s) and medium type, but does not have to have disc layout (sessions, tracks) built yet.
- set_conversion_progress_step(step)¶
- Parameters:
step (
int
) – new conversion progress step value
Sets conversion progress step. Setting step to 0 disables conversion progress reporting.
- do_create_fragment(track, role) virtual¶
- Parameters:
track (
Mirage.Track
) – track for which the fragment is to be createdrole (
Mirage.FragmentRole
) – fragment role
- Returns:
pointer to created fragment object on success,
None
on failure- Return type:
Creates a fragment with specified role for given track. The latter needs to already be part of disc’s layout.
The role helps writer implementation determine what kind of fragment to create; for example, some writer implementations create dummy fragments for pregaps.
- do_finalize_image(disc) virtual¶
- Parameters:
disc (
Mirage.Disc
) – disc object for which the image is being written- Returns:
- Return type:
Finalizes the image, possibly creating the image descriptor file if necessary.
- do_open_image_impl(disc) virtual¶
- Parameters:
disc (
Mirage.Disc
) –- Return type:
initializes writer on specified image
Signal Details¶
- Mirage.Writer.signals.conversion_progress(writer, progress)¶
- Signal Name:
conversion-progress
- Flags:
- Parameters:
writer (
Mirage.Writer
) – The object which received the signalprogress (
int
) – percentual image conversion progress
Emitted when the image conversion progress reaches a new progress mark.