## Reader

Reader — Reads the content of a DVD

## Functions

OGMDvdReader * | ogmdvd_reader_new ()
OGMDvdReader * | ogmdvd_reader_new_by_cells ()
void | ogmdvd_reader_ref ()
void | ogmdvd_reader_unref ()
gint | ogmdvd_reader_get_block ()

## Object Hierarchy

## Includes

    #include <ogmdvd-reader.h>

## Description

## Functions

### ogmdvd_reader_new ()

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

Creates a new OGMDvdReader.

#### Parameters

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.

#### Parameters

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.

#### Parameters

reader | An OGMDvdReader |

### ogmdvd_reader_unref ()

    void
    ogmdvd_reader_unref (OGMDvdReader *reader);

Decrements the reference count of an OGMDvdReader.

#### Parameters

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` .

#### Parameters

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

## Types and Values