OGMDvd Reference Manual: OGMDvdDisc

## OGMDvdDisc OGMDvdDisc — Structure describing a video DVD |

## Functions

OGMDvdDisc * | ogmdvd_disc_new ()
gboolean | ogmdvd_disc_open ()
void | ogmdvd_disc_close ()
gboolean | ogmdvd_disc_is_open ()
void | ogmdvd_disc_ref ()
void | ogmdvd_disc_unref ()
const gchar * | ogmdvd_disc_get_label ()
const gchar * | ogmdvd_disc_get_id ()
const gchar * | ogmdvd_disc_get_device ()
gint64 | ogmdvd_disc_get_vmg_size ()
gint | ogmdvd_disc_get_n_titles ()
OGMDvdTitle * | ogmdvd_disc_get_nth_title ()
GSList * | ogmdvd_disc_get_titles ()

## Types and Values

enum | OGMDvdDiscError

## Object Hierarchy

## Includes

    #include <ogmdvd-disc.h>

## Description

## Functions

### ogmdvd_disc_new ()

    OGMDvdDisc *
    ogmdvd_disc_new (const gchar *device,
                     GError **error);

Creates a new OGMDvdDisc for the given a DVD device.

#### Parameters

device | A DVD device, or NULL to use /dev/dvd. |
error | Location to store the error occuring, or NULL to ignore errors. |

#### Returns

The new OGMDvdDisc, or NULL

### ogmdvd_disc_open ()

    gboolean
    ogmdvd_disc_open (OGMDvdDisc *disc,
                      GError **error);

Opens `disc` .

#### Parameters

disc | A OGMDvdDisc |
error | Location to store the error occuring, or NULL to ignore errors. |

#### Returns

TRUE on success

### ogmdvd_disc_close ()

    void
    ogmdvd_disc_close (OGMDvdDisc *disc);

Closes `disc` .

#### Parameters

disc | A OGMDvdDisc |

### ogmdvd_disc_is_open ()

    gboolean
    ogmdvd_disc_is_open (OGMDvdDisc *disc);

Returns whether the DVD device is open or not.

#### Parameters

disc | A OGMDvdDisc |

#### Returns

TRUE if the DVD device is open

### ogmdvd_disc_ref ()

    void
    ogmdvd_disc_ref (OGMDvdDisc *disc);

Increments the reference count of an OGMDvdDisc.

#### Parameters

disc | An OGMDvdDisc |

### ogmdvd_disc_unref ()

    void
    ogmdvd_disc_unref (OGMDvdDisc *disc);

Decrements the reference count of an OGMDvdDisc.

#### Parameters

disc | An OGMDvdDisc |

### ogmdvd_disc_get_label ()

    const gchar *
    ogmdvd_disc_get_label (OGMDvdDisc *disc);

Returns the label of the DVD.

#### Parameters

disc | An OGMDvdDisc |

#### Returns

The label of the DVD, or NULL

### ogmdvd_disc_get_id ()

    const gchar *
    ogmdvd_disc_get_id (OGMDvdDisc *disc);

Returns a unique 128 bit disc identifier.

#### Parameters

disc | An OGMDvdDisc |

#### Returns

The identifier, or NULL

### ogmdvd_disc_get_device ()

    const gchar *
    ogmdvd_disc_get_device (OGMDvdDisc *disc);

Returns the DVD device.

#### Parameters

disc | An OGMDvdDisc |

#### Returns

The device of the DVD.

### ogmdvd_disc_get_vmg_size ()

    gint64
    ogmdvd_disc_get_vmg_size (OGMDvdDisc *disc);

Returns the size of the video manager in bytes.

#### Parameters

disc | An OGMDvdDisc |

#### Returns

The size in bytes, or -1

### ogmdvd_disc_get_n_titles ()

    gint
    ogmdvd_disc_get_n_titles (OGMDvdDisc *disc);

Returns the number of video titles of this DVD.

#### Parameters

disc | An OGMDvdDisc |

#### Returns

The number of video titles, or -1

### ogmdvd_disc_get_nth_title ()

    OGMDvdTitle *
    ogmdvd_disc_get_nth_title (OGMDvdDisc *disc,
                               guint nr);

Returns the video title at position nr. The first nr is 0.

#### Parameters

disc | An OGMDvdDisc |
nr | The title number |

#### Returns

The OGMDvdTitle, or NULL

### ogmdvd_disc_get_titles ()

    GSList *
    ogmdvd_disc_get_titles (OGMDvdDisc *disc);

Returns a list of all the titles of `disc` .

#### Parameters

disc | An OGMDvdDisc |

#### Returns

A GSList, or NULL

## Types and Values

### enum OGMDvdDiscError

Error codes returned by `ogmdvd_disc_open()`

#### Members

OGMDVD_DISC_ERROR_EXIST | No such file or directory |
OGMDVD_DISC_ERROR_PERM | Permission denied to access device |
OGMDVD_DISC_ERROR_TRAY | Tray seems to be open |
OGMDVD_DISC_ERROR_DEV | Device does not contain a valid DVD video |
OGMDVD_DISC_ERROR_PATH | Path does not contain a valid DVD structure |
OGMDVD_DISC_ERROR_ACCESS | No such directory, block device or iso file |
OGMDVD_DISC_ERROR_VMG | Cannot open video manager |
OGMDVD_DISC_ERROR_VTS | Cannot open video titleset |
OGMDVD_DISC_ERROR_ID | The DVD identifiers differ |
OGMDVD_DISC_ERROR_UNKNOWN | Unknown error |