Commit 5a478d55 authored by hpi1's avatar hpi1

Added BD_EVENT_READ_ERROR

parent 4bcc2e59
......@@ -458,6 +458,11 @@ static void handle_libbluray_event(bluray_input_plugin_t *this, BD_EVENT ev)
this->error = 1;
return;
case BD_EVENT_READ_ERROR:
LOGMG("m2ts file read error");
/*stream_flush(this); leave error detection and handling for upper layer */
return;
case BD_EVENT_ENCRYPTED:
lprintf("BD_EVENT_ENCRYPTED\n");
_x_message (this->stream, XINE_MSG_ENCRYPTED_SOURCE,
......
......@@ -33,6 +33,12 @@ static void _print_event(BD_EVENT *ev)
case BD_EVENT_ERROR:
printf("EVENT_ERROR:\t%d\n", ev->param);
break;
case BD_EVENT_READ_ERROR:
printf("EVENT_READ_ERROR:\t%d\n", ev->param);
break;
case BD_EVENT_ENCRYPTED:
printf("EVENT_ENCRYPTED:\t%d\n", ev->param);
break;
/* current playback position */
......
......@@ -434,6 +434,7 @@ static int _read_block(BLURAY *bd, BD_STREAM *st, uint8_t *buf)
BD_DEBUG(DBG_STREAM | DBG_CRIT, "Read %d bytes at %"PRIu64" failed ! (%p)\n", len, st->clip_block_pos, bd);
_queue_event(bd, (BD_EVENT){BD_EVENT_READ_ERROR, 0});
return 0;
}
......
......@@ -466,8 +466,9 @@ void bd_stop_bdj(BLURAY *bd); // shutdown BD-J and clean up resources
typedef enum {
BD_EVENT_NONE = 0,
BD_EVENT_ERROR,
BD_EVENT_ENCRYPTED,
BD_EVENT_ERROR, /* Fatal error. Playback can't be continued. */
BD_EVENT_READ_ERROR, /* Reading of .m2ts aligned unit failed. Next call to read will try next block. */
BD_EVENT_ENCRYPTED, /* .m2ts file is encrypted and can't be played */
/* current playback position */
BD_EVENT_ANGLE, /* current angle, 1...N */
......
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