]> git.sesse.net Git - vlc/commitdiff
* Fixed my old stupid bug that disabled sound after having played the
authorSam Hocevar <sam@videolan.org>
Mon, 12 Feb 2001 07:52:40 +0000 (07:52 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 12 Feb 2001 07:52:40 +0000 (07:52 +0000)
    first playlist item.
  * Added `Prev' and `Next' buttons to the interface, with the beginning of
    a playlist window (still empty).
  * Added `Slow' and `Fast' buttons to the interface and popup menu.

  Ok, I promise it's the last time I check bloat in, from now the interface
  commits will be much cleaner and actually fix things :)

12 files changed:
debian/vlc.1
include/config.h.in
plugins/dvd/input_dvd.c
plugins/gnome/gnome_callbacks.c
plugins/gnome/gnome_callbacks.h
plugins/gnome/gnome_interface.c
plugins/gnome/gnome_interface.h
plugins/gnome/intf_gnome.glade
plugins/mpeg/input_ps.c
plugins/sdl/vout_sdl.c
src/input/mpeg_system.c
src/interface/main.c

index 0380275085ac1b5c44324d01a280ceb86250172a..544980f54b5288a2e9e4ddb692bc31b4d86ef826 100644 (file)
@@ -149,9 +149,9 @@ also accepts a lot of parameters to customize its behaviour.
 .TP
 .B DVD parameters:
  vlc_dvd_device=<device>           DVD device
- vlc_dvd_audio={ac3|lpcm|mpeg|off} audio type
- vlc_dvd_channel=[0-15]            audio channel
- vlc_dvd_subtitle=[0-31]           subtitle channel
+ vlc_audio={ac3|lpcm|mpeg|off}     audio type
+ vlc_channel=[0-15]                audio channel
+ vlc_subtitle=[0-31]               subtitle channel
 .TP
 .B Input parameters:
  vlc_server=<hostname>    video server
index a9bcbf0cba00f61452faf1031083514fcd8f6afd..edfc7ebfd116de508e8fd3249d0d9ef664740da5 100644 (file)
 
 #define INPUT_DVD_DEVICE_VAR            "vlc_dvd_device"
 #define INPUT_DVD_DEVICE_DEFAULT        "/dev/dvd"
-#define INPUT_DVD_AUDIO_VAR             "vlc_dvd_audio"
-#define INPUT_DVD_CHANNEL_VAR           "vlc_dvd_channel"
-#define INPUT_DVD_SUBTITLE_VAR          "vlc_dvd_subtitle"
+
+#define INPUT_AUDIO_VAR                 "vlc_input_audio"
+#define INPUT_CHANNEL_VAR               "vlc_input_channel"
+#define INPUT_SUBTITLE_VAR              "vlc_input_subtitle"
 
 /*****************************************************************************
  * Audio configuration
index 5af36e5c8d5bb40cf47eafaaf776b1c9a3473eea..c6322a1d67f826fd5ad3bc685fa05e3af09d2227 100644 (file)
@@ -10,7 +10,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.6 2001/02/09 03:51:42 stef Exp $
+ * $Id: input_dvd.c,v 1.7 2001/02/12 07:52:40 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -289,12 +289,12 @@ static void DVDInit( input_thread_t * p_input )
 
                     case MPEG1_AUDIO_ES:
                     case MPEG2_AUDIO_ES:
-                        if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
                                 == (p_es->i_id & 0x1F) )
-                        switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
                         {
                         case 0:
-                            main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
+                            main_PutIntVariable( INPUT_AUDIO_VAR,
                                                  REQUESTED_MPEG );
                         case REQUESTED_MPEG:
                             input_SelectES( p_input, p_es );
@@ -302,12 +302,12 @@ static void DVDInit( input_thread_t * p_input )
                         break;
 
                     case AC3_AUDIO_ES:
-                        if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
                                 == ((p_es->i_id & 0xF00) >> 8) )
-                        switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
                         {
                         case 0:
-                            main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
+                            main_PutIntVariable( INPUT_AUDIO_VAR,
                                                  REQUESTED_AC3 );
                         case REQUESTED_AC3:
                             input_SelectES( p_input, p_es );
@@ -315,7 +315,7 @@ static void DVDInit( input_thread_t * p_input )
                         break;
 
                     case DVD_SPU_ES:
-                        if( main_GetIntVariable( INPUT_DVD_SUBTITLE_VAR, -1 )
+                        if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
                                 == ((p_es->i_id & 0x1F00) >> 8) )
                         {
                             input_SelectES( p_input, p_es );
index 2475e1dcd4be580f1b64b11cc5ad6f04bd224491..6708c13f7af80a30fe0a791d55c20792068b1ce6 100644 (file)
@@ -90,7 +90,15 @@ void
 on_menubar_playlist_activate           (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
 
+    if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
+    {
+        p_intf->p_sys->p_playlist = create_intf_playlist();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
+                             "p_intf", p_intf );
+    }
+    gtk_widget_show( p_intf->p_sys->p_playlist );
 }
 
 
@@ -119,6 +127,8 @@ on_menubar_about_activate              (GtkMenuItem     *menuitem,
     if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
     {
         p_intf->p_sys->p_about = create_intf_about();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_about ),
+                             "p_intf", p_intf );
     }
     gtk_widget_show( p_intf->p_sys->p_about );
 }
@@ -189,7 +199,15 @@ void
 on_toolbar_playlist_clicked            (GtkButton       *button,
                                         gpointer         user_data)
 {
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
 
+    if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
+    {
+        p_intf->p_sys->p_playlist = create_intf_playlist();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
+                             "p_intf", p_intf );
+    }
+    gtk_widget_show( p_intf->p_sys->p_playlist );
 }
 
 
@@ -197,7 +215,15 @@ void
 on_toolbar_prev_clicked                (GtkButton       *button,
                                         gpointer         user_data)
 {
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
 
+    if( p_intf->p_input != NULL )
+    {
+        /* FIXME: temporary hack */
+        intf_PlstPrev( p_main->p_playlist );
+        intf_PlstPrev( p_main->p_playlist );
+        p_intf->p_input->b_eof = 1;
+    }
 }
 
 
