sound-juicer r1982 - in trunk: . libjuicer



Author: rburton
Date: Fri Jan 18 10:15:15 2008
New Revision: 1982
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=1982&view=rev

Log:
2008-01-18  Ross Burton  <ross burtonini com>

	* libjuicer/sj-extractor.c:
	Determine the maximum read speed from the element instead of
	assuming G_MAXINT, because the libcdio src has a range of 0-100.
	This fixes slow rips when using libcdio.


Modified:
   trunk/ChangeLog
   trunk/libjuicer/sj-extractor.c

Modified: trunk/libjuicer/sj-extractor.c
==============================================================================
--- trunk/libjuicer/sj-extractor.c	(original)
+++ trunk/libjuicer/sj-extractor.c	Fri Jan 18 10:15:15 2008
@@ -467,6 +467,7 @@
 void
 sj_extractor_extract_track (SjExtractor *extractor, const TrackDetails *track, const char* url, GError **error)
 {
+  GParamSpec *spec;
   GstStateChangeReturn state_ret;
   SjExtractorPrivate *priv;
   GstIterator *iter;
@@ -491,7 +492,10 @@
   }
 
   /* Need to do this, as playback will have locked the read speed to 2x previously */
-  g_object_set (G_OBJECT (priv->cdsrc), "read-speed", G_MAXINT, NULL);
+  spec = g_object_class_find_property (G_OBJECT_GET_CLASS (priv->cdsrc), "read-speed");
+  if (spec && spec->value_type == G_TYPE_INT) {
+    g_object_set (G_OBJECT (priv->cdsrc), "read-speed", ((GParamSpecInt*)spec)->maximum, NULL);
+  }
 
   /* Set the output filename */
   gst_element_set_state (priv->filesink, GST_STATE_NULL);



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