CVS Root: /cvs/gstreamer
Module: gst-plugins-bad
Changes by: slomo
Date: Fri Nov 21 2008 15:45:29 UTC
Log message:
* gst/speexresample/gstspeexresample.c:
(gst_speex_resample_class_init), (gst_speex_resample_set_property),
(gst_speex_resample_get_property):
Add a "filter-length" property that maps to the quality values
for compatibilty with audioresample.
Modified files:
. : ChangeLog
gst/speexresample: gstspeexresample.c
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3721&r2=1.3722
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/speexresample/gstspeexresample.c.diff?r1=1.19&r2=1.20
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v
retrieving revision 1.3721
retrieving revision 1.3722
diff -u -d -r1.3721 -r1.3722
--- ChangeLog 21 Nov 2008 10:37:12 -0000 1.3721
+++ ChangeLog 21 Nov 2008 15:45:13 -0000 1.3722
@@ -1,5 +1,13 @@
2008-11-21 Sebastian Dröge <[email protected]>
+ * gst/speexresample/gstspeexresample.c:
+ (gst_speex_resample_class_init), (gst_speex_resample_set_property),
+ (gst_speex_resample_get_property):
+ Add a "filter-length" property that maps to the quality values
+ for compatibilty with audioresample.
+
+2008-11-21 Sebastian Dröge <[email protected]>
* configure.ac:
Remove the "experimental" flag from the deinterlace2 plugin.
Index: gstspeexresample.c
RCS file: /cvs/gstreamer/gst-plugins-bad/gst/speexresample/gstspeexresample.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gstspeexresample.c 3 Nov 2008 08:55:49 -0000 1.19
+++ gstspeexresample.c 21 Nov 2008 15:45:15 -0000 1.20
@@ -59,7 +59,8 @@
enum
{
PROP_0,
- PROP_QUALITY
+ PROP_QUALITY,
+ PROP_FILTER_LENGTH
};
#define SUPPORTED_CAPS \
@@ -169,6 +170,14 @@
SPEEX_RESAMPLER_QUALITY_DEFAULT,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /* FIXME 0.11: Remove this property, it's just for compatibility
+ * with old audioresample
+ */
+ g_object_class_install_property (gobject_class, PROP_FILTER_LENGTH,
+ g_param_spec_int ("filter-length", "Filter length",
+ "DEPRECATED, DON'T USE THIS! " "Length of the resample filter", 0,
+ G_MAXINT, 64, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
GST_BASE_TRANSFORM_CLASS (klass)->start =
GST_DEBUG_FUNCPTR (gst_speex_resample_start);
GST_BASE_TRANSFORM_CLASS (klass)->stop =
@@ -1158,6 +1167,39 @@
resample->channels, resample->inrate, resample->outrate,
resample->quality, resample->fp);
break;
+ case PROP_FILTER_LENGTH:{
+ gint filter_length = g_value_get_int (value);
+ if (filter_length <= 8)
+ resample->quality = 0;
+ else if (filter_length <= 16)
+ resample->quality = 1;
+ else if (filter_length <= 32)
+ resample->quality = 2;
+ else if (filter_length <= 48)
+ resample->quality = 3;
+ else if (filter_length <= 64)
+ resample->quality = 4;
+ else if (filter_length <= 80)
+ resample->quality = 5;
+ else if (filter_length <= 96)
+ resample->quality = 6;
+ else if (filter_length <= 128)
+ resample->quality = 7;
+ else if (filter_length <= 160)
+ resample->quality = 8;
+ else if (filter_length <= 192)
+ resample->quality = 9;
+ else
+ resample->quality = 10;
+ GST_DEBUG_OBJECT (resample, "new quality %d", resample->quality);
+ gst_speex_resample_update_state (resample, resample->width,
+ resample->channels, resample->inrate, resample->outrate,
+ resample->quality, resample->fp);
+ break;
+ }
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1176,6 +1218,43 @@
case PROP_QUALITY:
g_value_set_int (value, resample->quality);
+ case PROP_FILTER_LENGTH:
+ switch (resample->quality) {
+ case 0:
+ g_value_set_int (value, 8);
+ break;
+ case 1:
+ g_value_set_int (value, 16);
+ case 2:
+ g_value_set_int (value, 32);
+ case 3:
+ g_value_set_int (value, 48);
+ case 4:
+ g_value_set_int (value, 64);
+ case 5:
+ g_value_set_int (value, 80);
+ case 6:
+ g_value_set_int (value, 96);
+ case 7:
+ g_value_set_int (value, 128);
+ case 8:
+ g_value_set_int (value, 160);
+ case 9:
+ g_value_set_int (value, 192);
+ case 10:
+ g_value_set_int (value, 256);
+ }
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.