@@ -205,7 +231,13 @@ void
 on_toolbar_next_clicked                (GtkButton       *button,
                                         gpointer         user_data)
 {
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
 
+    if( p_intf->p_input != NULL )
+    {
+        /* FIXME: temporary hack */
+        p_intf->p_input->b_eof = 1;
+    }
 }
 
 
@@ -318,7 +350,105 @@ on_popup_about_activate                (GtkMenuItem     *menuitem,
     if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
     {
         p_intf->p_sys->p_about = create_intf_about();
+        gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_about ),
+                             "p_intf", p_intf );
     }
     gtk_widget_show( p_intf->p_sys->p_about );
 }
 
+
+void
+on_intf_playlist_destroy               (GtkObject       *object,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_playlist" );
+
+    p_intf->p_sys->p_playlist = NULL;
+}
+
+
+void
+on_playlist_close_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
+}
+
+
+void
+on_popup_slow_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+    int i_rate;
+
+    if( p_intf->p_input != NULL )
+    {
+        i_rate = p_intf->p_input->stream.control.i_rate * 2;
+        if ( i_rate <= MAXIMAL_RATE )
+        {
+             if ( i_rate > 500 && i_rate < 1000 )
+                 i_rate = 1000;
+
+             input_Forward( p_intf->p_input, i_rate );
+        }
+    }
+}
+
+
+void
+on_popup_fast_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
+    int i_rate;
+
+    if( p_intf->p_input != NULL )
+    {
+        i_rate = p_intf->p_input->stream.control.i_rate / 2;
+        if ( i_rate >= MINIMAL_RATE )
+        {
+             input_Forward( p_intf->p_input, i_rate );
+        }
+    }
+}
+
+
+void
+on_toolbar_slow_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+    int i_rate;
+
+    if( p_intf->p_input != NULL )
+    {
+        i_rate = p_intf->p_input->stream.control.i_rate * 2;
+        if ( i_rate <= MAXIMAL_RATE )
+        {
+             if ( i_rate > 500 && i_rate < 1000 )
+                 i_rate = 1000;
+
+             input_Forward( p_intf->p_input, i_rate );
+        }
+    }
+}
+
+
+void
+on_toolbar_fast_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+    intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
+    int i_rate;
+
+    if( p_intf->p_input != NULL )
+    {
+        i_rate = p_intf->p_input->stream.control.i_rate / 2;
+        if ( i_rate >= MINIMAL_RATE )
+        {
+             input_Forward( p_intf->p_input, i_rate );
+        }
+    }
+}
+
index 94b5ed367529fa1e3393f1c80a7adfedd4301df7..e52b2990f34f231968d50f072a9bff95c4558571 100644 (file)
@@ -120,3 +120,27 @@ on_popup_open_activate                 (GtkMenuItem     *menuitem,
 void
 on_popup_about_activate                (GtkMenuItem     *menuitem,
                                         gpointer         user_data);
+
+void
+on_intf_playlist_destroy               (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_playlist_close_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_popup_slow_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_popup_fast_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_toolbar_slow_clicked                (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_toolbar_fast_clicked                (GtkButton       *button,
+                                        gpointer         user_data);
index 1f146f9ea6bf79c08bec8c74d876f81260c5168a..73fa64e27e63e1cd369b9b91006abf7ef99f5eed 100644 (file)
@@ -77,7 +77,8 @@ create_intf_window (void)
   GtkWidget *toolbar_stop;
   GtkWidget *toolbar_play;
   GtkWidget *toolbar_pause;
-  GtkWidget *vseparator2;
+  GtkWidget *toolbar_slow;
+  GtkWidget *toolbar_fast;
   GtkWidget *toolbar_playlist;
   GtkWidget *toolbar_prev;
   GtkWidget *toolbar_next;
@@ -214,7 +215,7 @@ create_intf_window (void)
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (toolbar_play);
 
-  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER_STOP);
+  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_BOTTOM);
   toolbar_pause = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                 GTK_TOOLBAR_CHILD_BUTTON,
                                 NULL,
@@ -226,12 +227,29 @@ create_intf_window (void)
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (toolbar_pause);
 
-  vseparator2 = gtk_vseparator_new ();
-  gtk_widget_ref (vseparator2);
-  gtk_object_set_data_full (GTK_OBJECT (intf_window), "vseparator2", vseparator2,
+  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER_STOP);
+  toolbar_slow = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                _("Slow"),
+                                _("Play Slower"), NULL,
+                                tmp_toolbar_icon, NULL, NULL);
+  gtk_widget_ref (toolbar_slow);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_slow", toolbar_slow,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (vseparator2);
-  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator2, NULL, NULL);
+  gtk_widget_show (toolbar_slow);
+
+  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER);
+  toolbar_fast = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
+                                GTK_TOOLBAR_CHILD_BUTTON,
+                                NULL,
+                                _("Fast"),
+                                _("Play Faster"), NULL,
+                                tmp_toolbar_icon, NULL, NULL);
+  gtk_widget_ref (toolbar_fast);
+  gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_fast", toolbar_fast,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (toolbar_fast);
 
   gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
 
