diff options
author | Johan Dahlin <johan@gnome.org> | 2004-03-15 16:32:54 +0000 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2004-03-15 16:32:54 +0000 |
commit | 39fd8a2dbd436cbabe5e336d1145b62c2a885ed5 (patch) | |
tree | 61df7da4a9d2b8bdb853af50a27219a8921bf5e4 /gst-libs/gst/audio | |
parent | 1633bd8693c54cbc5f6648703a7ecf01548ec55f (diff) | |
download | gstreamer-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.gz |
*.h: Revert indenting
Original commit message from CVS:
* *.h: Revert indenting
Diffstat (limited to 'gst-libs/gst/audio')
-rw-r--r-- | gst-libs/gst/audio/audio.h | 44 | ||||
-rw-r--r-- | gst-libs/gst/audio/audioclock.h | 22 | ||||
-rw-r--r-- | gst-libs/gst/audio/gstaudiofilter.h | 29 |
3 files changed, 52 insertions, 43 deletions
diff --git a/gst-libs/gst/audio/audio.h b/gst-libs/gst/audio/audio.h index 5f21e0180..4a3428ddb 100644 --- a/gst-libs/gst/audio/audio.h +++ b/gst-libs/gst/audio/audio.h @@ -26,6 +26,7 @@ #define __GST_AUDIO_AUDIO_H__ G_BEGIN_DECLS + /* For people that are looking at this source: the purpose of these defines is * to make GstCaps a bit easier, in that you don't have to know all of the * properties that need to be defined. you can just use these macros. currently @@ -49,7 +50,9 @@ G_BEGIN_DECLS * * Andy Wingo, 18 August 2001 * Thomas, 6 September 2002 */ + #define GST_AUDIO_DEF_RATE 44100 + #define GST_AUDIO_INT_PAD_TEMPLATE_CAPS \ "audio/x-raw-int, " \ "rate = (int) [ 1, MAX ], " \ @@ -57,7 +60,9 @@ G_BEGIN_DECLS "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \ "width = (int) { 8, 16, 32 }, " \ "depth = (int) [ 1, 32 ], " \ - "signed = (boolean) { true, false }" + "signed = (boolean) { true, false }" + + /* "standard" int audio is native order, 16 bit stereo. */ #define GST_AUDIO_INT_STANDARD_PAD_TEMPLATE_CAPS \ "audio/x-raw-int, " \ @@ -66,7 +71,8 @@ G_BEGIN_DECLS "endianness = (int) BYTE_ORDER, " \ "width = (int) 16, " \ "depth = (int) 16, " \ - "signed = (boolean) true" + "signed = (boolean) true" + #define GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS \ "audio/x-raw-float, " \ "rate = (int) [ 1, MAX ], " \ @@ -74,6 +80,7 @@ G_BEGIN_DECLS "endianness = (int) { LITTLE_ENDIAN , BIG_ENDIAN }, " \ "width = (int) { 32, 64 }, " \ "buffer-frames = (int) [ 1, MAX]" + /* "standard" float audio is native order, 32 bit mono. */ #define GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS \ "audio/x-raw-float, " \ @@ -81,42 +88,43 @@ G_BEGIN_DECLS "channels = (int) 1, " \ "endianness = (int) BYTE_ORDER, " \ "buffer-frames = (int) [ 1, MAX]" + /* * this library defines and implements some helper functions for audio * handling */ + /* get byte size of audio frame (based on caps of pad */ -int gst_audio_frame_byte_size (GstPad * pad); +int gst_audio_frame_byte_size (GstPad* pad); /* get length in frames of buffer */ -long gst_audio_frame_length (GstPad * pad, GstBuffer * buf); +long gst_audio_frame_length (GstPad* pad, GstBuffer* buf); /* get frame rate based on caps */ -long gst_audio_frame_rate (GstPad * pad); +long gst_audio_frame_rate (GstPad *pad); /* calculate length in seconds of audio buffer buf based on caps of pad */ -double gst_audio_length (GstPad * pad, GstBuffer * buf); +double gst_audio_length (GstPad* pad, GstBuffer* buf); /* calculate highest possible sample value based on capabilities of pad */ -long gst_audio_highest_sample_value (GstPad * pad); +long gst_audio_highest_sample_value (GstPad* pad); /* check if the buffer size is a whole multiple of the frame size */ -gboolean gst_audio_is_buffer_framed (GstPad * pad, GstBuffer * buf); +gboolean gst_audio_is_buffer_framed (GstPad* pad, GstBuffer* buf); /* functions useful for _getcaps functions */ -typedef enum -{ - GST_AUDIO_FIELD_RATE = (1 << 0), - GST_AUDIO_FIELD_CHANNELS = (1 << 1), - GST_AUDIO_FIELD_ENDIANNESS = (1 << 2), - GST_AUDIO_FIELD_WIDTH = (1 << 3), - GST_AUDIO_FIELD_DEPTH = (1 << 4), - GST_AUDIO_FIELD_SIGNED = (1 << 5), +typedef enum { + GST_AUDIO_FIELD_RATE = (1 << 0), + GST_AUDIO_FIELD_CHANNELS = (1 << 1), + GST_AUDIO_FIELD_ENDIANNESS = (1 << 2), + GST_AUDIO_FIELD_WIDTH = (1 << 3), + GST_AUDIO_FIELD_DEPTH = (1 << 4), + GST_AUDIO_FIELD_SIGNED = (1 << 5), GST_AUDIO_FIELD_BUFFER_FRAMES = (1 << 6) } GstAudioFieldFlag; -void gst_audio_structure_set_int (GstStructure * structure, - GstAudioFieldFlag flag); +void gst_audio_structure_set_int (GstStructure *structure, GstAudioFieldFlag flag); G_END_DECLS + #endif /* __GST_AUDIO_AUDIO_H__ */ diff --git a/gst-libs/gst/audio/audioclock.h b/gst-libs/gst/audio/audioclock.h index abb075416..17439242b 100644 --- a/gst-libs/gst/audio/audioclock.h +++ b/gst-libs/gst/audio/audioclock.h @@ -27,6 +27,7 @@ #include <gst/gstsystemclock.h> G_BEGIN_DECLS + #define GST_TYPE_AUDIO_CLOCK \ (gst_audio_clock_get_type()) #define GST_AUDIO_CLOCK(obj) \ @@ -37,15 +38,14 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_CLOCK)) #define GST_IS_AUDIO_CLOCK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_CLOCK)) + typedef struct _GstAudioClock GstAudioClock; typedef struct _GstAudioClockClass GstAudioClockClass; -typedef GstClockTime (*GstAudioClockGetTimeFunc) (GstClock * clock, - gpointer user_data); +typedef GstClockTime (*GstAudioClockGetTimeFunc) (GstClock *clock, gpointer user_data); -struct _GstAudioClock -{ +struct _GstAudioClock { GstSystemClock clock; GstClockTime prev1, prev2; @@ -63,19 +63,19 @@ struct _GstAudioClock gpointer _gst_reserved[GST_PADDING]; }; -struct _GstAudioClockClass -{ +struct _GstAudioClockClass { GstSystemClockClass parent_class; gpointer _gst_reserved[GST_PADDING]; }; -GType gst_audio_clock_get_type (void); -GstClock *gst_audio_clock_new (gchar * name, GstAudioClockGetTimeFunc func, - gpointer user_data); -void gst_audio_clock_set_active (GstAudioClock * aclock, gboolean active); +GType gst_audio_clock_get_type (void); +GstClock* gst_audio_clock_new (gchar *name, GstAudioClockGetTimeFunc func, + gpointer user_data); +void gst_audio_clock_set_active (GstAudioClock *aclock, gboolean active); -void gst_audio_clock_update_time (GstAudioClock * aclock, GstClockTime time); +void gst_audio_clock_update_time (GstAudioClock *aclock, GstClockTime time); G_END_DECLS + #endif /* __GST_AUDIO_CLOCK_H__ */ diff --git a/gst-libs/gst/audio/gstaudiofilter.h b/gst-libs/gst/audio/gstaudiofilter.h index 534d4c6bb..9786e16c7 100644 --- a/gst-libs/gst/audio/gstaudiofilter.h +++ b/gst-libs/gst/audio/gstaudiofilter.h @@ -25,15 +25,17 @@ #include <gst/gst.h> -G_BEGIN_DECLS typedef struct _GstAudiofilter GstAudiofilter; +G_BEGIN_DECLS + +typedef struct _GstAudiofilter GstAudiofilter; typedef struct _GstAudiofilterClass GstAudiofilterClass; -typedef void (*GstAudiofilterFilterFunc) (GstAudiofilter * filter, - GstBuffer * outbuf, GstBuffer * inbuf); -typedef void (*GstAudiofilterInplaceFilterFunc) (GstAudiofilter * filter, - GstBuffer * buffer); +typedef void (*GstAudiofilterFilterFunc)(GstAudiofilter *filter, + GstBuffer *outbuf, GstBuffer *inbuf); +typedef void (*GstAudiofilterInplaceFilterFunc)(GstAudiofilter *filter, + GstBuffer *buffer); -typedef void (*GstAudiofilterSetupFunc) (GstAudiofilter * filter); +typedef void (*GstAudiofilterSetupFunc) (GstAudiofilter *filter); #define GST_TYPE_AUDIOFILTER \ @@ -47,11 +49,10 @@ typedef void (*GstAudiofilterSetupFunc) (GstAudiofilter * filter); #define GST_IS_AUDIOFILTER_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOFILTER)) -struct _GstAudiofilter -{ +struct _GstAudiofilter { GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; /* audio state */ gboolean inited; @@ -67,8 +68,7 @@ struct _GstAudiofilter int bytes_per_sample; }; -struct _GstAudiofilterClass -{ +struct _GstAudiofilterClass { GstElementClass parent_class; GstCaps *caps; @@ -77,10 +77,11 @@ struct _GstAudiofilterClass GstAudiofilterFilterFunc filter; }; -GType gst_audiofilter_get_type (void); +GType gst_audiofilter_get_type(void); -void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass * - audiofilterclass, const GstCaps * caps); +void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *audiofilterclass, const GstCaps *caps); G_END_DECLS + #endif /* __GST_AUDIOFILTER_H__ */ + |