bluray.c File Reference

Go to the source code of this file.

Classes

struct  bd_event_queue_s
struct  BD_STREAM
struct  BD_PRELOAD
struct  bluray

Typedefs

typedef int(* fptr_int )()
typedef int32_t(* fptr_int32 )()
typedef void *(* fptr_p_void )()
typedef struct bd_event_queue_s BD_EVENT_QUEUE

Enumerations

enum  BD_TITLE_TYPE { title_undef = 0, title_hdmv, title_bdj }

Functions

static void _init_event_queue (BLURAY *bd)
static int _get_event (BLURAY *bd, BD_EVENT *ev)
static int _queue_event (BLURAY *bd, BD_EVENT ev)
static void _update_stream_psr_by_lang (BD_REGISTERS *regs, uint32_t psr_lang, uint32_t psr_stream, uint32_t enable_flag, uint32_t undefined_val, MPLS_STREAM *streams, unsigned num_streams)
static void _update_clip_psrs (BLURAY *bd, NAV_CLIP *clip)
static void _update_chapter_psr (BLURAY *bd)
static void _close_m2ts (BD_STREAM *st)
static int _open_m2ts (BLURAY *bd, BD_STREAM *st)
static int _read_block (BLURAY *bd, BD_STREAM *st, uint8_t *buf)
static void _close_preload (BD_PRELOAD *p)
static int _preload_m2ts (BLURAY *bd, BD_PRELOAD *p)
static int64_t _seek_stream (BLURAY *bd, BD_STREAM *st, NAV_CLIP *clip, uint32_t clip_pkt)
static void _libaacs_close (BLURAY *bd)
static void _libaacs_unload (BLURAY *bd)
static int _libaacs_required (BLURAY *bd)
static int _libaacs_load (BLURAY *bd)
static int _libaacs_open (BLURAY *bd, const char *keyfile_path)
static uint8_t_libaacs_get_vid (BLURAY *bd)
static void _libbdplus_close (BLURAY *bd)
static void _libbdplus_unload (BLURAY *bd)
static int _libbdplus_required (BLURAY *bd)
static int _libbdplus_load (BLURAY *bd)
static int _libbdplus_open (BLURAY *bd, const char *keyfile_path)
static int _index_open (BLURAY *bd)
static int _meta_open (BLURAY *bd)
const BLURAY_DISC_INFObd_get_disc_info (BLURAY *bd)
 Get information about current BluRay disc.
static void _fill_disc_info (BLURAY *bd)
BLURAYbd_open (const char *device_path, const char *keyfile_path)
 Initializes libbluray objects.
void bd_close (BLURAY *bd)
 Free libbluray objects.
static int64_t _seek_internal (BLURAY *bd, NAV_CLIP *clip, uint32_t title_pkt, uint32_t clip_pkt)
static void _change_angle (BLURAY *bd)
int64_t bd_seek_time (BLURAY *bd, uint64_t tick)
 Seek to specific time in 90Khz ticks.
uint64_t bd_tell_time (BLURAY *bd)
 Return current time.
int64_t bd_seek_chapter (BLURAY *bd, unsigned chapter)
 Seek to a chapter.
int64_t bd_chapter_pos (BLURAY *bd, unsigned chapter)
 Find the byte position of a chapter.
uint32_t bd_get_current_chapter (BLURAY *bd)
 Get the current chapter.
int64_t bd_seek_playitem (BLURAY *bd, unsigned clip_ref)
int64_t bd_seek_mark (BLURAY *bd, unsigned mark)
 Seek to a playmark.
int64_t bd_seek (BLURAY *bd, uint64_t pos)
 Seek to pos in corrently selected title.
uint64_t bd_get_title_size (BLURAY *bd)
 Returns file size in bytes of currently selected title, 0 in no title selected.
uint64_t bd_tell (BLURAY *bd)
 Return current pos.