@@ -286,7 +304,7 @@ create_intf_window (void)
   gtk_widget_show (text1);
   gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1);
   gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL,
-                   _("This is some random text. Nah."), 30);
+                   _("This is some random text. Nah. Eat at Sam's. Rent this place. Wazaaa."), 69);
 
   appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   gtk_widget_ref (appbar);
@@ -314,6 +332,12 @@ create_intf_window (void)
   gtk_signal_connect (GTK_OBJECT (toolbar_pause), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_pause_clicked),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (toolbar_slow), "clicked",
+                      GTK_SIGNAL_FUNC (on_toolbar_slow_clicked),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (toolbar_fast), "clicked",
+                      GTK_SIGNAL_FUNC (on_toolbar_fast_clicked),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (toolbar_playlist), "clicked",
                       GTK_SIGNAL_FUNC (on_toolbar_playlist_clicked),
                       NULL);
@@ -340,9 +364,23 @@ static GnomeUIInfo intf_popup_uiinfo[] =
     GNOME_APP_UI_ITEM, N_("Pause"),
     NULL,
     (gpointer) on_popup_pause_activate, NULL, NULL,
+    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOTTOM,
+    0, (GdkModifierType) 0, NULL
+  },
+  {
+    GNOME_APP_UI_ITEM, N_("Slow"),
+    NULL,
+    (gpointer) on_popup_slow_activate, NULL, NULL,
     GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TIMER_STOP,
     0, (GdkModifierType) 0, NULL
   },
+  {
+    GNOME_APP_UI_ITEM, N_("Fast"),
+    NULL,
+    (gpointer) on_popup_fast_activate, NULL, NULL,
+    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TIMER,
+    0, (GdkModifierType) 0, NULL
+  },
   GNOMEUIINFO_SEPARATOR,
   GNOMEUIINFO_MENU_OPEN_ITEM (on_popup_open_activate, NULL),
   GNOMEUIINFO_SEPARATOR,
