From a5e777fac35776b31cd797b0d28a5e9542718657 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 23 Aug 2007 08:33:43 +0000 Subject: [PATCH] Original commit message from CVS: reviewed by: patch by: * configure.ac: * docs/libs/Makefile.am: * docs/libs/gst-plugins-base-libs-docs.sgml: * docs/libs/gst-plugins-base-libs-sections.txt: * ext/gnomevfs/gstgnomevfssrc.c: * ext/gnomevfs/gstgnomevfssrc.h: * gst-libs/gst/Makefile.am: * gst-libs/gst/audio/gstaudiofilter.h: * gst/typefind/gsttypefindfunctions.c: * gst/volume/gstvolume.c: * pkgconfig/gstreamer-plugins-base-uninstalled.pc.in: * pkgconfig/gstreamer-plugins-base.pc.in: * sys/v4l/v4lsrc_calls.c: * tests/examples/Makefile.am: * win32/common/config.h: --- ChangeLog | 5 ++ configure.ac | 1 + docs/libs/Makefile.am | 1 + docs/libs/gst-plugins-base-libs-docs.sgml | 20 +++++++ docs/libs/gst-plugins-base-libs-sections.txt | 64 ++++++++++++++++++++++ ext/gnomevfs/gstgnomevfssrc.c | 39 ++++++++++--- ext/gnomevfs/gstgnomevfssrc.h | 3 + gst-libs/gst/Makefile.am | 1 + gst-libs/gst/audio/gstaudiofilter.h | 2 +- gst/typefind/gsttypefindfunctions.c | 3 +- gst/volume/gstvolume.c | 15 +++-- pkgconfig/gstreamer-plugins-base-uninstalled.pc.in | 4 +- pkgconfig/gstreamer-plugins-base.pc.in | 2 +- sys/v4l/v4lsrc_calls.c | 2 +- tests/examples/Makefile.am | 5 +- win32/common/config.h | 10 ++-- 16 files changed, 148 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index de4771c..fbea8cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-23 Stefan Kost + + * gst/volume/gstvolume.c: + Move passthrough below gst_object_sync_values(). Fixes #442654. + 2007-08-22 Wim Taymans * gst-libs/gst/audio/audio.c: diff --git a/configure.ac b/configure.ac index 6a985a1..8ca59c3 100644 --- a/configure.ac +++ b/configure.ac @@ -648,6 +648,7 @@ gst-libs/Makefile gst-libs/gst/Makefile gst-libs/gst/audio/Makefile gst-libs/gst/cdda/Makefile +gst-libs/gst/fft/Makefile gst-libs/gst/floatcast/Makefile gst-libs/gst/interfaces/Makefile gst-libs/gst/netbuffer/Makefile diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am index 42b57cc..310b693 100644 --- a/docs/libs/Makefile.am +++ b/docs/libs/Makefile.am @@ -69,6 +69,7 @@ SCANOBJ_DEPS = \ $(top_builddir)/gst-libs/gst/interfaces/libgstinterfaces-@GST_MAJORMINOR@.la \ $(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_MAJORMINOR@.la \ $(top_builddir)/gst-libs/gst/cdda/libgstcdda-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/fft/libgstfft-@GST_MAJORMINOR@.la \ $(top_builddir)/gst-libs/gst/rtp/libgstrtp-@GST_MAJORMINOR@.la \ $(top_builddir)/gst-libs/gst/rtsp/libgstrtsp-@GST_MAJORMINOR@.la \ $(top_builddir)/gst-libs/gst/sdp/libgstsdp-@GST_MAJORMINOR@.la \ diff --git a/docs/libs/gst-plugins-base-libs-docs.sgml b/docs/libs/gst-plugins-base-libs-docs.sgml index 3ef293d..cb75caa 100644 --- a/docs/libs/gst-plugins-base-libs-docs.sgml +++ b/docs/libs/gst-plugins-base-libs-docs.sgml @@ -17,6 +17,12 @@ + + + + + + @@ -117,6 +123,20 @@ &GstCddaBaseSrc; + + FFT Library + + This library should be linked to by getting cflags and libs from + gstreamer-plugins-base-&GST_MAJORMINOR;.pc and adding + -lgstfft-&GST_MAJORMINOR; to the library flags. + + &GstFFT; + &GstFFTS16; + &GstFFTS32; + &GstFFTF32; + &GstFFTF64; + + FloatCast Library diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index e9b8d31..8752303 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -226,6 +226,70 @@ GST_TYPE_CDDA_BASE_SRC gst_cdda_base_src_get_type +# fft + +
+gstfft +gst/fft/gstfft.h +GstFFTWindow +gst_fft_next_fast_length +
+ +
+gstffts16 +gst/fft/gstffts16.h +GstFFTS16 +GstFFTS16Complex +gst_fft_s16_new +gst_fft_s16_fft +gst_fft_s16_inverse_fft +gst_fft_s16_free +gst_fft_s16_magnitude +gst_fft_s16_phase +gst_fft_s16_window +
+ +
+gstffts32 +gst/fft/gstffts32.h +GstFFTS32 +GstFFTS32Complex +gst_fft_s32_new +gst_fft_s32_fft +gst_fft_s32_inverse_fft +gst_fft_s32_free +gst_fft_s32_magnitude +gst_fft_s32_phase +gst_fft_s32_window +
+ +
+gstfftf32 +gst/fft/gstfftf32.h +GstFFTF32 +GstFFTF32Complex +gst_fft_f32_new +gst_fft_f32_fft +gst_fft_f32_inverse_fft +gst_fft_f32_free +gst_fft_f32_magnitude +gst_fft_f32_phase +gst_fft_f32_window +
+ +
+gstfftf64 +gst/fft/gstfftf64.h +GstFFTF64 +GstFFTF64Complex +gst_fft_f64_new +gst_fft_f64_fft +gst_fft_f64_inverse_fft +gst_fft_f64_free +gst_fft_f64_magnitude +gst_fft_f64_phase +gst_fft_f64_window +
# floatcast diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index 6b0504c..071c355 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -132,7 +132,8 @@ enum ARG_IRADIO_NAME, ARG_IRADIO_GENRE, ARG_IRADIO_URL, - ARG_IRADIO_TITLE + ARG_IRADIO_TITLE, + ARG_RANDOM_ACCESS }; static void gst_gnome_vfs_src_base_init (gpointer g_class); @@ -254,6 +255,12 @@ gst_gnome_vfs_src_class_init (GstGnomeVFSSrcClass * klass) "iradio-title", "Name of currently playing song", NULL, G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + ARG_RANDOM_ACCESS, + g_param_spec_boolean ("random-access", + "random-mode", + "Enable random file access", FALSE, G_PARAM_READWRITE)); + gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_gnome_vfs_src_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_gnome_vfs_src_stop); gstbasesrc_class->get_size = GST_DEBUG_FUNCPTR (gst_gnome_vfs_src_get_size); @@ -439,6 +446,9 @@ gst_gnome_vfs_src_set_property (GObject * object, guint prop_id, case ARG_IRADIO_MODE: src->iradio_mode = g_value_get_boolean (value); break; + case ARG_RANDOM_ACCESS: + src->random_access = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -475,6 +485,9 @@ gst_gnome_vfs_src_get_property (GObject * object, guint prop_id, GValue * value, case ARG_IRADIO_TITLE: g_value_set_string (value, src->iradio_title); break; + case ARG_RANDOM_ACCESS: + g_value_set_boolean (value, src->random_access); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -662,7 +675,6 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size, gst_buffer_set_caps (buf, src->icy_caps); data = GST_BUFFER_DATA (buf); - GST_BUFFER_OFFSET (buf) = src->curoffset; res = gnome_vfs_read (src->handle, data, size, &readbytes); @@ -670,11 +682,11 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size, && readbytes == 0))) goto eos; - GST_BUFFER_SIZE (buf) = readbytes; - if (G_UNLIKELY (res != GNOME_VFS_OK)) goto read_failed; + GST_BUFFER_OFFSET (buf) = src->curoffset; + GST_BUFFER_SIZE (buf) = readbytes; src->curoffset += readbytes; /* we're done, return the buffer */ @@ -734,7 +746,7 @@ gst_gnome_vfs_src_check_get_range (GstBaseSrc * basesrc) return FALSE; } - if (gnome_vfs_uri_is_local (src->uri)) { + if (gnome_vfs_uri_is_local (src->uri) || src->random_access) { GST_LOG_OBJECT (src, "local URI (%s), assuming random access is possible", GST_STR_NULL (src->uri_name)); return TRUE; @@ -822,11 +834,16 @@ gst_gnome_vfs_src_start (GstBaseSrc * basesrc) if (src->uri != NULL) { GnomeVFSOpenMode mode; + if (src->random_access) + mode = GNOME_VFS_OPEN_READ | GNOME_VFS_OPEN_RANDOM; + else + mode = GNOME_VFS_OPEN_READ; + /* this can block... */ - mode = GNOME_VFS_OPEN_READ; res = gnome_vfs_open_uri (&src->handle, src->uri, mode); - if (res != GNOME_VFS_OK) + if (res != GNOME_VFS_OK) { goto open_failed; + } src->own_handle = TRUE; } else if (!src->handle) { goto no_filename; @@ -882,7 +899,13 @@ gst_gnome_vfs_src_stop (GstBaseSrc * basesrc) gst_gnome_vfs_src_pop_callbacks (src); if (src->own_handle) { - gnome_vfs_close (src->handle); + GnomeVFSResult res; + + res = gnome_vfs_close (src->handle); + if (res != GNOME_VFS_OK) { + GST_ELEMENT_ERROR (src, RESOURCE, CLOSE, (NULL), + ("Could not close vfs handle: %s", gnome_vfs_result_to_string (res))); + } src->handle = NULL; } src->curoffset = 0; diff --git a/ext/gnomevfs/gstgnomevfssrc.h b/ext/gnomevfs/gstgnomevfssrc.h index 458941f..abf0700 100644 --- a/ext/gnomevfs/gstgnomevfssrc.h +++ b/ext/gnomevfs/gstgnomevfssrc.h @@ -73,6 +73,9 @@ struct _GstGnomeVFSSrc gchar *iradio_genre; gchar *iradio_url; gchar *iradio_title; + + /* random acces read mode */ + gboolean random_access; }; struct _GstGnomeVFSSrcClass diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am index f4db55a..d935ae4 100644 --- a/gst-libs/gst/Makefile.am +++ b/gst-libs/gst/Makefile.am @@ -7,6 +7,7 @@ SUBDIRS = \ tag \ audio \ cdda \ + fft \ floatcast \ netbuffer \ pbutils \ diff --git a/gst-libs/gst/audio/gstaudiofilter.h b/gst-libs/gst/audio/gstaudiofilter.h index c6fefe4..27a1328 100644 --- a/gst-libs/gst/audio/gstaudiofilter.h +++ b/gst-libs/gst/audio/gstaudiofilter.h @@ -73,7 +73,7 @@ struct _GstAudioFilter { struct _GstAudioFilterClass { GstBaseTransformClass basetransformclass; - /* virtual function, called whenever the format changes */ + /* virtual function, called whenever the format changes */ gboolean (*setup) (GstAudioFilter * filter, GstRingBufferSpec * format); /*< private >*/ diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index ce33979..cc64efb 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -2738,7 +2738,6 @@ G_BEGIN_DECLS{ \ }G_END_DECLS - /*** plugin initialization ***/ #define TYPE_FIND_REGISTER(plugin,name,rank,func,ext,caps,priv,notify) \ @@ -2746,6 +2745,8 @@ G_BEGIN_DECLS{\ if (!gst_type_find_register (plugin, name, rank, func, ext, caps, priv, notify))\ return FALSE; \ }G_END_DECLS + + static gboolean plugin_init (GstPlugin * plugin) { diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 459087c..fd3bd36 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -430,8 +430,8 @@ volume_process_int16 (GstVolume * this, gpointer bytes, guint n_bytes) /* FIXME: need oil_scalarmultiply_s16_ns ? * https://bugs.freedesktop.org/show_bug.cgi?id=7060 * code below - * - crashes for volume<1.0 - * - is not faster + * - crashes :/ + * - real_vol_i is scaled by VOLUME_UNITY_INT16 and needs the bitshift * time gst-launch 2>/dev/null audiotestsrc wave=7 num-buffers=100 ! volume volume=1.5 ! fakesink */ oil_scalarmult_s16 (data, 0, data, 0, @@ -448,8 +448,7 @@ volume_process_int16_clamp (GstVolume * this, gpointer bytes, guint n_bytes) num_samples = n_bytes / sizeof (gint16); - /* FIXME: need... liboil... - * oil_scalarmultiply_s16_ns ? + /* FIXME: oil_scalarmultiply_s16_ns ? * https://bugs.freedesktop.org/show_bug.cgi?id=7060 */ for (i = 0; i < num_samples; i++) { @@ -513,10 +512,6 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf) GstVolume *this = GST_VOLUME (base); GstClockTime timestamp; - /* don't process data in passthrough-mode */ - if (gst_base_transform_is_passthrough (base)) - return GST_FLOW_OK; - /* FIXME: if controllers are bound, subdivide GST_BUFFER_SIZE into small * chunks for smooth fades, what is small? 1/10th sec. */ @@ -530,6 +525,10 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf) if (GST_CLOCK_TIME_IS_VALID (timestamp)) gst_object_sync_values (G_OBJECT (this), timestamp); + /* don't process data in passthrough-mode */ + if (gst_base_transform_is_passthrough (base)) + return GST_FLOW_OK; + this->process (this, GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf)); return GST_FLOW_OK; diff --git a/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in b/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in index 2431d4e..8150400 100644 --- a/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in +++ b/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in @@ -9,7 +9,7 @@ Description: Streaming media framework, base plugins libraries, uninstalled Version: @VERSION@ Requires: gstreamer-@GST_MAJORMINOR@ -Libs: -L${libdir}/audio -L${libdir}/cdda -L${libdir}/floatcast -L${libdir}/interfaces -L${libdir}/netbuffer -L${libdir}/riff -L${libdir}/rtp -L${libdir}/rtsp -L${libdir}/sdp -L${libdir}/tag -L${libdir}/pbutils -L${libdir}/video +Libs: -L${libdir}/audio -L${libdir}/cdda -L${libdir}/fft -L${libdir}/floatcast -L${libdir}/interfaces -L${libdir}/netbuffer -L${libdir}/riff -L${libdir}/rtp -L${libdir}/rtsp -L${libdir}/sdp -L${libdir}/tag -L${libdir}/pbutils -L${libdir}/video Cflags: -I${includedir} -libraries=audio cdda floatcast interfaces netbuffer riff tag pbutils video +libraries=audio cdda fft floatcast interfaces netbuffer riff tag pbutils video diff --git a/pkgconfig/gstreamer-plugins-base.pc.in b/pkgconfig/gstreamer-plugins-base.pc.in index 397681d..4bc6088 100644 --- a/pkgconfig/gstreamer-plugins-base.pc.in +++ b/pkgconfig/gstreamer-plugins-base.pc.in @@ -11,4 +11,4 @@ Version: @VERSION@ Libs: -L${libdir} Cflags: -I${includedir} -libraries=audio cdda floatcast interfaces netbuffer riff rtp tag pbutils video +libraries=audio cdda fft floatcast interfaces netbuffer riff rtp tag pbutils video diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index 39e4517..cd98bcd 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -721,7 +721,7 @@ gst_v4lsrc_buffer_new (GstV4lSrc * v4lsrc, gint num) if (timestamp > latency) timestamp -= latency; else - timestamp = 0; + timestamp = GST_CLOCK_TIME_NONE; GST_BUFFER_TIMESTAMP (buf) = timestamp; GST_BUFFER_DURATION (buf) = duration; diff --git a/tests/examples/Makefile.am b/tests/examples/Makefile.am index a92de36..25264c5 100644 --- a/tests/examples/Makefile.am +++ b/tests/examples/Makefile.am @@ -4,6 +4,7 @@ else FT2_SUBDIRS = endif -SUBDIRS = $(FT2_SUBDIRS) volume +SUBDIRS = $(FT2_SUBDIRS) volume xerror + +DIST_SUBDIRS = seek volume xerror -DIST_SUBDIRS = seek volume diff --git a/win32/common/config.h b/win32/common/config.h index ec96892..79d91d5 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -39,7 +39,7 @@ #define GST_LICENSE "LGPL" /* package name in plugins */ -#define GST_PACKAGE_NAME "GStreamer Base Plug-ins source release" +#define GST_PACKAGE_NAME "GStreamer Base Plug-ins CVS/prerelease" /* package origin */ #define GST_PACKAGE_ORIGIN "Unknown package origin" @@ -211,13 +211,13 @@ #undef PACKAGE_NAME "GStreamer Base Plug-ins" /* Define to the full name and version of this package. */ -#undef PACKAGE_STRING "GStreamer Base Plug-ins 0.10.14" +#undef PACKAGE_STRING "GStreamer Base Plug-ins 0.10.14.1" /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME "gst-plugins-base" /* Define to the version of this package. */ -#undef PACKAGE_VERSION "0.10.14" +#undef PACKAGE_VERSION "0.10.14.1" /* directory where plugins are located */ #undef PLUGINDIR @@ -241,7 +241,7 @@ #undef STDC_HEADERS /* Version number of package */ -#define VERSION "0.10.14" +#define VERSION "0.10.14.1" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ @@ -256,4 +256,4 @@ #undef inline #endif -#define GST_INSTALL_PLUGINS_HELPER "/home/jan/.install/libexec/gst-install-plugins-helper" +#define GST_INSTALL_PLUGINS_HELPER "/usr/bin/gnome-codec-install" -- 2.7.4