totem r5470 - in trunk: . src/backend



Author: hadess
Date: Sun Jun 15 00:20:25 2008
New Revision: 5470
URL: http://svn.gnome.org/viewvc/totem?rev=5470&view=rev

Log:
2008-06-15  Bastien Nocera  <hadess hadess net>

	* src/backend/bacon-video-widget-xine.c (bacon_video_widget_init),
	(bacon_video_widget_get_mrls): Don't say we can't support DVB: just
	because we're missing a simple channels.conf, it might appear before
	we try to use DVB,
	Set the device as expected when supporting multiple DVB adapters



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

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	Sun Jun 15 00:20:25 2008
@@ -463,13 +463,7 @@
 		} else if (g_ascii_strcasecmp (autoplug_list[i], "DVD") == 0) {
 			bvw->priv->can_dvd = TRUE;
 		} else if (g_ascii_strcasecmp (autoplug_list[i], "DVB") == 0) {
-			char *path;
-
-			path = g_build_filename (g_get_home_dir (),
-						 ".xine", "channels.conf", NULL);
-			if (g_file_test (path, G_FILE_TEST_IS_REGULAR) != FALSE)
-				bvw->priv->can_dvb = TRUE;
-			g_free (path);
+			bvw->priv->can_dvb = TRUE;
 		}
 		i++;
 	}
@@ -3477,8 +3471,7 @@
 	g_return_val_if_fail (bvw != NULL, NULL);
 	g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), NULL);
 	g_return_val_if_fail (bvw->priv->xine != NULL, NULL);
-	//FIXME enable when we use devices for DVB
-	//g_return_val_if_fail (device != NULL, NULL);
+	g_return_val_if_fail (device != NULL, NULL);
 
 	entry_name = plugin_id = NULL;
 
@@ -3490,15 +3483,23 @@
 		entry_name = "media.vcd.device";
 	} else if (type == MEDIA_TYPE_DVB) {
 		plugin_id = "DVB";
+		entry_name = "media.dvb.adapter";
 	}
 
-	if (entry_name != NULL) {
+	if (type != MEDIA_TYPE_DVB) {
 		xine_cfg_entry_t entry;
 		bvw_config_helper_string (bvw->priv->xine,
 					  entry_name,
 					  device, &entry);
 		entry.str_value = (char *) device;
 		xine_config_update_entry (bvw->priv->xine, &entry);
+	} else {
+		xine_cfg_entry_t entry;
+		bvw_config_helper_string (bvw->priv->xine,
+					  entry_name,
+					  0, &entry);
+		entry.num_value = atoi (device);
+		xine_config_update_entry (bvw->priv->xine, &entry);
 	}
 
 	mrls = xine_get_autoplay_mrls (bvw->priv->xine, plugin_id, &num_mrls);



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