@@ -372,30 +410,40 @@ create_intf_popup (void)
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[2].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_slow",
                             intf_popup_uiinfo[2].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[3].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fast",
                             intf_popup_uiinfo[3].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[4].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
                             intf_popup_uiinfo[4].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[5].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open",
                             intf_popup_uiinfo[5].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
   gtk_widget_ref (intf_popup_uiinfo[6].widget);
-  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_exit",
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3",
                             intf_popup_uiinfo[6].widget,
                             (GtkDestroyNotify) gtk_widget_unref);
 
+  gtk_widget_ref (intf_popup_uiinfo[7].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about",
+                            intf_popup_uiinfo[7].widget,
+                            (GtkDestroyNotify) gtk_widget_unref);
+
+  gtk_widget_ref (intf_popup_uiinfo[8].widget);
+  gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_exit",
+                            intf_popup_uiinfo[8].widget,
+                            (GtkDestroyNotify) gtk_widget_unref);
+
   return intf_popup;
 }
 
@@ -467,3 +515,114 @@ create_intf_fileopen (void)
   return intf_fileopen;
 }
 
+GtkWidget*
+create_intf_playlist (void)
+{
+  GtkWidget *intf_playlist;
+  GtkWidget *vbox1;
+  GtkWidget *scrolledwindow2;
+  GtkWidget *clist1;
+  GtkWidget *label3;
+  GtkWidget *label4;
+  GtkWidget *label5;
+  GtkWidget *hseparator1;
+  GtkWidget *hbox1;
+  GtkWidget *button1;
+  GtkWidget *playlist_close;
+  GtkWidget *playlist_help;
+
+  intf_playlist = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_object_set_data (GTK_OBJECT (intf_playlist), "intf_playlist", intf_playlist);
+  gtk_window_set_title (GTK_WINDOW (intf_playlist), _("Playlist"));
+
+  vbox1 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "vbox1", vbox1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox1);
+  gtk_container_add (GTK_CONTAINER (intf_playlist), vbox1);
+
+  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_ref (scrolledwindow2);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "scrolledwindow2", scrolledwindow2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (scrolledwindow2);
+  gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow2, TRUE, TRUE, 0);
+
+  clist1 = gtk_clist_new (3);
+  gtk_widget_ref (clist1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "clist1", clist1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (clist1);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow2), clist1);
+  gtk_clist_set_column_width (GTK_CLIST (clist1), 0, 189);
+  gtk_clist_set_column_width (GTK_CLIST (clist1), 1, 80);
+  gtk_clist_set_column_width (GTK_CLIST (clist1), 2, 80);
+  gtk_clist_column_titles_show (GTK_CLIST (clist1));
+
+  label3 = gtk_label_new (_("Name"));
+  gtk_widget_ref (label3);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label3", label3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label3);
+  gtk_clist_set_column_widget (GTK_CLIST (clist1), 0, label3);
+
+  label4 = gtk_label_new (_("Type"));
+  gtk_widget_ref (label4);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label4", label4,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label4);
+  gtk_clist_set_column_widget (GTK_CLIST (clist1), 1, label4);
+
+  label5 = gtk_label_new (_("Length"));
+  gtk_widget_ref (label5);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label5", label5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label5);
+  gtk_clist_set_column_widget (GTK_CLIST (clist1), 2, label5);
+
+  hseparator1 = gtk_hseparator_new ();
+  gtk_widget_ref (hseparator1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "hseparator1", hseparator1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hseparator1);
+  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, TRUE, 0);
+
+  hbox1 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_ref (hbox1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "hbox1", hbox1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox1);
+  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
+
+  button1 = gtk_button_new_with_label (_("Wazaaaa !"));
+  gtk_widget_ref (button1);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "button1", button1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (button1);
+  gtk_box_pack_start (GTK_BOX (hbox1), button1, FALSE, FALSE, 0);
+
+  playlist_close = gnome_stock_button (GNOME_STOCK_BUTTON_CLOSE);
+  gtk_widget_ref (playlist_close);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "playlist_close", playlist_close,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (playlist_close);
+  gtk_box_pack_start (GTK_BOX (hbox1), playlist_close, FALSE, FALSE, 0);
+
+  playlist_help = gnome_stock_button (GNOME_STOCK_BUTTON_HELP);
+  gtk_widget_ref (playlist_help);
+  gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "playlist_help", playlist_help,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (playlist_help);
+  gtk_box_pack_start (GTK_BOX (hbox1), playlist_help, FALSE, FALSE, 0);
+
+  gtk_signal_connect (GTK_OBJECT (intf_playlist), "destroy",
+                      GTK_SIGNAL_FUNC (on_intf_playlist_destroy),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (playlist_close), "clicked",
+                      GTK_SIGNAL_FUNC (on_playlist_close_clicked),
+                      NULL);
+
+  return intf_playlist;
+}
+
index 17900a679d07f035f00c48b6745ac5305a3c3f33..c54874d031370024dcffe99dfcf45f38b1404721 100644 (file)
@@ -6,3 +6,4 @@ GtkWidget* create_intf_window (void);
 GtkWidget* create_intf_popup (void);
 GtkWidget* create_intf_about (void);
 GtkWidget* create_intf_fileopen (void);
