From 6fcc950836dc9626bd9cabbd6ba3650c363a4375 Mon Sep 17 00:00:00 2001 From: Leif Johnson Date: Sat, 19 Jul 2003 23:25:25 +0000 Subject: [PATCH] + changes for new float caps without slope/intercept + some category changes for plugins Original commit message from CVS: + changes for new float caps without slope/intercept + some category changes for plugins --- ext/ladspa/gstladspa.c | 45 +++++++++++++++++----------------- ext/libpng/gstpngenc.c | 2 +- ext/raw1394/gst1394.c | 2 +- ext/shout2/gstshout2.c | 2 +- gst/smoothwave/gstsmoothwave.c | 2 +- 5 files changed, 26 insertions(+), 27 deletions(-) diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index f4b9684a69..a58358ba33 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "gstladspa.h" #include /* main ladspa sdk include file */ @@ -35,14 +36,10 @@ ladspa_sink_factory (gchar *name) name, GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS_NEW ( + gst_caps_new ( "ladspa_sink", "audio/x-raw-float", - "width", GST_PROPS_INT (32), - "endianness", GST_PROPS_INT (G_BYTE_ORDER), - "rate", GST_PROPS_INT_RANGE (4000, 96000), - "buffer-frames", GST_PROPS_INT_RANGE (1, G_MAXINT), - "channels", GST_PROPS_INT (1) + GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS ) ); } @@ -55,14 +52,10 @@ ladspa_src_factory (gchar *name) name, GST_PAD_SRC, GST_PAD_ALWAYS, - GST_CAPS_NEW ( + gst_caps_new ( "ladspa_src", "audio/x-raw-float", - "width", GST_PROPS_INT (32), - "endianness", GST_PROPS_INT (G_BYTE_ORDER), - "rate", GST_PROPS_INT_RANGE (4000, 96000), - "buffer-frames", GST_PROPS_INT_RANGE (1, G_MAXINT), - "channels", GST_PROPS_INT (1) + GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS ) ); } @@ -91,6 +84,13 @@ static GstElementClass *parent_class = NULL; static GstPlugin *ladspa_plugin; static GHashTable *ladspa_descriptors; +enum { + ARG_0, + ARG_SAMPLERATE, + ARG_BUFFERSIZE, + ARG_LAST, +}; + GST_DEBUG_CATEGORY_STATIC (ladspa_debug); #define DEBUG(...) \ GST_CAT_LEVEL_LOG (ladspa_debug, GST_LEVEL_DEBUG, NULL, __VA_ARGS__) @@ -477,25 +477,24 @@ gst_ladspa_force_src_caps(GstLADSPA *ladspa, GstPad *pad) if (!ladspa->buffer_frames) { ladspa->buffer_frames = 256; /* 5 ms at 44100 kHz (just a default...) */ g_return_if_fail (ladspa->bufpool == NULL); - ladspa->bufpool = gst_buffer_pool_get_default (ladspa->buffer_frames * sizeof(gfloat), - 3); + ladspa->bufpool = + gst_buffer_pool_get_default (ladspa->buffer_frames * sizeof(gfloat), 3); } DEBUG_OBJ (ladspa, "forcing caps with rate=%d, buffer-frames=%d", ladspa->samplerate, ladspa->buffer_frames); - gst_pad_try_set_caps (pad, gst_caps_new ( + gst_pad_try_set_caps (pad, + gst_caps_new ( "ladspa_src_caps", "audio/x-raw-float", gst_props_new ( - "width", GST_PROPS_INT (32), - "endianness", GST_PROPS_INT (G_BYTE_ORDER), + "width", GST_PROPS_INT (32), + "endianness", GST_PROPS_INT (G_BYTE_ORDER), + "rate", GST_PROPS_INT (ladspa->samplerate), "buffer-frames", GST_PROPS_INT (ladspa->buffer_frames), - "rate", GST_PROPS_INT (ladspa->samplerate), "channels", GST_PROPS_INT (1), - NULL - ) - )); + NULL))); } static void @@ -504,7 +503,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP GstLADSPA *ladspa = (GstLADSPA*)object; GstLADSPAClass *oclass; ladspa_control_info *control_info; - + oclass = (GstLADSPAClass*)(G_OBJECT_GET_CLASS (object)); /* remember, properties have an offset of 1 */ @@ -512,7 +511,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP /* verify it exists */ g_return_if_fail (prop_id < oclass->numcontrols); - + control_info = &(oclass->control_info[prop_id]); g_return_if_fail (control_info->name != NULL); diff --git a/ext/libpng/gstpngenc.c b/ext/libpng/gstpngenc.c index d3ebcf5bc4..37b442d054 100644 --- a/ext/libpng/gstpngenc.c +++ b/ext/libpng/gstpngenc.c @@ -27,7 +27,7 @@ GstElementDetails gst_pngenc_details = { - "png encoder", + "PNG encoder", "Codec/Image/Encoder", "LGPL", "Encode a video frame to a .png image", diff --git a/ext/raw1394/gst1394.c b/ext/raw1394/gst1394.c index 8e4671d370..3ed0f59f57 100644 --- a/ext/raw1394/gst1394.c +++ b/ext/raw1394/gst1394.c @@ -29,7 +29,7 @@ /* elementfactory information */ static GstElementDetails gst_dv1394src_details = { "Firewire (1394) DV Source", - "Source/1394/DV", + "Source/Video", "LGPL", "Source for DV video data from firewire port", VERSION, diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index b7d01c7402..808bd9ad7d 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -27,7 +27,7 @@ /* elementfactory information */ static GstElementDetails shout2send_details = { "An Icecast plugin", - "Sink/Network/Icecast2", + "Sink/Network", "LGPL", "Sends data to an icecast server", VERSION, diff --git a/gst/smoothwave/gstsmoothwave.c b/gst/smoothwave/gstsmoothwave.c index 6b96dd9eca..a8b8849639 100644 --- a/gst/smoothwave/gstsmoothwave.c +++ b/gst/smoothwave/gstsmoothwave.c @@ -27,7 +27,7 @@ static GstElementDetails gst_smoothwave_details = { "Smooth waveform", - "Sink/Visualization", + "Visualization", "LGPL", "Fading grayscale waveform display", VERSION,