BraseroMedium: Libbrasero-media Reference Manual

## BraseroMedium BraseroMedium |

## Functions

BraseroMedia | brasero_medium_get_status ()
guint64 | brasero_medium_get_max_write_speed ()
guint64 * | brasero_medium_get_write_speeds ()
void | brasero_medium_get_free_space ()
void | brasero_medium_get_capacity ()
void | brasero_medium_get_data_size ()
gint64 | brasero_medium_get_next_writable_address ()
gboolean | brasero_medium_can_be_rewritten ()
gboolean | brasero_medium_can_be_written ()
const gchar * | brasero_medium_get_CD_TEXT_title ()
const gchar * | brasero_medium_get_type_string ()
gchar * | brasero_medium_get_tooltip ()
BraseroDrive * | brasero_medium_get_drive ()
guint | brasero_medium_get_track_num ()
gboolean | brasero_medium_get_last_data_track_space ()
gboolean | brasero_medium_get_last_data_track_address ()
gboolean | brasero_medium_get_track_space ()
gboolean | brasero_medium_get_track_address ()
gboolean | brasero_medium_can_use_dummy_for_sao ()
gboolean | brasero_medium_can_use_dummy_for_tao ()
gboolean | brasero_medium_can_use_burnfree ()

## Properties

BraseroDrive * | drive | Read / Write / Construct Only

## Signals

void | probed | No Recursion

## Types and Values

struct | BraseroMedium

## Object Hierarchy

        GObject
        ╰── BraseroMedium
            ╰── BraseroVolume

## Description

## Functions

### brasero_medium_get_status ()

    BraseroMedia
    brasero_medium_get_status (BraseroMedium *medium);

Gets the medium type and state.

#### Parameters

medium | BraseroMedium |

#### Returns

a BraseroMedia.

### brasero_medium_get_max_write_speed ()

    guint64
    brasero_medium_get_max_write_speed (BraseroMedium *medium);

Gets the maximum speed that can be used to write to `medium` . Note: the speed are in B/sec.

#### Parameters

medium | BraseroMedium |

#### Returns

a guint64.

### brasero_medium_get_write_speeds ()

    guint64 *
    brasero_medium_get_write_speeds (BraseroMedium *medium);

Gets an array holding all possible speeds to write to `medium` . Note: the speed are in B/sec.

#### Parameters

medium | BraseroMedium |

#### Returns

a guint64 *.

### brasero_medium_get_free_space ()

    void
    brasero_medium_get_free_space (BraseroMedium *medium,
                                   goffset *bytes,
                                   goffset *blocks);

Stores in either `size` (in bytes) or `blocks` (the number of blocks) the space on the disc that can be used for writing.

#### Parameters

medium | BraseroMedium |
bytes | a gint64 * or NULL |
blocks | a gint64 * or NULL |

### brasero_medium_get_capacity ()

    void
    brasero_medium_get_capacity (BraseroMedium *medium,
                                 goffset *bytes,
                                 goffset *blocks);

Stores in either `size` (in bytes) or `blocks` (the number of blocks) the total disc space. Note that when the disc is closed this space is the one occupied by data. Otherwise it is the sum of free and used space.

#### Parameters

medium | BraseroMedium |
bytes | a gint64 * or NULL |
blocks | a gint64 * or NULL |

### brasero_medium_get_data_size ()

    void
    brasero_medium_get_data_size (BraseroMedium *medium,
                                  goffset *bytes,
                                  goffset *blocks);

Stores in either `size` (in bytes) or `blocks` (the number of blocks) the size used to store data (including audio on CDs) on the disc.

#### Parameters

medium | BraseroMedium |
bytes | a gint64 * or NULL |
blocks | a gint64 * or NULL |

### brasero_medium_get_next_writable_address ()

    gint64
    brasero_medium_get_next_writable_address
                                   (BraseroMedium *medium);

Gets the address (block number) that can be used to write a new session on `medium`

#### Parameters

medium | BraseroMedium |

#### Returns

a gint64.

### brasero_medium_can_be_rewritten ()

    gboolean
    brasero_medium_can_be_rewritten (BraseroMedium *medium);

Gets whether the medium can be rewritten. Note: it also checks that the drive can rewrite the medium type.

#### Parameters

medium | BraseroMedium |

#### Returns

a gboolean. TRUE if the medium can be rewritten, FALSE otherwise.

### brasero_medium_can_be_written ()

    gboolean
    brasero_medium_can_be_written (BraseroMedium *medium);

Gets whether the medium can be written. It also checks that the medium can write the medium.

#### Parameters

medium | BraseroMedium |

#### Returns

a gboolean. TRUE if the medium can be rewritten, FALSE otherwise.

### brasero_medium_get_CD_TEXT_title ()

    const gchar *
    brasero_medium_get_CD_TEXT_title (BraseroMedium *medium);