+GtkWidget* create_intf_playlist (void);
index 2b43f89b388fb61bfee52a0f27af1d7f458bc009..2f5517e0007b5206ab64fe200f413a2fee1e9cc1 100644 (file)
            <last_modification_time>Sun, 11 Feb 2001 17:06:43 GMT</last_modification_time>
          </signal>
          <label>Pause</label>
+         <stock_pixmap>GNOME_STOCK_PIXMAP_BOTTOM</stock_pixmap>
+       </widget>
+
+       <widget>
+         <class>GtkButton</class>
+         <child_name>Toolbar:button</child_name>
+         <name>toolbar_slow</name>
+         <tooltip>Play Slower</tooltip>
+         <signal>
+           <name>clicked</name>
+           <handler>on_toolbar_slow_clicked</handler>
+           <last_modification_time>Mon, 12 Feb 2001 07:20:42 GMT</last_modification_time>
+         </signal>
+         <label>Slow</label>
          <stock_pixmap>GNOME_STOCK_PIXMAP_TIMER_STOP</stock_pixmap>
        </widget>
 
        <widget>
-         <class>GtkVSeparator</class>
-         <name>vseparator2</name>
+         <class>GtkButton</class>
+         <child_name>Toolbar:button</child_name>
+         <name>toolbar_fast</name>
+         <tooltip>Play Faster</tooltip>
+         <signal>
+           <name>clicked</name>
+           <handler>on_toolbar_fast_clicked</handler>
+           <last_modification_time>Mon, 12 Feb 2001 07:20:48 GMT</last_modification_time>
+         </signal>
+         <label>Fast</label>
+         <stock_pixmap>GNOME_STOCK_PIXMAP_TIMER</stock_pixmap>
        </widget>
 
        <widget>
        <name>text1</name>
        <can_focus>True</can_focus>
        <editable>False</editable>
-       <text>This is some random text. Nah.</text>
+       <text>This is some random text. Nah. Eat at Sam's. Rent this place. Wazaaa.</text>
       </widget>
     </widget>
   </widget>
     </signal>
     <label>Pause</label>
     <right_justify>False</right_justify>
+    <stock_icon>GNOME_STOCK_MENU_BOTTOM</stock_icon>
+  </widget>
+
+  <widget>
+    <class>GtkPixmapMenuItem</class>
+    <name>popup_slow</name>
+    <signal>
+      <name>activate</name>
+      <handler>on_popup_slow_activate</handler>
+      <last_modification_time>Mon, 12 Feb 2001 07:19:57 GMT</last_modification_time>
+    </signal>
+    <label>Slow</label>
+    <right_justify>False</right_justify>
     <stock_icon>GNOME_STOCK_MENU_TIMER_STOP</stock_icon>
   </widget>
 
+  <widget>
+    <class>GtkPixmapMenuItem</class>
+    <name>popup_fast</name>
+    <signal>
+      <name>activate</name>
+      <handler>on_popup_fast_activate</handler>
+      <last_modification_time>Mon, 12 Feb 2001 07:19:57 GMT</last_modification_time>
+    </signal>
+    <label>Fast</label>
+    <right_justify>False</right_justify>
+    <stock_icon>GNOME_STOCK_MENU_TIMER</stock_icon>
+  </widget>
+
   <widget>
     <class>GtkMenuItem</class>
     <name>separator2</name>
@@ -524,4 +573,158 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
   </widget>
 </widget>
 
