mme_get_title_chapter()

Get DVD title and chapter information

Synopsis:

#include <mme/mme.h>

int mme_get_title_chapter( mme_hdl_t hdl,
                           uint64_t *title,
                           uint64_t *ntitles,
                           uint64_t *chapter,
                           uint64_t *nchapters );

Arguments:

hdl
An MME connection handle.
title
The current title number.
ntitles
The number of titles in currently playing track or mediastore.
chapter
The current chapter number.
nchapters
The number of chapters in the current title.

Library:

mme

Description:

The function mme_get_title_chapter() gets for the currently playing DVD track:

This function can be used only if the MME_PLAYSUPPORT_NAVIGATION flag is set in the support member of the structure mme_play_info_t.

To start playback from a specific title and chapter, call the function mme_seek_title_chapter() to seek to the desired title and chapter, then call the function mme_play() to start playback.

Events

None delivered.

Blocking and validation

This function blocks on io-media.

Returns:

0
Success.
-1
An error occurred (errno is set).

Examples:

Below is a code snippet that illustrates how to get DVD title and chapter information.

    uint64_t title, ntitles, chapter, nchapters;

    rc = mme_get_title_chapter( mmehdl, &title, &ntitles, &chapter, &nchapters);
    if (rc == EOK) {
        printf( "Title %lld of %lld, Chapter %lld of %lld",
            title, ntitles, chapter, nchapters);
    } else {
        printf( "Error getting title/chapter info %s", strerror(errno));
    }

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_play(), mme_play_bookmark(), mme_play_get_info(), mme_play_info_t, mme_seek_title_chapter(), mme_seektotime()