mme_seek_title_chapter()

Seek to a specified title and chapter on a track or mediastore

Synopsis:

#include <mme/mme.h>

int mme_seek_title_chapter( mme_hdl_t hdl,
                            uint64_t title,
                            uint64_t chapter );

Arguments:

hdl
An MME connection handle.
title
The title from which to start playback.
chapter
The chapter from which to start playback.

Library:

mme

Description:

The function mme_seek_title_chapter() seeks to a specified title and chapter on a track or mediastore so that playback can begin from that point. This function can only be used 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:

  1. Create a track session with the mediastore file ID (fid) for the entire DVD.
  2. Set the track session.
  3. Call mme_play() to start playback.
  4. Once the navigator is active, call mme_seek_title_chapter() to seek to the desired title and chapter on the DVD.

To get information about titles and chapters on a playing track, call the function mme_get_title_chapter().

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 seek to a specific title (1) and chapter (5).

    uint64_t title = 1, chapter = 5;

    rc = mme_seek_title_chapter(mmehdl, title, chapter);
    if (rc == EOK) {
        printf( "Seeking to title %lld chapter %lld", title, chapter);
    } else {
        printf( "Seek to title %lld chapter %lld failed, %s", title, chapter, strerror(errno));
    }

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

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