[MPlayer-cvslog] r34947 - in trunk/gui: interface.c ui/gtk/fileselect.c ui/main.c

ib subversion at mplayerhq.hu
Mon May 21 20:46:25 CEST 2012


Author: ib
Date: Mon May 21 20:46:25 2012
New Revision: 34947

Log:
Add playlist support to the GUI.

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/gtk/fileselect.c
   trunk/gui/ui/main.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Mon May 21 17:31:03 2012	(r34946)
+++ trunk/gui/interface.c	Mon May 21 20:46:25 2012	(r34947)
@@ -595,6 +595,9 @@ int gui(int what, void *data)
 
     case GUI_SET_STREAM:
 
+        if (guiInfo.StreamType == STREAMTYPE_PLAYLIST)
+            guiInfo.mpcontext->file_format = DEMUXER_TYPE_PLAYLIST;
+
         stream = data;
         guiInfo.StreamType = stream->type;
 

Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c	Mon May 21 17:31:03 2012	(r34946)
+++ trunk/gui/ui/gtk/fileselect.c	Mon May 21 20:46:25 2012	(r34947)
@@ -485,7 +485,7 @@ static void fs_Up_released( GtkButton * 
 static void fs_Ok_released( GtkButton * button, gpointer user_data )
 {
  GList         * item;
- int             i = 1;
+ int             i = 1, l;
  struct stat     fs;
 
  stat( fsSelectedFile,&fs );
@@ -503,7 +503,9 @@ static void fs_Ok_released( GtkButton * 
  switch ( fsType )
   {
    case fsVideoSelector:
-          uiSetFileName( fsSelectedDirectory,fsSelectedFile,STREAMTYPE_FILE );
+          for (l = 0; fsVideoFilterNames[l][0]; l++)
+            if (strcmp(fsVideoFilterNames[l][0], MSGTR_Filter_Playlists) == 0) break;
+          uiSetFileName( fsSelectedDirectory,fsSelectedFile, fsLastVideoFilterSelected == l ? STREAMTYPE_PLAYLIST : STREAMTYPE_FILE );
           guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0;
           fs_PersistantHistory( get_current_dir_name_utf8() );      //totem, write into history
           break;

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Mon May 21 17:31:03 2012	(r34946)
+++ trunk/gui/ui/main.c	Mon May 21 20:46:25 2012	(r34947)
@@ -218,6 +218,7 @@ play:
          {
 	  case STREAMTYPE_FILE:
 	  case STREAMTYPE_STREAM:
+	  case STREAMTYPE_PLAYLIST:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_FILE );
 	       if ( !guiInfo.Track )
 	         guiInfo.Track=1;


More information about the MPlayer-cvslog mailing list