brasero r2193 - in trunk: . libbrasero-burn libbrasero-burn/plugins/local-track



Author: philippr
Date: Wed Apr  1 13:01:22 2009
New Revision: 2193
URL: http://svn.gnome.org/viewvc/brasero?rev=2193&view=rev

Log:
2009-04-01  Philippe Rouquier  <bonfire-app wanadoo fr>

	Added a new function that allows to copy track tags
	Use it in burn-uri and local-track plugins
	More headers fixing

	* libbrasero-burn/brasero-burn-options.h:
	* libbrasero-burn/brasero-track-stream.h:
	* libbrasero-burn/brasero-track.c (brasero_track_tag_copy):
	* libbrasero-burn/brasero-track.h:
	* libbrasero-burn/plugins/local-track/burn-local-image.c
	(brasero_local_track_update_track):
	* libbrasero-burn/plugins/local-track/burn-uri.c
	(brasero_burn_uri_thread):


Modified:
   trunk/ChangeLog
   trunk/libbrasero-burn/brasero-burn-options.h
   trunk/libbrasero-burn/brasero-track-stream.h
   trunk/libbrasero-burn/brasero-track.c
   trunk/libbrasero-burn/brasero-track.h
   trunk/libbrasero-burn/plugins/local-track/burn-local-image.c
   trunk/libbrasero-burn/plugins/local-track/burn-uri.c

Modified: trunk/libbrasero-burn/brasero-burn-options.h
==============================================================================
--- trunk/libbrasero-burn/brasero-burn-options.h	(original)
+++ trunk/libbrasero-burn/brasero-burn-options.h	Wed Apr  1 13:01:22 2009
@@ -35,6 +35,8 @@
 
 #include <gtk/gtk.h>
 
+#include <brasero-medium-monitor.h>
+
 #include <brasero-session-cfg.h>
 
 G_BEGIN_DECLS

Modified: trunk/libbrasero-burn/brasero-track-stream.h
==============================================================================
--- trunk/libbrasero-burn/brasero-track-stream.h	(original)
+++ trunk/libbrasero-burn/brasero-track-stream.h	Wed Apr  1 13:01:22 2009
@@ -33,8 +33,8 @@
 
 #include <glib-object.h>
 
-#include "brasero-enums.h"
-#include "brasero-track.h"
+#include <brasero-enums.h>
+#include <brasero-track.h>
 
 G_BEGIN_DECLS
 

Modified: trunk/libbrasero-burn/brasero-track.c
==============================================================================
--- trunk/libbrasero-burn/brasero-track.c	(original)
+++ trunk/libbrasero-burn/brasero-track.c	Wed Apr  1 13:01:22 2009
@@ -302,6 +302,40 @@
 }
 
 void
+brasero_track_tag_copy (BraseroTrack *dest,
+			BraseroTrack *src)
+{
+	BraseroTrackPrivate *priv;
+	GHashTableIter iter;
+	gpointer new_value;
+	gpointer new_key;
+	gpointer value;
+	gpointer key;
+
+	g_return_if_fail (BRASERO_IS_TRACK (dest));
+	g_return_if_fail (BRASERO_IS_TRACK (src));
+
+	priv = BRASERO_TRACK_PRIVATE (src);
+
+	if (!priv->tags)
+		return;
+
+	g_hash_table_iter_init (&iter, priv->tags);
+
+	priv = BRASERO_TRACK_PRIVATE (dest);
+	while (g_hash_table_iter_next (&iter, &key, &value)) {
+		new_value = g_new0 (GValue, 1);
+
+		g_value_init (new_value, g_value_get_gtype (value));
+		g_value_copy (new_value, value);
+
+		new_key = g_strdup (key);
+
+		g_hash_table_insert (priv->tags, new_key, new_value);
+	}
+}
+
+void
 brasero_track_changed (BraseroTrack *track)
 {
 	g_signal_emit (track,

Modified: trunk/libbrasero-burn/brasero-track.h
==============================================================================
--- trunk/libbrasero-burn/brasero-track.h	(original)
+++ trunk/libbrasero-burn/brasero-track.h	Wed Apr  1 13:01:22 2009
@@ -158,6 +158,10 @@
 			  const gchar *tag,
 			  GValue **value);
 
+void
+brasero_track_tag_copy (BraseroTrack *dest,
+			BraseroTrack *src);
+
 G_END_DECLS
 
 #endif /* _BURN_TRACK_H */

Modified: trunk/libbrasero-burn/plugins/local-track/burn-local-image.c
==============================================================================
--- trunk/libbrasero-burn/plugins/local-track/burn-local-image.c	(original)
+++ trunk/libbrasero-burn/plugins/local-track/burn-local-image.c	Wed Apr  1 13:01:22 2009
@@ -604,6 +604,7 @@
 		guint64 file_num = 0;
 
 		track = BRASERO_TRACK (brasero_track_data_new ());
+		brasero_track_tag_copy (BRASERO_TRACK (track), current);
 		brasero_track_data_add_fs (BRASERO_TRACK_DATA (track), input.subtype.fs_type);
 
 		brasero_track_data_get_file_num (BRASERO_TRACK_DATA (current), &file_num);
@@ -651,6 +652,7 @@
 		newuri = brasero_local_track_translate_uri (self, uri);
 
 		track = BRASERO_TRACK (brasero_track_stream_new ());
+		brasero_track_tag_copy (BRASERO_TRACK (track), current);
 		brasero_track_stream_set_source (BRASERO_TRACK_STREAM (track), newuri);
 		brasero_track_stream_set_format (BRASERO_TRACK_STREAM (track), input.subtype.audio_format);
 		brasero_track_stream_set_boundaries (BRASERO_TRACK_STREAM (track),
@@ -680,6 +682,7 @@
 		brasero_track_get_size (current, &blocks, NULL);
 
 		track = BRASERO_TRACK (brasero_track_image_new ());
+		brasero_track_tag_copy (BRASERO_TRACK (track), current);
 		brasero_track_image_set_source (BRASERO_TRACK_IMAGE (track),
 						newimage,
 						newtoc,

Modified: trunk/libbrasero-burn/plugins/local-track/burn-uri.c
==============================================================================
--- trunk/libbrasero-burn/plugins/local-track/burn-uri.c	(original)
+++ trunk/libbrasero-burn/plugins/local-track/burn-uri.c	Wed Apr  1 13:01:22 2009
@@ -341,9 +341,10 @@
 		}
 		g_free (uri);
 
-		brasero_track_get_size (BRASERO_TRACK (current), &blocks, NULL);
+		brasero_track_get_size (current, &blocks, NULL);
 
 		image = brasero_track_image_new ();
+		brasero_track_tag_copy (BRASERO_TRACK (image), current);
 		brasero_track_image_set_source (image,
 						path_image,
 						path_toc,
@@ -484,6 +485,8 @@
 	excluded = g_slist_reverse (excluded);
 
 	track = brasero_track_data_new ();
+	brasero_track_tag_copy (BRASERO_TRACK (track), current);
+	
 	brasero_track_data_add_fs (track, type.subtype.fs_type);
 
 	brasero_track_data_get_file_num (BRASERO_TRACK_DATA (current), &num);



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