From 5a00cae46fb77ec9a107797d5107f8db06a0dc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 16 May 2008 21:56:24 +0000 Subject: gst/interleave/: Add support for all raw audio formats and provide better negotiation if the caps are changing. Original commit message from CVS: * gst/interleave/Makefile.am: * gst/interleave/deinterleave.c: (deinterleave_24), (gst_deinterleave_finalize), (gst_deinterleave_base_init), (gst_deinterleave_class_init), (gst_deinterleave_init), (gst_deinterleave_add_new_pads), (gst_deinterleave_set_pads_caps), (gst_deinterleave_set_process_function), (gst_deinterleave_sink_setcaps), (__remove_channels), (__set_channels), (gst_deinterleave_getcaps), (gst_deinterleave_process), (gst_deinterleave_chain), (gst_deinterleave_sink_activate_push): * gst/interleave/deinterleave.h: Add support for all raw audio formats and provide better negotiation if the caps are changing. Don't allow changes of the channel positions and set the position of the corresponding channel on the src pad caps. General cleanup and smaller bugfixes. * tests/check/elements/deinterleave.c: (float_buffer_check_probe): Check the channel positions on the output buffer caps. --- gst/interleave/deinterleave.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gst/interleave/deinterleave.h') diff --git a/gst/interleave/deinterleave.h b/gst/interleave/deinterleave.h index ee3f8e17..4a1c9578 100644 --- a/gst/interleave/deinterleave.h +++ b/gst/interleave/deinterleave.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS #include +#include #define GST_TYPE_DEINTERLEAVE (gst_deinterleave_get_type()) #define GST_DEINTERLEAVE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DEINTERLEAVE,GstDeinterleave)) @@ -41,6 +42,8 @@ G_BEGIN_DECLS typedef struct _GstDeinterleave GstDeinterleave; typedef struct _GstDeinterleaveClass GstDeinterleaveClass; +typedef void (*GstDeinterleaveFunc) (gpointer out, gpointer in, guint stride, guint nframes); + struct _GstDeinterleave { GstElement element; @@ -49,8 +52,12 @@ struct _GstDeinterleave GList *srcpads; GstCaps *sinkcaps; gint channels; + GstAudioChannelPosition *pos; GstPad *sink; + + gint width; + GstDeinterleaveFunc func; }; struct _GstDeinterleaveClass -- cgit v1.2.1