]> git.sesse.net Git - vlc/commitdiff
-added a field to p_input->stream to inform the interface of a stream
authorStéphane Borel <stef@videolan.org>
Thu, 12 Apr 2001 03:26:53 +0000 (03:26 +0000)
committerStéphane Borel <stef@videolan.org>
Thu, 12 Apr 2001 03:26:53 +0000 (03:26 +0000)
change (useful in network mode)

include/input_ext-intf.h
plugins/gnome/intf_gnome.c
src/input/input_programs.c
src/input/mpeg_system.c

index 2a086eba1ed5163c79c044bfc79c221eaaf896fe..25ba60caaf458a0fdd156c4be1eb10fac8f1afb7 100644 (file)
@@ -4,7 +4,7 @@
  * control the pace of reading. 
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.31 2001/04/10 17:47:05 stef Exp $
+ * $Id: input_ext-intf.h,v 1.32 2001/04/12 03:26:53 stef Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -181,6 +181,8 @@ typedef struct input_area_s
 typedef struct stream_descriptor_s
 {
     u16                     i_stream_id;                        /* stream id */
+    boolean_t               b_changed;    /* if stream has been changed,
+                                             we have to inform the interface */
     vlc_mutex_t             stream_lock;  /* to be taken every time you read
                                            * or modify stream, pgrm or es    */
 
index 32167d02e346cb945be99de830ae12c8c6bb9d0f..cc560c836e18a89509f54025ab2fc221f0e66eec 100644 (file)
@@ -2,7 +2,7 @@
  * intf_gnome.c: Gnome interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gnome.c,v 1.27 2001/04/11 12:52:09 sam Exp $
+ * $Id: intf_gnome.c,v 1.28 2001/04/12 03:26:53 stef Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -351,6 +351,13 @@ static gint GnomeManage( gpointer p_data )
         char            psz_title[3];
         char            psz_chapter[3];
 
+        if( p_intf->p_input->stream.b_changed )
+        {
+            p_intf->p_sys->b_menus_update = 1;
+            p_intf->p_input->stream.b_changed = 0;
+fprintf( stderr, "########changed interface##########\n" );
+        }
+
 #define p_area p_intf->p_input->stream.p_selected_area
         /* Update language/chapter menus after user request */
         if( ( p_intf->p_sys->b_menus_update ) ||
index 2d9c09b96b5c6178e6a639fc58938eb82b01d87a..fcc7b57d50e2e04c8e0f4add83743100dff1ff46 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.47 2001/04/12 02:40:09 stef Exp $
+ * $Id: input_programs.c,v 1.48 2001/04/12 03:26:53 stef Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -55,6 +55,7 @@
 int input_InitStream( input_thread_t * p_input, size_t i_data_len )
 {
     p_input->stream.i_stream_id = 0;
+    p_input->stream.b_changed = 0;
     p_input->stream.pp_es = NULL;
     p_input->stream.pp_selected_es = NULL;
     p_input->stream.pp_programs = NULL;
index 92cb693b852581a3e9f1b3c9f5235fa8288e7cbb..d1e276e4749ffddff414bbd1dd7e15afa52318fd 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.48 2001/04/08 07:24:47 stef Exp $
+ * $Id: mpeg_system.c,v 1.49 2001/04/12 03:26:53 stef Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -1445,6 +1445,8 @@ static void input_DecodePMT( input_thread_t * p_input, es_descriptor_t * p_es )
 
         p_pgrm_data->i_pmt_version = p_psi->i_version_number;
 
+        /* inform interface that stream has changed */
+        p_input->stream.b_changed = 1;
     }
     
 #undef p_psi