+<widget>
+  <class>GtkWindow</class>
+  <name>intf_playlist</name>
+  <signal>
+    <name>destroy</name>
+    <handler>on_intf_playlist_destroy</handler>
+    <last_modification_time>Mon, 12 Feb 2001 06:02:25 GMT</last_modification_time>
+  </signal>
+  <title>Playlist</title>
+  <type>GTK_WINDOW_TOPLEVEL</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>False</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>True</allow_grow>
+  <auto_shrink>False</auto_shrink>
+
+  <widget>
+    <class>GtkVBox</class>
+    <name>vbox1</name>
+    <homogeneous>False</homogeneous>
+    <spacing>0</spacing>
+
+    <widget>
+      <class>GtkScrolledWindow</class>
+      <name>scrolledwindow2</name>
+      <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
+      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+      <child>
+       <padding>0</padding>
+       <expand>True</expand>
+       <fill>True</fill>
+      </child>
+
+      <widget>
+       <class>GtkCList</class>
+       <name>clist1</name>
+       <can_focus>True</can_focus>
+       <columns>3</columns>
+       <column_widths>189,80,80</column_widths>
+       <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+       <show_titles>True</show_titles>
+       <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+       <widget>
+         <class>GtkLabel</class>
+         <child_name>CList:title</child_name>
+         <name>label3</name>
+         <label>Name</label>
+         <justify>GTK_JUSTIFY_CENTER</justify>
+         <wrap>False</wrap>
+         <xalign>0.5</xalign>
+         <yalign>0.5</yalign>
+         <xpad>0</xpad>
+         <ypad>0</ypad>
+       </widget>
+
+       <widget>
+         <class>GtkLabel</class>
+         <child_name>CList:title</child_name>
+         <name>label4</name>
+         <label>Type</label>
+         <justify>GTK_JUSTIFY_CENTER</justify>
+         <wrap>False</wrap>
+         <xalign>0.5</xalign>
+         <yalign>0.5</yalign>
+         <xpad>0</xpad>
+         <ypad>0</ypad>
+       </widget>
+
+       <widget>
+         <class>GtkLabel</class>
+         <child_name>CList:title</child_name>
+         <name>label5</name>
+         <label>Length</label>
+         <justify>GTK_JUSTIFY_CENTER</justify>
+         <wrap>False</wrap>
+         <xalign>0.5</xalign>
+         <yalign>0.5</yalign>
+         <xpad>0</xpad>
+         <ypad>0</ypad>
+       </widget>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkHSeparator</class>
+      <name>hseparator1</name>
+      <child>
+       <padding>0</padding>
+       <expand>False</expand>
+       <fill>True</fill>
+      </child>
+    </widget>
+
+    <widget>
+      <class>GtkHBox</class>
+      <name>hbox1</name>
+      <homogeneous>True</homogeneous>
+      <spacing>0</spacing>
+      <child>
+       <padding>0</padding>
+       <expand>False</expand>
+       <fill>False</fill>
+      </child>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>button1</name>
+       <can_focus>True</can_focus>
+       <label>Wazaaaa !</label>
+       <relief>GTK_RELIEF_NORMAL</relief>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>False</fill>
+       </child>
+      </widget>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>playlist_close</name>
+       <can_focus>True</can_focus>
+       <signal>
+         <name>clicked</name>
+         <handler>on_playlist_close_clicked</handler>
+         <last_modification_time>Mon, 12 Feb 2001 06:19:17 GMT</last_modification_time>
+       </signal>
+       <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
+       <relief>GTK_RELIEF_NORMAL</relief>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>False</fill>
+       </child>
+      </widget>
+
+      <widget>
+       <class>GtkButton</class>
+       <name>playlist_help</name>
+       <can_focus>True</can_focus>
+       <stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
+       <relief>GTK_RELIEF_NORMAL</relief>
+       <child>
+         <padding>0</padding>
+         <expand>False</expand>
+         <fill>False</fill>
+       </child>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
 </GTK-Interface>
index a60ef27fcecd89ef037d4f226efff9ac10f1250d..b2d3fd7e8fb23d1305cb43f2fd94354ec68257e9 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.4 2001/02/08 17:44:12 massiot Exp $
+ * $Id: input_ps.c,v 1.5 2001/02/12 07:52:40 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -211,12 +211,12 @@ static void PSInit( input_thread_t * p_input )
 
                     case MPEG1_AUDIO_ES:
                     case MPEG2_AUDIO_ES:
-                        if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
                                 == (p_es->i_id & 0x1F) )
