[vlc-devel] [PATCH 05/12] bluray: Adding an overlay handling skeleton.

Hugo Beauzée-Luyssen beauze.h at gmail.com
Sun Jan 22 00:31:00 CET 2012


---
 modules/access/bluray.c |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 94840f1..f26ff55 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -87,8 +87,10 @@ static int     blurayDemuxMenu(demux_t *);
 static int     blurayInitTitles(demux_t *p_demux );
 static int     bluraySetTitle(demux_t *p_demux, int i_title);
 
-static void     blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e );
-static void     blurayHandleEvents( demux_t *p_demux );
+static void    blurayHandleEvent( demux_t *p_demux, const BD_EVENT *e );
+static void    blurayHandleEvents( demux_t *p_demux );
+
+static void    blurayOverlayProc( void *ptr, const BD_OVERLAY * const overlay );
 
 #define FROM_TICKS(a) (a*CLOCK_FREQ / INT64_C(90000))
 #define TO_TICKS(a)   (a*INT64_C(90000)/CLOCK_FREQ)
@@ -187,6 +189,8 @@ static int blurayOpen( vlc_object_t *object )
     {
         //Starting playback from main menu
         bd_play( p_sys->bluray );
+        //Registering overlay event handler
+        bd_register_overlay_proc( p_sys->bluray, p_demux, blurayOverlayProc );
     }
     else
     {
@@ -245,6 +249,13 @@ static void blurayClose( vlc_object_t *object )
     free(p_sys);
 }
 
+static void blurayOverlayProc( void *ptr, const BD_OVERLAY *const overlay )
+{
+    demux_t     *p_demux = (demux_t*)ptr;
+    demux_sys_t *p_sys = p_demux->p_sys;
+
+    //FIXME
+}
 
 static int blurayInitTitles(demux_t *p_demux )
 {
@@ -254,7 +265,8 @@ static int blurayInitTitles(demux_t *p_demux )
     unsigned i_title = bd_get_titles(p_sys->bluray, TITLES_RELEVANT, 60);
     int64_t duration = 0;
 
-    for (unsigned int i = 0; i < i_title; i++) {
+    for (unsigned int i = 0; i < i_title; i++)
+    {
         input_title_t *t = vlc_input_title_New();
         if (!t)
             break;
-- 
1.7.8.4




More information about the vlc-devel mailing list