static int64_t _clip_seek_time (BLURAY *bd, uint64_t tick)
int bd_read (BLURAY *bd, unsigned char *buf, int len)
 Read from currently selected title file, decrypt if possible.
int bd_read_skip_still (BLURAY *bd)
 Continue reading after still mode clip.
static int _find_ig_stream (BLURAY *bd, uint16_t *pid, int *sub_path_idx)
static int _preload_ig_subpath (BLURAY *bd)
static int _preload_subpaths (BLURAY *bd)
static void _close_playlist (BLURAY *bd)
static int _open_playlist (BLURAY *bd, const char *f_name, unsigned angle)
int bd_select_playlist (BLURAY *bd, uint32_t playlist)
 Select a playlist.
int bd_select_title (BLURAY *bd, uint32_t title_idx)
 Select the title from the list created by bd_get_titles().
uint32_t bd_get_current_title (BLURAY *bd)
 Returns the current title index.
int bd_select_angle (BLURAY *bd, unsigned angle)
 Set the angle to play.
unsigned bd_get_current_angle (BLURAY *bd)
 Return the current angle.
void bd_seamless_angle_change (BLURAY *bd, unsigned angle)
 Initiate seamless angle change.
uint32_t bd_get_titles (BLURAY *bd, uint8_t flags, uint32_t min_title_length)
 This must be called after bd_open() and before bd_select_title().
static void _copy_streams (NAV_CLIP *clip, BLURAY_STREAM_INFO *streams, MPLS_STREAM *si, int count)
static BLURAY_TITLE_INFO_fill_title_info (NAV_TITLE *title, uint32_t title_idx, uint32_t playlist)
static BLURAY_TITLE_INFO_get_title_info (BLURAY *bd, uint32_t title_idx, uint32_t playlist, const char *mpls_name, unsigned angle)
BLURAY_TITLE_INFObd_get_title_info (BLURAY *bd, uint32_t title_idx, unsigned angle)
 Get information about a title.
BLURAY_TITLE_INFObd_get_playlist_info (BLURAY *bd, uint32_t playlist, unsigned angle)
 Get information about a playlist.
void bd_free_title_info (BLURAY_TITLE_INFO *title_info)
 Free BLURAY_TITLE_INFO object.
int bd_set_player_setting (BLURAY *bd, uint32_t idx, uint32_t value)
 Update player setting registers.
int bd_set_player_setting_str (BLURAY *bd, uint32_t idx, const char *s)
int bd_start_bdj (BLURAY *bd, const char *start_object)
void bd_stop_bdj (BLURAY *bd)
static void _process_psr_restore_event (BLURAY *bd, BD_PSR_EVENT *ev)
static void _process_psr_write_event (BLURAY *bd, BD_PSR_EVENT *ev)
static void _process_psr_change_event (BLURAY *bd, BD_PSR_EVENT *ev)
static void _process_psr_event (void *handle, BD_PSR_EVENT *ev)
static void _queue_initial_psr_events (BLURAY *bd)
static int _play_bdj (BLURAY *bd, const char *name)
static int _play_hdmv (BLURAY *bd, unsigned id_ref)
static int _play_title (BLURAY *bd, unsigned title)
int bd_play (BLURAY *bd)
 Start playing disc in navigation mode (using on-disc menus).
int bd_play_title (BLURAY *bd, unsigned title)
 Play a title (from disc index).
int bd_menu_call (BLURAY *bd, int64_t pts)
 Open BluRay disc Top Menu.
static int _run_gc (BLURAY *bd, gc_ctrl_e msg, uint32_t param)
static void _process_hdmv_vm_event (BLURAY *bd, HDMV_EVENT *hev)
static int _run_hdmv (BLURAY *bd)
int bd_read_ext (BLURAY *bd, unsigned char *buf, int len, BD_EVENT *event)
 Read from currently playing title.