-                        switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
                         {
                         case 0:
-                            main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
+                            main_PutIntVariable( INPUT_AUDIO_VAR,
                                                  REQUESTED_MPEG );
                         case REQUESTED_MPEG:
                             input_SelectES( p_input, p_es );
@@ -224,12 +224,12 @@ static void PSInit( input_thread_t * p_input )
                         break;
 
                     case AC3_AUDIO_ES:
-                        if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
                                 == ((p_es->i_id & 0xF00) >> 8) )
-                        switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
                         {
                         case 0:
-                            main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
+                            main_PutIntVariable( INPUT_AUDIO_VAR,
                                                  REQUESTED_AC3 );
                         case REQUESTED_AC3:
                             input_SelectES( p_input, p_es );
@@ -237,7 +237,7 @@ static void PSInit( input_thread_t * p_input )
                         break;
 
                     case DVD_SPU_ES:
-                        if( main_GetIntVariable( INPUT_DVD_SUBTITLE_VAR, -1 )
+                        if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
                                 == ((p_es->i_id & 0x1F00) >> 8) )
                         {
                             input_SelectES( p_input, p_es );
index 48b2692a100e50a633d22bc05c73522cc83c97fa..fbdfa845a9f4b781ae176f12a70b447bd8153577 100644 (file)
 /*****************************************************************************
  * FIXME: this file is ...                                                   *
  *                                                                           *
- *    XXX     XXX         XXX XXX     XXX             XXX     XXX     XXX    *
- *    XXX     XXX     XXX             XXX             XXX     XXX     XXX    *
- *    XXX     XXX     XXX             XXX                 XXX         XXX    *
- *    XXX     XXX     XXX     XXX     XXX                 XXX         XXX    *
- *    XXX     XXX     XXX     XXX     XXX                 XXX                *
- *        XXX             XXX XXX         XXX XXX         XXX         XXX    *
+ *              XXX   XXX     FIXME     XXX     XXX   XXX   XXX              *
+ *              XXX   XXX   XXX   XXX   XXX     XXX   XXX   XXX              *
+ *              XXX   XXX   XXX         XXX       FIXME     XXX              *
+ *              XXX   XXX   XXX  TODO   XXX        XXX      XXX              *
+ *              XXX   XXX   XXX   XXX   XXX        XXX                       *
+ *                FIXME       FIXME       FIXME    XXX      XXX              *
  *                                                                           *
  *****************************************************************************/
 
@@ -79,8 +79,7 @@ typedef struct vout_sys_s
     boolean_t   b_overlay;
     boolean_t   b_cursor;
     boolean_t   b_reopen_display;
-    Uint8   *   p_buffer[2];
-                                                     /* Buffers informations */
+    Uint8   *   p_sdl_buf[2];                           /* Buffer information */
 }   vout_sys_t;
 
 /*****************************************************************************
@@ -631,9 +630,9 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
 
     if( p_vout->b_need_render )
     {
-        p_vout->p_sys->p_buffer[ 0 ] = p_vout->p_sys->p_display->pixels;
+        p_vout->p_sys->p_sdl_buf[ 0 ] = p_vout->p_sys->p_display->pixels;
         SDL_Flip(p_vout->p_sys->p_display);
-        p_vout->p_sys->p_buffer[ 1 ] = p_vout->p_sys->p_display->pixels;
+        p_vout->p_sys->p_sdl_buf[ 1 ] = p_vout->p_sys->p_display->pixels;
         SDL_Flip(p_vout->p_sys->p_display);
 
         /* Set clipping for text */
@@ -659,21 +658,21 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
 
         /* FIXME: palette in 8bpp ?? */
         /* Set and initialize buffers */
-        vout_SetBuffers( p_vout, p_vout->p_sys->p_buffer[ 0 ],
-                                 p_vout->p_sys->p_buffer[ 1 ] );
+        vout_SetBuffers( p_vout, p_vout->p_sys->p_sdl_buf[ 0 ],
+                                 p_vout->p_sys->p_sdl_buf[ 1 ] );
     }
     else
     {
-        p_vout->p_sys->p_buffer[ 0 ] = p_vout->p_sys->p_display->pixels;
-        p_vout->p_sys->p_buffer[ 1 ] = p_vout->p_sys->p_display->pixels;
+        p_vout->p_sys->p_sdl_buf[ 0 ] = p_vout->p_sys->p_display->pixels;
+        p_vout->p_sys->p_sdl_buf[ 1 ] = p_vout->p_sys->p_display->pixels;
 
         /* Set thread information */
         p_vout->i_width =           p_vout->p_sys->p_display->w;
         p_vout->i_height =          p_vout->p_sys->p_display->h;
         p_vout->i_bytes_per_line =  p_vout->p_sys->p_display->pitch;
 
-        vout_SetBuffers( p_vout, p_vout->p_sys->p_buffer[ 0 ],
-                                 p_vout->p_sys->p_buffer[ 1 ] );
+        vout_SetBuffers( p_vout, p_vout->p_sys->p_sdl_buf[ 0 ],
+                                 p_vout->p_sys->p_sdl_buf[ 1 ] );
     }
 
     p_vout->p_sys->b_reopen_display = 0;
