diff options
author | Leif Johnson <leif@ambient.2y.net> | 2003-07-19 23:47:42 +0000 |
---|---|---|
committer | Leif Johnson <leif@ambient.2y.net> | 2003-07-19 23:47:42 +0000 |
commit | 6d6150c0529d8f5af1857543c5d94902eab7237c (patch) | |
tree | 11813ead7a82bbf5dc1ab36ce6c4d3ea1303bd74 /gst/passthrough | |
parent | f6830d4ad15f488c6a61ebccf4f09529fdf5ebd3 (diff) | |
download | gst-plugins-bad-6d6150c0529d8f5af1857543c5d94902eab7237c.tar.gz gst-plugins-bad-6d6150c0529d8f5af1857543c5d94902eab7237c.tar.bz2 gst-plugins-bad-6d6150c0529d8f5af1857543c5d94902eab7237c.zip |
+ the last of the float caps changes ... these are a bit more pervasive
Original commit message from CVS:
+ the last of the float caps changes ... these are a bit more pervasive
Diffstat (limited to 'gst/passthrough')
-rw-r--r-- | gst/passthrough/gstpassthrough.c | 48 | ||||
-rw-r--r-- | gst/passthrough/gstpassthrough.h | 22 |
2 files changed, 28 insertions, 42 deletions
diff --git a/gst/passthrough/gstpassthrough.c b/gst/passthrough/gstpassthrough.c index fca1e941..eb3e8cbb 100644 --- a/gst/passthrough/gstpassthrough.c +++ b/gst/passthrough/gstpassthrough.c @@ -53,21 +53,21 @@ enum { ARG_SILENT }; -static GstPadTemplate* -passthrough_sink_factory (void) -{ - static GstPadTemplate *template = NULL; - - if (! template) { - template = gst_pad_template_new +static GstPadTemplate* +passthrough_sink_factory (void) +{ + static GstPadTemplate *template = NULL; + + if (! template) { + template = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_append (gst_caps_new ("sink_int", "audio/x-raw-int", GST_AUDIO_INT_PAD_TEMPLATE_PROPS), gst_caps_new ("sink_float", "audio/x-raw-float", - GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS)), + GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS)), NULL); - } - return template; + } + return template; } static GstPadTemplate* @@ -79,7 +79,7 @@ passthrough_src_factory (void) template = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_append (gst_caps_new ("src_float", "audio/x-raw-float", - GST_AUDIO_FLOAT_MONO_PAD_TEMPLATE_PROPS), + GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_PROPS), gst_caps_new ("src_int", "audio/x-raw-float", GST_AUDIO_INT_PAD_TEMPLATE_PROPS)), NULL); @@ -126,35 +126,29 @@ passthrough_connect_sink (GstPad *pad, GstCaps *caps) g_return_val_if_fail (GST_IS_PASSTHROUGH (filter), GST_PAD_LINK_REFUSED); mimetype = gst_caps_get_mime(caps); - + gst_caps_get_int (caps, "rate", &filter->rate); gst_caps_get_int (caps, "channels", &filter->channels); - + gst_caps_get_int (caps, "width", &filter->width); + gst_caps_get_int (caps, "endianness", &filter->endianness); + if (strcmp (mimetype, "audio/x-raw-int") == 0) { - filter->format = GST_PASSTHROUGH_FORMAT_INT; - gst_caps_get_int (caps, "width", &filter->width); + filter->format = GST_PASSTHROUGH_FORMAT_INT; + gst_caps_get_int (caps, "depth", &filter->depth); - gst_caps_get_int (caps, "law", &filter->law); - gst_caps_get_int (caps, "endianness", &filter->endianness); gst_caps_get_boolean (caps, "signed", &filter->is_signed); if (! filter->silent) { - g_print ("Passthrough : channels %d, rate %d\n", - filter->channels, filter->rate); + g_print ("Passthrough : channels %d, rate %d\n", filter->channels, filter->rate); g_print ("Passthrough : format int, bit width %d, endianness %d, signed %s\n", filter->width, filter->endianness, filter->is_signed ? "yes" : "no"); } } else if (strcmp (mimetype, "audio/x-raw-float") == 0) { - filter->format = GST_PASSTHROUGH_FORMAT_FLOAT; - gst_caps_get_string (caps, "layout", &filter->layout); - gst_caps_get_float (caps, "intercept", &filter->intercept); - gst_caps_get_float (caps, "slope", &filter->slope); + filter->format = GST_PASSTHROUGH_FORMAT_FLOAT; if (! filter->silent) { - g_print ("Passthrough : channels %d, rate %d\n", - filter->channels, filter->rate); - g_print ("Passthrough : format float, layout %s, intercept %f, slope %f\n", - filter->layout, filter->intercept, filter->slope); + g_print ("Passthrough : channels %d, rate %d\n", filter->channels, filter->rate); + g_print ("Passthrough : format float, width %d\n", filter->width); } } diff --git a/gst/passthrough/gstpassthrough.h b/gst/passthrough/gstpassthrough.h index 74c4cf68..bcd09f9a 100644 --- a/gst/passthrough/gstpassthrough.h +++ b/gst/passthrough/gstpassthrough.h @@ -59,26 +59,18 @@ struct _GstPassthrough { GstBufferPool *bufpool; gboolean silent; - - /* the next three are valid for both int and float */ - + + /* the next are valid for both int and float */ GstPassthroughFormat format; - guint rate; + guint rate; guint channels; - - /* the next five are valid only for format==GST_PASSTHROUGH_FORMAT_INT */ - guint width; - guint depth; guint endianness; - guint law; + + /* the next are valid only for format==GST_PASSTHROUGH_FORMAT_INT */ + guint depth; gboolean is_signed; - - /* the next three are valid only for format==GST_PASSTHROUGH_FORMAT_FLOAT */ - - const gchar *layout; - gfloat slope; - gfloat intercept; + }; struct _GstPassthroughClass { |