From kde-commits Wed Feb 06 08:15:53 2008 From: Jens Bache-Wiig Date: Wed, 06 Feb 2008 08:15:53 +0000 To: kde-commits Subject: kdereview/phonon/gstreamer Message-Id: <1202285753.132293.4886.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120228580213828 SVN commit 771491 by jbache: Compile on older versions of gstreamer M +9 -9 phononsrc.cpp --- trunk/kdereview/phonon/gstreamer/phononsrc.cpp #771490:771491 @@ -27,7 +27,7 @@ namespace Gstreamer { -static GstStaticPadTemplate srctemplate = +static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -54,7 +54,7 @@ static gboolean phonon_src_is_seekable (GstBaseSrc * src); static gboolean phonon_src_get_size (GstBaseSrc * src, guint64 * size); -static GstFlowReturn phonon_src_create (GstBaseSrc * src, guint64 offset, +static GstFlowReturn phonon_src_create (GstBaseSrc * src, guint64 offset, guint length, GstBuffer ** buffer); static void _do_init (GType filesrc_type) @@ -68,11 +68,11 @@ // Register element details static void phonon_src_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); - gst_element_class_set_details_simple (gstelement_class, - "Phonon Stream Source", + GstElementDetails details = GST_ELEMENT_DETAILS ("Phonon Stream Source", "Source/File", "Read from a Phonon StreamInterface", - "Trolltech "); + "Trolltech ASA "); + gst_element_class_set_details (gstelement_class, &details); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&srctemplate)); } @@ -89,7 +89,7 @@ gobject_class->set_property = phonon_src_set_property; gobject_class->get_property = phonon_src_get_property; - g_object_class_install_property (gobject_class, ARG_PHONONSRC, + g_object_class_install_property (gobject_class, ARG_PHONONSRC, g_param_spec_pointer ("iodevice", "A Phonon StreamReader", "A Phonon::GStreamer::StreamReader to read from", GParamFlags(G_PARAM_READWRITE))); @@ -197,10 +197,10 @@ if (success) { *buffer = buf; return GST_FLOW_OK; - } + } g_object_unref(buf); - return GST_FLOW_ERROR; + return GST_FLOW_ERROR; } static GstFlowReturn phonon_src_create (GstBaseSrc * basesrc, guint64 offset, guint length, GstBuffer ** buffer) @@ -228,7 +228,7 @@ *size = src->device->streamSize(); return TRUE; } - *size = -1; + *size = -1; return FALSE; }