totem r5384 - in trunk: . src/backend



Author: hadess
Date: Sat May  3 15:38:50 2008
New Revision: 5384
URL: http://svn.gnome.org/viewvc/totem?rev=5384&view=rev

Log:
2008-05-03  Bastien Nocera  <hadess hadess net>

	* src/backend/bacon-video-widget-gst-0.10.c
	(bacon_video_widget_open_with_subtitle):
	* src/backend/bacon-video-widget-xine.c
	(bacon_video_widget_open_with_subtitle),
	(bacon_video_widget_strdupnv), (bacon_video_widget_get_mrls):
	Make sure we store URIs as the MRL, not local paths, fixes
	direct seeking not working on local files
	Fix a few compilation warnings in the xine-lib backend



Modified:
   trunk/ChangeLog
   trunk/src/backend/bacon-video-widget-gst-0.10.c
   trunk/src/backend/bacon-video-widget-xine.c

Modified: trunk/src/backend/bacon-video-widget-gst-0.10.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-gst-0.10.c	(original)
+++ trunk/src/backend/bacon-video-widget-gst-0.10.c	Sat May  3 15:38:50 2008
@@ -2659,8 +2659,13 @@
   /* If giosrc isn't available, try to get the MRL's local path */
   if (gst_default_registry_check_feature_version ("giosrc", 0, 10, 0) != FALSE)
     bvw->com->mrl = g_file_get_uri (file);
-  else
-    bvw->com->mrl = g_file_get_path (file);
+  else {
+    char *path;
+
+    path = g_file_get_path (file);
+    bvw->com->mrl = g_filename_to_uri (path, NULL, NULL);
+    g_free (path);
+  }
 
   g_object_unref (file);
 

Modified: trunk/src/backend/bacon-video-widget-xine.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-xine.c	(original)
+++ trunk/src/backend/bacon-video-widget-xine.c	Sat May  3 15:38:50 2008
@@ -2444,9 +2444,12 @@
 		bvw->com->mrl = g_strdup_printf ("http:%s", mrl + 5);
 	} else {
 		GFile *file;
+		char *path;
 
 		file = g_file_new_for_commandline_arg (mrl);
-		bvw->com->mrl = g_file_get_path (file);
+		path = g_file_get_path (file);
+		bvw->com->mrl = g_filename_to_uri (path, NULL, NULL);
+		g_free (path);
 		g_object_unref (file);
 
 		if (bvw->com->mrl == NULL)
@@ -3522,8 +3525,8 @@
 	return BVW_CAN_PLAY_MISSING_PLUGINS;
 }
 
-static char *
-bacon_video_widget_strdupnv (const char **mrls, int num_mrls)
+static char **
+bacon_video_widget_strdupnv (const char **mrls, guint num_mrls)
 {
 	guint i;
 	char **retval;
@@ -3591,10 +3594,10 @@
 			return NULL;
 		/* The first channel can be the last channel played,
 		 * or a copy of the first one, ignore it */
-		return bacon_video_widget_strdupnv (mrls++, num_mrls - 1);
+		return bacon_video_widget_strdupnv ((const char **) mrls++, num_mrls - 1);
 	}
 
-	return bacon_video_widget_strdupnv (mrls, num_mrls);
+	return bacon_video_widget_strdupnv ((const char **) mrls, num_mrls);
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]