## Reader

Reader — Reads the content of a DVD

## Synopsis

    #include <ogmdvd-reader.h>

    OGMDvdReader *      ogmdvd_reader_new                   (OGMDvdTitle *title,
                                                             guint start_chap,
                                                             gint end_chap,
                                                             guint angle);
    OGMDvdReader *      ogmdvd_reader_new_by_cells          (OGMDvdTitle *title,
                                                             guint start_cell,
                                                             gint end_cell,
                                                             guint angle);
    void                ogmdvd_reader_ref                   (OGMDvdReader *reader);
    void                ogmdvd_reader_unref                 (OGMDvdReader *reader);
    gint                ogmdvd_reader_get_block             (OGMDvdReader *reader,
                                                             gsize len,
                                                             guchar *buffer);

## Description

## Details

### ogmdvd_reader_new ()

    OGMDvdReader *      ogmdvd_reader_new                   (OGMDvdTitle *title,
                                                             guint start_chap,
                                                             gint end_chap,
                                                             guint angle);

Creates a new OGMDvdReader.

`title` : | An OGMDvdTitle
`start_chap` : | The chapter to start reading at, 0 for the first chapter
`end_chap` : | The chapter to stop reading at, -1 for the last chapter
`angle` : | The angle to read
Returns : | The new OGMDvdReader, or NULL

### ogmdvd_reader_new_by_cells ()

    OGMDvdReader *      ogmdvd_reader_new_by_cells          (OGMDvdTitle *title,
                                                             guint start_cell,
                                                             gint end_cell,
                                                             guint angle);

Creates a new OGMDvdReader.

`title` : | An OGMDvdTitle
`start_cell` : | The cell to start reading at, 0 for the first cell
`end_cell` : | The cell to stop reading at, -1 for the last cell
`angle` : | The angle to read
Returns : | The new OGMDvdReader, or NULL

### ogmdvd_reader_ref ()

    void                ogmdvd_reader_ref                   (OGMDvdReader *reader);

Increments the reference count of an OGMDvdReader.

`reader` : | An OGMDvdReader

### ogmdvd_reader_unref ()

    void                ogmdvd_reader_unref                 (OGMDvdReader *reader);

Decrements the reference count of an OGMDvdReader.

`reader` : | An OGMDvdReader

### ogmdvd_reader_get_block ()

    gint                ogmdvd_reader_get_block             (OGMDvdReader *reader,
                                                             gsize len,
                                                             guchar *buffer);

Reads up to `len` blocks from the DVD into the buffer starting at `buffer`.

`reader` : | An OGMDvdReader
`len` : | The number of blocks to read
`buffer` : | The buffer to store the blocks read
Returns : | The number of blocks read, or -1