Skip to content

Commit

Permalink
libmythbluray: Add a BD_EVENT_SEEK Event.
Browse files Browse the repository at this point in the history
Sometimes the HDMV VM will seek to a new location itself-- this allows us to catch the event and act on it, if we were so inclined.
  • Loading branch information
Robert McNamara authored and jyavenard committed Dec 14, 2010
1 parent f247206 commit eb02f2e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
11 changes: 9 additions & 2 deletions mythtv/libs/libmythbluray/bluray.c
Expand Up @@ -261,8 +261,10 @@ static int _open_m2ts(BLURAY *bd, BD_STREAM *st)
bd->aacs, title);
}

if (st == &bd->st0)
if (st == &bd->st0) {
bd_psr_write(bd->regs, PSR_PLAYITEM, st->clip->ref);
bd_psr_write(bd->regs, PSR_TIME, st->clip->in_time);
}

return 1;
}
Expand Down Expand Up @@ -1796,11 +1798,16 @@ static void _process_hdmv_vm_event(BLURAY *bd, HDMV_EVENT *hev)
break;

case HDMV_EVENT_PLAY_PI:
//bd_seek_pi(bd, hev->param);
#if 0
_queue_event(bd, (BD_EVENT){BD_EVENT_SEEK, 0});
bd_seek_pi(bd, hev->param);
#else
DEBUG(DBG_BLURAY|DBG_CRIT, "HDMV_EVENT_PLAY_PI: not implemented\n");
#endif
break;

case HDMV_EVENT_PLAY_PM:
_queue_event(bd, (BD_EVENT){BD_EVENT_SEEK, 0});
bd_seek_mark(bd, hev->param);
break;

Expand Down
5 changes: 4 additions & 1 deletion mythtv/libs/libmythbluray/bluray.h
Expand Up @@ -477,7 +477,10 @@ typedef enum {
BD_EVENT_SECONDARY_VIDEO, /* 0 - disable, 1 - enable */
BD_EVENT_SECONDARY_VIDEO_SIZE, /* 0 - PIP, 0xf - fullscreen */

/* still */
/* HDMV VM or JVM seeked the stream. Next read() will return data from new position. */
BD_EVENT_SEEK,

/* still playback (pause) */
BD_EVENT_STILL, /* 0 - off, 1 - on */

} bd_event_e;
Expand Down

0 comments on commit eb02f2e

Please sign in to comment.