index 3661b16766d156e424183ceb5f2857aea273ded4..49dae60cae0d9e606c621e1142046df52f96c8eb 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.34 2001/02/08 17:44:12 massiot Exp $
+ * $Id: mpeg_system.c,v 1.35 2001/02/12 07:52:40 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -703,12 +703,12 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
                         p_es->b_audio = 1;
 #ifdef AUTO_SPAWN
                         if( !p_input->stream.b_seekable )
-                        if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
                                 == (p_es->i_id & 0x1F) )
-                        switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
                         {
                         case 0:
-                            main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
+                            main_PutIntVariable( INPUT_CHANNEL_VAR,
                                                  REQUESTED_MPEG );
                         case REQUESTED_MPEG:
                             input_SelectES( p_input, p_es );
@@ -722,12 +722,12 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
                         p_es->b_audio = 1;
 #ifdef AUTO_SPAWN
                         if( !p_input->stream.b_seekable )
-                        if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
+                        if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
                                 == ((p_es->i_id & 0xF00) >> 8) )
-                        switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
+                        switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
                         {
                         case 0:
-                            main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
+                            main_PutIntVariable( INPUT_CHANNEL_VAR,
                                                  REQUESTED_AC3 );
                         case REQUESTED_AC3:
                             input_SelectES( p_input, p_es );
@@ -739,7 +739,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
                         /* Subtitles video (0x20->0x3F) */
                         p_es->i_type = DVD_SPU_ES;
 #ifdef AUTO_SPAWN
-                        if( main_GetIntVariable( INPUT_DVD_SUBTITLE_VAR, -1 )
+                        if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
                                 == ((p_es->i_id & 0x1F00) >> 8) )
                         {
                             if( !p_input->stream.b_seekable )
index 7cba67b8fafbd3ba8bb6035256650002fd22fc0a..bae98cbb6fe10a7fd755409add05d106e87755a4 100644 (file)
@@ -616,19 +616,19 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
         /* DVD options */
         case 'a':
             if ( ! strcmp(optarg, "ac3") )
-                main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_AC3 );
+                main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_AC3 );
             else if ( ! strcmp(optarg, "lpcm") )
-                main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_LPCM );
+                main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_LPCM );
             else if ( ! strcmp(optarg, "mpeg") )
-                main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_MPEG );
+                main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_MPEG );
             else
-                main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_NOAUDIO );
+                main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_NOAUDIO );
             break;
         case 'c':
-            main_PutIntVariable( INPUT_DVD_CHANNEL_VAR, atoi(optarg) );
+            main_PutIntVariable( INPUT_CHANNEL_VAR, atoi(optarg) );
             break;
         case 's':
-            main_PutIntVariable( INPUT_DVD_SUBTITLE_VAR, atoi(optarg) );
+            main_PutIntVariable( INPUT_SUBTITLE_VAR, atoi(optarg) );
             break;
 
         /* Input options */
@@ -776,9 +776,9 @@ static void Usage( int i_fashion )
     /* DVD parameters */
     intf_MsgImm( "\nDVD parameters:"
         "\n  " INPUT_DVD_DEVICE_VAR "=<device>           \tDVD device"
-        "\n  " INPUT_DVD_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
-        "\n  " INPUT_DVD_CHANNEL_VAR "=[0-15]            \taudio channel"
-        "\n  " INPUT_DVD_SUBTITLE_VAR "=[0-31]           \tsubtitle channel" );
+        "\n  " INPUT_AUDIO_VAR "={ac3|lpcm|mpeg|off}     \taudio type"
+        "\n  " INPUT_CHANNEL_VAR "=[0-15]                \taudio channel"
+        "\n  " INPUT_SUBTITLE_VAR "=[0-31]               \tsubtitle channel" );
 
     /* Input parameters */
     intf_MsgImm( "\nInput parameters:\n"