int bd_get_event (BLURAY *bd, BD_EVENT *event)
 Get event from libbluray event queue.
void bd_set_scr (BLURAY *bd, int64_t pts)
int bd_mouse_select (BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
 Select menu button at location (x,y).
int bd_user_input (BLURAY *bd, int64_t pts, uint32_t key)
 Pass user input to graphics controller.
void bd_register_overlay_proc (BLURAY *bd, void *handle, bd_overlay_proc_f func)
 Register overlay graphics handler function.
struct meta_dlbd_get_meta (BLURAY *bd)
 Get meta information about the bluray disc.
struct clpi_clbd_get_clpi (BLURAY *bd, unsigned clip_ref)
 Get copy of clip information for requested playitem.
void bd_free_clpi (struct clpi_cl *cl)
 Free CLPI_CL object.

Typedef Documentation

typedef int(* fptr_int)()

Definition at line 56 of file bluray.c.

typedef int32_t(* fptr_int32)()

Definition at line 57 of file bluray.c.

typedef void*(* fptr_p_void)()

Definition at line 58 of file bluray.c.


Enumeration Type Documentation

Enumerator:
title_undef 
title_hdmv 
title_bdj 

Definition at line 67 of file bluray.c.


Function Documentation

static void _init_event_queue ( BLURAY bd  )  [static]

Definition at line 172 of file bluray.c.

Referenced by bd_get_event(), and bd_play().

static int _get_event ( BLURAY bd,
BD_EVENT ev 
) [static]

Definition at line 181 of file bluray.c.

Referenced by bd_get_event(), and bd_read_ext().

static int _queue_event ( BLURAY bd,
BD_EVENT  ev 
) [static]
static void _update_stream_psr_by_lang ( BD_REGISTERS regs,
uint32_t  psr_lang,
uint32_t  psr_stream,
uint32_t  enable_flag,
uint32_t  undefined_val,
MPLS_STREAM streams,
unsigned  num_streams 
) [static]

Definition at line 221 of file bluray.c.

Referenced by _update_clip_psrs().

static void _update_clip_psrs ( BLURAY bd,
NAV_CLIP clip 
) [static]

Definition at line 264 of file bluray.c.

Referenced by _open_m2ts().

static void _update_chapter_psr ( BLURAY bd  )  [static]

Definition at line 285 of file bluray.c.

Referenced by _seek_internal(), and bd_read().

static void _close_m2ts ( BD_STREAM st  )  [static]

Definition at line 296 of file bluray.c.

Referenced by _change_angle(), _close_playlist(), _open_m2ts(), _preload_m2ts(), and bd_close().

static int _open_m2ts ( BLURAY bd,
BD_STREAM st 
) [static]
static int _read_block ( BLURAY bd,
BD_STREAM st,
uint8_t buf 
) [static]

Definition at line 368 of file bluray.c.

Referenced by _preload_m2ts(), and bd_read().

static void _close_preload ( BD_PRELOAD p  )  [static]

Definition at line 438 of file bluray.c.

Referenced by _close_playlist(), _preload_m2ts(), and bd_close().

static int _preload_m2ts ( BLURAY bd,
BD_PRELOAD p 
) [static]

Definition at line 444 of file bluray.c.

Referenced by _preload_ig_subpath().

static int64_t _seek_stream ( BLURAY bd,
BD_STREAM st,
NAV_CLIP clip,
uint32_t  clip_pkt 
) [static]

Definition at line 486 of file bluray.c.

Referenced by _seek_internal().

static void _libaacs_close ( BLURAY bd  )  [static]

Definition at line 514 of file bluray.c.

Referenced by _libaacs_open(), and _libaacs_unload().

static void _libaacs_unload ( BLURAY bd  )  [static]

Definition at line 522 of file bluray.c.

Referenced by _libaacs_load(), _libaacs_open(), and bd_close().

static int _libaacs_required ( BLURAY bd  )  [static]

Definition at line 537 of file bluray.c.

Referenced by _libaacs_open().

static int _libaacs_load ( BLURAY bd  )  [static]

Definition at line 559 of file bluray.c.

Referenced by _libaacs_open().

static int _libaacs_open ( BLURAY bd,
const char *  keyfile_path 
) [static]

Definition at line 602 of file bluray.c.

Referenced by bd_open().

static uint8_t* _libaacs_get_vid ( BLURAY bd  )  [static]

Definition at line 631 of file bluray.c.

Referenced by _libbdplus_open().

static void _libbdplus_close ( BLURAY bd  )  [static]

Definition at line 650 of file bluray.c.

Referenced by _libbdplus_open(), and _libbdplus_unload().

static void _libbdplus_unload ( BLURAY bd  )  [static]

Definition at line 658 of file bluray.c.

Referenced by _libbdplus_load(), _libbdplus_open(), and bd_close().

static int _libbdplus_required ( BLURAY bd  )  [static]

Definition at line 674 of file bluray.c.

Referenced by _libbdplus_open().

static int _libbdplus_load ( BLURAY bd  )  [static]

Definition at line 696 of file bluray.c.

Referenced by _libbdplus_open().

static int _libbdplus_open ( BLURAY bd,
const char *  keyfile_path 
) [static]

Definition at line 742 of file bluray.c.

Referenced by bd_open().

static int _index_open ( BLURAY bd  )  [static]

Definition at line 782 of file bluray.c.

Referenced by bd_open().

static int _meta_open ( BLURAY bd  )  [static]

Definition at line 799 of file bluray.c.

Referenced by bd_get_meta().

const BLURAY_DISC_INFO* bd_get_disc_info ( BLURAY  ) 

Get information about current BluRay disc.

Parameters:
bd BLURAY object
Returns:
pointer to BLURAY_DISC_INFO object, NULL on error

Definition at line 811 of file bluray.c.

Referenced by BDRingBuffer::OpenFile(), and BlurayMetadata::ParseDisc().

static void _fill_disc_info ( BLURAY bd  )  [static]

Definition at line 816 of file bluray.c.

Referenced by bd_open().

BLURAY* bd_open ( const char *  device_path,
const char *  keyfile_path 
)

Initializes libbluray objects.

Parameters:
device_path path to mounted Blu-ray disc
keyfile_path path to KEYDB.cfg (may be NULL)
Returns:
allocated BLURAY object, NULL if error

Definition at line 857 of file bluray.c.

Referenced by BlurayMetadata::OpenDisc(), and BDRingBuffer::OpenFile().

void bd_close ( BLURAY bd  ) 

Free libbluray objects.

Parameters:
bd BLURAY object

Definition at line 888 of file bluray.c.

Referenced by BDRingBuffer::close(), and BlurayMetadata::~BlurayMetadata().

static int64_t _seek_internal ( BLURAY bd,
NAV_CLIP clip,
uint32_t  title_pkt,
uint32_t  clip_pkt 
) [static]
static void _change_angle ( BLURAY bd  )  [static]
int64_t bd_seek_time ( BLURAY bd,
uint64_t  tick 
)

Seek to specific time in 90Khz ticks.

Parameters:
bd BLURAY ojbect
tick tick count
Returns:
current seek position

Definition at line 959 of file bluray.c.

Referenced by _process_psr_restore_event(), and BDRingBuffer::Seek().

uint64_t bd_tell_time ( BLURAY bd  ) 

Return current time.

Parameters:
bd BLURAY object
Returns:
current time

Definition at line 980 of file bluray.c.

int64_t bd_seek_chapter ( BLURAY bd,
unsigned  chapter 
)

Seek to a chapter.

First chapter is 0

Parameters:
bd BLURAY object
chapter chapter to seek to
Returns:
current seek position

Definition at line 991 of file bluray.c.

int64_t bd_chapter_pos ( BLURAY bd,
unsigned  chapter 
)

Find the byte position of a chapter.

Parameters:
bd BLURAY object
chapter chapter to find position of
Returns:
seek position of chapter start

Definition at line 1010 of file bluray.c.

Referenced by _open_playlist(), and _update_chapter_psr().

uint32_t bd_get_current_chapter ( BLURAY bd  ) 

Get the current chapter.

Parameters:
bd BLURAY object
Returns:
current chapter

Definition at line 1025 of file bluray.c.

Referenced by _update_chapter_psr(), and BDRingBuffer::GetCurrentChapter().

int64_t bd_seek_playitem ( BLURAY bd,
unsigned  clip_ref 
)

Definition at line 1034 of file bluray.c.

Referenced by _process_hdmv_vm_event(), and _process_psr_restore_event().

int64_t bd_seek_mark ( BLURAY bd,
unsigned  mark 
)

Seek to a playmark.

First mark is 0

Parameters:
bd BLURAY object
mark playmark to seek to
Returns:
current seek position

Definition at line 1054 of file bluray.c.

Referenced by _process_hdmv_vm_event().

int64_t bd_seek ( BLURAY bd,
uint64_t  pos 
)

Seek to pos in corrently selected title.

Parameters:
bd BLURAY object
pos position to seek to
Returns:
current seek position

Definition at line 1073 of file bluray.c.

uint64_t bd_get_title_size ( BLURAY bd  ) 

Returns file size in bytes of currently selected title, 0 in no title selected.

Parameters:
bd BLURAY object
Returns:
file size in bytes of currently selected title, 0 if no title selected

Definition at line 1094 of file bluray.c.

Referenced by BDRingBuffer::GetTotalReadPosition(), and BDRingBuffer::UpdateTitleInfo().

uint64_t bd_tell ( BLURAY bd  ) 

Return current pos.

Parameters:
bd BLURAY object
Returns:
current seek position

Definition at line 1102 of file bluray.c.

Referenced by BDRingBuffer::GetReadPosition(), and BDRingBuffer::safe_read().

static int64_t _clip_seek_time ( BLURAY bd,
uint64_t  tick 
) [static]

Definition at line 1111 of file bluray.c.

Referenced by bd_read().

int bd_read ( BLURAY bd,
unsigned char *  buf,
int  len 
)

Read from currently selected title file, decrypt if possible.

Parameters:
bd BLURAY object
buf buffer to read data into
len size of data to be read
Returns:
size of data read, -1 if error, 0 if EOF

Definition at line 1126 of file bluray.c.

Referenced by bd_read_ext(), and BDRingBuffer::safe_read().

int bd_read_skip_still ( BLURAY bd  ) 

Continue reading after still mode clip.

Parameters:
bd BLURAY object
Returns:
0 on error

Definition at line 1241 of file bluray.c.

Referenced by BDRingBuffer::UpdateTitleInfo().

static int _find_ig_stream ( BLURAY bd,
uint16_t pid,
int *  sub_path_idx 
) [static]

Definition at line 1263 of file bluray.c.

Referenced by _preload_ig_subpath().

static int _preload_ig_subpath ( BLURAY bd  )  [static]

Definition at line 1283 of file bluray.c.

Referenced by _preload_subpaths().

static int _preload_subpaths ( BLURAY bd  )  [static]

Definition at line 1309 of file bluray.c.

Referenced by _open_playlist().

static void _close_playlist ( BLURAY bd  )  [static]

Definition at line 1322 of file bluray.c.

Referenced by _open_playlist(), and _process_hdmv_vm_event().

static int _open_playlist ( BLURAY bd,
const char *  f_name,
unsigned  angle 
) [static]

Definition at line 1337 of file bluray.c.

Referenced by bd_select_playlist(), and bd_select_title().

int bd_select_playlist ( BLURAY bd,
uint32_t  playlist 
)

Select a playlist.

Parameters:
bd BLURAY object
playlist playlist to select
Returns:
1 on success, 0 if error

Definition at line 1369 of file bluray.c.

Referenced by _process_hdmv_vm_event(), and _process_psr_restore_event().

int bd_select_title ( BLURAY bd,
uint32_t  title 
)

Select the title from the list created by bd_get_titles().

Parameters:
bd BLURAY object
title title to select
Returns:
1 on success, 0 if error

Definition at line 1394 of file bluray.c.

Referenced by BDRingBuffer::SwitchTitle().

uint32_t bd_get_current_title ( BLURAY bd  ) 

Returns the current title index.

Parameters:
bd BLURAY object
Returns:
current title index

Definition at line 1414 of file bluray.c.

Referenced by BDRingBuffer::HandleBDEvent().

int bd_select_angle ( BLURAY bd,
unsigned  angle 
)

Set the angle to play.

Parameters:
bd BLURAY object
angle angle to play
Returns:
1 on success, 0 if error

Definition at line 1419 of file bluray.c.

unsigned bd_get_current_angle ( BLURAY bd  ) 

Return the current angle.

Parameters:
bd BLURAY object
Returns:
current angle

Definition at line 1446 of file bluray.c.

void bd_seamless_angle_change ( BLURAY bd,
unsigned  angle 
)

Initiate seamless angle change.

Parameters:
bd BLURAY object
angle angle to change to

Definition at line 1455 of file bluray.c.

Referenced by BDRingBuffer::SwitchAngle().

uint32_t bd_get_titles ( BLURAY bd,
uint8_t  flags,
uint32_t  min_title_length 
)

This must be called after bd_open() and before bd_select_title().

Populates the title list in BLURAY. Filtering of the returned list is controled through title flags

Parameters:
bd BLURAY object
flags title flags
min_title_length filter out titles shorter than min_title_length seconds
Returns:
number of titles found

Definition at line 1470 of file bluray.c.

Referenced by BDRingBuffer::OpenFile().

static void _copy_streams ( NAV_CLIP clip,
BLURAY_STREAM_INFO streams,
MPLS_STREAM si,
int  count 
) [static]

Definition at line 1490 of file bluray.c.

Referenced by _fill_title_info().

static BLURAY_TITLE_INFO* _fill_title_info ( NAV_TITLE title,
uint32_t  title_idx,
uint32_t  playlist 
) [static]

Definition at line 1505 of file bluray.c.

Referenced by _get_title_info().

static BLURAY_TITLE_INFO* _get_title_info ( BLURAY bd,
uint32_t  title_idx,
uint32_t  playlist,
const char *  mpls_name,
unsigned  angle 
) [static]

Definition at line 1556 of file bluray.c.

Referenced by bd_get_playlist_info(), and bd_get_title_info().

BLURAY_TITLE_INFO* bd_get_title_info ( BLURAY bd,
uint32_t  title_idx,
unsigned  angle 
)

Get information about a title.

Parameters:
bd BLURAY object
title_idx title index number
angle angle number (chapter offsets and clip size depend on selected angle)
Returns:
allocated BLURAY_TITLE_INFO object, NULL on error

Definition at line 1575 of file bluray.c.

Referenced by BDRingBuffer::GetTitleInfo().

BLURAY_TITLE_INFO* bd_get_playlist_info ( BLURAY bd,
uint32_t  playlist,
unsigned  angle 
)

Get information about a playlist.

Parameters:
bd BLURAY object
playlist playlist number
angle angle number (chapter offsets and clip size depend on selected angle)
Returns:
allocated BLURAY_TITLE_INFO object, NULL on error

Definition at line 1592 of file bluray.c.

Referenced by BDRingBuffer::GetPlaylistInfo().

void bd_free_title_info ( BLURAY_TITLE_INFO title_info  ) 

Free BLURAY_TITLE_INFO object.

Parameters:
title_info BLURAY_TITLE_INFO object

Definition at line 1604 of file bluray.c.

Referenced by BDRingBuffer::close().

int bd_set_player_setting ( BLURAY bd,
uint32_t  idx,
uint32_t  value 
)

Update player setting registers.

Parameters:
bd BLURAY object
idx Player setting register
value New value for player setting register
Returns:
1 on success, 0 on error (invalid setting)

Definition at line 1625 of file bluray.c.

Referenced by bd_set_player_setting_str(), and BDRingBuffer::OpenFile().

int bd_set_player_setting_str ( BLURAY bd,
uint32_t  idx,
const char *  s 
)

Definition at line 1655 of file bluray.c.

Referenced by BDRingBuffer::OpenFile().

int bd_start_bdj ( BLURAY bd,
const char *  start_object 
)

Definition at line 1675 of file bluray.c.

Referenced by _play_bdj().

void bd_stop_bdj ( BLURAY bd  ) 

Definition at line 1691 of file bluray.c.

Referenced by _play_bdj(), _play_hdmv(), and bd_close().

static void _process_psr_restore_event ( BLURAY bd,
BD_PSR_EVENT ev 
) [static]

Definition at line 1707 of file bluray.c.

Referenced by _process_psr_event().

static void _process_psr_write_event ( BLURAY bd,
BD_PSR_EVENT ev 
) [static]

Definition at line 1752 of file bluray.c.

Referenced by _process_psr_change_event(), and _process_psr_event().

static void _process_psr_change_event ( BLURAY bd,
BD_PSR_EVENT ev 
) [static]

Definition at line 1772 of file bluray.c.

Referenced by _process_psr_event(), and _queue_initial_psr_events().

static void _process_psr_event ( void *  handle,
BD_PSR_EVENT ev 
) [static]

Definition at line 1815 of file bluray.c.

Referenced by bd_get_event(), and bd_play().

static void _queue_initial_psr_events ( BLURAY bd  )  [static]

Definition at line 1839 of file bluray.c.

Referenced by bd_get_event(), and bd_play().

static int _play_bdj ( BLURAY bd,
const char *  name 
) [static]

Definition at line 1866 of file bluray.c.

Referenced by _play_title().

static int _play_hdmv ( BLURAY bd,
unsigned  id_ref 
) [static]

Definition at line 1879 of file bluray.c.

Referenced by _play_title().

static int _play_title ( BLURAY bd,
unsigned  title 
) [static]

Definition at line 1902 of file bluray.c.

Referenced by _process_hdmv_vm_event(), bd_menu_call(), bd_play(), and bd_play_title().

int bd_play ( BLURAY bd  ) 

Start playing disc in navigation mode (using on-disc menus).

Playback is started from "First Play" title.

Parameters:
bd BLURAY object
Returns:
1 on success, 0 if error

Definition at line 1970 of file bluray.c.

Referenced by BDRingBuffer::OpenFile().

int bd_play_title ( BLURAY bd,
unsigned  title 
)

Play a title (from disc index).

Title 0 = Top Menu Title 0xffff = First Play title Number of titles can be found from BLURAY_DISC_INFO.

Parameters:
bd BLURAY object
title title number from disc index
Returns:
1 on success, 0 if error

Definition at line 1990 of file bluray.c.

int bd_menu_call ( BLURAY bd,
int64_t  pts 
)

Open BluRay disc Top Menu.

Current pts is needed for resuming playback when menu is closed.

Parameters:
bd BLURAY object
pts current playback position (1/90000s) or -1
Returns:
1 on success, 0 if error

Definition at line 2012 of file bluray.c.

Referenced by BDRingBuffer::GoToMenu().

static int _run_gc ( BLURAY bd,
gc_ctrl_e  msg,
uint32_t  param 
) [static]

Definition at line 2042 of file bluray.c.

Referenced by _process_hdmv_vm_event(), bd_mouse_select(), and bd_user_input().

static void _process_hdmv_vm_event ( BLURAY bd,
HDMV_EVENT hev 
) [static]

Definition at line 2060 of file bluray.c.

Referenced by _run_hdmv().

static int _run_hdmv ( BLURAY bd  )  [static]

Definition at line 2122 of file bluray.c.

Referenced by bd_read_ext().

int bd_read_ext ( BLURAY bd,
unsigned char *  buf,
int  len,
BD_EVENT event 
)

Read from currently playing title.

When playing disc in navigation mode this function must be used instead of bd_read().

Parameters:
bd BLURAY object
buf buffer to read data into
len size of data to be read
event next BD_EVENT from event queue (BD_EVENT_NONE if no events)
Returns:
size of data read, -1 if error, 0 if event needs to be handled first, 0 if end of title was reached

Definition at line 2145 of file bluray.c.

Referenced by BDRingBuffer::safe_read().

int bd_get_event ( BLURAY bd,
BD_EVENT event 
)

Get event from libbluray event queue.

Parameters:
bd BLURAY object
event next BD_EVENT from event queue, NULL to initialize event queue
Returns:
1 on success, 0 if no events

Definition at line 2189 of file bluray.c.

Referenced by BDRingBuffer::HandleBDEvents().

void bd_set_scr ( BLURAY bd,
int64_t  pts 
)

Definition at line 2209 of file bluray.c.

Referenced by bd_mouse_select(), and bd_user_input().

int bd_mouse_select ( BLURAY bd,
int64_t  pts,
uint16_t  x,
uint16_t  y 
)

Select menu button at location (x,y).

Parameters:
bd BLURAY object
pts current playback position (1/90000s) or -1
x mouse pointer x-position
y mouse pointer y-position
Returns:
<0 on error, 0 when mouse is outside of buttons, 1 when mouse is inside button

Definition at line 2216 of file bluray.c.

Referenced by BDRingBuffer::ClickButton().

int bd_user_input ( BLURAY bd,
int64_t  pts,
uint32_t  key 
)

Pass user input to graphics controller.

Keys are defined in libbluray/keys.h. Current pts can be updated by using BD_VK_NONE key. This is required for animated menus.

Parameters:
bd BLURAY object
pts current playback position (1/90000s) or -1
key input key
Returns:
<0 on error, 0 on success, >0 if selection/activation changed

Definition at line 2223 of file bluray.c.

Referenced by BDRingBuffer::PressButton().

void bd_register_overlay_proc ( BLURAY bd,
void *  handle,
bd_overlay_proc_f  func 
)

Register overlay graphics handler function.

Parameters:
bd BLURAY object
handle application-specific handle that will be passed to handler function
func handler function pointer
Returns:
1 on success, 0 if error

Definition at line 2230 of file bluray.c.

Referenced by BDRingBuffer::OpenFile().

struct meta_dl* bd_get_meta ( BLURAY bd  )  [read]

Get meta information about the bluray disc.

Parameters:
bd BLURAY object
Returns:
allocated META_DL (disclib) object, NULL on error

Definition at line 2247 of file bluray.c.

Referenced by BDRingBuffer::OpenFile(), and BlurayMetadata::ParseDisc().

struct clpi_cl* bd_get_clpi ( BLURAY bd,
unsigned  clip_ref 
) [read]

Get copy of clip information for requested playitem.

Parameters:
bd BLURAY objects
clip_ref requested playitem number
Returns:
pointer to allocated CLPI_CL object on success, NULL on error

Definition at line 2268 of file bluray.c.

void bd_free_clpi ( struct clpi_cl cl  ) 

Free CLPI_CL object.

Parameters:
cl CLPI_CL objects

Definition at line 2280 of file bluray.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:41:47 2012 for MythTV by  doxygen 1.6.3