]> git.sesse.net Git - vlc/blobdiff - modules/access/vcdx/vcd.c
Handle keyboard input: numeric entry, next, prev, return and default.
[vlc] / modules / access / vcdx / vcd.c
index 8567ee8dcd8ea73b558f44d7bcdafea990d80126..3e21e9140c10f43bad23c86c7dd2a21d1713985d 100644 (file)
@@ -4,7 +4,7 @@
  *         to go here.
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.1 2003/10/04 18:55:13 gbazin Exp $
+ * $Id: vcd.c,v 1.3 2003/11/09 00:52:32 rocky Exp $
  *
  * Authors: Johan Bilien <jobi@via.ecp.fr>
  *          Rocky Bernstein <rocky@panix.com> 
@@ -30,6 +30,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/input.h>
+#include <vlc_interface.h>
 
 #include "../../demux/mpeg/system.h"
 #include "vcd.h"
@@ -345,6 +346,10 @@ VCDOpen( vlc_object_t *p_this )
 #endif
     }
 
+    p_vcd->p_intf = intf_Create( p_input, "vcdx" );
+    p_vcd->p_intf->b_block = VLC_FALSE;
+    intf_RunThread( p_vcd->p_intf );
+
     return VLC_SUCCESS;
 }
 
@@ -362,8 +367,22 @@ VCDClose( vlc_object_t *p_this )
 
     free( p_vcd->p_entries );
     free( p_vcd->p_segments );
+
+
+    /* The following if block get moved elsewhere... */
+    if( p_vcd->p_intf != NULL )
+    {
+        intf_StopThread( p_vcd->p_intf );
+        vlc_object_detach( p_vcd->p_intf );
+        vlc_object_release( p_vcd->p_intf );
+        intf_Destroy( p_vcd->p_intf );
+       p_vcd->p_intf = NULL;
+    }
+
     free( p_vcd );
     p_vcd_input = NULL;
+
+
 }
 
 /*****************************************************************************
@@ -922,8 +941,16 @@ VCDLIDs( input_thread_t * p_input )
       
       vcdinfo_visit_lot (p_vcd->vcd, false);
       
+#if FIXED
+    /* 
+       We need to change libvcdinfo to be more robust when there are 
+       problems reading the extended PSD. Given that area-highlighting and 
+       selection features in the extended PSD haven't been implemented,
+       it's best then to not try to read this at all.
+     */
       if (vcdinfo_get_psd_x_size(p_vcd->vcd))
         vcdinfo_visit_lot (p_vcd->vcd, true);
+#endif 
     }
 
     dbg_print( (INPUT_DBG_CALL|INPUT_DBG_MRL),