rhythmbox r5989 - in trunk: . backends/gstreamer lib shell sources
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5989 - in trunk: . backends/gstreamer lib shell sources
- Date: Mon, 20 Oct 2008 11:28:28 +0000 (UTC)
Author: jmatthew
Date: Mon Oct 20 11:28:28 2008
New Revision: 5989
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5989&view=rev
Log:
2008-10-20 Jonathan Matthew <jonathan d14n org>
* backends/gstreamer/rb-encoder-gst.c: (start_pipeline),
(add_encoding_pipeline), (attach_output_pipeline),
(profile_bin_find_encoder), (create_pipeline_and_source),
(extract_track), (transcode_track):
* lib/rb-file-helpers.c: (rb_check_dir_has_space),
(rb_file_find_extant_parent), (rb_uri_get_filesystem_type):
* shell/rb-removable-media-manager.c: (do_transfer):
* sources/rb-library-source.c: (impl_paste):
Add more debug info for track transfer stuff, might help figure out
why things are broken for MTP devices..
Modified:
trunk/ChangeLog
trunk/backends/gstreamer/rb-encoder-gst.c
trunk/lib/rb-file-helpers.c
trunk/shell/rb-removable-media-manager.c
trunk/sources/rb-library-source.c
Modified: trunk/backends/gstreamer/rb-encoder-gst.c
==============================================================================
--- trunk/backends/gstreamer/rb-encoder-gst.c (original)
+++ trunk/backends/gstreamer/rb-encoder-gst.c Mon Oct 20 11:28:28 2008
@@ -333,6 +333,8 @@
} else {
_rb_encoder_emit_progress (RB_ENCODER (encoder), -1);
}
+ } else {
+ rb_debug ("encoder pipeline refused to start");
}
return (result != GST_STATE_CHANGE_FAILURE);
@@ -363,11 +365,14 @@
g_object_set (queue, "max-size-time", 120 * GST_SECOND, NULL);
tmp = g_strdup_printf (GST_ENCODING_PROFILE, gm_audio_profile_get_pipeline (profile));
+ rb_debug ("constructing encoding bin from pipeline string %s", tmp);
encoding_bin = GST_ELEMENT (gst_parse_launch (tmp, error));
g_free (tmp);
- if (encoding_bin == NULL)
+ if (encoding_bin == NULL) {
+ rb_debug ("unable to construct encoding bin");
return NULL;
+ }
/* find pads and ghost them if necessary */
if ((pad = gst_bin_find_unconnected_pad (GST_BIN (encoding_bin), GST_PAD_SRC)))
@@ -377,8 +382,10 @@
gst_bin_add (GST_BIN (encoder->priv->pipeline), encoding_bin);
- if (gst_element_link_many (queue, encoding_bin, queue2, NULL) == FALSE)
+ if (gst_element_link_many (queue, encoding_bin, queue2, NULL) == FALSE) {
+ rb_debug ("unable to link encoding bin with queues");
return NULL;
+ }
/* store the first element of the encoding graph. new_decoded_pad_cb
* will link to this once a decoded pad is found */
@@ -601,6 +608,7 @@
* (prompting for overwrite if it already exists) and use giostreamsink.
* otherwise, create whatever sink element we can.
*/
+ rb_debug ("attempting to open output file %s", dest);
file = g_file_new_for_uri (dest);
sink = gst_element_factory_make ("giostreamsink", NULL);
@@ -635,7 +643,7 @@
g_object_set (sink, "stream", stream, NULL);
}
} else {
- rb_debug ("unable to create giostreamsink, falling back to default sink for uri");
+ rb_debug ("unable to create giostreamsink, falling back to default sink for %s", dest);
}
if (sink == NULL) {
@@ -748,6 +756,9 @@
}
gst_iterator_free (iter);
+ if (encoder == NULL) {
+ rb_debug ("unable to find encoder element");
+ }
return encoder;
}
@@ -827,8 +838,11 @@
GstElement *src;
uri = rhythmdb_entry_get_playback_uri (entry);
- if (uri == NULL)
+ if (uri == NULL) {
+ rb_debug ("didn't get a playback URI for entry %s",
+ rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION));
return NULL;
+ }
src = gst_element_make_from_uri (GST_URI_SRC, uri, "source");
if (src == NULL) {
@@ -903,8 +917,11 @@
/* setup cd extraction properties */
uri = rhythmdb_entry_get_playback_uri (entry);
- if (uri == NULL)
+ if (uri == NULL) {
+ rb_debug ("didn't get a playback URI for entry %s",
+ rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION));
return FALSE;
+ }
device = g_utf8_strrchr (uri, -1, '#');
g_object_set (G_OBJECT (src),
@@ -922,8 +939,10 @@
end = add_encoding_pipeline (encoder, profile, error);
if (end == NULL)
return FALSE;
- if (gst_element_link (src, encoder->priv->enc) == FALSE)
+ if (gst_element_link (src, encoder->priv->enc) == FALSE) {
+ rb_debug ("unable to link source to encoding pipeline");
return FALSE;
+ }
if (!attach_output_pipeline (encoder, end, dest, error))
return FALSE;
@@ -969,8 +988,10 @@
if (decoder == NULL)
goto error;
- if (gst_element_link (src, decoder) == FALSE)
+ if (gst_element_link (src, decoder) == FALSE) {
+ rb_debug ("unable to link source element to decodebin");
goto error;
+ }
end = add_encoding_pipeline (encoder, profile, error);
if (end == NULL)
Modified: trunk/lib/rb-file-helpers.c
==============================================================================
--- trunk/lib/rb-file-helpers.c (original)
+++ trunk/lib/rb-file-helpers.c Mon Oct 20 11:28:28 2008
@@ -817,6 +817,9 @@
extant = rb_file_find_extant_parent (file);
if (extant == NULL) {
+ char *uri = g_file_get_uri (file);
+ g_warning ("Cannot get free space at %s: none of the directory structure exists", uri);
+ g_free (uri);
return FALSE;
}
@@ -988,13 +991,16 @@
GFile *parent;
parent = g_file_get_parent (file);
- g_object_unref (file);
- file = parent;
-
- if (file == NULL) {
- g_warning ("filesystem root apparently doesn't exist!");
+ if (parent == NULL) {
+ char *uri = g_file_get_uri (file);
+ g_warning ("filesystem root %s apparently doesn't exist!", uri);
+ g_free (uri);
+ g_object_unref (file);
return NULL;
}
+
+ g_object_unref (file);
+ file = parent;
}
return file;
@@ -1022,6 +1028,7 @@
extant = rb_file_find_extant_parent (file);
if (extant == NULL) {
+ rb_debug ("unable to get filesystem type for %s: none of the directory structure exists", uri);
g_object_unref (file);
return NULL;
}
Modified: trunk/shell/rb-removable-media-manager.c
==============================================================================
--- trunk/shell/rb-removable-media-manager.c (original)
+++ trunk/shell/rb-removable-media-manager.c Mon Oct 20 11:28:28 2008
@@ -1035,11 +1035,14 @@
emit_progress (manager);
- if (priv->transfer_running)
+ if (priv->transfer_running) {
+ rb_debug ("already transferring something");
return;
+ }
data = g_async_queue_try_pop (priv->transfer_queue);
if (data == NULL) {
+ rb_debug ("transfer queue is empty");
priv->transfer_total = 0;
priv->transfer_done = 0;
emit_progress (manager);
@@ -1059,7 +1062,12 @@
g_signal_connect (G_OBJECT (encoder),
"completed", G_CALLBACK (completed_cb),
data);
- rb_encoder_encode (encoder, data->entry, data->dest, data->mime_types);
+ rb_debug ("starting transfer of %s to %s",
+ rhythmdb_entry_get_string (data->entry, RHYTHMDB_PROP_LOCATION),
+ data->dest);
+ if (rb_encoder_encode (encoder, data->entry, data->dest, data->mime_types) == FALSE) {
+ rb_debug ("unable to start transfer");
+ }
}
/**
Modified: trunk/sources/rb-library-source.c
==============================================================================
--- trunk/sources/rb-library-source.c (original)
+++ trunk/sources/rb-library-source.c Mon Oct 20 11:28:28 2008
@@ -1246,14 +1246,17 @@
rb_debug ("pasting entry %s", rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION));
entry_type = rhythmdb_entry_get_entry_type (entry);
- if (entry_type == source_entry_type)
- /* copying to ourselves would be silly */
+ if (entry_type == source_entry_type) {
+ rb_debug ("can't copy an entry from the library to itself");
continue;
+ }
/* see if the responsible source lets us copy */
source_source = rb_shell_get_source_by_entry_type (shell, entry_type);
- if ((source_source != NULL) && !rb_source_can_copy (source_source))
+ if ((source_source != NULL) && !rb_source_can_copy (source_source)) {
+ rb_debug ("source for the entry doesn't want us to copy it");
continue;
+ }
dest = build_filename (source, entry);
if (dest == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]