Gets the CD-TEXT title for `Medium` .

#### Parameters

medium | BraseroMedium |

#### Returns

a gchar *.

### brasero_medium_get_type_string ()

    const gchar *
    brasero_medium_get_type_string (BraseroMedium *medium);

Returns the medium type as a string to be displayed in a UI.

#### Parameters

medium | BraseroMedium |

#### Returns

a gchar *.

### brasero_medium_get_tooltip ()

    gchar *
    brasero_medium_get_tooltip (BraseroMedium *medium);

Returns a tooltip to be displayed in the UI. It is of the form {content type} {disc type} in {drive name}.

#### Parameters

medium | BraseroMedium |

#### Returns

a gchar *.

### brasero_medium_get_drive ()

    BraseroDrive *
    brasero_medium_get_drive (BraseroMedium *medium);

Gets the BraseroDrive in which the medium is inserted.

#### Parameters

medium | BraseroMedium |

#### Returns

a BraseroDrive. No need to unref after use.

[transfer none]

### brasero_medium_get_track_num ()

    guint
    brasero_medium_get_track_num (BraseroMedium *medium);

Gets the number of tracks on the medium.

#### Parameters

medium | BraseroMedium |

#### Returns

a guint.

### brasero_medium_get_last_data_track_space ()

    gboolean
    brasero_medium_get_last_data_track_space
                                   (BraseroMedium *medium,
                                    goffset *bytes,
                                    goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the space used by the last track on the medium.

#### Parameters

medium | BraseroMedium |
bytes | a goffset * or NULL |
sectors | a goffset * or NULL |

#### Returns

a gboolean. Returns TRUE if information could be retrieved.

### brasero_medium_get_last_data_track_address ()

    gboolean
    brasero_medium_get_last_data_track_address
                                   (BraseroMedium *medium,
                                    goffset *bytes,
                                    goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the address where the last session starts. This is useful when creating a multisession image or when reading the contents of this last track.

#### Parameters

medium | BraseroMedium |
bytes | a goffset * or NULL |
sectors | a goffset * or NULL |

#### Returns

a gboolean. Returns TRUE if information could be retrieved.

### brasero_medium_get_track_space ()

    gboolean
    brasero_medium_get_track_space (BraseroMedium *medium,
                                    guint num,
                                    goffset *bytes,
                                    goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the space used by session `num` on the disc.

#### Parameters

medium | a BraseroMedium |
num | a guint |
bytes | a goffset * or NULL |
sectors | a goffset * or NULL |

#### Returns

a gboolean. Returns TRUE if information could be retrieved; FALSE otherwise (usually when track `num` doesn't exist).

### brasero_medium_get_track_address ()

    gboolean
    brasero_medium_get_track_address (BraseroMedium *medium,
                                      guint num,
                                      goffset *bytes,
                                      goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the address at which the session identified by `num` starts.

#### Parameters

medium | a BraseroMedium |
num | a guint |
bytes | a goffset * or NULL |
sectors | a goffset * or NULL |

#### Returns

a gboolean. Returns TRUE if information could be retrieved; FALSE otherwise (usually when track `num` doesn't exist).

### brasero_medium_can_use_dummy_for_sao ()

    gboolean
    brasero_medium_can_use_dummy_for_sao (BraseroMedium *medium);

Gets whether the medium supports doing a test write with SAO on.

#### Parameters

medium | BraseroMedium |

#### Returns

a gboolean. TRUE if the medium can use SAO write mode during a test write, FALSE otherwise.

### brasero_medium_can_use_dummy_for_tao ()

    gboolean
    brasero_medium_can_use_dummy_for_tao (BraseroMedium *medium);

Gets whether the medium supports doing a test write with TAO on.

#### Parameters

medium | BraseroMedium |

#### Returns

a gboolean. TRUE if the medium can use TAO write mode during a test write, FALSE otherwise.

### brasero_medium_can_use_burnfree ()

    gboolean
    brasero_medium_can_use_burnfree (BraseroMedium *medium);

Gets whether the medium supports any burnfree technology.

#### Parameters

medium | BraseroMedium |

#### Returns

a gboolean. TRUE if the medium can use any burnfree technology, FALSE otherwise.

## Types and Values

### struct BraseroMedium

    struct BraseroMedium;

Represents a physical medium currently inserted in a BraseroDrive.

## Property Details

### The `“drive”` property

      “drive”                    BraseroDrive *

Drive in which medium is inserted.

Owner: BraseroMedium

Flags: Read / Write / Construct Only

## Signal Details

### The `“probed”` signal

    void
    user_function (BraseroMedium *medium,
                   gpointer       user_data)

This signal gets emitted when the medium inside the drive has been fully probed. This is mostly for internal use.

#### Parameters

medium | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion