[libbluray-devel] Added BD_EVENT_DISCONTINUITY

hpi1 git at videolan.org
Sun Feb 3 00:09:47 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Feb  3 00:38:50 2013 +0200| [7e64e29e5fa2c7e270bc9a8028e1b4cbabc5d506] | committer: hpi1

Added BD_EVENT_DISCONTINUITY

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=7e64e29e5fa2c7e270bc9a8028e1b4cbabc5d506
---

 src/libbluray/bluray.c |    6 ++++++
 src/libbluray/bluray.h |    5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index eb7473f..a41fa64 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1698,6 +1698,12 @@ int bd_read(BLURAY *bd, unsigned char *buf, int len)
                     if (!_open_m2ts(bd, st)) {
                         return -1;
                     }
+
+                    if (st->clip->connection == CONNECT_NON_SEAMLESS) {
+                        /* application layer demuxer buffers must be reset here */
+                        _queue_event(bd, BD_EVENT_DISCONTINUITY, st->clip->in_time);
+                    }
+
                 }
 
                 int r = _read_block(bd, st, bd->int_buf);
diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h
index 9dbb0a0..912940a 100644
--- a/src/libbluray/bluray.h
+++ b/src/libbluray/bluray.h
@@ -569,6 +569,9 @@ typedef enum {
      * playback control
      */
 
+    /* discontinuity in the stream (non-seamless connection). Reset demuxer PES buffers. */
+    BD_EVENT_DISCONTINUITY          = 28,  /* new timestamp (45 kHz) */
+
     /* HDMV VM or JVM seeked the stream. Next read() will return data from new position. Flush all buffers. */
     BD_EVENT_SEEK                   = 21,
 
@@ -595,7 +598,7 @@ typedef enum {
     /* 3D */
     BD_EVENT_STEREOSCOPIC_STATUS    = 27,  /* 0 - 2D, 1 - 3D */
 
-    /*BD_EVENT_LAST = 27, */
+    /*BD_EVENT_LAST = 28, */
 
 } bd_event_e;
 



More information about the libbluray-devel mailing list