Commit be8abc2c authored by hpi1's avatar hpi1

Emit BD_EVENT_PLAYLIST_STOP when playlist playback is stopped in middle

parent b6961182
- Add support for UDF image files and unmounted discs
- Add UDF volume identifier to DISC_INFO
- Fix infinite loop with some broken HDMV menus
- Add support for UDF image files and unmounted discs.
- Add UDF volume identifier to DISC_INFO.
- Fix infinite loop with some broken HDMV menus.
- Emit BD_EVENT_PLAYLIST_STOP when playlist playback is stopped in middle.
2015-01-26: Version 0.7.0
- Add player setting for BD-J persistent storage and cache paths.
......
......@@ -2052,6 +2052,23 @@ static void _close_playlist(BLURAY *bd)
gc_run(bd->graphics_controller, GC_CTRL_RESET, 0, NULL);
}
/* stopping playback in middle of playlist ? */
if (bd->title && bd->st0.clip) {
if (bd->st0.clip->ref < bd->title->clip_list.count - 1) {
/* not last clip of playlist */
BD_DEBUG(DBG_BLURAY, "close playlist (not last clip)\n");
_queue_event(bd, BD_EVENT_PLAYLIST_STOP, 0);
} else {
/* last clip of playlist */
int clip_pkt = SPN(bd->st0.clip_pos);
int skip = bd->st0.clip->end_pkt - clip_pkt;
BD_DEBUG(DBG_BLURAY, "close playlist (last clip), packets skipped %d\n", skip);
if (skip > 100) {
_queue_event(bd, BD_EVENT_PLAYLIST_STOP, 0);
}
}
}
_close_m2ts(&bd->st0);
_close_preload(&bd->st_ig);
_close_preload(&bd->st_textst);
......
......@@ -660,6 +660,9 @@ typedef enum {
* playback control
*/
/* HDMV VM or JVM stopped playlist playback. Flush all buffers. */
BD_EVENT_PLAYLIST_STOP = 31,
/* discontinuity in the stream (non-seamless connection). Reset demuxer PES buffers. */
BD_EVENT_DISCONTINUITY = 28, /* new timestamp (45 kHz) */
......@@ -692,7 +695,7 @@ typedef enum {
/* 3D */
BD_EVENT_STEREOSCOPIC_STATUS = 27, /* 0 - 2D, 1 - 3D */
/*BD_EVENT_LAST = 30, */
/*BD_EVENT_LAST = 31, */
} bd_event_e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment