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 | 5acffea623eaa95469a8fb77260c85240c6c0a41 (patch) | |
tree | 5d1eb5b3c6cbe7ff7888cfe0b2f972f7e509e99d | |
parent | f878cc16402dcc70f31861bb120f435f3157c518 (diff) |
*.h: Revert indenting
Original commit message from CVS:
* *.h: Revert indenting
93 files changed, 2202 insertions, 2232 deletions
@@ -1,3 +1,7 @@ +2004-03-15 Johan Dahlin <johan@gnome.org> + + * *.h: Revert indenting + 2004-03-15 Thomas Vander Stichele <thomas at apestaart dot org> * configure.ac: diff --git a/ext/aalib/gstaasink.h b/ext/aalib/gstaasink.h index d11ff20e0..e50362f6c 100644 --- a/ext/aalib/gstaasink.h +++ b/ext/aalib/gstaasink.h @@ -26,9 +26,8 @@ #include <aalib.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_AASINK \ @@ -42,51 +41,48 @@ extern "C" #define GST_IS_AASINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AASINK)) - typedef enum - { - GST_AASINK_OPEN = GST_ELEMENT_FLAG_LAST, +typedef enum { + GST_AASINK_OPEN = GST_ELEMENT_FLAG_LAST, - GST_AASINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, - } GstAASinkFlags; + GST_AASINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, +} GstAASinkFlags; - typedef struct _GstAASink GstAASink; - typedef struct _GstAASinkClass GstAASinkClass; +typedef struct _GstAASink GstAASink; +typedef struct _GstAASinkClass GstAASinkClass; - struct _GstAASink - { - GstElement element; +struct _GstAASink { + GstElement element; - GstPad *sinkpad; + GstPad *sinkpad; - gulong format; - gint width, height; + gulong format; + gint width, height; - gint frames_displayed; - guint64 frame_time; + gint frames_displayed; + guint64 frame_time; - GstClock *clock; + GstClock *clock; - aa_context *context; - struct aa_hardware_params ascii_surf; - struct aa_renderparams ascii_parms; - aa_palette palette; - gint aa_driver; - }; + aa_context *context; + struct aa_hardware_params ascii_surf; + struct aa_renderparams ascii_parms; + aa_palette palette; + gint aa_driver; +}; - struct _GstAASinkClass - { - GstElementClass parent_class; +struct _GstAASinkClass { + GstElementClass parent_class; - /* signals */ - void (*frame_displayed) (GstElement * element); - void (*have_size) (GstElement * element, guint width, guint height); - }; + /* signals */ + void (*frame_displayed) (GstElement *element); + void (*have_size) (GstElement *element, guint width, guint height); +}; - GType gst_aasink_get_type (void); +GType gst_aasink_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_AASINKE_H__ */ +#endif /* __GST_AASINKE_H__ */ diff --git a/ext/dv/gstdvdec.h b/ext/dv/gstdvdec.h index 6052c76f5..4dffd96f7 100644 --- a/ext/dv/gstdvdec.h +++ b/ext/dv/gstdvdec.h @@ -24,9 +24,8 @@ #include <gst/gst.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #include <libdv/dv.h> @@ -34,55 +33,55 @@ extern "C" /* This is the definition of the element's object structure. */ - typedef struct _GstDVDec GstDVDec; +typedef struct _GstDVDec GstDVDec; /* The structure itself is derived from GstElement, as can be seen by the * fact that there's a complete instance of the GstElement structure at * the beginning of the object. This allows the element to be cast to * an Element or even an Object. */ - struct _GstDVDec - { - GstElement element; - - /* We need to keep track of our pads, so we do so here. */ - GstPad *sinkpad, *videosrcpad, *audiosrcpad; - - dv_decoder_t *decoder; - gboolean clamp_luma; - gboolean clamp_chroma; - gint quality; - - GstByteStream *bs; - dv_color_space_t space; - gint bpp; - gboolean PAL; - gdouble framerate; - gint height; - gint frequency; - gint channels; - - gint length; - guint64 next_ts; - guint64 end_position; - gboolean need_discont; - gboolean loop; - - gboolean found_header; - - gint16 *audio_buffers[4]; - }; +struct _GstDVDec { + GstElement element; + + /* We need to keep track of our pads, so we do so here. */ + GstPad *sinkpad, + *videosrcpad, + *audiosrcpad; + + dv_decoder_t *decoder; + gboolean clamp_luma; + gboolean clamp_chroma; + gint quality; + + GstByteStream *bs; + dv_color_space_t space; + gint bpp; + gboolean PAL; + gdouble framerate; + gint height; + gint frequency; + gint channels; + + gint length; + guint64 next_ts; + guint64 end_position; + gboolean need_discont; + gboolean loop; + + gboolean found_header; + + gint16 *audio_buffers[4]; +}; /* The other half of the object is its class. The class also derives from * the same parent, though it must be the class structure this time. * Function pointers for polymophic methods and signals are placed in this * structure. */ - typedef struct _GstDVDecClass GstDVDecClass; +typedef struct _GstDVDecClass GstDVDecClass; - struct _GstDVDecClass - { - GstElementClass parent_class; - }; +struct _GstDVDecClass { + GstElementClass parent_class; +}; /* Five standard preprocessing macros are used in the Gtk+ object system. * The first uses the object's _get_type function to return the GType @@ -108,12 +107,12 @@ extern "C" /* This is the only prototype needed, because it is used in the above * GST_TYPE_DVDEC macro. */ - GType gst_dvdec_get_type (void); +GType gst_dvdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_DVDEC_H__ */ +#endif /* __GST_DVDEC_H__ */ diff --git a/ext/esd/esdmon.h b/ext/esd/esdmon.h index 5b8c7e497..f50e65449 100644 --- a/ext/esd/esdmon.h +++ b/ext/esd/esdmon.h @@ -26,6 +26,7 @@ #include <gst/gst.h> G_BEGIN_DECLS + #define GST_TYPE_ESDMON \ (gst_esdmon_get_type()) #define GST_ESDMON(obj) \ @@ -36,22 +37,21 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ESDMON)) #define GST_IS_ESDMON_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDMON)) - typedef enum -{ - GST_ESDMON_OPEN = GST_ELEMENT_FLAG_LAST, - GST_ESDMON_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, + +typedef enum { + GST_ESDMON_OPEN = GST_ELEMENT_FLAG_LAST, + GST_ESDMON_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2, } GstEsdSrcFlags; typedef struct _GstEsdmon GstEsdmon; typedef struct _GstEsdmonClass GstEsdmonClass; -struct _GstEsdmon -{ +struct _GstEsdmon { GstElement element; GstPad *srcpad; - gchar *host; + gchar* host; int fd; @@ -65,13 +65,14 @@ struct _GstEsdmon guint64 bytes_per_read; }; -struct _GstEsdmonClass -{ +struct _GstEsdmonClass { GstElementClass parent_class; }; -GType gst_esdmon_get_type (void); -gboolean gst_esdmon_factory_init (GstPlugin * plugin); +GType gst_esdmon_get_type(void); +gboolean gst_esdmon_factory_init(GstPlugin *plugin); G_END_DECLS + #endif /* __GST_ESDMON_H__ */ + diff --git a/ext/esd/esdsink.h b/ext/esd/esdsink.h index f88f29b11..9bf816416 100644 --- a/ext/esd/esdsink.h +++ b/ext/esd/esdsink.h @@ -25,6 +25,7 @@ #include <gst/audio/audioclock.h> G_BEGIN_DECLS + #define GST_TYPE_ESDSINK \ (gst_esdsink_get_type()) #define GST_ESDSINK(obj) \ @@ -35,41 +36,41 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ESDSINK)) #define GST_IS_ESDSINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK)) + typedef struct _GstEsdsink GstEsdsink; typedef struct _GstEsdsinkClass GstEsdsinkClass; -struct _GstEsdsink -{ - GstElement element; +struct _GstEsdsink { + GstElement element; - GstPad *sinkpad; + GstPad *sinkpad; - GstClock *provided_clock; - GstClock *clock; + GstClock *provided_clock; + GstClock *clock; - gboolean mute; - int fd; - gint format; - gint depth; - gint channels; - gint frequency; - gboolean negotiated; - gchar *host; - int handled; - int bytes_per_sample; - gboolean sync; - gboolean resync; - gboolean fallback; + gboolean mute; + int fd; + gint format; + gint depth; + gint channels; + gint frequency; + gboolean negotiated; + gchar *host; + int handled; + int bytes_per_sample; + gboolean sync; + gboolean resync; + gboolean fallback; }; -struct _GstEsdsinkClass -{ +struct _GstEsdsinkClass { GstElementClass parent_class; }; -GType gst_esdsink_get_type (void); -gboolean gst_esdsink_factory_init (GstPlugin * plugin); +GType gst_esdsink_get_type(void); +gboolean gst_esdsink_factory_init (GstPlugin *plugin); G_END_DECLS + #endif /* __GST_ESDSINK_H__ */ diff --git a/ext/flac/flac_compat.h b/ext/flac/flac_compat.h index defa969d1..87b5b864a 100644 --- a/ext/flac/flac_compat.h +++ b/ext/flac/flac_compat.h @@ -16,7 +16,7 @@ /* FIXME when there's a autoconf symbol */ #ifndef FLAC_VERSION -#ifndef FLAC__VERSION_STRING /* removed in 1.0.4 */ +#ifndef FLAC__VERSION_STRING /* removed in 1.0.4 */ #define FLAC_VERSION 0x010004 #else #ifdef FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE diff --git a/ext/flac/gstflacdec.h b/ext/flac/gstflacdec.h index c525c3a25..5b5fd110d 100644 --- a/ext/flac/gstflacdec.h +++ b/ext/flac/gstflacdec.h @@ -28,9 +28,8 @@ #include <FLAC/all.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_FLACDEC flacdec_get_type() @@ -39,42 +38,40 @@ extern "C" #define GST_IS_FLACDEC(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_FLACDEC) #define GST_IS_FLACDEC_CLASS(obj) G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_FLACDEC) - typedef struct _FlacDec FlacDec; - typedef struct _FlacDecClass FlacDecClass; +typedef struct _FlacDec FlacDec; +typedef struct _FlacDecClass FlacDecClass; - struct _FlacDec - { - GstElement element; +struct _FlacDec { + GstElement element; - GstPad *sinkpad, *srcpad; - GstByteStream *bs; + GstPad *sinkpad,*srcpad; + GstByteStream *bs; - FLAC__SeekableStreamDecoder *decoder; - gint channels; - gint depth; - gint frequency; + FLAC__SeekableStreamDecoder *decoder; + gint channels; + gint depth; + gint frequency; - gboolean need_discont; - gboolean seek_pending; - gint64 seek_value; + gboolean need_discont; + gboolean seek_pending; + gint64 seek_value; - gboolean init; - guint64 total_samples; - guint64 stream_samples; + gboolean init; + guint64 total_samples; + guint64 stream_samples; - gboolean eos; - }; + gboolean eos; +}; - struct _FlacDecClass - { - GstElementClass parent_class; - }; +struct _FlacDecClass { + GstElementClass parent_class; +}; - GType flacdec_get_type (void); +GType flacdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __FLACDEC_H__ */ +#endif /* __FLACDEC_H__ */ diff --git a/ext/flac/gstflacenc.h b/ext/flac/gstflacenc.h index 1337a6fef..27dbb3b0a 100644 --- a/ext/flac/gstflacenc.h +++ b/ext/flac/gstflacenc.h @@ -27,9 +27,8 @@ #include <FLAC/all.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_FLACENC flacenc_get_type() #define GST_FLACENC(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_FLACENC, FlacEnc) @@ -37,42 +36,40 @@ extern "C" #define GST_IS_FLACENC(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_FLACENC) #define GST_IS_FLACENC_CLASS(obj) G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_FLACENC) - typedef struct _FlacEnc FlacEnc; - typedef struct _FlacEncClass FlacEncClass; +typedef struct _FlacEnc FlacEnc; +typedef struct _FlacEncClass FlacEncClass; - struct _FlacEnc - { - GstElement element; +struct _FlacEnc { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - gboolean first; - GstBuffer *first_buf; - gboolean eos; - gint channels; - gint depth; - gint sample_rate; - gboolean negotiated; - gint quality; - gboolean stopped; - FLAC__int32 *data; + gboolean first; + GstBuffer *first_buf; + gboolean eos; + gint channels; + gint depth; + gint sample_rate; + gboolean negotiated; + gint quality; + gboolean stopped; + FLAC__int32 *data; - FLAC__SeekableStreamEncoder *encoder; - FLAC__StreamMetadata **meta; + FLAC__SeekableStreamEncoder *encoder; + FLAC__StreamMetadata **meta; - GstTagList *tags; - }; + GstTagList * tags; +}; - struct _FlacEncClass - { - GstElementClass parent_class; - }; +struct _FlacEncClass { + GstElementClass parent_class; +}; - GType flacenc_get_type (void); +GType flacenc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __FLACENC_H__ */ +#endif /* __FLACENC_H__ */ diff --git a/ext/gdk_pixbuf/gstgdkanimation.h b/ext/gdk_pixbuf/gstgdkanimation.h index 8dc0d4efe..183d335e1 100644 --- a/ext/gdk_pixbuf/gstgdkanimation.h +++ b/ext/gdk_pixbuf/gstgdkanimation.h @@ -27,16 +27,20 @@ #include <stdio.h> G_BEGIN_DECLS + /* how many bytes we need to have available before we dare to start a new iteration */ #define GST_GDK_BUFFER_SIZE (102400) /* how far behind we need to be before we attempt to seek */ #define GST_GDK_MAX_DELAY_TO_SEEK (GST_SECOND / 4) + + #define GST_TYPE_GDK_ANIMATION (gst_gdk_animation_get_type()) #define GST_GDK_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GDK_ANIMATION,GstGdkAnimation)) #define GST_GDK_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GDK_ANIMATION,GstGdkAnimation)) #define GST_IS_GDK_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GDK_ANIMATION)) #define GST_IS_GDK_ANIMATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GDK_ANIMATION)) -typedef struct _GstGdkAnimation GstGdkAnimation; + +typedef struct _GstGdkAnimation GstGdkAnimation; typedef struct _GstGdkAnimationClass GstGdkAnimationClass; typedef struct _GstGdkAnimationIter GstGdkAnimationIter; @@ -44,33 +48,34 @@ typedef struct _GstGdkAnimationIterClass GstGdkAnimationIterClass; struct _GstGdkAnimation { - GdkPixbufAnimation parent; + GdkPixbufAnimation parent; /* name of temporary buffer file */ - gchar *temp_location; + gchar * temp_location; /* file descriptor to temporary file or 0 if we're done writing */ - int temp_fd; + int temp_fd; /* size of image */ - gint width; - gint height; - gint bpp; + gint width; + gint height; + gint bpp; /* static image we use */ - GdkPixbuf *pixbuf; + GdkPixbuf * pixbuf; }; -struct _GstGdkAnimationClass +struct _GstGdkAnimationClass { - GdkPixbufAnimationClass parent_class; + GdkPixbufAnimationClass parent_class; }; -GType gst_gdk_animation_get_type (void); +GType gst_gdk_animation_get_type (void); -GstGdkAnimation *gst_gdk_animation_new (GError ** error); +GstGdkAnimation * gst_gdk_animation_new (GError **error); -gboolean gst_gdk_animation_add_data (GstGdkAnimation * ani, - const guint8 * data, guint size); -void gst_gdk_animation_done_adding (GstGdkAnimation * ani); +gboolean gst_gdk_animation_add_data (GstGdkAnimation * ani, + const guint8 * data, + guint size); +void gst_gdk_animation_done_adding (GstGdkAnimation * ani); #define GST_TYPE_GDK_ANIMATION_ITER (gst_gdk_animation_iter_get_type ()) @@ -81,35 +86,32 @@ void gst_gdk_animation_done_adding (GstGdkAnimation * ani); #define GST_IS_GDK_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GDK_ANIMATION_ITER)) #define GST_GDK_ANIMATION_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIterClass)) -struct _GstGdkAnimationIter -{ - GdkPixbufAnimationIter parent; - +struct _GstGdkAnimationIter { + GdkPixbufAnimationIter parent; + /* our animation */ - GstGdkAnimation *ani; + GstGdkAnimation * ani; /* start timeval */ - GTimeVal start; + GTimeVal start; /* timestamp of last buffer */ - GstClockTime last_timestamp; - + GstClockTime last_timestamp; + /* pipeline we're using */ - GstElement *pipeline; - gboolean eos; - gboolean just_seeked; - + GstElement * pipeline; + gboolean eos; + gboolean just_seeked; + /* current image and the buffers containing the data */ - GdkPixbuf *pixbuf; - GQueue *buffers; + GdkPixbuf * pixbuf; + GQueue * buffers; }; -struct _GstGdkAnimationIterClass -{ - GdkPixbufAnimationIterClass parent_class; +struct _GstGdkAnimationIterClass { + GdkPixbufAnimationIterClass parent_class; }; -GType -gst_gdk_animation_iter_get_type (void) - G_GNUC_CONST; +GType gst_gdk_animation_iter_get_type (void) G_GNUC_CONST; G_END_DECLS + #endif /* __GST_GDK_ANIMATION_H__ */ diff --git a/ext/gdk_pixbuf/gstgdkpixbuf.h b/ext/gdk_pixbuf/gstgdkpixbuf.h index f239bf727..62e11aac6 100644 --- a/ext/gdk_pixbuf/gstgdkpixbuf.h +++ b/ext/gdk_pixbuf/gstgdkpixbuf.h @@ -26,6 +26,7 @@ #include <gst/gst.h> G_BEGIN_DECLS + /* #define's don't like whitespacey bits */ #define GST_TYPE_GDK_PIXBUF \ (gst_gdk_pixbuf_get_type()) @@ -37,7 +38,8 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GDK_PIXBUF)) #define GST_IS_GDK_PIXBUF_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GDK_PIXBUF)) -typedef struct _GstGdkPixbuf GstGdkPixbuf; + +typedef struct _GstGdkPixbuf GstGdkPixbuf; typedef struct _GstGdkPixbufClass GstGdkPixbufClass; struct _GstGdkPixbuf @@ -46,7 +48,7 @@ struct _GstGdkPixbuf GstPad *sinkpad, *srcpad; - GstClockTime last_timestamp; + GstClockTime last_timestamp; GdkPixbufLoader *pixbuf_loader; int width; @@ -57,7 +59,7 @@ struct _GstGdkPixbuf double framerate; }; -struct _GstGdkPixbufClass +struct _GstGdkPixbufClass { GstElementClass parent_class; }; @@ -65,4 +67,5 @@ struct _GstGdkPixbufClass GType gst_gdk_pixbuf_get_type (void); G_END_DECLS + #endif /* __GST_GDK_PIXBUF_H__ */ diff --git a/ext/jpeg/gstjpegdec.h b/ext/jpeg/gstjpegdec.h index 9a864eba9..051878739 100644 --- a/ext/jpeg/gstjpegdec.h +++ b/ext/jpeg/gstjpegdec.h @@ -30,9 +30,8 @@ #include <jpeglib.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_JPEGDEC \ @@ -46,48 +45,46 @@ extern "C" #define GST_IS_JPEGDEC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JPEGDEC)) - typedef struct _GstJpegDec GstJpegDec; - typedef struct _GstJpegDecClass GstJpegDecClass; +typedef struct _GstJpegDec GstJpegDec; +typedef struct _GstJpegDecClass GstJpegDecClass; - struct _GstJpegDec - { - GstElement element; +struct _GstJpegDec { + GstElement element; - /* pads */ - GstPad *sinkpad, *srcpad; + /* pads */ + GstPad *sinkpad,*srcpad; - int parse_state; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + int parse_state; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; - /* video state */ - gint format; - gint width; - gint height; - gdouble fps; - /* the size of the output buffer */ - gint outsize; - /* the jpeg line buffer */ - guchar **line[3]; + /* video state */ + gint format; + gint width; + gint height; + gdouble fps; + /* the size of the output buffer */ + gint outsize; + /* the jpeg line buffer */ + guchar **line[3]; - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - struct jpeg_source_mgr jsrc; - }; + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; + struct jpeg_source_mgr jsrc; +}; - struct _GstJpegDecClass - { - GstElementClass parent_class; - }; +struct _GstJpegDecClass { + GstElementClass parent_class; +}; - GType gst_jpegdec_get_type (void); +GType gst_jpegdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_JPEGDEC_H__ */ +#endif /* __GST_JPEGDEC_H__ */ diff --git a/ext/jpeg/gstjpegenc.h b/ext/jpeg/gstjpegenc.h index beeaf6f94..b68b4859d 100644 --- a/ext/jpeg/gstjpegenc.h +++ b/ext/jpeg/gstjpegenc.h @@ -30,9 +30,8 @@ #include <jpeglib.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_JPEGENC \ @@ -46,50 +45,48 @@ extern "C" #define GST_IS_JPEGENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_JPEGENC)) - typedef struct _GstJpegEnc GstJpegEnc; - typedef struct _GstJpegEncClass GstJpegEncClass; +typedef struct _GstJpegEnc GstJpegEnc; +typedef struct _GstJpegEncClass GstJpegEncClass; - struct _GstJpegEnc - { - GstElement element; +struct _GstJpegEnc { + GstElement element; - /* pads */ - GstPad *sinkpad, *srcpad; + /* pads */ + GstPad *sinkpad,*srcpad; - /* video state */ - gint format; - gint width; - gint height; - gdouble fps; - /* the video buffer */ - gint bufsize; - GstBuffer *buffer; - guint row_stride; - /* the jpeg line buffer */ - guchar **line[3]; + /* video state */ + gint format; + gint width; + gint height; + gdouble fps; + /* the video buffer */ + gint bufsize; + GstBuffer *buffer; + guint row_stride; + /* the jpeg line buffer */ + guchar **line[3]; - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - struct jpeg_destination_mgr jdest; + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + struct jpeg_destination_mgr jdest; - int quality; - int smoothing; - }; + int quality; + int smoothing; +}; - struct _GstJpegEncClass - { - GstElementClass parent_class; +struct _GstJpegEncClass { + GstElementClass parent_class; - /* signals */ - void (*frame_encoded) (GstElement * element); - }; + /* signals */ + void (*frame_encoded) (GstElement *element); +}; - GType gst_jpegenc_get_type (void); +GType gst_jpegenc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_JPEGENC_H__ */ +#endif /* __GST_JPEGENC_H__ */ diff --git a/ext/ladspa/gstladspa.h b/ext/ladspa/gstladspa.h index b40cd145d..f3556f74d 100644 --- a/ext/ladspa/gstladspa.h +++ b/ext/ladspa/gstladspa.h @@ -31,60 +31,62 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ - typedef struct _ladspa_control_info - { - gchar *name; - gchar *param_name; - gfloat lowerbound, upperbound; - gfloat def; - gboolean lower, upper, samplerate; - gboolean toggled, logarithmic, integer, writable; - } ladspa_control_info; +typedef struct _ladspa_control_info { + gchar *name; + gchar *param_name; + gfloat lowerbound, upperbound; + gfloat def; + gboolean lower,upper,samplerate; + gboolean toggled, logarithmic, integer, writable; +} ladspa_control_info; - typedef struct _GstLADSPA GstLADSPA; - typedef struct _GstLADSPAClass GstLADSPAClass; +typedef struct _GstLADSPA GstLADSPA; +typedef struct _GstLADSPAClass GstLADSPAClass; - struct _GstLADSPA - { - GstElement element; +struct _GstLADSPA { + GstElement element; - LADSPA_Descriptor *descriptor; - LADSPA_Handle *handle; + LADSPA_Descriptor *descriptor; + LADSPA_Handle *handle; - GstDParamManager *dpman; + GstDParamManager *dpman; - gfloat *controls; + gfloat *controls; + + GstPad **sinkpads, + **srcpads; - GstPad **sinkpads, **srcpads; + gboolean activated; - gboolean activated; + gint samplerate, buffer_frames; + gint64 timestamp; + gboolean inplace_broken; +}; - gint samplerate, buffer_frames; - gint64 timestamp; - gboolean inplace_broken; - }; +struct _GstLADSPAClass { + GstElementClass parent_class; - struct _GstLADSPAClass - { - GstElementClass parent_class; + LADSPA_Descriptor *descriptor; - LADSPA_Descriptor *descriptor; + gint numports, + numsinkpads, + numsrcpads, + numcontrols; - gint numports, numsinkpads, numsrcpads, numcontrols; + gint *sinkpad_portnums, + *srcpad_portnums, + *control_portnums; - gint *sinkpad_portnums, *srcpad_portnums, *control_portnums; - - ladspa_control_info *control_info; - }; + ladspa_control_info *control_info; +}; #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_LADSPA_H__ */ +#endif /* __GST_LADSPA_H__ */ diff --git a/ext/ladspa/utils.h b/ext/ladspa/utils.h index 7a22b50b3..d470eb0d0 100644 --- a/ext/ladspa/utils.h +++ b/ext/ladspa/utils.h @@ -20,19 +20,20 @@ unloadLADSPAPluginLibrary(). Errors are handled by writing a message to stderr and calling exit(1). It is alright (although inefficient) to call this more than once for the same file. */ -void *loadLADSPAPluginLibrary (const char *pcPluginFilename); +void * loadLADSPAPluginLibrary(const char * pcPluginFilename); /* This function unloads a LADSPA plugin library. */ -void unloadLADSPAPluginLibrary (void *pvLADSPAPluginLibrary); +void unloadLADSPAPluginLibrary(void * pvLADSPAPluginLibrary); /* This function locates a LADSPA plugin within a plugin library loaded with loadLADSPAPluginLibrary(). Errors are handled by writing a message to stderr and calling exit(1). Note that the plugin library filename is only included to help provide informative error messages. */ -const LADSPA_Descriptor *findLADSPAPluginDescriptor (void - *pvLADSPAPluginLibrary, const char *pcPluginLibraryFilename, - const char *pcPluginLabel); +const LADSPA_Descriptor * +findLADSPAPluginDescriptor(void * pvLADSPAPluginLibrary, + const char * pcPluginLibraryFilename, + const char * pcPluginLabel); /*****************************************************************************/ @@ -43,15 +44,16 @@ const LADSPA_Descriptor *findLADSPAPluginDescriptor (void style) and a LADSPA_DescriptorFunction (from which LADSPA_Descriptors can be acquired). */ typedef void LADSPAPluginSearchCallbackFunction - (const char *pcFullFilename, - void *pvPluginHandle, LADSPA_Descriptor_Function fDescriptorFunction); +(const char * pcFullFilename, + void * pvPluginHandle, + LADSPA_Descriptor_Function fDescriptorFunction); /* Search through the $(LADSPA_PATH) (or a default path) for any LADSPA plugin libraries. Each plugin library is tested using dlopen() and dlsym(,"ladspa_descriptor"). After loading each library, the callback function is called to process it. This function leaves items passed to the callback function open. */ -void LADSPAPluginSearch (LADSPAPluginSearchCallbackFunction fCallbackFunction); +void LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction); /*****************************************************************************/ diff --git a/ext/libcaca/gstcacasink.h b/ext/libcaca/gstcacasink.h index 2080c284b..3a6d4f23e 100644 --- a/ext/libcaca/gstcacasink.h +++ b/ext/libcaca/gstcacasink.h @@ -28,9 +28,8 @@ #include <caca.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_CACA_DEFAULT_SCREEN_WIDTH 80 #define GST_CACA_DEFAULT_SCREEN_HEIGHT 25 @@ -54,47 +53,44 @@ extern "C" #define GST_IS_CACASINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CACASINK)) - typedef enum - { - GST_CACASINK_OPEN = GST_ELEMENT_FLAG_LAST, +typedef enum { + GST_CACASINK_OPEN = GST_ELEMENT_FLAG_LAST, - GST_CACASINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, - } GstCACASinkFlags; + GST_CACASINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, +} GstCACASinkFlags; - typedef struct _GstCACASink GstCACASink; - typedef struct _GstCACASinkClass GstCACASinkClass; +typedef struct _GstCACASink GstCACASink; +typedef struct _GstCACASinkClass GstCACASinkClass; - struct _GstCACASink - { - GstVideoSink videosink; +struct _GstCACASink { + GstVideoSink videosink; - GstPad *sinkpad; + GstPad *sinkpad; - gulong format; - gint screen_width, screen_height; - guint bpp; - guint dither; - gboolean antialiasing; - guint red_mask, green_mask, blue_mask; + gulong format; + gint screen_width, screen_height; + guint bpp; + guint dither; + gboolean antialiasing; + guint red_mask, green_mask, blue_mask; - gint64 correction; - GstClockID id; + gint64 correction; + GstClockID id; - struct caca_bitmap *bitmap; - }; + struct caca_bitmap *bitmap; +}; - struct _GstCACASinkClass - { - GstVideoSinkClass parent_class; +struct _GstCACASinkClass { + GstVideoSinkClass parent_class; - /* signals */ - }; + /* signals */ +}; - GType gst_cacasink_get_type (void); +GType gst_cacasink_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_CACASINKE_H__ */ +#endif /* __GST_CACASINKE_H__ */ diff --git a/ext/libpng/gstpngenc.h b/ext/libpng/gstpngenc.h index 1c521260a..59bc4ab4f 100644 --- a/ext/libpng/gstpngenc.h +++ b/ext/libpng/gstpngenc.h @@ -25,9 +25,8 @@ #include <png.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_PNGENC (gst_pngenc_get_type()) @@ -36,37 +35,37 @@ extern "C" #define GST_IS_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGENC)) #define GST_IS_PNGENC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGENC)) - typedef struct _GstPngEnc GstPngEnc; - typedef struct _GstPngEncClass GstPngEncClass; +typedef struct _GstPngEnc GstPngEnc; +typedef struct _GstPngEncClass GstPngEncClass; - extern GstPadTemplate *pngenc_src_template, *pngenc_sink_template; +extern GstPadTemplate *pngenc_src_template, *pngenc_sink_template; - struct _GstPngEnc - { - GstElement element; +struct _GstPngEnc +{ + GstElement element; - GstPad *sinkpad, *srcpad; - GstBuffer *buffer_out; + GstPad *sinkpad, *srcpad; + GstBuffer *buffer_out; - png_structp png_struct_ptr; - png_infop png_info_ptr; + png_structp png_struct_ptr; + png_infop png_info_ptr; - gint width; - gint height; - gint bpp; - }; + gint width; + gint height; + gint bpp; +}; - struct _GstPngEncClass - { - GstElementClass parent_class; - }; +struct _GstPngEncClass +{ + GstElementClass parent_class; +}; - GType gst_pngenc_get_type (void); +GType gst_pngenc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_PNGENC_H__ */ +#endif /* __GST_PNGENC_H__ */ diff --git a/ext/mikmod/gstmikmod.h b/ext/mikmod/gstmikmod.h index ce65f8e8f..208fc5b9d 100644 --- a/ext/mikmod/gstmikmod.h +++ b/ext/mikmod/gstmikmod.h @@ -25,14 +25,13 @@ #include <gst/gst.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_MIKMOD \ (gst_mikmod_get_type()) - + #define GST_MIKMOD(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIKMOD,GstMikMod)) #define GST_MIKMOD_CLASS(klass) \ @@ -41,70 +40,68 @@ extern "C" (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MIKMOD)) #define GST_IS_MIKMOD_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MIKMOD)) - - struct _GstMikMod - { - GstElement element; - GstPad *sinkpad, *srcpad; - GstBuffer *Buffer; - - gchar *songname; - gchar *modtype; - gint musicvolume; - gint pansep; - gint reverb; - gint sndfxvolume; - gint volume; - gint mixfreq; - gint mode; - gboolean interp; - gboolean reverse; - gboolean surround; - gboolean _16bit; - gboolean hqmixer; - gboolean soft_music; - gboolean soft_sndfx; - gboolean stereo; - - gboolean initialized; - }; - - struct _GstMikModClass - { - GstElementClass parent_class; - }; - - typedef struct _GstMikMod GstMikMod; - typedef struct _GstMikModClass GstMikModClass; - - extern MODULE *module; - extern MREADER *reader; - extern GstPad *srcpad; - extern GstClockTime timestamp; - extern int need_sync; - - GType gst_mikmod_get_type (void); + +struct _GstMikMod { + GstElement element; + GstPad *sinkpad, *srcpad; + GstBuffer *Buffer; + + gchar *songname; + gchar *modtype; + gint musicvolume; + gint pansep; + gint reverb; + gint sndfxvolume; + gint volume; + gint mixfreq; + gint mode; + gboolean interp; + gboolean reverse; + gboolean surround; + gboolean _16bit; + gboolean hqmixer; + gboolean soft_music; + gboolean soft_sndfx; + gboolean stereo; + + gboolean initialized; +}; + +struct _GstMikModClass { + GstElementClass parent_class; +}; + +typedef struct _GstMikMod GstMikMod; +typedef struct _GstMikModClass GstMikModClass; + +extern MODULE *module; +extern MREADER *reader; +extern GstPad *srcpad; +extern GstClockTime timestamp; +extern int need_sync; + +GType gst_mikmod_get_type(void); /* symbols for mikmod_reader.h */ - struct _GST_READER - { - MREADER core; - GstMikMod *mik; - guint64 offset; - gshort eof; - }; +struct _GST_READER +{ + MREADER core; + GstMikMod *mik; + guint64 offset; + gshort eof; +}; - typedef struct _GST_READER GST_READER; +typedef struct _GST_READER GST_READER; - MREADER *GST_READER_new (GstMikMod * mik); +MREADER *GST_READER_new( GstMikMod *mik ); /* symbols for drv_gst.c */ - extern MDRIVER drv_gst; +extern MDRIVER drv_gst; #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_MIKMOD_H__ */ +#endif /* __GST_MIKMOD_H__ */ diff --git a/ext/mikmod/mikmod_types.h b/ext/mikmod/mikmod_types.h index 8559455c2..c431faf9e 100644 --- a/ext/mikmod/mikmod_types.h +++ b/ext/mikmod/mikmod_types.h @@ -20,26 +20,25 @@ #define __MIKMOD_TYPES_H__ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ - gboolean MOD_CheckType (GstBuffer * buf); - gboolean Mod_669_CheckType (GstBuffer * buf); - gboolean Amf_CheckType (GstBuffer * buf); - gboolean Dsm_CheckType (GstBuffer * buf); - gboolean Fam_CheckType (GstBuffer * buf); - gboolean Gdm_CheckType (GstBuffer * buf); - gboolean Imf_CheckType (GstBuffer * buf); - gboolean It_CheckType (GstBuffer * buf); - gboolean M15_CheckType (GstBuffer * buf); - gboolean Mtm_CheckType (GstBuffer * buf); - gboolean Okt_CheckType (GstBuffer * buf); - gboolean S3m_CheckType (GstBuffer * buf); - gboolean Xm_CheckType (GstBuffer * buf); +gboolean MOD_CheckType (GstBuffer *buf); +gboolean Mod_669_CheckType (GstBuffer *buf); +gboolean Amf_CheckType (GstBuffer *buf); +gboolean Dsm_CheckType (GstBuffer *buf); +gboolean Fam_CheckType (GstBuffer *buf); +gboolean Gdm_CheckType (GstBuffer *buf); +gboolean Imf_CheckType (GstBuffer *buf); +gboolean It_CheckType (GstBuffer *buf); +gboolean M15_CheckType (GstBuffer *buf); +gboolean Mtm_CheckType (GstBuffer *buf); +gboolean Okt_CheckType (GstBuffer *buf); +gboolean S3m_CheckType (GstBuffer *buf); +gboolean Xm_CheckType (GstBuffer *buf); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __MIKMOD_TYPES_H__ */ +#endif /* __MIKMOD_TYPES_H__ */ diff --git a/ext/pango/gsttextoverlay.h b/ext/pango/gsttextoverlay.h index 08ad8145b..b039acac3 100644 --- a/ext/pango/gsttextoverlay.h +++ b/ext/pango/gsttextoverlay.h @@ -6,6 +6,7 @@ #include <pango/pangoft2.h> G_BEGIN_DECLS + #define GST_TYPE_TEXTOVERLAY (gst_textoverlay_get_type()) #define GST_TEXTOVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\ GST_TYPE_TEXTOVERLAY, GstTextOverlay)) @@ -17,60 +18,56 @@ G_BEGIN_DECLS GST_TYPE_TEXTOVERLAY)) #define GST_IS_TEXTOVERLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\ GST_TYPE_TEXTOVERLAY)) -typedef struct _GstTextOverlay GstTextOverlay; + +typedef struct _GstTextOverlay GstTextOverlay; typedef struct _GstTextOverlayClass GstTextOverlayClass; typedef enum _GstTextOverlayVAlign GstTextOverlayVAlign; typedef enum _GstTextOverlayHAlign GstTextOverlayHAlign; -enum _GstTextOverlayVAlign -{ - GST_TEXT_OVERLAY_VALIGN_BASELINE, - GST_TEXT_OVERLAY_VALIGN_BOTTOM, - GST_TEXT_OVERLAY_VALIGN_TOP, +enum _GstTextOverlayVAlign { + GST_TEXT_OVERLAY_VALIGN_BASELINE, + GST_TEXT_OVERLAY_VALIGN_BOTTOM, + GST_TEXT_OVERLAY_VALIGN_TOP, }; -enum _GstTextOverlayHAlign -{ - GST_TEXT_OVERLAY_HALIGN_LEFT, - GST_TEXT_OVERLAY_HALIGN_CENTER, - GST_TEXT_OVERLAY_HALIGN_RIGHT, +enum _GstTextOverlayHAlign { + GST_TEXT_OVERLAY_HALIGN_LEFT, + GST_TEXT_OVERLAY_HALIGN_CENTER, + GST_TEXT_OVERLAY_HALIGN_RIGHT, }; -struct _GstTextOverlay -{ - GstElement element; +struct _GstTextOverlay { + GstElement element; - GstPad *video_sinkpad; - GstPad *text_sinkpad; - GstPad *srcpad; - gint width; - gint height; - PangoLayout *layout; - FT_Bitmap bitmap; - gint bitmap_buffer_size; - gint baseline_y; - GstTextOverlayVAlign valign; - GstTextOverlayHAlign halign; - gint x0; - gint y0; - GstBuffer *current_buffer; - GstBuffer *next_buffer; - gchar *default_text; - gboolean need_render; + GstPad *video_sinkpad; + GstPad *text_sinkpad; + GstPad *srcpad; + gint width; + gint height; + PangoLayout *layout; + FT_Bitmap bitmap; + gint bitmap_buffer_size; + gint baseline_y; + GstTextOverlayVAlign valign; + GstTextOverlayHAlign halign; + gint x0; + gint y0; + GstBuffer *current_buffer; + GstBuffer *next_buffer; + gchar *default_text; + gboolean need_render; }; -struct _GstTextOverlayClass -{ - GstElementClass parent_class; +struct _GstTextOverlayClass { + GstElementClass parent_class; - PangoContext *pango_context; + PangoContext *pango_context; }; -GType -gst_textoverlay_get_type (void) - G_GNUC_CONST; +GType gst_textoverlay_get_type(void) G_GNUC_CONST; G_END_DECLS + #endif /* __GST_TEXTOVERLAY_H */ diff --git a/ext/pango/gsttimeoverlay.h b/ext/pango/gsttimeoverlay.h index a591bd6a1..505f8f049 100644 --- a/ext/pango/gsttimeoverlay.h +++ b/ext/pango/gsttimeoverlay.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS + #define GST_TYPE_TIMEOVERLAY \ (gst_timeoverlay_get_type()) #define GST_TIMEOVERLAY(obj) \ @@ -39,11 +40,11 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TIMEOVERLAY)) #define GST_IS_TIMEOVERLAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TIMEOVERLAY)) + typedef struct _GstTimeoverlay GstTimeoverlay; typedef struct _GstTimeoverlayClass GstTimeoverlayClass; -struct _GstTimeoverlay -{ +struct _GstTimeoverlay { GstVideofilter videofilter; PangoFontDescription *font_description; @@ -51,12 +52,13 @@ struct _GstTimeoverlay }; -struct _GstTimeoverlayClass -{ +struct _GstTimeoverlayClass { GstVideofilterClass parent_class; }; -GType gst_timeoverlay_get_type (void); +GType gst_timeoverlay_get_type(void); G_END_DECLS + #endif /* __GST_TIMEOVERLAY_H__ */ + diff --git a/ext/raw1394/gstdv1394src.h b/ext/raw1394/gstdv1394src.h index 2ba4ab3d4..7d384fd02 100644 --- a/ext/raw1394/gstdv1394src.h +++ b/ext/raw1394/gstdv1394src.h @@ -27,9 +27,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_DV1394SRC \ @@ -43,47 +42,45 @@ extern "C" #define GST_IS_DV1394SRC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DV1394SRC)) - typedef struct _GstDV1394Src GstDV1394Src; - typedef struct _GstDV1394SrcClass GstDV1394SrcClass; +typedef struct _GstDV1394Src GstDV1394Src; +typedef struct _GstDV1394SrcClass GstDV1394SrcClass; - struct _GstDV1394Src - { - GstElement element; +struct _GstDV1394Src { + GstElement element; - GstPad *srcpad; + GstPad *srcpad; - // consecutive=2, skip=4 will skip 4 frames, then let 2 consecutive ones thru - gint consecutive; - gint skip; - gboolean drop_incomplete; + // consecutive=2, skip=4 will skip 4 frames, then let 2 consecutive ones thru + gint consecutive; + gint skip; + gboolean drop_incomplete; - int numcards, numports; - int card, port, channel; + int numcards,numports; + int card,port,channel; - struct raw1394_portinfo pinfo[16]; - raw1394handle_t handle; + struct raw1394_portinfo pinfo[16]; + raw1394handle_t handle; - gboolean started; - GstBuffer *buf; + gboolean started; + GstBuffer *buf; + + GstBuffer *frame; + guint frameSize; + guint bytesInFrame; + guint frameSequence; - GstBuffer *frame; - guint frameSize; - guint bytesInFrame; - guint frameSequence; + gboolean negotiated; +}; - gboolean negotiated; - }; +struct _GstDV1394SrcClass { + GstElementClass parent_class; +}; - struct _GstDV1394SrcClass - { - GstElementClass parent_class; - }; - - GType gst_dv1394src_get_type (void); +GType gst_dv1394src_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_GST1394_H__ */ +#endif /* __GST_GST1394_H__ */ diff --git a/ext/shout2/gstshout2.h b/ext/shout2/gstshout2.h index 62ff44b92..706312988 100644 --- a/ext/shout2/gstshout2.h +++ b/ext/shout2/gstshout2.h @@ -25,51 +25,47 @@ #include <shout/shout.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ /* Protocol type enum */ - typedef enum - { - SHOUT2SEND_PROTOCOL_ICE = 1, - SHOUT2SEND_PROTOCOL_XAUDIOCAST, - SHOUT2SEND_PROTOCOL_ICY, - SHOUT2SEND_PROTOCOL_HTTP - } GstShout2SendProtocol; +typedef enum { + SHOUT2SEND_PROTOCOL_ICE = 1, + SHOUT2SEND_PROTOCOL_XAUDIOCAST, + SHOUT2SEND_PROTOCOL_ICY, + SHOUT2SEND_PROTOCOL_HTTP +} GstShout2SendProtocol; /* Definition of structure storing data for this element. */ - typedef struct _GstShout2send GstShout2send; - struct _GstShout2send - { - GstElement element; +typedef struct _GstShout2send GstShout2send; +struct _GstShout2send { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - GstShout2SendProtocol protocol; + GstShout2SendProtocol protocol; - shout_t *conn; + shout_t *conn; - gchar *ip; - guint port; - gchar *password; - gchar *name; - gchar *description; - gchar *genre; - gchar *mount; - gchar *url; + gchar *ip; + guint port; + gchar *password; + gchar *name; + gchar *description; + gchar *genre; + gchar *mount; + gchar *url; - }; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstShout2sendClass GstShout2sendClass; - struct _GstShout2sendClass - { - GstElementClass parent_class; - }; +typedef struct _GstShout2sendClass GstShout2sendClass; +struct _GstShout2sendClass { + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_SHOUT2SEND \ @@ -84,12 +80,12 @@ extern "C" (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SHOUT2SEND)) /* Standard function returning type information. */ - GType gst_shout2send_get_type (void); +GType gst_shout2send_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_SHOUT2SEND_H__ */ +#endif /* __GST_SHOUT2SEND_H__ */ diff --git a/ext/speex/gstspeexdec.h b/ext/speex/gstspeexdec.h index 6723742ce..c679dc188 100644 --- a/ext/speex/gstspeexdec.h +++ b/ext/speex/gstspeexdec.h @@ -26,9 +26,8 @@ #include <speex.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_SPEEXDEC \ @@ -42,28 +41,26 @@ extern "C" #define GST_IS_SPEEXDEC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPEEXDEC)) - typedef struct _GstSpeexDec GstSpeexDec; - typedef struct _GstSpeexDecClass GstSpeexDecClass; +typedef struct _GstSpeexDec GstSpeexDec; +typedef struct _GstSpeexDecClass GstSpeexDecClass; - struct _GstSpeexDec - { - GstElement element; +struct _GstSpeexDec { + GstElement element; - /* pads */ - GstPad *sinkpad, *srcpad; - }; + /* pads */ + GstPad *sinkpad,*srcpad; +}; - struct _GstSpeexDecClass - { - GstElementClass parent_class; - }; +struct _GstSpeexDecClass { + GstElementClass parent_class; +}; - GType gst_speexdec_get_type (void); +GType gst_speexdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_SPEEXDEC_H__ */ +#endif /* __GST_SPEEXDEC_H__ */ diff --git a/ext/speex/gstspeexenc.h b/ext/speex/gstspeexenc.h index 4da1e7870..4677f6a1d 100644 --- a/ext/speex/gstspeexenc.h +++ b/ext/speex/gstspeexenc.h @@ -28,9 +28,8 @@ #include <speex_header.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_SPEEXENC \ @@ -44,45 +43,44 @@ extern "C" #define GST_IS_SPEEXENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPEEXENC)) - typedef struct _GstSpeexEnc GstSpeexEnc; - typedef struct _GstSpeexEncClass GstSpeexEncClass; +typedef struct _GstSpeexEnc GstSpeexEnc; +typedef struct _GstSpeexEncClass GstSpeexEncClass; - struct _GstSpeexEnc - { - GstElement element; +struct _GstSpeexEnc { + GstElement element; - /* pads */ - GstPad *sinkpad, *srcpad; + /* pads */ + GstPad *sinkpad, + *srcpad; - gint packet_count; - gint n_packets; + gint packet_count; + gint n_packets; - SpeexBits bits; - SpeexHeader header; - SpeexMode *mode; - void *state; - gint frame_size; - gint16 buffer[2000]; - gint bufsize; - guint64 next_ts; + SpeexBits bits; + SpeexHeader header; + SpeexMode *mode; + void *state; + gint frame_size; + gint16 buffer[2000]; + gint bufsize; + guint64 next_ts; - gint rate; - }; + gint rate; +}; - struct _GstSpeexEncClass - { - GstElementClass parent_class; +struct _GstSpeexEncClass { + GstElementClass parent_class; - /* signals */ - void (*frame_encoded) (GstElement * element); - }; + /* signals */ + void (*frame_encoded) (GstElement *element); +}; - GType gst_speexenc_get_type (void); +GType gst_speexenc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_SPEEXENC_H__ */ +#endif /* __GST_SPEEXENC_H__ */ diff --git a/gst/auparse/gstauparse.h b/gst/auparse/gstauparse.h index 87508c5ba..d6e5a082f 100644 --- a/gst/auparse/gstauparse.h +++ b/gst/auparse/gstauparse.h @@ -26,9 +26,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_AUPARSE \ @@ -42,35 +41,33 @@ extern "C" #define GST_IS_AUPARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUPARSE)) - typedef struct _GstAuParse GstAuParse; - typedef struct _GstAuParseClass GstAuParseClass; +typedef struct _GstAuParse GstAuParse; +typedef struct _GstAuParseClass GstAuParseClass; - struct _GstAuParse - { - GstElement element; +struct _GstAuParse { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - guchar le; - glong offset; - glong size; - glong encoding; - glong frequency; - glong channels; + guchar le; + glong offset; + glong size; + glong encoding; + glong frequency; + glong channels; - }; +}; - struct _GstAuParseClass - { - GstElementClass parent_class; - }; +struct _GstAuParseClass { + GstElementClass parent_class; +}; - GType gst_auparse_get_type (void); +GType gst_auparse_get_type (void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_AUPARSE_H__ */ +#endif /* __GST_AUPARSE_H__ */ diff --git a/gst/avi/avi-ids.h b/gst/avi/avi-ids.h index f7e773ece..f9e2dd316 100644 --- a/gst/avi/avi-ids.h +++ b/gst/avi/avi-ids.h @@ -22,22 +22,21 @@ #include <gst/gst.h> -typedef struct _gst_riff_avih -{ - guint32 us_frame; /* microsec per frame */ - guint32 max_bps; /* byte/s overall */ - guint32 pad_gran; /* pad_granularity */ +typedef struct _gst_riff_avih { + guint32 us_frame; /* microsec per frame */ + guint32 max_bps; /* byte/s overall */ + guint32 pad_gran; /* pad_granularity */ guint32 flags; /* flags values */ -#define GST_RIFF_AVIH_HASINDEX 0x00000010 /* has idx1 chunk */ -#define GST_RIFF_AVIH_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */ -#define GST_RIFF_AVIH_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */ -#define GST_RIFF_AVIH_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */ -#define GST_RIFF_AVIH_COPYRIGHTED 0x00020000 /* contains copyrighted data */ - guint32 tot_frames; /* # of frames (all) */ - guint32 init_frames; /* initial frames (???) */ +#define GST_RIFF_AVIH_HASINDEX 0x00000010 /* has idx1 chunk */ +#define GST_RIFF_AVIH_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */ +#define GST_RIFF_AVIH_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */ +#define GST_RIFF_AVIH_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */ +#define GST_RIFF_AVIH_COPYRIGHTED 0x00020000 /* contains copyrighted data */ + guint32 tot_frames; /* # of frames (all) */ + guint32 init_frames; /* initial frames (???) */ guint32 streams; - guint32 bufsize; /* suggested buffer size */ + guint32 bufsize; /* suggested buffer size */ guint32 width; guint32 height; guint32 scale; diff --git a/gst/avi/gstavidemux.h b/gst/avi/gstavidemux.h index 9849bdaf2..d94433ae5 100644 --- a/gst/avi/gstavidemux.h +++ b/gst/avi/gstavidemux.h @@ -26,6 +26,7 @@ #include "gst/riff/riff-read.h" G_BEGIN_DECLS + #define GST_TYPE_AVI_DEMUX \ (gst_avi_demux_get_type ()) #define GST_AVI_DEMUX(obj) \ @@ -36,94 +37,93 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AVI_DEMUX)) #define GST_IS_AVI_DEMUX_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_AVI_DEMUX)) -#define GST_AVI_DEMUX_MAX_STREAMS 16 + +#define GST_AVI_DEMUX_MAX_STREAMS 16 + #define CHUNKID_TO_STREAMNR(chunkid) \ ((((chunkid) & 0xff) - '0') * 10 + \ (((chunkid) >> 8) & 0xff) - '0') - typedef struct -{ - gint index_nr; - gint stream_nr; - guint64 ts; - guint32 flags; - guint32 offset; - gint size; - guint64 bytes_before; - guint32 frames_before; + +typedef struct { + gint index_nr; + gint stream_nr; + guint64 ts; + guint32 flags; + guint32 offset; + gint size; + guint64 bytes_before; + guint32 frames_before; } gst_avi_index_entry; -typedef struct -{ +typedef struct { /* index of this streamcontext */ - guint num; + guint num; /* pad, strh */ - GstPad *pad; - GstCaps *caps; - gst_riff_strh *strh; + GstPad *pad; + GstCaps *caps; + gst_riff_strh *strh; /* current position (byte, frame, time) */ - guint current_frame; - guint64 current_byte; - gint current_entry; + guint current_frame; + guint64 current_byte; + gint current_entry; /* delay in time (init_frames) */ - guint64 delay; + guint64 delay; /* stream length */ - guint64 total_bytes; - guint32 total_frames; + guint64 total_bytes; + guint32 total_frames; - guint32 skip; + guint32 skip; } avi_stream_context; -typedef enum -{ +typedef enum { GST_AVI_DEMUX_START, GST_AVI_DEMUX_HEADER, GST_AVI_DEMUX_MOVI, } GstAviDemuxState; -typedef struct _GstAviDemux -{ - GstRiffRead parent; +typedef struct _GstAviDemux { + GstRiffRead parent; /* pads */ - GstPad *sinkpad; + GstPad *sinkpad; /* AVI decoding state */ GstAviDemuxState state; - guint level_up; + guint level_up; /* index */ gst_avi_index_entry *index_entries; - guint index_size; - guint64 index_offset; + guint index_size; + guint64 index_offset; /* streams */ - guint num_streams; - guint num_v_streams; - guint num_a_streams; + guint num_streams; + guint num_v_streams; + guint num_a_streams; avi_stream_context stream[GST_AVI_DEMUX_MAX_STREAMS]; /* some stream info for length */ - guint32 us_per_frame; - guint32 num_frames; + guint32 us_per_frame; + guint32 num_frames; /* seeking */ - guint64 seek_offset; - guint64 last_seek; + guint64 seek_offset; + guint64 last_seek; /* info */ - GstCaps *streaminfo; + GstCaps *streaminfo; } GstAviDemux; -typedef struct _GstAviDemuxClass -{ +typedef struct _GstAviDemuxClass { GstRiffReadClass parent_class; } GstAviDemuxClass; -GType gst_avi_demux_get_type (void); +GType gst_avi_demux_get_type (void); G_END_DECLS + #endif /* __GST_AVI_DEMUX_H__ */ diff --git a/gst/avi/gstavimux.h b/gst/avi/gstavimux.h index e51f3010b..452b72212 100644 --- a/gst/avi/gstavimux.h +++ b/gst/avi/gstavimux.h @@ -28,9 +28,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_AVIMUX \ @@ -45,67 +44,65 @@ extern "C" (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AVIMUX)) - typedef struct _GstAviMux GstAviMux; - typedef struct _GstAviMuxClass GstAviMuxClass; - - struct _GstAviMux - { - GstElement element; - - /* pads */ - GstPad *srcpad; - GstPad *audiosinkpad; - gboolean audio_pad_connected, audio_pad_eos; - GstPad *videosinkpad; - gboolean video_pad_connected, video_pad_eos; - - /* the AVI header */ - gst_riff_avih avi_hdr; - guint32 total_frames; /* total number of frames */ - guint64 total_data; /* amount of total data */ - guint32 data_size, datax_size; /* amount of data (bytes) in the AVI/AVIX block */ - guint32 num_frames, numx_frames; /* num frames in the AVI/AVIX block */ - guint32 header_size; - gboolean write_header; - gboolean restart; - guint32 audio_size; - guint64 audio_time; - - /* video header */ - gst_riff_strh vids_hdr; - gst_riff_strf_vids vids; - - /* audio header */ - gst_riff_strh auds_hdr; - gst_riff_strf_auds auds; - - /* information about the AVI index ('idx') */ - gst_riff_index_entry *idx; - gint idx_index, idx_count; - guint32 idx_offset, idx_size; - - /* are we a big file already? */ - gboolean is_bigfile; - guint64 avix_start; - - /* whether to use "large AVI files" or just stick to small indexed files */ - gboolean enable_large_avi; - - /* in order to be usable as a loopbased element, we need an internal - * 'buffered' buffer for each pad, so one for audio, one for video */ - GstBuffer *audio_buffer_queue, *video_buffer_queue; - }; - - struct _GstAviMuxClass - { - GstElementClass parent_class; - }; - - GType gst_avimux_get_type (void); +typedef struct _GstAviMux GstAviMux; +typedef struct _GstAviMuxClass GstAviMuxClass; + +struct _GstAviMux { + GstElement element; + + /* pads */ + GstPad *srcpad; + GstPad *audiosinkpad; + gboolean audio_pad_connected, audio_pad_eos; + GstPad *videosinkpad; + gboolean video_pad_connected, video_pad_eos; + + /* the AVI header */ + gst_riff_avih avi_hdr; + guint32 total_frames; /* total number of frames */ + guint64 total_data; /* amount of total data */ + guint32 data_size, datax_size; /* amount of data (bytes) in the AVI/AVIX block */ + guint32 num_frames, numx_frames; /* num frames in the AVI/AVIX block */ + guint32 header_size; + gboolean write_header; + gboolean restart; + guint32 audio_size; + guint64 audio_time; + + /* video header */ + gst_riff_strh vids_hdr; + gst_riff_strf_vids vids; + + /* audio header */ + gst_riff_strh auds_hdr; + gst_riff_strf_auds auds; + + /* information about the AVI index ('idx') */ + gst_riff_index_entry *idx; + gint idx_index, idx_count; + guint32 idx_offset, idx_size; + + /* are we a big file already? */ + gboolean is_bigfile; + guint64 avix_start; + + /* whether to use "large AVI files" or just stick to small indexed files */ + gboolean enable_large_avi; + + /* in order to be usable as a loopbased element, we need an internal + * 'buffered' buffer for each pad, so one for audio, one for video */ + GstBuffer *audio_buffer_queue, *video_buffer_queue; +}; + +struct _GstAviMuxClass { + GstElementClass parent_class; +}; + +GType gst_avimux_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_AVIMUX_H__ */ +#endif /* __GST_AVIMUX_H__ */ diff --git a/gst/cutter/gstcutter.h b/gst/cutter/gstcutter.h index e1ed9976f..84166636b 100644 --- a/gst/cutter/gstcutter.h +++ b/gst/cutter/gstcutter.h @@ -27,9 +27,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_CUTTER \ @@ -43,44 +42,44 @@ extern "C" #define GST_IS_CUTTER_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CUTTER)) - typedef struct _GstCutter GstCutter; - typedef struct _GstCutterClass GstCutterClass; +typedef struct _GstCutter GstCutter; +typedef struct _GstCutterClass GstCutterClass; - struct _GstCutter - { - GstElement element; +struct _GstCutter +{ + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad, *srcpad; - double threshold_level; /* level below which to cut */ - double threshold_length; /* how long signal has to remain + double threshold_level; /* level below which to cut */ + double threshold_length; /* how long signal has to remain * below this level before cutting */ - double silent_run_length; /* how long has it been below threshold ? */ - gboolean silent; + double silent_run_length; /* how long has it been below threshold ? */ + gboolean silent; - double pre_length; /* how long can the pre-record buffer be ? */ - double pre_run_length; /* how long is it currently ? */ - GList *pre_buffer; /* list of GstBuffers in pre-record buffer */ - gboolean leaky; /* do we leak an overflowing prebuffer ? */ + double pre_length; /* how long can the pre-record buffer be ? */ + double pre_run_length; /* how long is it currently ? */ + GList *pre_buffer; /* list of GstBuffers in pre-record buffer */ + gboolean leaky; /* do we leak an overflowing prebuffer ? */ - gboolean have_caps; /* did we get the needed caps yet ? */ - gint width; /* bit width of data */ - long max_sample; /* maximum sample value */ - }; + gboolean have_caps; /* did we get the needed caps yet ? */ + gint width; /* bit width of data */ + long max_sample; /* maximum sample value */ +}; - struct _GstCutterClass - { - GstElementClass parent_class; - void (*cut_start) (GstCutter * filter); - void (*cut_stop) (GstCutter * filter); - }; +struct _GstCutterClass +{ + GstElementClass parent_class; + void (*cut_start) (GstCutter* filter); + void (*cut_stop) (GstCutter* filter); +}; - GType gst_cutter_get_type (void); +GType gst_cutter_get_type (void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_STEREO_H__ */ +#endif /* __GST_STEREO_H__ */ diff --git a/gst/debug/efence.h b/gst/debug/efence.h index 8447e8488..bf0790dd0 100644 --- a/gst/debug/efence.h +++ b/gst/debug/efence.h @@ -8,9 +8,8 @@ #include <gst/gst.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ /* #define's don't like whitespacey bits */ #define GST_TYPE_EFENCE \ @@ -24,27 +23,27 @@ extern "C" #define GST_IS_EFENCE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EFENCE)) - typedef struct _GstEFence GstEFence; - typedef struct _GstEFenceClass GstEFenceClass; +typedef struct _GstEFence GstEFence; +typedef struct _GstEFenceClass GstEFenceClass; - struct _GstEFence - { - GstElement element; +struct _GstEFence +{ + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad, *srcpad; - gboolean fence_top; - }; + gboolean fence_top; +}; - struct _GstEFenceClass - { - GstElementClass parent_class; - }; +struct _GstEFenceClass +{ + GstElementClass parent_class; +}; - GType gst_gst_efence_get_type (void); +GType gst_gst_efence_get_type (void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_EFENCE_H__ */ +#endif /* __GST_EFENCE_H__ */ diff --git a/gst/debug/gstnavigationtest.h b/gst/debug/gstnavigationtest.h index 00d3e6d16..61798c93a 100644 --- a/gst/debug/gstnavigationtest.h +++ b/gst/debug/gstnavigationtest.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS + #define GST_TYPE_NAVIGATIONTEST \ (gst_navigationtest_get_type()) #define GST_NAVIGATIONTEST(obj) \ @@ -38,23 +39,24 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NAVIGATIONTEST)) #define GST_IS_NAVIGATIONTEST_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NAVIGATIONTEST)) + typedef struct _GstNavigationtest GstNavigationtest; typedef struct _GstNavigationtestClass GstNavigationtestClass; -struct _GstNavigationtest -{ +struct _GstNavigationtest { GstVideofilter videofilter; double x; double y; }; -struct _GstNavigationtestClass -{ +struct _GstNavigationtestClass { GstVideofilterClass parent_class; }; -GType gst_navigationtest_get_type (void); +GType gst_navigationtest_get_type(void); G_END_DECLS + #endif /* __GST_NAVIGATIONTEST_H__ */ + diff --git a/gst/flx/flx_color.h b/gst/flx/flx_color.h index 2ad852fad..d423ab873 100644 --- a/gst/flx/flx_color.h +++ b/gst/flx/flx_color.h @@ -17,8 +17,7 @@ * Boston, MA 02111-1307, USA. */ -typedef enum -{ +typedef enum { FLX_COLORSPACE_RGB8, FLX_COLORSPACE_RGB32, } FlxColorSpaceType; @@ -26,20 +25,19 @@ typedef enum typedef struct _FlxColorSpaceConverter FlxColorSpaceConverter; -struct _FlxColorSpaceConverter -{ - guint width; - guint height; - guchar palvec[768]; +struct _FlxColorSpaceConverter { + guint width; + guint height; + guchar palvec[768]; }; -void flx_colorspace_converter_destroy (FlxColorSpaceConverter * flxpal); -void flx_colorspace_convert (FlxColorSpaceConverter * flxpal, guchar * src, - guchar * dest); -FlxColorSpaceConverter *flx_colorspace_converter_new (gint width, gint height); +void flx_colorspace_converter_destroy(FlxColorSpaceConverter *flxpal); +void flx_colorspace_convert(FlxColorSpaceConverter *flxpal, guchar *src, guchar *dest); +FlxColorSpaceConverter * flx_colorspace_converter_new(gint width, gint height); + +void flx_set_palette_vector(FlxColorSpaceConverter *flxpal, guint start, guint num, + guchar *newpal, gint scale); +void flx_set_color(FlxColorSpaceConverter *flxpal, guint colr, guint red, guint green, + guint blue, gint scale); -void flx_set_palette_vector (FlxColorSpaceConverter * flxpal, guint start, - guint num, guchar * newpal, gint scale); -void flx_set_color (FlxColorSpaceConverter * flxpal, guint colr, guint red, - guint green, guint blue, gint scale); diff --git a/gst/flx/flx_fmt.h b/gst/flx/flx_fmt.h index 1457551a3..ac2062edc 100644 --- a/gst/flx/flx_fmt.h +++ b/gst/flx/flx_fmt.h @@ -24,114 +24,113 @@ #include <gst/gst.h> #ifdef __cplusplus -extern "C" +extern "C" { +#endif /* __cplusplus */ + +enum Flx_TypeChunk +{ + /* frame chunks */ + FLX_PREFIX_TYPE = 0xf100, + FLX_SCRIPT_CHUNK = 0xf1e0, + FLX_FRAME_TYPE = 0xf1fa, + FLX_SEGMENT_TABLE = 0xf1fb, + FLX_HUFFMAN_TABLE = 0xf1fc, + + /* sub chunks */ + FLX_CEL_DATA = 3, + FLX_COLOR256 = 4, + FLX_SS2 = 7, + FLX_COLOR64 = 11, + FLX_LC = 12, + FLX_BLACK = 13, + FLX_BRUN = 15, + FLX_COPY = 16, + FLX_MINI = 18, + FLX_DTA_RUN = 25, + FLX_DTA_COPY = 26, + FLX_DTA_LC = 27, + FLX_LABEL = 31, + FLX_BMP_MASK = 32, + FLX_MLEV_MASK = 33, + FLX_SEGMENT = 34, + FLX_KEY_IMAGE = 35, + FLX_KEY_PAL = 36, + FLX_REGION = 37, + FLX_WAVE = 38, + FLX_USERSTRING = 39, + FLX_RGN_MASK = 40, + +}; + +enum Flx_MagicHdr { -#endif /* __cplusplus */ - - enum Flx_TypeChunk - { - /* frame chunks */ - FLX_PREFIX_TYPE = 0xf100, - FLX_SCRIPT_CHUNK = 0xf1e0, - FLX_FRAME_TYPE = 0xf1fa, - FLX_SEGMENT_TABLE = 0xf1fb, - FLX_HUFFMAN_TABLE = 0xf1fc, - - /* sub chunks */ - FLX_CEL_DATA = 3, - FLX_COLOR256 = 4, - FLX_SS2 = 7, - FLX_COLOR64 = 11, - FLX_LC = 12, - FLX_BLACK = 13, - FLX_BRUN = 15, - FLX_COPY = 16, - FLX_MINI = 18, - FLX_DTA_RUN = 25, - FLX_DTA_COPY = 26, - FLX_DTA_LC = 27, - FLX_LABEL = 31, - FLX_BMP_MASK = 32, - FLX_MLEV_MASK = 33, - FLX_SEGMENT = 34, - FLX_KEY_IMAGE = 35, - FLX_KEY_PAL = 36, - FLX_REGION = 37, - FLX_WAVE = 38, - FLX_USERSTRING = 39, - FLX_RGN_MASK = 40, - - }; - - enum Flx_MagicHdr - { - FLX_MAGICHDR_FLI = 0xaf11, - FLX_MAGICHDR_FLC = 0xaf12, - FLX_MAGICHDR_FLX = 0xaf44, - FLX_MAGICHDR_HUFFBWT = 0xaf30, - }; - - - - typedef struct _FlxHeader - { - guint32 size; - guint16 type; - guint16 frames; - guint16 width, height, depth, flags; - guint32 speed; - guint16 reserved1; - /* FLC */ - guint32 created, creator, updated, updater; - guint16 aspect_dx, aspect_dy; - /* EGI */ - guint16 ext_flags, keyframes, totalframes; - guint32 req_memory; - guint16 max_regions, transp_num; - guchar reserved2[24]; - /* FLC */ - guint32 oframe1, oframe2; - guchar reserved3[40]; - } FlxHeader; + FLX_MAGICHDR_FLI = 0xaf11, + FLX_MAGICHDR_FLC = 0xaf12, + FLX_MAGICHDR_FLX = 0xaf44, + FLX_MAGICHDR_HUFFBWT = 0xaf30, +}; + + + +typedef struct _FlxHeader +{ + guint32 size; + guint16 type; + guint16 frames; + guint16 width,height,depth,flags; + guint32 speed; + guint16 reserved1; + /* FLC */ + guint32 created,creator,updated,updater; + guint16 aspect_dx, aspect_dy; + /* EGI */ + guint16 ext_flags,keyframes,totalframes; + guint32 req_memory; + guint16 max_regions,transp_num; + guchar reserved2[24]; + /* FLC */ + guint32 oframe1,oframe2; + guchar reserved3[40]; +} FlxHeader; #define FlxHeaderSize 128 - typedef struct _FlxFrameChunk - { - guint32 size; - guint16 id; - } FlxFrameChunk; +typedef struct _FlxFrameChunk +{ + guint32 size; + guint16 id; +} FlxFrameChunk; #define FlxFrameChunkSize 6 - typedef struct _FlxPrefixChunk - { - guint16 chunks; - guchar reserved[8]; - } FlxPrefixChunk; - - typedef struct _FlxSegmentTable - { - guint16 segments; - } FlxSegmentTable; - - typedef struct _FlxHuffmanTable - { - guint16 codelength; - guint16 numcodes; - guchar reserved[6]; - } FlxHuffmanTable; - - typedef struct _FlxFrameType - { - guint16 chunks; - guint16 delay; - guchar reserved[6]; - } FlxFrameType; +typedef struct _FlxPrefixChunk +{ + guint16 chunks; + guchar reserved[8]; +} FlxPrefixChunk; + +typedef struct _FlxSegmentTable +{ + guint16 segments; +} FlxSegmentTable; + +typedef struct _FlxHuffmanTable +{ + guint16 codelength; + guint16 numcodes; + guchar reserved[6]; +} FlxHuffmanTable; + +typedef struct _FlxFrameType +{ + guint16 chunks; + guint16 delay; + guchar reserved[6]; +} FlxFrameType; #define FlxFrameTypeSize 10 #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_FLX_FMT_H__ */ +#endif /* __GST_FLX_FMT_H__ */ diff --git a/gst/flx/gstflxdec.h b/gst/flx/gstflxdec.h index c5ce60ecd..c7d6f3864 100644 --- a/gst/flx/gstflxdec.h +++ b/gst/flx/gstflxdec.h @@ -27,46 +27,42 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - typedef enum - { - GST_FLXDEC_READ_HEADER, - GST_FLXDEC_PLAYING, - } GstFlxDecState; +extern "C" { +#endif /* __cplusplus */ +typedef enum { + GST_FLXDEC_READ_HEADER, + GST_FLXDEC_PLAYING, +} GstFlxDecState; + /* Definition of structure storing data for this element. */ - typedef struct _GstFlxDec GstFlxDec; +typedef struct _GstFlxDec GstFlxDec; - struct _GstFlxDec - { - GstElement element; +struct _GstFlxDec { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - gboolean active, new_meta; + gboolean active, new_meta; - GstBuffer *delta, *frame; - GstByteStream *bs; - gulong size; - GstFlxDecState state; - glong frame_time; - gint64 next_time; + GstBuffer *delta, *frame; + GstByteStream *bs; + gulong size; + GstFlxDecState state; + glong frame_time; + gint64 next_time; - FlxColorSpaceConverter *converter; + FlxColorSpaceConverter *converter; - FlxHeader hdr; - }; + FlxHeader hdr; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstFlxDecClass GstFlxDecClass; - struct _GstFlxDecClass - { - GstElementClass parent_class; - }; +typedef struct _GstFlxDecClass GstFlxDecClass; +struct _GstFlxDecClass { + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_FLXDEC \ @@ -81,12 +77,12 @@ extern "C" (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLXDEC)) /* Standard function returning type information. */ - GType gst_flxdec_get_type (void); +GType gst_flxdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_FLX_DECODER_H__ */ +#endif /* __GST_FLX_DECODER_H__ */ diff --git a/gst/goom/filters.h b/gst/goom/filters.h index c4f0926de..33784c299 100644 --- a/gst/goom/filters.h +++ b/gst/goom/filters.h @@ -7,17 +7,17 @@ typedef struct { - int vitesse; - unsigned char pertedec; - unsigned char sqrtperte; - int middleX, middleY; - char reverse; - char mode; + int vitesse ; + unsigned char pertedec ; + unsigned char sqrtperte ; + int middleX,middleY ; + char reverse ; + char mode ; /** @since June 2001 */ - int hPlaneEffect; - int vPlaneEffect; - char noisify; -} ZoomFilterData; + int hPlaneEffect ; + int vPlaneEffect ; + char noisify ; +} ZoomFilterData ; #define NORMAL_MODE 0 @@ -27,8 +27,9 @@ typedef struct #define AMULETTE_MODE 4 #define WATER_MODE 5 -void pointFilter (guint32 * pix1, Color c, - float t1, float t2, float t3, float t4, guint32 cycle); +void pointFilter(guint32 *pix1, Color c, + float t1, float t2, float t3, float t4, + guint32 cycle); /* filtre de zoom : le contenu de pix1 est copie dans pix2, avec l'effet appliqué @@ -41,8 +42,10 @@ Uint middleX, Uint middleY); */ -void zoomFilterFastRGB (guint32 * pix1, - guint32 * pix2, ZoomFilterData * zf, guint32 resx, guint32 resy); +void zoomFilterFastRGB (guint32 *pix1, + guint32 *pix2, + ZoomFilterData *zf, + guint32 resx, guint32 resy); /* filtre sin : diff --git a/gst/goom/goom_core.h b/gst/goom/goom_core.h index 3751b5226..15f942d23 100644 --- a/gst/goom/goom_core.h +++ b/gst/goom/goom_core.h @@ -6,7 +6,7 @@ void goom_init (guint32 resx, guint32 resy); void goom_set_resolution (guint32 resx, guint32 resy); -guint32 *goom_update (gint16 data[2][512]); +guint32 * goom_update (gint16 data [2][512]); void goom_close (); diff --git a/gst/goom/goom_tools.h b/gst/goom/goom_tools.h index 5159cf910..e3613825b 100644 --- a/gst/goom/goom_tools.h +++ b/gst/goom/goom_tools.h @@ -4,8 +4,8 @@ #define NB_RAND 0x10000 /* in graphic.c */ -extern int *rand_tab; -extern unsigned short rand_pos; +extern int * rand_tab ; +extern unsigned short rand_pos ; #define RAND_INIT(i) \ srand (i) ;\ @@ -25,5 +25,5 @@ extern unsigned short rand_pos; /*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */ #define iRAND(i) (RAND()%i) - + #endif diff --git a/gst/goom/graphic.h b/gst/goom/graphic.h index 1af1030ac..415dde73c 100644 --- a/gst/goom/graphic.h +++ b/gst/goom/graphic.h @@ -5,7 +5,7 @@ typedef unsigned int Uint; typedef struct { - unsigned short r, v, b; + unsigned short r,v,b; } Color; @@ -18,7 +18,7 @@ extern const Color YELLOW; extern const Color ORANGE; extern const Color VIOLET; -inline void setPixelRGB (Uint * buffer, Uint x, Uint y, Color c); -inline void getPixelRGB (Uint * buffer, Uint x, Uint y, Color * c); +inline void setPixelRGB (Uint *buffer, Uint x, Uint y, Color c) ; +inline void getPixelRGB (Uint *buffer, Uint x, Uint y, Color *c) ; -#endif /*GRAPHIC_H */ +#endif /*GRAPHIC_H*/ diff --git a/gst/goom/lines.h b/gst/goom/lines.h index 988605ee0..3582d380c 100644 --- a/gst/goom/lines.h +++ b/gst/goom/lines.h @@ -10,6 +10,6 @@ #include "graphic.h" -void goom_lines (gint16 data[2][512], unsigned int ID, unsigned int *p, - guint32 power); -void goom_lines_conf (gint16 config[25]); +void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 power); +void goom_lines_conf(gint16 config [25]); + diff --git a/gst/law/alaw-decode.h b/gst/law/alaw-decode.h index 8a6ac61b3..aa3a418c2 100644 --- a/gst/law/alaw-decode.h +++ b/gst/law/alaw-decode.h @@ -27,9 +27,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_ALAWDEC \ @@ -43,29 +42,27 @@ extern "C" #define GST_IS_ALAWDEC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALAWDEC)) - typedef struct _GstALawDec GstALawDec; - typedef struct _GstALawDecClass GstALawDecClass; +typedef struct _GstALawDec GstALawDec; +typedef struct _GstALawDecClass GstALawDecClass; - struct _GstALawDec - { - GstElement element; +struct _GstALawDec { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - /*MetaAudioRaw meta; */ + /*MetaAudioRaw meta; */ - }; +}; - struct _GstALawDecClass - { - GstElementClass parent_class; - }; +struct _GstALawDecClass { + GstElementClass parent_class; +}; - GType gst_alawdec_get_type (void); +GType gst_alawdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_STEREO_H__ */ +#endif /* __GST_STEREO_H__ */ diff --git a/gst/law/alaw-encode.h b/gst/law/alaw-encode.h index 907fa3d84..e08010364 100644 --- a/gst/law/alaw-encode.h +++ b/gst/law/alaw-encode.h @@ -27,9 +27,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_ALAWENC \ @@ -43,29 +42,27 @@ extern "C" #define GST_IS_ALAWENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALAWENC)) - typedef struct _GstALawEnc GstALawEnc; - typedef struct _GstALawEncClass GstALawEncClass; +typedef struct _GstALawEnc GstALawEnc; +typedef struct _GstALawEncClass GstALawEncClass; - struct _GstALawEnc - { - GstElement element; +struct _GstALawEnc { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - /*MetaAudioRaw meta; */ + /*MetaAudioRaw meta; */ - }; +}; - struct _GstALawEncClass - { - GstElementClass parent_class; - }; +struct _GstALawEncClass { + GstElementClass parent_class; +}; - GType gst_alawenc_get_type (void); +GType gst_alawenc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_STEREO_H__ */ +#endif /* __GST_STEREO_H__ */ diff --git a/gst/law/mulaw-conversion.h b/gst/law/mulaw-conversion.h index db07789df..55180121d 100644 --- a/gst/law/mulaw-conversion.h +++ b/gst/law/mulaw-conversion.h @@ -3,6 +3,8 @@ #include <glib.h> -void mulaw_encode (gint16 * in, guint8 * out, gint numsamples); -void mulaw_decode (guint8 * in, gint16 * out, gint numsamples); +void +mulaw_encode(gint16* in, guint8* out, gint numsamples); +void +mulaw_decode(guint8* in,gint16* out,gint numsamples); #endif diff --git a/gst/law/mulaw-decode.h b/gst/law/mulaw-decode.h index 9fb32267d..d34c8c068 100644 --- a/gst/law/mulaw-decode.h +++ b/gst/law/mulaw-decode.h @@ -27,9 +27,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_MULAWDEC \ @@ -43,29 +42,27 @@ extern "C" #define GST_IS_MULAWDEC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULAWDEC)) - typedef struct _GstMuLawDec GstMuLawDec; - typedef struct _GstMuLawDecClass GstMuLawDecClass; +typedef struct _GstMuLawDec GstMuLawDec; +typedef struct _GstMuLawDecClass GstMuLawDecClass; - struct _GstMuLawDec - { - GstElement element; +struct _GstMuLawDec { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - /*MetaAudioRaw meta; */ + /*MetaAudioRaw meta; */ - }; +}; - struct _GstMuLawDecClass - { - GstElementClass parent_class; - }; +struct _GstMuLawDecClass { + GstElementClass parent_class; +}; - GType gst_mulawdec_get_type (void); +GType gst_mulawdec_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_STEREO_H__ */ +#endif /* __GST_STEREO_H__ */ diff --git a/gst/law/mulaw-encode.h b/gst/law/mulaw-encode.h index 2ef39d233..6d99759b5 100644 --- a/gst/law/mulaw-encode.h +++ b/gst/law/mulaw-encode.h @@ -27,9 +27,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_MULAWENC \ @@ -43,29 +42,27 @@ extern "C" #define GST_IS_MULAWENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULAWENC)) - typedef struct _GstMuLawEnc GstMuLawEnc; - typedef struct _GstMuLawEncClass GstMuLawEncClass; +typedef struct _GstMuLawEnc GstMuLawEnc; +typedef struct _GstMuLawEncClass GstMuLawEncClass; - struct _GstMuLawEnc - { - GstElement element; +struct _GstMuLawEnc { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - /*MetaAudioRaw meta; */ + /*MetaAudioRaw meta; */ - }; +}; - struct _GstMuLawEncClass - { - GstElementClass parent_class; - }; +struct _GstMuLawEncClass { + GstElementClass parent_class; +}; - GType gst_mulawenc_get_type (void); +GType gst_mulawenc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_STEREO_H__ */ +#endif /* __GST_STEREO_H__ */ diff --git a/gst/level/gstlevel.h b/gst/level/gstlevel.h index 4158b9b03..7a853771a 100644 --- a/gst/level/gstlevel.h +++ b/gst/level/gstlevel.h @@ -31,9 +31,8 @@ #include "gstlevel-marshal.h" #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_LEVEL \ @@ -47,48 +46,46 @@ extern "C" #define GST_IS_LEVEL_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_LEVEL)) - typedef struct _GstLevel GstLevel; - typedef struct _GstLevelClass GstLevelClass; - - struct _GstLevel - { - GstElement element; - - GstPad *sinkpad, *srcpad; - gboolean signal; /* whether or not to emit signals */ - gboolean inited; /* whether or not the element is initialized */ - gdouble interval; /* how many seconds between emits */ - - gint rate; /* caps variables */ - gint width; - gint channels; - - gdouble decay_peak_ttl; /* time to live for peak in seconds */ - gdouble decay_peak_falloff; /* falloff in dB/sec */ - gdouble num_samples; /* cumulative sample count */ - - /* per-channel arrays for intermediate values */ - gdouble *CS; /* normalized Cumulative Square */ - gdouble *peak; /* normalized Peak value over buffer */ - gdouble *last_peak; /* last normalized Peak value over interval */ - gdouble *decay_peak; /* running decaying normalized Peak */ - gdouble *MS; /* normalized Mean Square of buffer */ - gdouble *RMS_dB; /* RMS in dB to emit */ - gdouble *decay_peak_age; /* age of last peak */ - }; - - struct _GstLevelClass - { - GstElementClass parent_class; - void (*level) (GstElement * element, gdouble time, gint channel, - gdouble RMS_dB, gdouble peak_dB, gdouble decay_peak_dB); - }; - - GType gst_level_get_type (void); +typedef struct _GstLevel GstLevel; +typedef struct _GstLevelClass GstLevelClass; + +struct _GstLevel { + GstElement element; + + GstPad *sinkpad, *srcpad; + gboolean signal; /* whether or not to emit signals */ + gboolean inited; /* whether or not the element is initialized */ + gdouble interval; /* how many seconds between emits */ + + gint rate; /* caps variables */ + gint width; + gint channels; + + gdouble decay_peak_ttl; /* time to live for peak in seconds */ + gdouble decay_peak_falloff; /* falloff in dB/sec */ + gdouble num_samples; /* cumulative sample count */ + + /* per-channel arrays for intermediate values */ + gdouble *CS; /* normalized Cumulative Square */ + gdouble *peak; /* normalized Peak value over buffer */ + gdouble *last_peak; /* last normalized Peak value over interval */ + gdouble *decay_peak; /* running decaying normalized Peak */ + gdouble *MS; /* normalized Mean Square of buffer */ + gdouble *RMS_dB; /* RMS in dB to emit */ + gdouble *decay_peak_age; /* age of last peak */ +}; + +struct _GstLevelClass { + GstElementClass parent_class; + void (*level) (GstElement *element, gdouble time, gint channel, + gdouble RMS_dB, gdouble peak_dB, gdouble decay_peak_dB); +}; + +GType gst_level_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_STEREO_H__ */ +#endif /* __GST_STEREO_H__ */ diff --git a/gst/matroska/ebml-ids.h b/gst/matroska/ebml-ids.h index eb396b231..329f036cd 100644 --- a/gst/matroska/ebml-ids.h +++ b/gst/matroska/ebml-ids.h @@ -23,10 +23,13 @@ #define __GST_EBML_IDS_H__ G_BEGIN_DECLS + /* EBML version supported */ #define GST_EBML_VERSION 1 + /* top-level master-IDs */ #define GST_EBML_ID_HEADER 0x1A45DFA3 + /* IDs in the HEADER master */ #define GST_EBML_ID_EBMLVERSION 0x4286 #define GST_EBML_ID_EBMLREADVERSION 0x42F7 @@ -35,7 +38,10 @@ G_BEGIN_DECLS #define GST_EBML_ID_DOCTYPE 0x4282 #define GST_EBML_ID_DOCTYPEVERSION 0x4287 #define GST_EBML_ID_DOCTYPEREADVERSION 0x4285 + /* general EBML types */ #define GST_EBML_ID_VOID 0xEC - G_END_DECLS + +G_END_DECLS + #endif /* __GST_EBML_IDS_H__ */ diff --git a/gst/matroska/ebml-read.h b/gst/matroska/ebml-read.h index c7a981dca..d78d13ce7 100644 --- a/gst/matroska/ebml-read.h +++ b/gst/matroska/ebml-read.h @@ -27,6 +27,7 @@ #include <gst/bytestream/bytestream.h> G_BEGIN_DECLS + #define GST_TYPE_EBML_READ \ (gst_ebml_read_get_type ()) #define GST_EBML_READ(obj) \ @@ -39,13 +40,13 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_EBML_READ)) #define GST_EBML_READ_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_EBML_READ, GstEbmlReadClass)) - typedef struct _GstEbmlLevel -{ - guint64 start, length; + +typedef struct _GstEbmlLevel { + guint64 start, + length; } GstEbmlLevel; -typedef struct _GstEbmlRead -{ +typedef struct _GstEbmlRead { GstElement parent; GstPad *sinkpad; @@ -54,29 +55,48 @@ typedef struct _GstEbmlRead GList *level; } GstEbmlRead; -typedef struct _GstEbmlReadClass -{ +typedef struct _GstEbmlReadClass { GstElementClass parent; } GstEbmlReadClass; -GType gst_ebml_read_get_type (void); +GType gst_ebml_read_get_type (void); -guint32 gst_ebml_peek_id (GstEbmlRead * ebml, guint * level_up); -GstEvent *gst_ebml_read_seek (GstEbmlRead * ebml, guint64 offset); -gboolean gst_ebml_read_skip (GstEbmlRead * ebml); -gboolean gst_ebml_read_buffer (GstEbmlRead * ebml, - guint32 * id, GstBuffer ** buf); -gboolean gst_ebml_read_uint (GstEbmlRead * ebml, guint32 * id, guint64 * num); -gboolean gst_ebml_read_sint (GstEbmlRead * ebml, guint32 * id, gint64 * num); -gboolean gst_ebml_read_float (GstEbmlRead * ebml, guint32 * id, gdouble * num); -gboolean gst_ebml_read_ascii (GstEbmlRead * ebml, guint32 * id, gchar ** str); -gboolean gst_ebml_read_utf8 (GstEbmlRead * ebml, guint32 * id, gchar ** str); -gboolean gst_ebml_read_date (GstEbmlRead * ebml, guint32 * id, gint64 * date); -gboolean gst_ebml_read_master (GstEbmlRead * ebml, guint32 * id); -gboolean gst_ebml_read_binary (GstEbmlRead * ebml, - guint32 * id, guint8 ** binary, guint64 * length); -gboolean gst_ebml_read_header (GstEbmlRead * read, - gchar ** doctype, guint * version); +guint32 gst_ebml_peek_id (GstEbmlRead *ebml, + guint *level_up); +GstEvent *gst_ebml_read_seek (GstEbmlRead *ebml, + guint64 offset); +gboolean gst_ebml_read_skip (GstEbmlRead *ebml); +gboolean gst_ebml_read_buffer (GstEbmlRead *ebml, + guint32 *id, + GstBuffer **buf); +gboolean gst_ebml_read_uint (GstEbmlRead *ebml, + guint32 *id, + guint64 *num); +gboolean gst_ebml_read_sint (GstEbmlRead *ebml, + guint32 *id, + gint64 *num); +gboolean gst_ebml_read_float (GstEbmlRead *ebml, + guint32 *id, + gdouble *num); +gboolean gst_ebml_read_ascii (GstEbmlRead *ebml, + guint32 *id, + gchar **str); +gboolean gst_ebml_read_utf8 (GstEbmlRead *ebml, + guint32 *id, + gchar **str); +gboolean gst_ebml_read_date (GstEbmlRead *ebml, + guint32 *id, + gint64 *date); +gboolean gst_ebml_read_master (GstEbmlRead *ebml, + guint32 *id); +gboolean gst_ebml_read_binary (GstEbmlRead *ebml, + guint32 *id, + guint8 **binary, + guint64 *length); +gboolean gst_ebml_read_header (GstEbmlRead *read, + gchar **doctype, + guint *version); G_END_DECLS + #endif /* __GST_EBML_READ_H__ */ diff --git a/gst/matroska/ebml-write.h b/gst/matroska/ebml-write.h index 8974ecbe6..43d2f8b25 100644 --- a/gst/matroska/ebml-write.h +++ b/gst/matroska/ebml-write.h @@ -26,6 +26,7 @@ #include <gst/gst.h> G_BEGIN_DECLS + #define GST_TYPE_EBML_WRITE \ (gst_ebml_write_get_type ()) #define GST_EBML_WRITE(obj) \ @@ -38,8 +39,8 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_EBML_WRITE)) #define GST_EBML_WRITE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_EBML_WRITE, GstEbmlWriteClass)) - typedef struct _GstEbmlWrite -{ + +typedef struct _GstEbmlWrite { GstElement parent; GstPad *srcpad; @@ -49,54 +50,77 @@ G_BEGIN_DECLS guint handled; } GstEbmlWrite; -typedef struct _GstEbmlWriteClass -{ +typedef struct _GstEbmlWriteClass { GstElementClass parent; } GstEbmlWriteClass; -GType gst_ebml_write_get_type (void); +GType gst_ebml_write_get_type (void); /* * Caching means that we do not push one buffer for * each element, but fill this one until a flush. */ -void gst_ebml_write_set_cache (GstEbmlWrite * ebml, guint size); -void gst_ebml_write_flush_cache (GstEbmlWrite * ebml); +void gst_ebml_write_set_cache (GstEbmlWrite *ebml, + guint size); +void gst_ebml_write_flush_cache (GstEbmlWrite *ebml); /* * Seeking. */ -void gst_ebml_write_seek (GstEbmlWrite * ebml, guint64 pos); +void gst_ebml_write_seek (GstEbmlWrite *ebml, + guint64 pos); /* * Data writing. */ -void gst_ebml_write_uint (GstEbmlWrite * ebml, guint32 id, guint64 num); -void gst_ebml_write_sint (GstEbmlWrite * ebml, guint32 id, gint64 num); -void gst_ebml_write_float (GstEbmlWrite * ebml, guint32 id, gdouble num); -void gst_ebml_write_ascii (GstEbmlWrite * ebml, guint32 id, const gchar * str); -void gst_ebml_write_utf8 (GstEbmlWrite * ebml, guint32 id, const gchar * str); -void gst_ebml_write_date (GstEbmlWrite * ebml, guint32 id, gint64 date); -guint64 gst_ebml_write_master_start (GstEbmlWrite * ebml, guint32 id); -void gst_ebml_write_master_finish (GstEbmlWrite * ebml, guint64 startpos); -void gst_ebml_write_binary (GstEbmlWrite * ebml, - guint32 id, guchar * binary, guint64 length); -void gst_ebml_write_header (GstEbmlWrite * ebml, - gchar * doctype, guint version); +void gst_ebml_write_uint (GstEbmlWrite *ebml, + guint32 id, + guint64 num); +void gst_ebml_write_sint (GstEbmlWrite *ebml, + guint32 id, + gint64 num); +void gst_ebml_write_float (GstEbmlWrite *ebml, + guint32 id, + gdouble num); +void gst_ebml_write_ascii (GstEbmlWrite *ebml, + guint32 id, + const gchar *str); +void gst_ebml_write_utf8 (GstEbmlWrite *ebml, + guint32 id, + const gchar *str); +void gst_ebml_write_date (GstEbmlWrite *ebml, + guint32 id, + gint64 date); +guint64 gst_ebml_write_master_start (GstEbmlWrite *ebml, + guint32 id); +void gst_ebml_write_master_finish (GstEbmlWrite *ebml, + guint64 startpos); +void gst_ebml_write_binary (GstEbmlWrite *ebml, + guint32 id, + guchar *binary, + guint64 length); +void gst_ebml_write_header (GstEbmlWrite *ebml, + gchar *doctype, + guint version); /* * Note: this is supposed to be used only for media data. */ -void gst_ebml_write_buffer_header (GstEbmlWrite * ebml, - guint32 id, guint64 length); -void gst_ebml_write_buffer (GstEbmlWrite * ebml, GstBuffer * data); +void gst_ebml_write_buffer_header (GstEbmlWrite *ebml, + guint32 id, + guint64 length); +void gst_ebml_write_buffer (GstEbmlWrite *ebml, + GstBuffer *data); /* * A hack, basically... See matroska-mux.c. I should actually * make a nice _replace_element_with_size() or so, but this * works for now. */ -void gst_ebml_replace_uint (GstEbmlWrite * ebml, guint64 pos, guint64 num); +void gst_ebml_replace_uint (GstEbmlWrite *ebml, + guint64 pos, + guint64 num); G_END_DECLS + #endif /* __GST_EBML_WRITE_H__ */ diff --git a/gst/matroska/matroska-demux.h b/gst/matroska/matroska-demux.h index 7d55a2236..e393a52af 100644 --- a/gst/matroska/matroska-demux.h +++ b/gst/matroska/matroska-demux.h @@ -29,6 +29,7 @@ #include "matroska-ids.h" G_BEGIN_DECLS + #define GST_TYPE_MATROSKA_DEMUX \ (gst_matroska_demux_get_type ()) #define GST_MATROSKA_DEMUX(obj) \ @@ -39,69 +40,71 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MATROSKA_DEMUX)) #define GST_IS_MATROSKA_DEMUX_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_DEMUX)) -#define GST_MATROSKA_DEMUX_MAX_STREAMS 64 - typedef enum -{ + +#define GST_MATROSKA_DEMUX_MAX_STREAMS 64 + +typedef enum { GST_MATROSKA_DEMUX_STATE_START, GST_MATROSKA_DEMUX_STATE_HEADER, GST_MATROSKA_DEMUX_STATE_DATA } GstMatroskaDemuxState; -typedef struct _GstMatroskaDemuxIndex -{ - guint64 pos; /* of the corresponding *cluster*! */ - guint16 track; /* reference to 'num' */ - guint64 time; /* in nanoseconds */ +typedef struct _GstMatroskaDemuxIndex { + guint64 pos; /* of the corresponding *cluster*! */ + guint16 track; /* reference to 'num' */ + guint64 time; /* in nanoseconds */ } GstMatroskaDemuxIndex; -typedef struct _GstMatroskaDemux -{ - GstEbmlRead parent; +typedef struct _GstMatroskaDemux { + GstEbmlRead parent; /* pads */ - GstPad *sinkpad; + GstPad *sinkpad; GstMatroskaTrackContext *src[GST_MATROSKA_DEMUX_MAX_STREAMS]; - guint num_streams, num_v_streams, num_a_streams, num_t_streams; - GstClock *clock; + guint num_streams, + num_v_streams, num_a_streams, num_t_streams; + GstClock *clock; /* metadata */ - GstCaps *metadata; - GstCaps *streaminfo; - gchar *muxing_app, *writing_app; - gint64 created; + GstCaps *metadata; + GstCaps *streaminfo; + gchar *muxing_app, *writing_app; + gint64 created; /* state */ GstMatroskaDemuxState state; - guint level_up; + guint level_up; /* did we parse metadata/cues already? */ - gboolean metadata_parsed, index_parsed; + gboolean metadata_parsed, + index_parsed; /* start-of-segment */ - guint64 segment_start; + guint64 segment_start; /* a cue (index) table */ GstMatroskaIndex *index; - guint num_indexes; + guint num_indexes; /* timescale in the file */ - guint64 time_scale; + guint64 time_scale; /* length, position (time, ns) */ - guint64 duration, pos; + guint64 duration, + pos; /* a possible pending seek */ - guint64 seek_pending; + guint64 seek_pending; } GstMatroskaDemux; -typedef struct _GstMatroskaDemuxClass -{ +typedef struct _GstMatroskaDemuxClass { GstEbmlReadClass parent; } GstMatroskaDemuxClass; -GType gst_matroska_demux_get_type (void); +GType gst_matroska_demux_get_type (void); -gboolean gst_matroska_demux_plugin_init (GstPlugin * plugin); +gboolean gst_matroska_demux_plugin_init (GstPlugin *plugin); G_END_DECLS + #endif /* __GST_MATROSKA_DEMUX_H__ */ diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h index eb4fb315e..64f25c0f0 100644 --- a/gst/matroska/matroska-ids.h +++ b/gst/matroska/matroska-ids.h @@ -148,28 +148,25 @@ * value to what it actually means). */ -typedef enum -{ - GST_MATROSKA_TRACK_TYPE_VIDEO = 0x1, - GST_MATROSKA_TRACK_TYPE_AUDIO = 0x2, - GST_MATROSKA_TRACK_TYPE_COMPLEX = 0x3, - GST_MATROSKA_TRACK_TYPE_LOGO = 0x10, +typedef enum { + GST_MATROSKA_TRACK_TYPE_VIDEO = 0x1, + GST_MATROSKA_TRACK_TYPE_AUDIO = 0x2, + GST_MATROSKA_TRACK_TYPE_COMPLEX = 0x3, + GST_MATROSKA_TRACK_TYPE_LOGO = 0x10, GST_MATROSKA_TRACK_TYPE_SUBTITLE = 0x11, - GST_MATROSKA_TRACK_TYPE_CONTROL = 0x20, + GST_MATROSKA_TRACK_TYPE_CONTROL = 0x20, } GstMatroskaTrackType; -typedef enum -{ - GST_MATROSKA_EYE_MODE_MONO = 0x0, +typedef enum { + GST_MATROSKA_EYE_MODE_MONO = 0x0, GST_MATROSKA_EYE_MODE_RIGHT = 0x1, - GST_MATROSKA_EYE_MODE_LEFT = 0x2, - GST_MATROSKA_EYE_MODE_BOTH = 0x3, + GST_MATROSKA_EYE_MODE_LEFT = 0x2, + GST_MATROSKA_EYE_MODE_BOTH = 0x3, } GstMatroskaEyeMode; -typedef enum -{ - GST_MATROSKA_ASPECT_RATIO_MODE_FREE = 0x0, - GST_MATROSKA_ASPECT_RATIO_MODE_KEEP = 0x1, +typedef enum { + GST_MATROSKA_ASPECT_RATIO_MODE_FREE = 0x0, + GST_MATROSKA_ASPECT_RATIO_MODE_KEEP = 0x1, GST_MATROSKA_ASPECT_RATIO_MODE_FIXED = 0x2, } GstMatroskaAspectRatioMode; @@ -178,71 +175,64 @@ typedef enum * it's just something I use in the muxer/demuxer. */ -typedef enum -{ - GST_MATROSKA_TRACK_ENABLED = (1 << 0), - GST_MATROSKA_TRACK_DEFAULT = (1 << 1), - GST_MATROSKA_TRACK_LACING = (1 << 2), - GST_MATROSKA_TRACK_SHIFT = (1 << 16) +typedef enum { + GST_MATROSKA_TRACK_ENABLED = (1<<0), + GST_MATROSKA_TRACK_DEFAULT = (1<<1), + GST_MATROSKA_TRACK_LACING = (1<<2), + GST_MATROSKA_TRACK_SHIFT = (1<<16) } GstMatroskaTrackFlags; -typedef enum -{ - GST_MATROSKA_VIDEOTRACK_INTERLACED = (GST_MATROSKA_TRACK_SHIFT << 0) +typedef enum { + GST_MATROSKA_VIDEOTRACK_INTERLACED = (GST_MATROSKA_TRACK_SHIFT<<0) } GstMatroskaVideoTrackFlags; -typedef struct _GstMatroskaTrackContext -{ - GstPad *pad; - GstCaps *caps; - guint index; +typedef struct _GstMatroskaTrackContext { + GstPad *pad; + GstCaps *caps; + guint index; /* some often-used info */ - gchar *codec_id, *codec_name, *name, *language; - gpointer codec_priv; - guint codec_priv_size; + gchar *codec_id, *codec_name, *name, *language; + gpointer codec_priv; + guint codec_priv_size; GstMatroskaTrackType type; - guint uid, num; + guint uid, num; GstMatroskaTrackFlags flags; - guint64 default_duration; + guint64 default_duration; } GstMatroskaTrackContext; -typedef struct _GstMatroskaTrackVideoContext -{ +typedef struct _GstMatroskaTrackVideoContext { GstMatroskaTrackContext parent; - guint pixel_width, pixel_height, display_width, display_height; + guint pixel_width, pixel_height, + display_width, display_height; GstMatroskaEyeMode eye_mode; GstMatroskaAspectRatioMode asr_mode; - guint32 fourcc; + guint32 fourcc; } GstMatroskaTrackVideoContext; -typedef struct _GstMatroskaTrackAudioContext -{ +typedef struct _GstMatroskaTrackAudioContext { GstMatroskaTrackContext parent; - guint samplerate, channels, bitdepth; + guint samplerate, channels, bitdepth; } GstMatroskaTrackAudioContext; -typedef struct _GstMatroskaTrackComplexContext -{ +typedef struct _GstMatroskaTrackComplexContext { GstMatroskaTrackContext parent; /* nothing special goes here, apparently */ } GstMatroskaTrackComplexContext; -typedef struct _GstMatroskaTrackSubtitleContext -{ +typedef struct _GstMatroskaTrackSubtitleContext { GstMatroskaTrackContext parent; /* or here... */ } GstMatroskaTrackSubtitleContext; -typedef struct _GstMatroskaIndex -{ - guint64 pos; /* of the corresponding *cluster*! */ - guint16 track; /* reference to 'num' */ - guint64 time; /* in nanoseconds */ +typedef struct _GstMatroskaIndex { + guint64 pos; /* of the corresponding *cluster*! */ + guint16 track; /* reference to 'num' */ + guint64 time; /* in nanoseconds */ } GstMatroskaIndex; #endif /* __GST_MATROSKA_IDS_H__ */ diff --git a/gst/matroska/matroska-mux.h b/gst/matroska/matroska-mux.h index ab018688e..119237c99 100644 --- a/gst/matroska/matroska-mux.h +++ b/gst/matroska/matroska-mux.h @@ -28,6 +28,7 @@ #include "matroska-ids.h" G_BEGIN_DECLS + #define GST_TYPE_MATROSKA_MUX \ (gst_matroska_mux_get_type ()) #define GST_MATROSKA_MUX(obj) \ @@ -38,61 +39,65 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MATROSKA_MUX)) #define GST_IS_MATROSKA_MUX_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_MUX)) + #define GST_MATROSKA_MUX_MAX_STREAMS 64 - typedef enum -{ + +typedef enum { GST_MATROSKA_MUX_STATE_START, GST_MATROSKA_MUX_STATE_HEADER, GST_MATROSKA_MUX_STATE_DATA, } GstMatroskaMuxState; -typedef struct _GstMatroskaMux -{ - GstEbmlWrite parent; +typedef struct _GstMatroskaMux { + GstEbmlWrite parent; /* pads */ - GstPad *srcpad; - struct - { + GstPad *srcpad; + struct { GstMatroskaTrackContext *track; - GstBuffer *buffer; - gboolean eos; + GstBuffer *buffer; + gboolean eos; } sink[GST_MATROSKA_MUX_MAX_STREAMS]; - guint num_streams, num_v_streams, num_a_streams, num_t_streams; + guint num_streams, + num_v_streams, num_a_streams, num_t_streams; /* metadata - includes writing_app and creation_time */ - GstCaps *metadata; + GstCaps *metadata; /* state */ GstMatroskaMuxState state; /* a cue (index) table */ GstMatroskaIndex *index; - guint num_indexes; + guint num_indexes; /* timescale in the file */ - guint64 time_scale; + guint64 time_scale; /* length, position (time, ns) */ - guint64 duration; + guint64 duration; /* byte-positions of master-elements (for replacing contents) */ - guint64 segment_pos, seekhead_pos, cues_pos, + guint64 segment_pos, + seekhead_pos, + cues_pos, #if 0 - tags_pos, + tags_pos, #endif - info_pos, tracks_pos, duration_pos; - guint64 segment_master; + info_pos, + tracks_pos, + duration_pos; + guint64 segment_master; } GstMatroskaMux; -typedef struct _GstMatroskaMuxClass -{ +typedef struct _GstMatroskaMuxClass { GstEbmlWriteClass parent; } GstMatroskaMuxClass; -GType gst_matroska_mux_get_type (void); +GType gst_matroska_mux_get_type (void); -gboolean gst_matroska_mux_plugin_init (GstPlugin * plugin); +gboolean gst_matroska_mux_plugin_init (GstPlugin *plugin); G_END_DECLS + #endif /* __GST_MATROSKA_MUX_H__ */ diff --git a/gst/median/gstmedian.h b/gst/median/gstmedian.h index 5e558bae7..c22b80d1e 100644 --- a/gst/median/gstmedian.h +++ b/gst/median/gstmedian.h @@ -26,9 +26,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_MEDIAN \ @@ -42,33 +41,31 @@ extern "C" #define GST_IS_MEDIAN_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MEDIAN)) - typedef struct _GstMedian GstMedian; - typedef struct _GstMedianClass GstMedianClass; +typedef struct _GstMedian GstMedian; +typedef struct _GstMedianClass GstMedianClass; - struct _GstMedian - { - GstElement element; +struct _GstMedian { + GstElement element; - int format; - int width; - int height; + int format; + int width; + int height; - int filtersize; + int filtersize; - gboolean active; - gboolean lum_only; + gboolean active; + gboolean lum_only; - GstPad *sinkpad, *srcpad; - }; + GstPad *sinkpad,*srcpad; +}; - struct _GstMedianClass - { - GstElementClass parent_class; - }; +struct _GstMedianClass { + GstElementClass parent_class; +}; #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_MEDIAN_H__ */ +#endif /* __GST_MEDIAN_H__ */ diff --git a/gst/monoscope/convolve.h b/gst/monoscope/convolve.h index d5f34d2b9..d9709edc5 100644 --- a/gst/monoscope/convolve.h +++ b/gst/monoscope/convolve.h @@ -21,8 +21,7 @@ #define CONVOLVE_H #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /* convolve_match takes two blocks, one twice the size of the other. The @@ -32,13 +31,14 @@ extern "C" #define CONVOLVE_BIG (CONVOLVE_SMALL * 2) /* Convolution stuff */ - typedef struct _struct_convolve_state convolve_state; +typedef struct _struct_convolve_state convolve_state; - convolve_state *convolve_init (void); - void convolve_close (convolve_state * state); +convolve_state *convolve_init (void); +void convolve_close (convolve_state * state); - int convolve_match (const int *lastchoice, - const short int *input, convolve_state * state); +int convolve_match (const int * lastchoice, + const short int * input, + convolve_state * state); #ifdef __cplusplus } diff --git a/gst/monoscope/monoscope.h b/gst/monoscope/monoscope.h index 37be6fff3..8e7d75913 100644 --- a/gst/monoscope/monoscope.h +++ b/gst/monoscope/monoscope.h @@ -7,19 +7,18 @@ #define scope_width 256 #define scope_height 128 -struct monoscope_state -{ - gint16 copyEq[CONVOLVE_BIG]; - int avgEq[CONVOLVE_SMALL]; /* a running average of the last few. */ - int avgMax; /* running average of max sample. */ - guint32 display[(scope_width + 1) * (scope_height + 1)]; +struct monoscope_state { + gint16 copyEq[CONVOLVE_BIG]; + int avgEq[CONVOLVE_SMALL]; /* a running average of the last few. */ + int avgMax; /* running average of max sample. */ + guint32 display[(scope_width + 1) * (scope_height + 1)]; - convolve_state *cstate; - guint32 colors[64]; + convolve_state *cstate; + guint32 colors[64]; }; -struct monoscope_state *monoscope_init (guint32 resx, guint32 resy); -guint32 *monoscope_update (struct monoscope_state *stateptr, gint16 data[512]); -void monoscope_close (struct monoscope_state *stateptr); +struct monoscope_state * monoscope_init (guint32 resx, guint32 resy); +guint32 * monoscope_update (struct monoscope_state * stateptr, gint16 data [512]); +void monoscope_close (struct monoscope_state * stateptr); #endif diff --git a/gst/qtdemux/qtdemux.h b/gst/qtdemux/qtdemux.h index ed0f3154e..249ef2161 100644 --- a/gst/qtdemux/qtdemux.h +++ b/gst/qtdemux/qtdemux.h @@ -26,9 +26,8 @@ #include <gst/getbits/getbits.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_QTDEMUX \ @@ -44,45 +43,43 @@ extern "C" #define GST_QTDEMUX_MAX_STREAMS 8 - typedef struct _GstQTDemux GstQTDemux; - typedef struct _GstQTDemuxClass GstQTDemuxClass; - typedef struct _QtDemuxStream QtDemuxStream; +typedef struct _GstQTDemux GstQTDemux; +typedef struct _GstQTDemuxClass GstQTDemuxClass; +typedef struct _QtDemuxStream QtDemuxStream; - struct _GstQTDemux - { - GstElement element; +struct _GstQTDemux { + GstElement element; - /* pads */ - GstPad *sinkpad; + /* pads */ + GstPad *sinkpad; - QtDemuxStream *streams[GST_QTDEMUX_MAX_STREAMS]; - int n_streams; - int n_video_streams; - int n_audio_streams; + QtDemuxStream *streams[GST_QTDEMUX_MAX_STREAMS]; + int n_streams; + int n_video_streams; + int n_audio_streams; - GstByteStream *bs; + GstByteStream *bs; - GNode *moov_node; - GNode *moov_node_compressed; + GNode *moov_node; + GNode *moov_node_compressed; - guint32 timescale; - guint32 duration; + guint32 timescale; + guint32 duration; - int state; + int state; - int offset; + int offset; - /* track stuff */ + /* track stuff */ - }; +}; - struct _GstQTDemuxClass - { - GstElementClass parent_class; - }; +struct _GstQTDemuxClass { + GstElementClass parent_class; +}; #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_QTDEMUX_H__ */ +#endif /* __GST_QTDEMUX_H__ */ diff --git a/gst/rtp/gstrtp-common.h b/gst/rtp/gstrtp-common.h index ec4cd9478..fb6751895 100644 --- a/gst/rtp/gstrtp-common.h +++ b/gst/rtp/gstrtp-common.h @@ -26,7 +26,7 @@ typedef enum { /* Audio: */ - PAYLOAD_PCMU = 0, /* ITU-T G.711. mu-law audio (RFC 3551) */ + PAYLOAD_PCMU = 0, /* ITU-T G.711. mu-law audio (RFC 3551) */ PAYLOAD_GSM = 3, PAYLOAD_PCMA = 8, /* ITU-T G.711 A-law audio (RFC 3551) */ PAYLOAD_L16_STEREO = 10, diff --git a/gst/rtp/gstrtpL16depay.h b/gst/rtp/gstrtpL16depay.h index b49cf2401..dad467bf6 100644 --- a/gst/rtp/gstrtpL16depay.h +++ b/gst/rtp/gstrtpL16depay.h @@ -30,26 +30,26 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Parse GstRtpL16Parse; - struct _GstRtpL16Parse - { - GstElement element; +typedef struct _GstRtpL16Parse GstRtpL16Parse; +struct _GstRtpL16Parse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - guint channels; + guint frequency; + guint channels; - rtp_payload_t payload_type; - }; + rtp_payload_t payload_type; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; - struct _GstRtpL16ParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; +struct _GstRtpL16ParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_PARSE \ @@ -63,7 +63,7 @@ extern "C" #define GST_IS_RTP_L16_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PARSE)) - gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpL16enc.h b/gst/rtp/gstrtpL16enc.h index 7e902483c..15ed92f6c 100644 --- a/gst/rtp/gstrtpL16enc.h +++ b/gst/rtp/gstrtpL16enc.h @@ -31,32 +31,32 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Enc GstRtpL16Enc; - struct _GstRtpL16Enc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpL16Enc GstRtpL16Enc; +struct _GstRtpL16Enc +{ + GstElement element; - guint frequency; - guint channels; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; + guint channels; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16EncClass GstRtpL16EncClass; - struct _GstRtpL16EncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16EncClass GstRtpL16EncClass; +struct _GstRtpL16EncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_ENC \ @@ -70,7 +70,7 @@ extern "C" #define GST_IS_RTP_L16_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_ENC)) - gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpL16parse.h b/gst/rtp/gstrtpL16parse.h index b49cf2401..dad467bf6 100644 --- a/gst/rtp/gstrtpL16parse.h +++ b/gst/rtp/gstrtpL16parse.h @@ -30,26 +30,26 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Parse GstRtpL16Parse; - struct _GstRtpL16Parse - { - GstElement element; +typedef struct _GstRtpL16Parse GstRtpL16Parse; +struct _GstRtpL16Parse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - guint channels; + guint frequency; + guint channels; - rtp_payload_t payload_type; - }; + rtp_payload_t payload_type; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; - struct _GstRtpL16ParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16ParseClass GstRtpL16ParseClass; +struct _GstRtpL16ParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_PARSE \ @@ -63,7 +63,7 @@ extern "C" #define GST_IS_RTP_L16_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PARSE)) - gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16parse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpL16pay.h b/gst/rtp/gstrtpL16pay.h index 7e902483c..15ed92f6c 100644 --- a/gst/rtp/gstrtpL16pay.h +++ b/gst/rtp/gstrtpL16pay.h @@ -31,32 +31,32 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpL16Enc GstRtpL16Enc; - struct _GstRtpL16Enc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpL16Enc GstRtpL16Enc; +struct _GstRtpL16Enc +{ + GstElement element; - guint frequency; - guint channels; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; + guint channels; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpL16EncClass GstRtpL16EncClass; - struct _GstRtpL16EncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpL16EncClass GstRtpL16EncClass; +struct _GstRtpL16EncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_L16_ENC \ @@ -70,7 +70,7 @@ extern "C" #define GST_IS_RTP_L16_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_ENC)) - gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpL16enc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmdepay.h b/gst/rtp/gstrtpgsmdepay.h index f3b0e6595..0a006e70f 100644 --- a/gst/rtp/gstrtpgsmdepay.h +++ b/gst/rtp/gstrtpgsmdepay.h @@ -30,23 +30,23 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMParse GstRtpGSMParse; - struct _GstRtpGSMParse - { - GstElement element; +typedef struct _GstRtpGSMParse GstRtpGSMParse; +struct _GstRtpGSMParse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - }; + guint frequency; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; - struct _GstRtpGSMParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; +struct _GstRtpGSMParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_PARSE \ @@ -60,7 +60,7 @@ extern "C" #define GST_IS_RTP_GSM_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PARSE)) - gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmenc.h b/gst/rtp/gstrtpgsmenc.h index e44e5dae2..1220d4029 100644 --- a/gst/rtp/gstrtpgsmenc.h +++ b/gst/rtp/gstrtpgsmenc.h @@ -31,31 +31,31 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMEnc GstRtpGSMEnc; - struct _GstRtpGSMEnc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpGSMEnc GstRtpGSMEnc; +struct _GstRtpGSMEnc +{ + GstElement element; - guint frequency; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; - struct _GstRtpGSMEncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; +struct _GstRtpGSMEncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_ENC \ @@ -69,7 +69,7 @@ extern "C" #define GST_IS_RTP_GSM_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_ENC)) - gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmparse.h b/gst/rtp/gstrtpgsmparse.h index f3b0e6595..0a006e70f 100644 --- a/gst/rtp/gstrtpgsmparse.h +++ b/gst/rtp/gstrtpgsmparse.h @@ -30,23 +30,23 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMParse GstRtpGSMParse; - struct _GstRtpGSMParse - { - GstElement element; +typedef struct _GstRtpGSMParse GstRtpGSMParse; +struct _GstRtpGSMParse +{ + GstElement element; - GstPad *sinkpad; - GstPad *srcpad; + GstPad *sinkpad; + GstPad *srcpad; - guint frequency; - }; + guint frequency; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; - struct _GstRtpGSMParseClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMParseClass GstRtpGSMParseClass; +struct _GstRtpGSMParseClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_PARSE \ @@ -60,7 +60,7 @@ extern "C" #define GST_IS_RTP_GSM_PARSE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PARSE)) - gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmparse_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/gstrtpgsmpay.h b/gst/rtp/gstrtpgsmpay.h index e44e5dae2..1220d4029 100644 --- a/gst/rtp/gstrtpgsmpay.h +++ b/gst/rtp/gstrtpgsmpay.h @@ -31,31 +31,31 @@ extern "C" #endif /* __cplusplus */ /* Definition of structure storing data for this element. */ - typedef struct _GstRtpGSMEnc GstRtpGSMEnc; - struct _GstRtpGSMEnc - { - GstElement element; - - GstPad *sinkpad; - GstPad *srcpad; +typedef struct _GstRtpGSMEnc GstRtpGSMEnc; +struct _GstRtpGSMEnc +{ + GstElement element; - guint frequency; + GstPad *sinkpad; + GstPad *srcpad; - /* the timestamp of the next frame */ - guint64 next_time; - /* the interval between frames */ - guint64 time_interval; + guint frequency; - guint32 ssrc; - guint16 seq; - }; + /* the timestamp of the next frame */ + guint64 next_time; + /* the interval between frames */ + guint64 time_interval; + + guint32 ssrc; + guint16 seq; +}; /* Standard definition defining a class for this element. */ - typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; - struct _GstRtpGSMEncClass - { - GstElementClass parent_class; - }; +typedef struct _GstRtpGSMEncClass GstRtpGSMEncClass; +struct _GstRtpGSMEncClass +{ + GstElementClass parent_class; +}; /* Standard macros for defining types for this element. */ #define GST_TYPE_RTP_GSM_ENC \ @@ -69,7 +69,7 @@ extern "C" #define GST_IS_RTP_GSM_ENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_ENC)) - gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); +gboolean gst_rtpgsmenc_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } diff --git a/gst/rtp/rtp-packet.h b/gst/rtp/rtp-packet.h index b130c86ec..f731c5f0f 100644 --- a/gst/rtp/rtp-packet.h +++ b/gst/rtp/rtp-packet.h @@ -30,80 +30,77 @@ #endif #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif #define RTP_VERSION 2 #define RTP_HEADER_LEN 12 #define RTP_MTU 2048 - typedef struct Rtp_Header *Rtp_Header; +typedef struct Rtp_Header *Rtp_Header; - struct Rtp_Packet_Struct - { - gpointer data; - guint data_len; - }; +struct Rtp_Packet_Struct { + gpointer data; + guint data_len; +}; - struct Rtp_Header - { +struct Rtp_Header { #if G_BYTE_ORDER == G_LITTLE_ENDIAN - unsigned int csrc_count:4; /* CSRC count */ - unsigned int extension:1; /* header extension flag */ - unsigned int padding:1; /* padding flag */ - unsigned int version:2; /* protocol version */ - unsigned int payload_type:7; /* payload type */ - unsigned int marker:1; /* marker bit */ + unsigned int csrc_count:4; /* CSRC count */ + unsigned int extension:1; /* header extension flag */ + unsigned int padding:1; /* padding flag */ + unsigned int version:2; /* protocol version */ + unsigned int payload_type:7; /* payload type */ + unsigned int marker:1; /* marker bit */ #elif G_BYTE_ORDER == G_BIG_ENDIAN - unsigned int version:2; /* protocol version */ - unsigned int padding:1; /* padding flag */ - unsigned int extension:1; /* header extension flag */ - unsigned int csrc_count:4; /* CSRC count */ - unsigned int marker:1; /* marker bit */ - unsigned int payload_type:7; /* payload type */ + unsigned int version:2; /* protocol version */ + unsigned int padding:1; /* padding flag */ + unsigned int extension:1; /* header extension flag */ + unsigned int csrc_count:4; /* CSRC count */ + unsigned int marker:1; /* marker bit */ + unsigned int payload_type:7; /* payload type */ #else #error "G_BYTE_ORDER should be big or little endian." #endif - guint16 seq; /* sequence number */ - guint32 timestamp; /* timestamp */ - guint32 ssrc; /* synchronization source */ - guint32 csrc[1]; /* optional CSRC list */ - }; + guint16 seq; /* sequence number */ + guint32 timestamp; /* timestamp */ + guint32 ssrc; /* synchronization source */ + guint32 csrc[1]; /* optional CSRC list */ +}; - typedef struct Rtp_Packet_Struct *Rtp_Packet; +typedef struct Rtp_Packet_Struct *Rtp_Packet; - Rtp_Packet rtp_packet_new_take_data (gpointer data, guint data_len); - Rtp_Packet rtp_packet_new_copy_data (gpointer data, guint data_len); - Rtp_Packet rtp_packet_new_allocate (guint payload_len, - guint pad_len, guint csrc_count); - void rtp_packet_free (Rtp_Packet packet); +Rtp_Packet rtp_packet_new_take_data(gpointer data, guint data_len); +Rtp_Packet rtp_packet_new_copy_data(gpointer data, guint data_len); +Rtp_Packet rtp_packet_new_allocate(guint payload_len, + guint pad_len, guint csrc_count); +void rtp_packet_free(Rtp_Packet packet); //Rtp_Packet rtp_packet_read(int fd, struct sockaddr *fromaddr, socklen_t *fromlen); //void rtp_packet_send(Rtp_Packet packet, int fd, struct sockaddr *toaddr, socklen_t tolen); - guint8 rtp_packet_get_version (Rtp_Packet packet); - void rtp_packet_set_version (Rtp_Packet packet, guint8 version); - guint8 rtp_packet_get_padding (Rtp_Packet packet); - void rtp_packet_set_padding (Rtp_Packet packet, guint8 padding); - guint8 rtp_packet_get_csrc_count (Rtp_Packet packet); - guint8 rtp_packet_get_extension (Rtp_Packet packet); - void rtp_packet_set_extension (Rtp_Packet packet, guint8 extension); - void rtp_packet_set_csrc_count (Rtp_Packet packet, guint8 csrc_count); - guint8 rtp_packet_get_marker (Rtp_Packet packet); - void rtp_packet_set_marker (Rtp_Packet packet, guint8 marker); - guint8 rtp_packet_get_payload_type (Rtp_Packet packet); - void rtp_packet_set_payload_type (Rtp_Packet packet, guint8 payload_type); - guint16 rtp_packet_get_seq (Rtp_Packet packet); - void rtp_packet_set_seq (Rtp_Packet packet, guint16 seq); - guint32 rtp_packet_get_timestamp (Rtp_Packet packet); - void rtp_packet_set_timestamp (Rtp_Packet packet, guint32 timestamp); - guint32 rtp_packet_get_ssrc (Rtp_Packet packet); - void rtp_packet_set_ssrc (Rtp_Packet packet, guint32 ssrc); - guint rtp_packet_get_payload_len (Rtp_Packet packet); - gpointer rtp_packet_get_payload (Rtp_Packet packet); - guint rtp_packet_get_packet_len (Rtp_Packet packet); +guint8 rtp_packet_get_version(Rtp_Packet packet); +void rtp_packet_set_version(Rtp_Packet packet, guint8 version); +guint8 rtp_packet_get_padding(Rtp_Packet packet); +void rtp_packet_set_padding(Rtp_Packet packet, guint8 padding); +guint8 rtp_packet_get_csrc_count(Rtp_Packet packet); +guint8 rtp_packet_get_extension(Rtp_Packet packet); +void rtp_packet_set_extension(Rtp_Packet packet, guint8 extension); +void rtp_packet_set_csrc_count(Rtp_Packet packet, guint8 csrc_count); +guint8 rtp_packet_get_marker(Rtp_Packet packet); +void rtp_packet_set_marker(Rtp_Packet packet, guint8 marker); +guint8 rtp_packet_get_payload_type(Rtp_Packet packet); +void rtp_packet_set_payload_type(Rtp_Packet packet, guint8 payload_type); +guint16 rtp_packet_get_seq(Rtp_Packet packet); +void rtp_packet_set_seq(Rtp_Packet packet, guint16 seq); +guint32 rtp_packet_get_timestamp(Rtp_Packet packet); +void rtp_packet_set_timestamp(Rtp_Packet packet, guint32 timestamp); +guint32 rtp_packet_get_ssrc(Rtp_Packet packet); +void rtp_packet_set_ssrc(Rtp_Packet packet, guint32 ssrc); +guint rtp_packet_get_payload_len(Rtp_Packet packet); +gpointer rtp_packet_get_payload(Rtp_Packet packet); +guint rtp_packet_get_packet_len(Rtp_Packet packet); #ifdef __cplusplus } #endif -#endif /* rtp-packet.h */ +#endif /* rtp-packet.h */ diff --git a/gst/smoothwave/gstsmoothwave.h b/gst/smoothwave/gstsmoothwave.h index df4d87634..871651310 100644 --- a/gst/smoothwave/gstsmoothwave.h +++ b/gst/smoothwave/gstsmoothwave.h @@ -26,9 +26,8 @@ #include <gtk/gtk.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_SMOOTHWAVE \ @@ -42,33 +41,31 @@ extern "C" #define GST_IS_SMOOTHWAVE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SMOOTHWAVE)) - typedef struct _GstSmoothWave GstSmoothWave; - typedef struct _GstSmoothWaveClass GstSmoothWaveClass; +typedef struct _GstSmoothWave GstSmoothWave; +typedef struct _GstSmoothWaveClass GstSmoothWaveClass; - struct _GstSmoothWave - { - GstElement element; +struct _GstSmoothWave { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - gint width, height; + gint width,height; - GdkRgbCmap *cmap; - GtkWidget *image; - guchar *imagebuffer; - }; + GdkRgbCmap *cmap; + GtkWidget *image; + guchar *imagebuffer; +}; - struct _GstSmoothWaveClass - { - GstElementClass parent_class; - }; +struct _GstSmoothWaveClass { + GstElementClass parent_class; +}; - GType gst_smoothwave_get_type (void); +GType gst_smoothwave_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_SMOOTHWAVE_H__ */ +#endif /* __GST_SMOOTHWAVE_H__ */ diff --git a/gst/smpte/gstmask.h b/gst/smpte/gstmask.h index 6f82078f6..6131c6243 100644 --- a/gst/smpte/gstmask.h +++ b/gst/smpte/gstmask.h @@ -27,39 +27,37 @@ typedef struct _GstMask GstMask; typedef struct _GstMaskDefinition GstMaskDefinition; -typedef void (*GstMaskDrawFunc) (GstMask * mask); -typedef void (*GstMaskDestroyFunc) (GstMask * mask); - -struct _GstMaskDefinition -{ - gint type; - gchar *short_name; - gchar *long_name; - GstMaskDrawFunc draw_func; - GstMaskDestroyFunc destroy_func; - gpointer user_data; +typedef void (*GstMaskDrawFunc) (GstMask *mask); +typedef void (*GstMaskDestroyFunc) (GstMask *mask); + +struct _GstMaskDefinition { + gint type; + gchar *short_name; + gchar *long_name; + GstMaskDrawFunc draw_func; + GstMaskDestroyFunc destroy_func; + gpointer user_data; }; -struct _GstMask -{ - gint type; - guint32 *data; - gpointer user_data; +struct _GstMask { + gint type; + guint32 *data; + gpointer user_data; - gint width; - gint height; - gint bpp; + gint width; + gint height; + gint bpp; - GstMaskDestroyFunc destroy_func; + GstMaskDestroyFunc destroy_func; }; -void _gst_mask_init (void); -void _gst_mask_register (GstMaskDefinition * definition); +void _gst_mask_init (void); +void _gst_mask_register (GstMaskDefinition *definition); -void _gst_mask_default_destroy (GstMask * mask); +void _gst_mask_default_destroy (GstMask *mask); -const GList *gst_mask_get_definitions (void); -GstMask *gst_mask_factory_new (gint type, gint bpp, gint width, gint height); -void gst_mask_destroy (GstMask * mask); +const GList* gst_mask_get_definitions (void); +GstMask* gst_mask_factory_new (gint type, gint bpp, gint width, gint height); +void gst_mask_destroy (GstMask *mask); #endif /* __GST_MASK_H__ */ diff --git a/gst/smpte/gstsmpte.h b/gst/smpte/gstsmpte.h index 762eebf89..40844209f 100644 --- a/gst/smpte/gstsmpte.h +++ b/gst/smpte/gstsmpte.h @@ -38,28 +38,28 @@ typedef struct _GstSMPTE GstSMPTE; typedef struct _GstSMPTEClass GstSMPTEClass; -struct _GstSMPTE -{ - GstElement element; +struct _GstSMPTE { + GstElement element; - gint format; - gint width; - gint height; - gdouble fps; + gint format; + gint width; + gint height; + gdouble fps; - gint duration; - gint position; + gint duration; + gint position; - GstPad *srcpad, *sinkpad1, *sinkpad2; + GstPad *srcpad, + *sinkpad1, + *sinkpad2; - gint type; - gint border; - gint depth; - GstMask *mask; + gint type; + gint border; + gint depth; + GstMask *mask; }; -struct _GstSMPTEClass -{ +struct _GstSMPTEClass { GstElementClass parent_class; }; diff --git a/gst/smpte/paint.h b/gst/smpte/paint.h index aa9fd4251..4c34cf92d 100644 --- a/gst/smpte/paint.h +++ b/gst/smpte/paint.h @@ -22,21 +22,26 @@ #include <glib.h> -void gst_smpte_paint_vbox (guint32 * dest, gint stride, - gint x0, gint y0, gint c0, gint x1, gint y1, gint c1); -void gst_smpte_paint_hbox (guint32 * dest, gint stride, - gint x0, gint y0, gint c0, gint x1, gint y1, gint c1); +void gst_smpte_paint_vbox (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1); +void gst_smpte_paint_hbox (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1); -void gst_smpte_paint_triangle_linear (guint32 * dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1, gint x2, gint y2, gint c2); +void gst_smpte_paint_triangle_linear (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1, + gint x2, gint y2, gint c2); -void gst_smpte_paint_triangle_clock (guint32 * dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1, gint x2, gint y2, gint c2); +void gst_smpte_paint_triangle_clock (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1, + gint x2, gint y2, gint c2); -void gst_smpte_paint_box_clock (guint32 * dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1, gint x2, gint y2, gint c2); +void gst_smpte_paint_box_clock (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1, + gint x2, gint y2, gint c2); #endif /* __GST_SMPTE_PAINT_H__ */ diff --git a/gst/spectrum/gstspectrum.h b/gst/spectrum/gstspectrum.h index 23c4ef4b7..8cc546eca 100644 --- a/gst/spectrum/gstspectrum.h +++ b/gst/spectrum/gstspectrum.h @@ -26,9 +26,8 @@ #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_SPECTRUM \ @@ -42,29 +41,27 @@ extern "C" #define GST_IS_SPECTRUM_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SPECTRUM)) - typedef struct _GstSpectrum GstSpectrum; - typedef struct _GstSpectrumClass GstSpectrumClass; +typedef struct _GstSpectrum GstSpectrum; +typedef struct _GstSpectrumClass GstSpectrumClass; - struct _GstSpectrum - { - GstElement element; +struct _GstSpectrum { + GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; - gint width; - }; + gint width; +}; - struct _GstSpectrumClass - { - GstElementClass parent_class; - }; +struct _GstSpectrumClass { + GstElementClass parent_class; +}; - GType gst_spectrum_get_type (void); +GType gst_spectrum_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_SPECTRUM_H__ */ +#endif /* __GST_SPECTRUM_H__ */ diff --git a/gst/udp/gstudp.h b/gst/udp/gstudp.h index e5fda0502..89103e930 100644 --- a/gst/udp/gstudp.h +++ b/gst/udp/gstudp.h @@ -36,6 +36,7 @@ extern "C" #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ + +#endif /* __GST_UDP_H__ */ -#endif /* __GST_UDP_H__ */ diff --git a/gst/udp/gstudpsink.h b/gst/udp/gstudpsink.h index 9a08f7091..f49b4efe0 100644 --- a/gst/udp/gstudpsink.h +++ b/gst/udp/gstudpsink.h @@ -25,9 +25,8 @@ #include <gst/gst.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #include <stdio.h> #include <stdlib.h> @@ -55,48 +54,45 @@ extern "C" #define GST_IS_UDPSINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSINK)) - typedef struct _GstUDPSink GstUDPSink; - typedef struct _GstUDPSinkClass GstUDPSinkClass; +typedef struct _GstUDPSink GstUDPSink; +typedef struct _GstUDPSinkClass GstUDPSinkClass; - typedef enum - { - GST_UDPSINK_OPEN = GST_ELEMENT_FLAG_LAST, +typedef enum { + GST_UDPSINK_OPEN = GST_ELEMENT_FLAG_LAST, - GST_UDPSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, - } GstUDPSinkFlags; + GST_UDPSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, +} GstUDPSinkFlags; - struct _GstUDPSink - { - GstElement element; +struct _GstUDPSink { + GstElement element; - /* pads */ - GstPad *sinkpad, *srcpad; + /* pads */ + GstPad *sinkpad,*srcpad; - int sock; - struct sockaddr_in theiraddr; - struct ip_mreq multi_addr; + int sock; + struct sockaddr_in theiraddr; + struct ip_mreq multi_addr; - gint port; - Gst_UDP_Control control; - gchar *host; + gint port; + Gst_UDP_Control control; + gchar *host; + + guint mtu; + + GstClock *clock; +}; - guint mtu; +struct _GstUDPSinkClass { + GstElementClass parent_class; - GstClock *clock; - }; +}; - struct _GstUDPSinkClass - { - GstElementClass parent_class; - - }; - - GType gst_udpsink_get_type (void); +GType gst_udpsink_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_UDPSINK_H__ */ +#endif /* __GST_UDPSINK_H__ */ diff --git a/gst/udp/gstudpsrc.h b/gst/udp/gstudpsrc.h index bb4273e7c..f16673df3 100644 --- a/gst/udp/gstudpsrc.h +++ b/gst/udp/gstudpsrc.h @@ -24,9 +24,8 @@ #include <gst/gst.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #include <errno.h> #include <string.h> @@ -50,47 +49,44 @@ extern "C" #define GST_IS_UDPSRC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSRC)) - typedef struct _GstUDPSrc GstUDPSrc; - typedef struct _GstUDPSrcClass GstUDPSrcClass; +typedef struct _GstUDPSrc GstUDPSrc; +typedef struct _GstUDPSrcClass GstUDPSrcClass; - typedef enum - { - GST_UDPSRC_OPEN = GST_ELEMENT_FLAG_LAST, +typedef enum { + GST_UDPSRC_OPEN = GST_ELEMENT_FLAG_LAST, - GST_UDPSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, - } GstUDPSrcFlags; + GST_UDPSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, +} GstUDPSrcFlags; - struct _GstUDPSrc - { - GstElement element; +struct _GstUDPSrc { + GstElement element; - /* pads */ - GstPad *sinkpad, *srcpad; + /* pads */ + GstPad *sinkpad,*srcpad; - int port; - int sock; - int control_sock; - Gst_UDP_Control control; - gchar *multi_group; + int port; + int sock; + int control_sock; + Gst_UDP_Control control; + gchar *multi_group; - struct sockaddr_in myaddr; - struct ip_mreq multi_addr; - GstClock *clock; + struct sockaddr_in myaddr; + struct ip_mreq multi_addr; + GstClock *clock; - gboolean first_buf; - }; + gboolean first_buf; +}; - struct _GstUDPSrcClass - { - GstElementClass parent_class; - }; +struct _GstUDPSrcClass { + GstElementClass parent_class; +}; - GType gst_udpsrc_get_type (void); +GType gst_udpsrc_get_type(void); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_UDPSRC_H__ */ +#endif /* __GST_UDPSRC_H__ */ diff --git a/gst/videofilter/gstvideobalance.h b/gst/videofilter/gstvideobalance.h index 03a3d066a..45aab910d 100644 --- a/gst/videofilter/gstvideobalance.h +++ b/gst/videofilter/gstvideobalance.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS + #define GST_TYPE_VIDEOBALANCE \ (gst_videobalance_get_type()) #define GST_VIDEOBALANCE(obj) \ @@ -38,30 +39,30 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEOBALANCE)) #define GST_IS_VIDEOBALANCE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOBALANCE)) + typedef struct _GstVideobalance GstVideobalance; typedef struct _GstVideobalanceClass GstVideobalanceClass; -struct _GstVideobalance -{ +struct _GstVideobalance { GstVideofilter videofilter; - guint8 *tabley, **tableu, **tablev; + guint8 *tabley, **tableu, **tablev; gboolean needupdate; gdouble contrast; gdouble brightness; gdouble hue; gdouble saturation; - + GList *channels; }; -struct _GstVideobalanceClass -{ +struct _GstVideobalanceClass { GstVideofilterClass parent_class; }; -GType gst_videobalance_get_type (void); +GType gst_videobalance_get_type(void); G_END_DECLS + #endif /* __GST_VIDEOBALANCE_H__ */ diff --git a/gst/videofilter/gstvideofilter.h b/gst/videofilter/gstvideofilter.h index 2c10a2118..e6c346c09 100644 --- a/gst/videofilter/gstvideofilter.h +++ b/gst/videofilter/gstvideofilter.h @@ -25,17 +25,18 @@ #include <gst/gst.h> -G_BEGIN_DECLS typedef struct _GstVideofilter GstVideofilter; +G_BEGIN_DECLS + +typedef struct _GstVideofilter GstVideofilter; typedef struct _GstVideofilterClass GstVideofilterClass; -typedef void (*GstVideofilterFilterFunc) (GstVideofilter * filter, +typedef void (*GstVideofilterFilterFunc)(GstVideofilter *filter, void *out_data, void *in_data); -typedef void (*GstVideofilterSetupFunc) (GstVideofilter * filter); +typedef void (*GstVideofilterSetupFunc)(GstVideofilter *filter); typedef struct _GstVideofilterFormat GstVideofilterFormat; -struct _GstVideofilterFormat -{ +struct _GstVideofilterFormat { char *fourcc; int bpp; GstVideofilterFilterFunc filter_func; @@ -57,11 +58,10 @@ struct _GstVideofilterFormat #define GST_IS_VIDEOFILTER_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOFILTER)) -struct _GstVideofilter -{ +struct _GstVideofilter { GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; /* video state */ gboolean inited; @@ -81,29 +81,28 @@ struct _GstVideofilter GstBuffer *out_buf; }; -struct _GstVideofilterClass -{ +struct _GstVideofilterClass { GstElementClass parent_class; GPtrArray *formats; GstVideofilterSetupFunc setup; }; -GType gst_videofilter_get_type (void); +GType gst_videofilter_get_type(void); -int gst_videofilter_get_input_width (GstVideofilter * videofilter); -int gst_videofilter_get_input_height (GstVideofilter * videofilter); -void gst_videofilter_set_output_size (GstVideofilter * videofilter, +int gst_videofilter_get_input_width(GstVideofilter *videofilter); +int gst_videofilter_get_input_height(GstVideofilter *videofilter); +void gst_videofilter_set_output_size(GstVideofilter *videofilter, int width, int height); -GstVideofilterFormat *gst_videofilter_find_format_by_structure (GstVideofilter * - filter, const GstStructure * structure); -GstCaps *gst_videofilter_class_get_capslist (GstVideofilterClass * - videofilterclass); +GstVideofilterFormat *gst_videofilter_find_format_by_structure (GstVideofilter *filter, + const GstStructure *structure); +GstCaps *gst_videofilter_class_get_capslist(GstVideofilterClass *videofilterclass); -void gst_videofilter_class_add_format (GstVideofilterClass * videofilterclass, - GstVideofilterFormat * format); -void gst_videofilter_class_add_pad_templates (GstVideofilterClass * - videofilterclass); +void gst_videofilter_class_add_format(GstVideofilterClass *videofilterclass, + GstVideofilterFormat *format); +void gst_videofilter_class_add_pad_templates (GstVideofilterClass *videofilterclass); G_END_DECLS + #endif /* __GST_VIDEOFILTER_H__ */ + diff --git a/gst/videofilter/gstvideoflip.h b/gst/videofilter/gstvideoflip.h index a43d2b4ce..83b377186 100644 --- a/gst/videofilter/gstvideoflip.h +++ b/gst/videofilter/gstvideoflip.h @@ -27,8 +27,9 @@ #include "gstvideofilter.h" -G_BEGIN_DECLS typedef enum -{ +G_BEGIN_DECLS + +typedef enum { GST_VIDEOFLIP_METHOD_IDENTITY, GST_VIDEOFLIP_METHOD_90R, GST_VIDEOFLIP_METHOD_180, @@ -53,19 +54,19 @@ G_BEGIN_DECLS typedef enum typedef struct _GstVideoflip GstVideoflip; typedef struct _GstVideoflipClass GstVideoflipClass; -struct _GstVideoflip -{ +struct _GstVideoflip { GstVideofilter videofilter; GstVideoflipMethod method; }; -struct _GstVideoflipClass -{ +struct _GstVideoflipClass { GstVideofilterClass parent_class; }; -GType gst_videoflip_get_type (void); +GType gst_videoflip_get_type(void); G_END_DECLS + #endif /* __GST_VIDEOFLIP_H__ */ + diff --git a/gst/videoflip/gstvideoflip.h b/gst/videoflip/gstvideoflip.h index 4d28ac669..b14b0bd3a 100644 --- a/gst/videoflip/gstvideoflip.h +++ b/gst/videoflip/gstvideoflip.h @@ -25,8 +25,9 @@ #include <gst/gst.h> -G_BEGIN_DECLS typedef enum -{ +G_BEGIN_DECLS + +typedef enum { GST_VIDEOFLIP_METHOD_IDENTITY, GST_VIDEOFLIP_METHOD_90R, GST_VIDEOFLIP_METHOD_180, @@ -52,11 +53,10 @@ G_BEGIN_DECLS typedef enum typedef struct _GstVideoflip GstVideoflip; typedef struct _GstVideoflipClass GstVideoflipClass; -struct _GstVideoflip -{ +struct _GstVideoflip { GstElement element; - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; gboolean force_size; gint forced_width; @@ -78,16 +78,16 @@ struct _GstVideoflip gint to_buf_size; }; -struct _GstVideoflipClass -{ +struct _GstVideoflipClass { GstElementClass parent_class; }; -GType gst_videoflip_get_type (void); - -void gst_videoflip_setup (GstVideoflip *); +GType gst_videoflip_get_type(void); +void gst_videoflip_setup(GstVideoflip *); #define gst_videoflip_scale(scale, src, dest) (scale)->scale_cc((scale), (src), (dest)) G_END_DECLS + #endif /* __GST_VIDEOFLIP_H__ */ + diff --git a/gst/videoflip/videoflip.h b/gst/videoflip/videoflip.h index a6bd5fb7e..e912fe986 100644 --- a/gst/videoflip/videoflip.h +++ b/gst/videoflip/videoflip.h @@ -23,24 +23,24 @@ #include "gstvideoflip.h" -struct videoflip_format_struct -{ - char *fourcc; - int depth; - void (*scale) (GstVideoflip *, unsigned char *dest, unsigned char *src); - int bpp; - unsigned int endianness; - unsigned int red_mask; - unsigned int green_mask; - unsigned int blue_mask; +struct videoflip_format_struct { + char *fourcc; + int depth; + void (*scale)(GstVideoflip *,unsigned char *dest, unsigned char *src); + int bpp; + unsigned int endianness; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; }; extern struct videoflip_format_struct videoflip_formats[]; extern int videoflip_n_formats; -GstStructure *videoflip_get_cap (struct videoflip_format_struct *format); +GstStructure *videoflip_get_cap(struct videoflip_format_struct *format); -struct videoflip_format_struct *videoflip_find_by_caps (const GstCaps * caps); +struct videoflip_format_struct *videoflip_find_by_caps(const GstCaps *caps); #endif + diff --git a/gst/wavenc/gstwavenc.h b/gst/wavenc/gstwavenc.h index 7711a25df..8810001a6 100644 --- a/gst/wavenc/gstwavenc.h +++ b/gst/wavenc/gstwavenc.h @@ -25,6 +25,7 @@ #include <gst/gst.h> G_BEGIN_DECLS + #define GST_TYPE_WAVENC \ (gst_wavenc_get_type()) #define GST_WAVENC(obj) \ @@ -35,17 +36,17 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WAVENC)) #define GST_IS_WAVENC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVENC)) + typedef struct _GstWavEnc GstWavEnc; typedef struct _GstWavEncClass GstWavEncClass; #define WAV_HEADER_LEN 44 -struct _GstWavEnc -{ +struct _GstWavEnc { GstElement element; /* pads */ - GstPad *sinkpad, *srcpad; + GstPad *sinkpad,*srcpad; /* useful audio data */ guint bits; @@ -53,15 +54,15 @@ struct _GstWavEnc guint channels; guint width; guint32 length; - + gboolean setup, flush_header, pad_eos; guchar header[WAV_HEADER_LEN]; }; -struct _GstWavEncClass -{ +struct _GstWavEncClass { GstElementClass parent_class; }; G_END_DECLS + #endif /* __GST_ENC_H__ */ diff --git a/gst/wavenc/riff.h b/gst/wavenc/riff.h index bf18a1fe2..141ed1fad 100644 --- a/gst/wavenc/riff.h +++ b/gst/wavenc/riff.h @@ -24,12 +24,11 @@ #include <gst/gst.h> -typedef enum -{ - GST_RIFF_OK = 0, +typedef enum { + GST_RIFF_OK = 0, GST_RIFF_ENOTRIFF = -1, - GST_RIFF_EINVAL = -2, - GST_RIFF_ENOMEM = -3 + GST_RIFF_EINVAL = -2, + GST_RIFF_ENOMEM = -3 } GstRiffReturn; #define MAKE_FOUR_CC(a,b,c,d) GST_MAKE_FOURCC(a,b,c,d) @@ -82,29 +81,29 @@ typedef enum #define GST_RIFF_FCCH_MSVC MAKE_FOUR_CC('M','S','V','C') /* INFO types - see http://www.saettler.com/RIFFMCI/riffmci.html */ -#define GST_RIFF_INFO_IARL MAKE_FOUR_CC('I','A','R','L') /* location */ -#define GST_RIFF_INFO_IART MAKE_FOUR_CC('I','A','R','T') /* artist */ -#define GST_RIFF_INFO_ICMS MAKE_FOUR_CC('I','C','M','S') /* commissioned */ -#define GST_RIFF_INFO_ICMT MAKE_FOUR_CC('I','C','M','T') /* comment */ -#define GST_RIFF_INFO_ICOP MAKE_FOUR_CC('I','C','O','P') /* copyright */ -#define GST_RIFF_INFO_ICRD MAKE_FOUR_CC('I','C','R','D') /* creation date */ -#define GST_RIFF_INFO_ICRP MAKE_FOUR_CC('I','C','R','P') /* cropped */ -#define GST_RIFF_INFO_IDIM MAKE_FOUR_CC('I','D','I','M') /* dimensions */ -#define GST_RIFF_INFO_IDPI MAKE_FOUR_CC('I','D','P','I') /* dots-per-inch */ -#define GST_RIFF_INFO_IENG MAKE_FOUR_CC('I','E','N','G') /* engineer(s) */ -#define GST_RIFF_INFO_IGNR MAKE_FOUR_CC('I','G','N','R') /* genre */ -#define GST_RIFF_INFO_IKEY MAKE_FOUR_CC('I','K','E','Y') /* keywords */ -#define GST_RIFF_INFO_ILGT MAKE_FOUR_CC('I','L','G','T') /* lightness */ -#define GST_RIFF_INFO_IMED MAKE_FOUR_CC('I','M','E','D') /* medium */ -#define GST_RIFF_INFO_INAM MAKE_FOUR_CC('I','N','A','M') /* name */ -#define GST_RIFF_INFO_IPLT MAKE_FOUR_CC('I','P','L','T') /* palette setting */ -#define GST_RIFF_INFO_IPRD MAKE_FOUR_CC('I','P','R','D') /* product */ -#define GST_RIFF_INFO_ISBJ MAKE_FOUR_CC('I','S','B','J') /* subject */ -#define GST_RIFF_INFO_ISFT MAKE_FOUR_CC('I','S','F','T') /* software */ -#define GST_RIFF_INFO_ISHP MAKE_FOUR_CC('I','S','H','P') /* sharpness */ -#define GST_RIFF_INFO_ISRC MAKE_FOUR_CC('I','S','R','C') /* source */ -#define GST_RIFF_INFO_ISRF MAKE_FOUR_CC('I','S','R','F') /* source form */ -#define GST_RIFF_INFO_ITCH MAKE_FOUR_CC('I','T','C','H') /* technician(s) */ +#define GST_RIFF_INFO_IARL MAKE_FOUR_CC('I','A','R','L') /* location */ +#define GST_RIFF_INFO_IART MAKE_FOUR_CC('I','A','R','T') /* artist */ +#define GST_RIFF_INFO_ICMS MAKE_FOUR_CC('I','C','M','S') /* commissioned */ +#define GST_RIFF_INFO_ICMT MAKE_FOUR_CC('I','C','M','T') /* comment */ +#define GST_RIFF_INFO_ICOP MAKE_FOUR_CC('I','C','O','P') /* copyright */ +#define GST_RIFF_INFO_ICRD MAKE_FOUR_CC('I','C','R','D') /* creation date */ +#define GST_RIFF_INFO_ICRP MAKE_FOUR_CC('I','C','R','P') /* cropped */ +#define GST_RIFF_INFO_IDIM MAKE_FOUR_CC('I','D','I','M') /* dimensions */ +#define GST_RIFF_INFO_IDPI MAKE_FOUR_CC('I','D','P','I') /* dots-per-inch */ +#define GST_RIFF_INFO_IENG MAKE_FOUR_CC('I','E','N','G') /* engineer(s) */ +#define GST_RIFF_INFO_IGNR MAKE_FOUR_CC('I','G','N','R') /* genre */ +#define GST_RIFF_INFO_IKEY MAKE_FOUR_CC('I','K','E','Y') /* keywords */ +#define GST_RIFF_INFO_ILGT MAKE_FOUR_CC('I','L','G','T') /* lightness */ +#define GST_RIFF_INFO_IMED MAKE_FOUR_CC('I','M','E','D') /* medium */ +#define GST_RIFF_INFO_INAM MAKE_FOUR_CC('I','N','A','M') /* name */ +#define GST_RIFF_INFO_IPLT MAKE_FOUR_CC('I','P','L','T') /* palette setting */ +#define GST_RIFF_INFO_IPRD MAKE_FOUR_CC('I','P','R','D') /* product */ +#define GST_RIFF_INFO_ISBJ MAKE_FOUR_CC('I','S','B','J') /* subject */ +#define GST_RIFF_INFO_ISFT MAKE_FOUR_CC('I','S','F','T') /* software */ +#define GST_RIFF_INFO_ISHP MAKE_FOUR_CC('I','S','H','P') /* sharpness */ +#define GST_RIFF_INFO_ISRC MAKE_FOUR_CC('I','S','R','C') /* source */ +#define GST_RIFF_INFO_ISRF MAKE_FOUR_CC('I','S','R','F') /* source form */ +#define GST_RIFF_INFO_ITCH MAKE_FOUR_CC('I','T','C','H') /* technician(s) */ /*********Chunk Names***************/ #define GST_RIFF_FF00 MAKE_FOUR_CC(0xFF,0xFF,0x00,0x00) @@ -183,7 +182,7 @@ typedef enum #define GST_RIFF_v422 MAKE_FOUR_CC( 'v', '4', '2', '2') #define GST_RIFF_V422 MAKE_FOUR_CC( 'V', '4', '2', '2') #define GST_RIFF_mvi1 MAKE_FOUR_CC( 'm', 'v', 'i', '1') -#define GST_RIFF_MPIX MAKE_FOUR_CC(0x04,0x00, 'i', '1') /* MotionPixels munged their id */ +#define GST_RIFF_MPIX MAKE_FOUR_CC(0x04,0x00, 'i', '1') /* MotionPixels munged their id */ #define GST_RIFF_AURA MAKE_FOUR_CC( 'A', 'U', 'R', 'A') #define GST_RIFF_DMB1 MAKE_FOUR_CC( 'D', 'M', 'B', '1') #define GST_RIFF_dmb1 MAKE_FOUR_CC( 'd', 'm', 'b', '1') @@ -219,7 +218,7 @@ typedef enum #define GST_RIFF_rpza MAKE_FOUR_CC( 'r', 'p', 'z', 'a') /* And this here's the mistakes that need to be supported */ -#define GST_RIFF_azpr MAKE_FOUR_CC( 'a', 'z', 'p', 'r') /* recognize Apple's rpza mangled? */ +#define GST_RIFF_azpr MAKE_FOUR_CC( 'a', 'z', 'p', 'r') /* recognize Apple's rpza mangled? */ /*********** FND in MJPG **********/ #define GST_RIFF_ISFT MAKE_FOUR_CC( 'I', 'S', 'F', 'T') @@ -232,22 +231,21 @@ typedef enum #define GST_RIFF_rec MAKE_FOUR_CC( 'r', 'e', 'c', ' ') /* common data structures */ -struct _gst_riff_avih -{ - guint32 us_frame; /* microsec per frame */ - guint32 max_bps; /* byte/s overall */ - guint32 pad_gran; /* pad_gran (???) */ +struct _gst_riff_avih { + guint32 us_frame; /* microsec per frame */ + guint32 max_bps; /* byte/s overall */ + guint32 pad_gran; /* pad_gran (???) */ guint32 flags; /* flags values */ -#define GST_RIFF_AVIH_HASINDEX 0x00000010 /* has idx1 chunk */ -#define GST_RIFF_AVIH_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */ -#define GST_RIFF_AVIH_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */ -#define GST_RIFF_AVIH_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */ -#define GST_RIFF_AVIH_COPYRIGHTED 0x00020000 /* contains copyrighted data */ - guint32 tot_frames; /* # of frames (all) */ - guint32 init_frames; /* initial frames (???) */ +#define GST_RIFF_AVIH_HASINDEX 0x00000010 /* has idx1 chunk */ +#define GST_RIFF_AVIH_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */ +#define GST_RIFF_AVIH_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */ +#define GST_RIFF_AVIH_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */ +#define GST_RIFF_AVIH_COPYRIGHTED 0x00020000 /* contains copyrighted data */ + guint32 tot_frames; /* # of frames (all) */ + guint32 init_frames; /* initial frames (???) */ guint32 streams; - guint32 bufsize; /* suggested buffer size */ + guint32 bufsize; /* suggested buffer size */ guint32 width; guint32 height; guint32 scale; @@ -256,28 +254,26 @@ struct _gst_riff_avih guint32 length; }; -struct _gst_riff_strh -{ - guint32 type; /* stream type */ - guint32 fcc_handler; /* fcc_handler */ +struct _gst_riff_strh { + guint32 type; /* stream type */ + guint32 fcc_handler; /* fcc_handler */ guint32 flags; /* flags values */ #define GST_RIFF_STRH_DISABLED 0x000000001 #define GST_RIFF_STRH_VIDEOPALCHANGES 0x000010000 guint32 priority; - guint32 init_frames; /* initial frames (???) */ + guint32 init_frames; /* initial frames (???) */ guint32 scale; guint32 rate; guint32 start; guint32 length; - guint32 bufsize; /* suggested buffer size */ + guint32 bufsize; /* suggested buffer size */ guint32 quality; guint32 samplesize; /* XXX 16 bytes ? */ }; -struct _gst_riff_strf_vids -{ /* == BitMapInfoHeader */ +struct _gst_riff_strf_vids { /* == BitMapInfoHeader */ guint32 size; guint32 width; guint32 height; @@ -287,14 +283,13 @@ struct _gst_riff_strf_vids guint32 image_size; guint32 xpels_meter; guint32 ypels_meter; - guint32 num_colors; /* used colors */ - guint32 imp_colors; /* important colors */ + guint32 num_colors; /* used colors */ + guint32 imp_colors; /* important colors */ /* may be more for some codecs */ }; -struct _gst_riff_strf_auds -{ /* == WaveHeader (?) */ +struct _gst_riff_strf_auds { /* == WaveHeader (?) */ guint16 format; /**** from public Microsoft RIFF docs ******/ #define GST_RIFF_WAVE_FORMAT_UNKNOWN (0x0000) @@ -333,8 +328,7 @@ struct _gst_riff_strf_auds guint16 size; }; -struct _gst_riff_strf_iavs -{ +struct _gst_riff_strf_iavs { guint32 DVAAuxSrc; guint32 DVAAuxCtl; guint32 DVAAuxSrc1; @@ -345,30 +339,26 @@ struct _gst_riff_strf_iavs guint32 DVReserved2; }; -struct _gst_riff_riff -{ +struct _gst_riff_riff { guint32 id; guint32 size; guint32 type; }; -struct _gst_riff_list -{ +struct _gst_riff_list { guint32 id; guint32 size; guint32 type; }; -struct _gst_riff_labl -{ +struct _gst_riff_labl { guint32 id; guint32 size; guint32 identifier; }; -struct _gst_riff_ltxt -{ +struct _gst_riff_ltxt { guint32 id; guint32 size; @@ -381,16 +371,14 @@ struct _gst_riff_ltxt guint16 codepage; }; -struct _gst_riff_note -{ +struct _gst_riff_note { guint32 id; guint32 size; guint32 identifier; }; -struct _gst_riff_cuepoints -{ +struct _gst_riff_cuepoints { guint32 identifier; guint32 position; guint32 id; @@ -399,22 +387,19 @@ struct _gst_riff_cuepoints guint32 offset; }; -struct _gst_riff_cue -{ +struct _gst_riff_cue { guint32 id; guint32 size; - guint32 cuepoints; /* Number of cue points held in the data */ + guint32 cuepoints; /* Number of cue points held in the data */ }; -struct _gst_riff_chunk -{ +struct _gst_riff_chunk { guint32 id; guint32 size; }; -struct _gst_riff_index_entry -{ +struct _gst_riff_index_entry { guint32 id; guint32 flags; #define GST_RIFF_IF_LIST (0x00000001L) @@ -425,31 +410,29 @@ struct _gst_riff_index_entry guint32 size; }; -struct _gst_riff_dmlh -{ +struct _gst_riff_dmlh { guint32 totalframes; }; -typedef struct _gst_riff_riff gst_riff_riff; -typedef struct _gst_riff_list gst_riff_list; -typedef struct _gst_riff_chunk gst_riff_chunk; -typedef struct _gst_riff_index_entry gst_riff_index_entry; - -typedef struct _gst_riff_avih gst_riff_avih; -typedef struct _gst_riff_strh gst_riff_strh; -typedef struct _gst_riff_strf_vids gst_riff_strf_vids; -typedef struct _gst_riff_strf_auds gst_riff_strf_auds; -typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; -typedef struct _gst_riff_dmlh gst_riff_dmlh; -typedef struct _GstRiffChunk GstRiffChunk; - -struct _GstRiffChunk -{ +typedef struct _gst_riff_riff gst_riff_riff; +typedef struct _gst_riff_list gst_riff_list; +typedef struct _gst_riff_chunk gst_riff_chunk; +typedef struct _gst_riff_index_entry gst_riff_index_entry; + +typedef struct _gst_riff_avih gst_riff_avih; +typedef struct _gst_riff_strh gst_riff_strh; +typedef struct _gst_riff_strf_vids gst_riff_strf_vids; +typedef struct _gst_riff_strf_auds gst_riff_strf_auds; +typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; +typedef struct _gst_riff_dmlh gst_riff_dmlh; +typedef struct _GstRiffChunk GstRiffChunk; + +struct _GstRiffChunk { gulong offset; guint32 id; guint32 size; - guint32 form; /* for list chunks */ + guint32 form; /* for list chunks */ gchar *data; }; diff --git a/gst/wavparse/gstwavparse.h b/gst/wavparse/gstwavparse.h index b8cdd2de8..3893a2934 100644 --- a/gst/wavparse/gstwavparse.h +++ b/gst/wavparse/gstwavparse.h @@ -27,9 +27,8 @@ #include <gst/bytestream/bytestream.h> #ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ +extern "C" { +#endif /* __cplusplus */ #define GST_TYPE_WAVPARSE \ @@ -45,62 +44,59 @@ extern "C" #define GST_WAVPARSE_UNKNOWN 0 /* initialized state */ -#define GST_WAVPARSE_START 1 /* At the start */ +#define GST_WAVPARSE_START 1 /* At the start */ #define GST_WAVPARSE_DATA 2 /* in data region */ #define GST_WAVPARSE_OTHER 3 /* in unknown region */ - - typedef struct _GstWavParse GstWavParse; - typedef struct _GstWavParseClass GstWavParseClass; - - struct _GstWavParse - { - GstElement element; - - GstByteStream *bs; - /* pads */ - GstPad *sinkpad, *srcpad; - - /* WAVE decoding state */ - gint state; - - /* format of audio, see defines below */ - gint format; - - /* useful audio data */ - gint bps; - gint rate; - gint channels; - gint width; - - int dataleft; - int byteoffset; - - gboolean seek_pending; - guint64 seek_offset; - - GstBuffer *buf; - }; - - struct _GstWavParseClass - { - GstElementClass parent_class; - }; - - GType gst_wavparse_get_type (void); - - typedef struct _GstWavParseFormat GstWavParseFormat; - - struct _GstWavParseFormat - { - gint16 wFormatTag; - guint16 wChannels; - guint32 dwSamplesPerSec; - guint32 dwAvgBytesPerSec; - guint16 wBlockAlign; - guint16 wBitsPerSample; - }; - - + +typedef struct _GstWavParse GstWavParse; +typedef struct _GstWavParseClass GstWavParseClass; + +struct _GstWavParse { + GstElement element; + + GstByteStream *bs; + /* pads */ + GstPad *sinkpad,*srcpad; + + /* WAVE decoding state */ + gint state; + + /* format of audio, see defines below */ + gint format; + + /* useful audio data */ + gint bps; + gint rate; + gint channels; + gint width; + + int dataleft; + int byteoffset; + + gboolean seek_pending; + guint64 seek_offset; + + GstBuffer *buf; +}; + +struct _GstWavParseClass { + GstElementClass parent_class; +}; + +GType gst_wavparse_get_type(void); + +typedef struct _GstWavParseFormat GstWavParseFormat; + +struct _GstWavParseFormat { + gint16 wFormatTag; + guint16 wChannels; + guint32 dwSamplesPerSec; + guint32 dwAvgBytesPerSec; + guint16 wBlockAlign; + guint16 wBitsPerSample; +}; + + /**** from public Microsoft RIFF docs ******/ #define GST_RIFF_WAVE_FORMAT_UNKNOWN (0x0000) #define GST_RIFF_WAVE_FORMAT_PCM (0x0001) @@ -133,7 +129,7 @@ extern "C" #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_WAVPARSE_H__ */ +#endif /* __GST_WAVPARSE_H__ */ diff --git a/gst/wavparse/riff.h b/gst/wavparse/riff.h index bf18a1fe2..141ed1fad 100644 --- a/gst/wavparse/riff.h +++ b/gst/wavparse/riff.h @@ -24,12 +24,11 @@ #include <gst/gst.h> -typedef enum -{ - GST_RIFF_OK = 0, +typedef enum { + GST_RIFF_OK = 0, GST_RIFF_ENOTRIFF = -1, - GST_RIFF_EINVAL = -2, - GST_RIFF_ENOMEM = -3 + GST_RIFF_EINVAL = -2, + GST_RIFF_ENOMEM = -3 } GstRiffReturn; #define MAKE_FOUR_CC(a,b,c,d) GST_MAKE_FOURCC(a,b,c,d) @@ -82,29 +81,29 @@ typedef enum #define GST_RIFF_FCCH_MSVC MAKE_FOUR_CC('M','S','V','C') /* INFO types - see http://www.saettler.com/RIFFMCI/riffmci.html */ -#define GST_RIFF_INFO_IARL MAKE_FOUR_CC('I','A','R','L') /* location */ -#define GST_RIFF_INFO_IART MAKE_FOUR_CC('I','A','R','T') /* artist */ -#define GST_RIFF_INFO_ICMS MAKE_FOUR_CC('I','C','M','S') /* commissioned */ -#define GST_RIFF_INFO_ICMT MAKE_FOUR_CC('I','C','M','T') /* comment */ -#define GST_RIFF_INFO_ICOP MAKE_FOUR_CC('I','C','O','P') /* copyright */ -#define GST_RIFF_INFO_ICRD MAKE_FOUR_CC('I','C','R','D') /* creation date */ -#define GST_RIFF_INFO_ICRP MAKE_FOUR_CC('I','C','R','P') /* cropped */ -#define GST_RIFF_INFO_IDIM MAKE_FOUR_CC('I','D','I','M') /* dimensions */ -#define GST_RIFF_INFO_IDPI MAKE_FOUR_CC('I','D','P','I') /* dots-per-inch */ -#define GST_RIFF_INFO_IENG MAKE_FOUR_CC('I','E','N','G') /* engineer(s) */ -#define GST_RIFF_INFO_IGNR MAKE_FOUR_CC('I','G','N','R') /* genre */ -#define GST_RIFF_INFO_IKEY MAKE_FOUR_CC('I','K','E','Y') /* keywords */ -#define GST_RIFF_INFO_ILGT MAKE_FOUR_CC('I','L','G','T') /* lightness */ -#define GST_RIFF_INFO_IMED MAKE_FOUR_CC('I','M','E','D') /* medium */ -#define GST_RIFF_INFO_INAM MAKE_FOUR_CC('I','N','A','M') /* name */ -#define GST_RIFF_INFO_IPLT MAKE_FOUR_CC('I','P','L','T') /* palette setting */ -#define GST_RIFF_INFO_IPRD MAKE_FOUR_CC('I','P','R','D') /* product */ -#define GST_RIFF_INFO_ISBJ MAKE_FOUR_CC('I','S','B','J') /* subject */ -#define GST_RIFF_INFO_ISFT MAKE_FOUR_CC('I','S','F','T') /* software */ -#define GST_RIFF_INFO_ISHP MAKE_FOUR_CC('I','S','H','P') /* sharpness */ -#define GST_RIFF_INFO_ISRC MAKE_FOUR_CC('I','S','R','C') /* source */ -#define GST_RIFF_INFO_ISRF MAKE_FOUR_CC('I','S','R','F') /* source form */ -#define GST_RIFF_INFO_ITCH MAKE_FOUR_CC('I','T','C','H') /* technician(s) */ +#define GST_RIFF_INFO_IARL MAKE_FOUR_CC('I','A','R','L') /* location */ +#define GST_RIFF_INFO_IART MAKE_FOUR_CC('I','A','R','T') /* artist */ +#define GST_RIFF_INFO_ICMS MAKE_FOUR_CC('I','C','M','S') /* commissioned */ +#define GST_RIFF_INFO_ICMT MAKE_FOUR_CC('I','C','M','T') /* comment */ +#define GST_RIFF_INFO_ICOP MAKE_FOUR_CC('I','C','O','P') /* copyright */ +#define GST_RIFF_INFO_ICRD MAKE_FOUR_CC('I','C','R','D') /* creation date */ +#define GST_RIFF_INFO_ICRP MAKE_FOUR_CC('I','C','R','P') /* cropped */ +#define GST_RIFF_INFO_IDIM MAKE_FOUR_CC('I','D','I','M') /* dimensions */ +#define GST_RIFF_INFO_IDPI MAKE_FOUR_CC('I','D','P','I') /* dots-per-inch */ +#define GST_RIFF_INFO_IENG MAKE_FOUR_CC('I','E','N','G') /* engineer(s) */ +#define GST_RIFF_INFO_IGNR MAKE_FOUR_CC('I','G','N','R') /* genre */ +#define GST_RIFF_INFO_IKEY MAKE_FOUR_CC('I','K','E','Y') /* keywords */ +#define GST_RIFF_INFO_ILGT MAKE_FOUR_CC('I','L','G','T') /* lightness */ +#define GST_RIFF_INFO_IMED MAKE_FOUR_CC('I','M','E','D') /* medium */ +#define GST_RIFF_INFO_INAM MAKE_FOUR_CC('I','N','A','M') /* name */ +#define GST_RIFF_INFO_IPLT MAKE_FOUR_CC('I','P','L','T') /* palette setting */ +#define GST_RIFF_INFO_IPRD MAKE_FOUR_CC('I','P','R','D') /* product */ +#define GST_RIFF_INFO_ISBJ MAKE_FOUR_CC('I','S','B','J') /* subject */ +#define GST_RIFF_INFO_ISFT MAKE_FOUR_CC('I','S','F','T') /* software */ +#define GST_RIFF_INFO_ISHP MAKE_FOUR_CC('I','S','H','P') /* sharpness */ +#define GST_RIFF_INFO_ISRC MAKE_FOUR_CC('I','S','R','C') /* source */ +#define GST_RIFF_INFO_ISRF MAKE_FOUR_CC('I','S','R','F') /* source form */ +#define GST_RIFF_INFO_ITCH MAKE_FOUR_CC('I','T','C','H') /* technician(s) */ /*********Chunk Names***************/ #define GST_RIFF_FF00 MAKE_FOUR_CC(0xFF,0xFF,0x00,0x00) @@ -183,7 +182,7 @@ typedef enum #define GST_RIFF_v422 MAKE_FOUR_CC( 'v', '4', '2', '2') #define GST_RIFF_V422 MAKE_FOUR_CC( 'V', '4', '2', '2') #define GST_RIFF_mvi1 MAKE_FOUR_CC( 'm', 'v', 'i', '1') -#define GST_RIFF_MPIX MAKE_FOUR_CC(0x04,0x00, 'i', '1') /* MotionPixels munged their id */ +#define GST_RIFF_MPIX MAKE_FOUR_CC(0x04,0x00, 'i', '1') /* MotionPixels munged their id */ #define GST_RIFF_AURA MAKE_FOUR_CC( 'A', 'U', 'R', 'A') #define GST_RIFF_DMB1 MAKE_FOUR_CC( 'D', 'M', 'B', '1') #define GST_RIFF_dmb1 MAKE_FOUR_CC( 'd', 'm', 'b', '1') @@ -219,7 +218,7 @@ typedef enum #define GST_RIFF_rpza MAKE_FOUR_CC( 'r', 'p', 'z', 'a') /* And this here's the mistakes that need to be supported */ -#define GST_RIFF_azpr MAKE_FOUR_CC( 'a', 'z', 'p', 'r') /* recognize Apple's rpza mangled? */ +#define GST_RIFF_azpr MAKE_FOUR_CC( 'a', 'z', 'p', 'r') /* recognize Apple's rpza mangled? */ /*********** FND in MJPG **********/ #define GST_RIFF_ISFT MAKE_FOUR_CC( 'I', 'S', 'F', 'T') @@ -232,22 +231,21 @@ typedef enum #define GST_RIFF_rec MAKE_FOUR_CC( 'r', 'e', 'c', ' ') /* common data structures */ -struct _gst_riff_avih -{ - guint32 us_frame; /* microsec per frame */ - guint32 max_bps; /* byte/s overall */ - guint32 pad_gran; /* pad_gran (???) */ +struct _gst_riff_avih { + guint32 us_frame; /* microsec per frame */ + guint32 max_bps; /* byte/s overall */ + guint32 pad_gran; /* pad_gran (???) */ guint32 flags; /* flags values */ -#define GST_RIFF_AVIH_HASINDEX 0x00000010 /* has idx1 chunk */ -#define GST_RIFF_AVIH_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */ -#define GST_RIFF_AVIH_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */ -#define GST_RIFF_AVIH_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */ -#define GST_RIFF_AVIH_COPYRIGHTED 0x00020000 /* contains copyrighted data */ - guint32 tot_frames; /* # of frames (all) */ - guint32 init_frames; /* initial frames (???) */ +#define GST_RIFF_AVIH_HASINDEX 0x00000010 /* has idx1 chunk */ +#define GST_RIFF_AVIH_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */ +#define GST_RIFF_AVIH_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */ +#define GST_RIFF_AVIH_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */ +#define GST_RIFF_AVIH_COPYRIGHTED 0x00020000 /* contains copyrighted data */ + guint32 tot_frames; /* # of frames (all) */ + guint32 init_frames; /* initial frames (???) */ guint32 streams; - guint32 bufsize; /* suggested buffer size */ + guint32 bufsize; /* suggested buffer size */ guint32 width; guint32 height; guint32 scale; @@ -256,28 +254,26 @@ struct _gst_riff_avih guint32 length; }; -struct _gst_riff_strh -{ - guint32 type; /* stream type */ - guint32 fcc_handler; /* fcc_handler */ +struct _gst_riff_strh { + guint32 type; /* stream type */ + guint32 fcc_handler; /* fcc_handler */ guint32 flags; /* flags values */ #define GST_RIFF_STRH_DISABLED 0x000000001 #define GST_RIFF_STRH_VIDEOPALCHANGES 0x000010000 guint32 priority; - guint32 init_frames; /* initial frames (???) */ + guint32 init_frames; /* initial frames (???) */ guint32 scale; guint32 rate; guint32 start; guint32 length; - guint32 bufsize; /* suggested buffer size */ + guint32 bufsize; /* suggested buffer size */ guint32 quality; guint32 samplesize; /* XXX 16 bytes ? */ }; -struct _gst_riff_strf_vids -{ /* == BitMapInfoHeader */ +struct _gst_riff_strf_vids { /* == BitMapInfoHeader */ guint32 size; guint32 width; guint32 height; @@ -287,14 +283,13 @@ struct _gst_riff_strf_vids guint32 image_size; guint32 xpels_meter; guint32 ypels_meter; - guint32 num_colors; /* used colors */ - guint32 imp_colors; /* important colors */ + guint32 num_colors; /* used colors */ + guint32 imp_colors; /* important colors */ /* may be more for some codecs */ }; -struct _gst_riff_strf_auds -{ /* == WaveHeader (?) */ +struct _gst_riff_strf_auds { /* == WaveHeader (?) */ guint16 format; /**** from public Microsoft RIFF docs ******/ #define GST_RIFF_WAVE_FORMAT_UNKNOWN (0x0000) @@ -333,8 +328,7 @@ struct _gst_riff_strf_auds guint16 size; }; -struct _gst_riff_strf_iavs -{ +struct _gst_riff_strf_iavs { guint32 DVAAuxSrc; guint32 DVAAuxCtl; guint32 DVAAuxSrc1; @@ -345,30 +339,26 @@ struct _gst_riff_strf_iavs guint32 DVReserved2; }; -struct _gst_riff_riff -{ +struct _gst_riff_riff { guint32 id; guint32 size; guint32 type; }; -struct _gst_riff_list -{ +struct _gst_riff_list { guint32 id; guint32 size; guint32 type; }; -struct _gst_riff_labl -{ +struct _gst_riff_labl { guint32 id; guint32 size; guint32 identifier; }; -struct _gst_riff_ltxt -{ +struct _gst_riff_ltxt { guint32 id; guint32 size; @@ -381,16 +371,14 @@ struct _gst_riff_ltxt guint16 codepage; }; -struct _gst_riff_note -{ +struct _gst_riff_note { guint32 id; guint32 size; guint32 identifier; }; -struct _gst_riff_cuepoints -{ +struct _gst_riff_cuepoints { guint32 identifier; guint32 position; guint32 id; @@ -399,22 +387,19 @@ struct _gst_riff_cuepoints guint32 offset; }; -struct _gst_riff_cue -{ +struct _gst_riff_cue { guint32 id; guint32 size; - guint32 cuepoints; /* Number of cue points held in the data */ + guint32 cuepoints; /* Number of cue points held in the data */ }; -struct _gst_riff_chunk -{ +struct _gst_riff_chunk { guint32 id; guint32 size; }; -struct _gst_riff_index_entry -{ +struct _gst_riff_index_entry { guint32 id; guint32 flags; #define GST_RIFF_IF_LIST (0x00000001L) @@ -425,31 +410,29 @@ struct _gst_riff_index_entry guint32 size; }; -struct _gst_riff_dmlh -{ +struct _gst_riff_dmlh { guint32 totalframes; }; -typedef struct _gst_riff_riff gst_riff_riff; -typedef struct _gst_riff_list gst_riff_list; -typedef struct _gst_riff_chunk gst_riff_chunk; -typedef struct _gst_riff_index_entry gst_riff_index_entry; - -typedef struct _gst_riff_avih gst_riff_avih; -typedef struct _gst_riff_strh gst_riff_strh; -typedef struct _gst_riff_strf_vids gst_riff_strf_vids; -typedef struct _gst_riff_strf_auds gst_riff_strf_auds; -typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; -typedef struct _gst_riff_dmlh gst_riff_dmlh; -typedef struct _GstRiffChunk GstRiffChunk; - -struct _GstRiffChunk -{ +typedef struct _gst_riff_riff gst_riff_riff; +typedef struct _gst_riff_list gst_riff_list; +typedef struct _gst_riff_chunk gst_riff_chunk; +typedef struct _gst_riff_index_entry gst_riff_index_entry; + +typedef struct _gst_riff_avih gst_riff_avih; +typedef struct _gst_riff_strh gst_riff_strh; +typedef struct _gst_riff_strf_vids gst_riff_strf_vids; +typedef struct _gst_riff_strf_auds gst_riff_strf_auds; +typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; +typedef struct _gst_riff_dmlh gst_riff_dmlh; +typedef struct _GstRiffChunk GstRiffChunk; + +struct _GstRiffChunk { gulong offset; guint32 id; guint32 size; - guint32 form; /* for list chunks */ + guint32 form; /* for list chunks */ gchar *data; }; diff --git a/sys/oss/gstosselement.h b/sys/oss/gstosselement.h index 1b73ec494..3ce84a2cc 100644 --- a/sys/oss/gstosselement.h +++ b/sys/oss/gstosselement.h @@ -30,6 +30,7 @@ GST_DEBUG_CATEGORY_EXTERN (oss_debug); #define GST_CAT_DEFAULT oss_debug G_BEGIN_DECLS + #define GST_TYPE_OSSELEMENT \ (gst_osselement_get_type()) #define GST_OSSELEMENT(obj) \ @@ -42,17 +43,16 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSSELEMENT)) #define GST_OSSELEMENT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OSSELEMENT, GstOssElementClass)) + typedef struct _GstOssElement GstOssElement; typedef struct _GstOssElementClass GstOssElementClass; -typedef enum -{ +typedef enum { GST_OSSELEMENT_READ, GST_OSSELEMENT_WRITE, } GstOssOpenMode; -typedef struct _GstOssDeviceCombination -{ +typedef struct _GstOssDeviceCombination { gchar *dsp, *mixer; dev_t dev; } GstOssDeviceCombination; @@ -60,57 +60,65 @@ typedef struct _GstOssDeviceCombination struct _GstOssElement { /* yes, we're a gstelement too */ - GstElement parent; + GstElement parent; - gchar *device, *mixer_dev; + gchar *device, + *mixer_dev; /* device state */ - int fd; - int caps; /* the capabilities */ - gint format; - gint fragment; - guint64 fragment_time; - gint fragment_size; + int fd; + int caps; /* the capabilities */ + gint format; + gint fragment; + guint64 fragment_time; + gint fragment_size; GstOssOpenMode mode; /* stats bytes per *second* */ - guint bps; + guint bps; /* parameters */ - gint law; - gint endianness; - gboolean sign; - gint width; - gint depth; - gint channels; - gint rate; + gint law; + gint endianness; + gboolean sign; + gint width; + gint depth; + gint channels; + gint rate; /* mixer stuff */ - GList *tracklist; - guint32 stereomask, recdevs, recmask, mixcaps; - gint mixer_fd; - gchar *device_name; + GList *tracklist; + guint32 stereomask, + recdevs, + recmask, + mixcaps; + gint mixer_fd; + gchar *device_name; }; -struct _GstOssElementClass -{ +struct _GstOssElementClass { GstElementClass klass; - GList *device_combinations; + GList *device_combinations; }; -GType gst_osselement_get_type (void); +GType gst_osselement_get_type (void); /* some useful functions */ -gboolean gst_osselement_parse_caps (GstOssElement * oss, const GstCaps * caps); -gboolean gst_osselement_merge_fixed_caps (GstOssElement * oss, GstCaps * caps); - -gboolean gst_osselement_sync_parms (GstOssElement * oss); -void gst_osselement_reset (GstOssElement * oss); - -gboolean gst_osselement_convert (GstOssElement * oss, - GstFormat src_format, - gint64 src_value, GstFormat * dest_format, gint64 * dest_value); +gboolean gst_osselement_parse_caps (GstOssElement *oss, + const GstCaps *caps); +gboolean gst_osselement_merge_fixed_caps (GstOssElement *oss, + GstCaps *caps); + +gboolean gst_osselement_sync_parms (GstOssElement *oss); +void gst_osselement_reset (GstOssElement *oss); + +gboolean gst_osselement_convert (GstOssElement *oss, + GstFormat src_format, + gint64 src_value, + GstFormat *dest_format, + gint64 *dest_value); G_END_DECLS + #endif /* __GST_OSS_ELEMENT_H__ */ diff --git a/sys/oss/gstossmixer.h b/sys/oss/gstossmixer.h index 100d6afde..dd2fb4fcb 100644 --- a/sys/oss/gstossmixer.h +++ b/sys/oss/gstossmixer.h @@ -27,6 +27,7 @@ #include "gstosselement.h" G_BEGIN_DECLS + #define GST_TYPE_OSSMIXER_TRACK \ (gst_ossmixer_track_get_type ()) #define GST_OSSMIXER_TRACK(obj) \ @@ -39,25 +40,25 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OSSMIXER_TRACK)) #define GST_IS_OSSMIXER_TRACK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OSSMIXER_TRACK)) - typedef struct _GstOssMixerTrack -{ + +typedef struct _GstOssMixerTrack { GstMixerTrack parent; - gint lvol, rvol; - gint track_num; + gint lvol, rvol; + gint track_num; } GstOssMixerTrack; -typedef struct _GstOssMixerTrackClass -{ +typedef struct _GstOssMixerTrackClass { GstMixerTrackClass parent; } GstOssMixerTrackClass; -GType gst_ossmixer_track_get_type (void); +GType gst_ossmixer_track_get_type (void); -void gst_ossmixer_interface_init (GstMixerClass * klass); -void gst_oss_interface_init (GstImplementsInterfaceClass * klass); -void gst_ossmixer_build_list (GstOssElement * oss); -void gst_ossmixer_free_list (GstOssElement * oss); +void gst_ossmixer_interface_init (GstMixerClass *klass); +void gst_oss_interface_init (GstImplementsInterfaceClass *klass); +void gst_ossmixer_build_list (GstOssElement *oss); +void gst_ossmixer_free_list (GstOssElement *oss); G_END_DECLS + #endif /* __GST_OSS_MIXER_H__ */ diff --git a/sys/oss/gstosssink.h b/sys/oss/gstosssink.h index e633ac528..f484007b2 100644 --- a/sys/oss/gstosssink.h +++ b/sys/oss/gstosssink.h @@ -31,6 +31,7 @@ #include <gst/audio/audioclock.h> G_BEGIN_DECLS + #define GST_TYPE_OSSSINK \ (gst_osssink_get_type()) #define GST_OSSSINK(obj) \ @@ -41,42 +42,41 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSSSINK)) #define GST_IS_OSSSINK_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSSSINK)) - typedef enum -{ - GST_OSSSINK_OPEN = GST_ELEMENT_FLAG_LAST, - GST_OSSSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, +typedef enum { + GST_OSSSINK_OPEN = GST_ELEMENT_FLAG_LAST, + + GST_OSSSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2, } GstOssSinkFlags; typedef struct _GstOssSink GstOssSink; typedef struct _GstOssSinkClass GstOssSinkClass; -struct _GstOssSink -{ - GstOssElement element; +struct _GstOssSink { + GstOssElement element; - GstPad *sinkpad; + GstPad *sinkpad; - GstClock *provided_clock; - GstClock *clock; - gboolean resync; - gboolean sync; - guint64 handled; + GstClock *provided_clock; + GstClock *clock; + gboolean resync; + gboolean sync; + guint64 handled; - gboolean mute; - guint bufsize; - guint chunk_size; + gboolean mute; + guint bufsize; + guint chunk_size; }; -struct _GstOssSinkClass -{ +struct _GstOssSinkClass { GstOssElementClass parent_class; /* signals */ - void (*handoff) (GstElement * element, GstPad * pad); + void (*handoff) (GstElement *element,GstPad *pad); }; -GType gst_osssink_get_type (void); +GType gst_osssink_get_type(void); G_END_DECLS + #endif /* __GST_OSSSINK_H__ */ diff --git a/sys/oss/gstosssrc.h b/sys/oss/gstosssrc.h index e74db7481..2bc6204fd 100644 --- a/sys/oss/gstosssrc.h +++ b/sys/oss/gstosssrc.h @@ -29,6 +29,7 @@ #include "gstosselement.h" G_BEGIN_DECLS + #define GST_TYPE_OSSSRC \ (gst_osssrc_get_type()) #define GST_OSSSRC(obj) \ @@ -39,39 +40,38 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSSSRC)) #define GST_IS_OSSSRC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSSSRC)) - typedef enum -{ - GST_OSSSRC_OPEN = GST_ELEMENT_FLAG_LAST, - GST_OSSSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2, +typedef enum { + GST_OSSSRC_OPEN = GST_ELEMENT_FLAG_LAST, + + GST_OSSSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2, } GstOssSrcFlags; typedef struct _GstOssSrc GstOssSrc; typedef struct _GstOssSrcClass GstOssSrcClass; -struct _GstOssSrc -{ - GstOssElement element; +struct _GstOssSrc { + GstOssElement element; /* pads */ - GstPad *srcpad; - - gboolean need_eos; /* Do we need to emit an EOS? */ + GstPad *srcpad; + gboolean need_eos; /* Do we need to emit an EOS? */ + /* blocking */ - gulong curoffset; - gulong buffersize; + gulong curoffset; + gulong buffersize; /* clocks */ GstClock *provided_clock, *clock; }; -struct _GstOssSrcClass -{ +struct _GstOssSrcClass { GstOssElementClass parent_class; }; -GType gst_osssrc_get_type (void); +GType gst_osssrc_get_type(void); G_END_DECLS + #endif /* __GST_OSSSRC_H__ */ diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h index f0de44ced..4003203b6 100644 --- a/sys/v4l2/gstv4l2colorbalance.h +++ b/sys/v4l2/gstv4l2colorbalance.h @@ -27,6 +27,7 @@ #include "v4l2_calls.h" G_BEGIN_DECLS + #define GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL \ (gst_v4l2_color_balance_channel_get_type ()) #define GST_V4L2_COLOR_BALANCE_CHANNEL(obj) \ @@ -39,20 +40,19 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL)) #define GST_IS_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL)) - typedef struct _GstV4l2ColorBalanceChannel -{ + +typedef struct _GstV4l2ColorBalanceChannel { GstColorBalanceChannel parent; guint32 index; } GstV4l2ColorBalanceChannel; -typedef struct _GstV4l2ColorBalanceChannelClass -{ +typedef struct _GstV4l2ColorBalanceChannelClass { GstColorBalanceChannelClass parent; } GstV4l2ColorBalanceChannelClass; -GType gst_v4l2_color_balance_channel_get_type (void); +GType gst_v4l2_color_balance_channel_get_type (void); -void gst_v4l2_color_balance_interface_init (GstColorBalanceClass * klass); +void gst_v4l2_color_balance_interface_init (GstColorBalanceClass *klass); #endif /* __GST_V4L2_COLOR_BALANCE_H__ */ diff --git a/sys/v4l2/gstv4l2element.h b/sys/v4l2/gstv4l2element.h index 7dcd68463..e46b24402 100644 --- a/sys/v4l2/gstv4l2element.h +++ b/sys/v4l2/gstv4l2element.h @@ -55,53 +55,53 @@ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass)) -typedef struct _GstV4l2Element GstV4l2Element; -typedef struct _GstV4l2ElementClass GstV4l2ElementClass; +typedef struct _GstV4l2Element GstV4l2Element; +typedef struct _GstV4l2ElementClass GstV4l2ElementClass; -struct _GstV4l2Element -{ - GstElement element; +struct _GstV4l2Element { + GstElement element; - /* the video device */ - char *device; + /* the video device */ + char *device; - /* the video-device's file descriptor */ - gint video_fd; + /* the video-device's file descriptor */ + gint video_fd; - /* the video buffer (mmap()'ed) */ - guint8 **buffer; + /* the video buffer (mmap()'ed) */ + guint8 **buffer; - /* the video-device's capabilities */ - struct v4l2_capability vcap; + /* the video-device's capabilities */ + struct v4l2_capability vcap; - /* the toys available to us */ - GList *channels; - GList *norms; - GList *colors; + /* the toys available to us */ + GList *channels; + GList *norms; + GList *colors; - /* X-overlay */ - GstXWindowListener *overlay; - XID xwindow_id; + /* X-overlay */ + GstXWindowListener *overlay; + XID xwindow_id; - /* properties */ - gchar *norm; - gchar *channel; - gulong frequency; + /* properties */ + gchar *norm; + gchar *channel; + gulong frequency; - /* caching values */ - gchar *display; + /* caching values */ + gchar *display; }; -struct _GstV4l2ElementClass -{ - GstElementClass parent_class; +struct _GstV4l2ElementClass { + GstElementClass parent_class; - /* probed devices */ - GList *devices; + /* probed devices */ + GList *devices; - /* signals */ - void (*open) (GstElement * element, const gchar * device); - void (*close) (GstElement * element, const gchar * device); + /* signals */ + void (*open) (GstElement *element, + const gchar *device); + void (*close) (GstElement *element, + const gchar *device); }; diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h index d68f9cf8c..ca528d1eb 100644 --- a/sys/v4l2/gstv4l2src.h +++ b/sys/v4l2/gstv4l2src.h @@ -38,75 +38,72 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug); #define GST_IS_V4L2SRC_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC)) -typedef struct _GstV4l2BufferPool GstV4l2BufferPool; -typedef struct _GstV4l2Buffer GstV4l2Buffer; -typedef struct _GstV4l2Src GstV4l2Src; -typedef struct _GstV4l2SrcClass GstV4l2SrcClass; +typedef struct _GstV4l2BufferPool GstV4l2BufferPool; +typedef struct _GstV4l2Buffer GstV4l2Buffer; +typedef struct _GstV4l2Src GstV4l2Src; +typedef struct _GstV4l2SrcClass GstV4l2SrcClass; /* global info */ -struct _GstV4l2BufferPool -{ - GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */ - gint video_fd; - guint buffer_count; - GstV4l2Buffer *buffers; +struct _GstV4l2BufferPool { + GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */ + gint video_fd; + guint buffer_count; + GstV4l2Buffer * buffers; }; -struct _GstV4l2Buffer -{ - struct v4l2_buffer buffer; - guint8 *start; - guint length; - GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */ - GstV4l2BufferPool *pool; +struct _GstV4l2Buffer { + struct v4l2_buffer buffer; + guint8 * start; + guint length; + GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */ + GstV4l2BufferPool * pool; }; -struct _GstV4l2Src -{ - GstV4l2Element v4l2element; +struct _GstV4l2Src { + GstV4l2Element v4l2element; - /* pads */ - GstPad *srcpad; + /* pads */ + GstPad *srcpad; - /* internal lists */ - GSList *formats; /* list of available capture formats */ + /* internal lists */ + GSList *formats; /* list of available capture formats */ - /* buffers */ - GstV4l2BufferPool *pool; + /* buffers */ + GstV4l2BufferPool *pool; - struct v4l2_requestbuffers breq; - struct v4l2_format format; + struct v4l2_requestbuffers breq; + struct v4l2_format format; - /* True if we want to stop */ - gboolean quit; + /* True if we want to stop */ + gboolean quit; - /* A/V sync... frame counter and internal cache */ - gulong handled; - gint need_writes; - GstBuffer *cached_buffer; - gulong last_seq; + /* A/V sync... frame counter and internal cache */ + gulong handled; + gint need_writes; + GstBuffer *cached_buffer; + gulong last_seq; - /* clock */ - GstClock *clock; + /* clock */ + GstClock *clock; + + /* time to substract from clock time to get back to timestamp */ + GstClockTime substract_time; - /* time to substract from clock time to get back to timestamp */ - GstClockTime substract_time; - - /* how are we going to push buffers? */ - gboolean use_fixed_fps; + /* how are we going to push buffers? */ + gboolean use_fixed_fps; }; -struct _GstV4l2SrcClass -{ - GstV4l2ElementClass parent_class; +struct _GstV4l2SrcClass { + GstV4l2ElementClass parent_class; - void (*frame_capture) (GObject * object); - void (*frame_drop) (GObject * object); - void (*frame_insert) (GObject * object); - void (*frame_lost) (GObject * object, gint num_lost); + void (*frame_capture) (GObject *object); + void (*frame_drop) (GObject *object); + void (*frame_insert) (GObject *object); + void (*frame_lost) (GObject *object, + gint num_lost); }; -GType gst_v4l2src_get_type (void); +GType gst_v4l2src_get_type(void); #endif /* __GST_V4L2SRC_H__ */ diff --git a/sys/v4l2/gstv4l2tuner.h b/sys/v4l2/gstv4l2tuner.h index 729fe2211..a768ea2f7 100644 --- a/sys/v4l2/gstv4l2tuner.h +++ b/sys/v4l2/gstv4l2tuner.h @@ -28,6 +28,7 @@ #include "gstv4l2element.h" G_BEGIN_DECLS + #define GST_TYPE_V4L2_TUNER_CHANNEL \ (gst_v4l2_tuner_channel_get_type ()) #define GST_V4L2_TUNER_CHANNEL(obj) \ @@ -40,17 +41,16 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL)) #define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_TUNER_CHANNEL)) - typedef struct _GstV4l2TunerChannel -{ + +typedef struct _GstV4l2TunerChannel { GstTunerChannel parent; - guint32 index; - guint32 tuner; - guint32 audio; + guint32 index; + guint32 tuner; + guint32 audio; } GstV4l2TunerChannel; -typedef struct _GstV4l2TunerChannelClass -{ +typedef struct _GstV4l2TunerChannelClass { GstTunerChannelClass parent; } GstV4l2TunerChannelClass; @@ -67,21 +67,19 @@ typedef struct _GstV4l2TunerChannelClass #define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_TUNER_NORM)) -typedef struct _GstV4l2TunerNorm -{ +typedef struct _GstV4l2TunerNorm { GstTunerNorm parent; - v4l2_std_id index; + v4l2_std_id index; } GstV4l2TunerNorm; -typedef struct _GstV4l2TunerNormClass -{ +typedef struct _GstV4l2TunerNormClass { GstTunerNormClass parent; } GstV4l2TunerNormClass; -GType gst_v4l2_tuner_channel_get_type (void); -GType gst_v4l2_tuner_norm_get_type (void); +GType gst_v4l2_tuner_channel_get_type (void); +GType gst_v4l2_tuner_norm_get_type (void); -void gst_v4l2_tuner_interface_init (GstTunerClass * klass); +void gst_v4l2_tuner_interface_init (GstTunerClass *klass); #endif /* __GST_V4L2_TUNER_H__ */ diff --git a/sys/v4l2/gstv4l2xoverlay.h b/sys/v4l2/gstv4l2xoverlay.h index d5cb7796f..cfcdfd353 100644 --- a/sys/v4l2/gstv4l2xoverlay.h +++ b/sys/v4l2/gstv4l2xoverlay.h @@ -27,13 +27,16 @@ #include "gstv4l2element.h" -G_BEGIN_DECLS void gst_v4l2_xoverlay_interface_init (GstXOverlayClass * klass); +G_BEGIN_DECLS -GstXWindowListener *gst_v4l2_xoverlay_new (GstV4l2Element * v4l2element); -void gst_v4l2_xoverlay_free (GstV4l2Element * v4l2element); +void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass); + +GstXWindowListener * + gst_v4l2_xoverlay_new (GstV4l2Element *v4l2element); +void gst_v4l2_xoverlay_free (GstV4l2Element *v4l2element); /* signal handlers */ -void gst_v4l2_xoverlay_open (GstV4l2Element * v4l2element); -void gst_v4l2_xoverlay_close (GstV4l2Element * v4l2element); +void gst_v4l2_xoverlay_open (GstV4l2Element *v4l2element); +void gst_v4l2_xoverlay_close (GstV4l2Element *v4l2element); #endif /* __GST_V4L2_X_OVERLAY_H__ */ diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h index 488e7bcad..428c57aa8 100644 --- a/sys/v4l2/v4l2_calls.h +++ b/sys/v4l2/v4l2_calls.h @@ -82,36 +82,50 @@ /* open/close the device */ -gboolean gst_v4l2_open (GstV4l2Element * v4l2element); -gboolean gst_v4l2_close (GstV4l2Element * v4l2element); +gboolean gst_v4l2_open (GstV4l2Element *v4l2element); +gboolean gst_v4l2_close (GstV4l2Element *v4l2element); /* norm/input/output */ -gboolean gst_v4l2_get_norm (GstV4l2Element * v4l2element, v4l2_std_id * norm); -gboolean gst_v4l2_set_norm (GstV4l2Element * v4l2element, v4l2_std_id norm); -gboolean gst_v4l2_get_input (GstV4l2Element * v4l2element, gint * input); -gboolean gst_v4l2_set_input (GstV4l2Element * v4l2element, gint input); -gboolean gst_v4l2_get_output (GstV4l2Element * v4l2element, gint * output); -gboolean gst_v4l2_set_output (GstV4l2Element * v4l2element, gint output); +gboolean gst_v4l2_get_norm (GstV4l2Element *v4l2element, + v4l2_std_id *norm); +gboolean gst_v4l2_set_norm (GstV4l2Element *v4l2element, + v4l2_std_id norm); +gboolean gst_v4l2_get_input (GstV4l2Element *v4l2element, + gint *input); +gboolean gst_v4l2_set_input (GstV4l2Element *v4l2element, + gint input); +gboolean gst_v4l2_get_output (GstV4l2Element *v4l2element, + gint *output); +gboolean gst_v4l2_set_output (GstV4l2Element *v4l2element, + gint output); /* frequency control */ -gboolean gst_v4l2_get_frequency (GstV4l2Element * v4l2element, - gint tunernum, gulong * frequency); -gboolean gst_v4l2_set_frequency (GstV4l2Element * v4l2element, - gint tunernum, gulong frequency); -gboolean gst_v4l2_signal_strength (GstV4l2Element * v4l2element, - gint tunernum, gulong * signal); +gboolean gst_v4l2_get_frequency (GstV4l2Element *v4l2element, + gint tunernum, + gulong *frequency); +gboolean gst_v4l2_set_frequency (GstV4l2Element *v4l2element, + gint tunernum, + gulong frequency); +gboolean gst_v4l2_signal_strength (GstV4l2Element *v4l2element, + gint tunernum, + gulong *signal); /* attribute control */ -gboolean gst_v4l2_get_attribute (GstV4l2Element * v4l2element, - int attribute, int *value); -gboolean gst_v4l2_set_attribute (GstV4l2Element * v4l2element, - int attribute, const int value); +gboolean gst_v4l2_get_attribute (GstV4l2Element *v4l2element, + int attribute, + int *value); +gboolean gst_v4l2_set_attribute (GstV4l2Element *v4l2element, + int attribute, + const int value); /* overlay */ -gboolean gst_v4l2_set_display (GstV4l2Element * v4l2element); -gboolean gst_v4l2_set_window (GstElement * element, - gint x, gint y, gint w, gint h, struct v4l2_clip *clips, gint num_clips); -gboolean gst_v4l2_enable_overlay (GstV4l2Element * v4l2element, - gboolean enable); +gboolean gst_v4l2_set_display (GstV4l2Element *v4l2element); +gboolean gst_v4l2_set_window (GstElement *element, + gint x, gint y, + gint w, gint h, + struct v4l2_clip *clips, + gint num_clips); +gboolean gst_v4l2_enable_overlay (GstV4l2Element *v4l2element, + gboolean enable); #endif /* __V4L2_CALLS_H__ */ diff --git a/sys/v4l2/v4l2src_calls.h b/sys/v4l2/v4l2src_calls.h index 043dddf08..dc5fca0cb 100644 --- a/sys/v4l2/v4l2src_calls.h +++ b/sys/v4l2/v4l2src_calls.h @@ -24,25 +24,30 @@ #include "v4l2_calls.h" -gboolean gst_v4l2src_get_capture (GstV4l2Src * v4l2src); -gboolean gst_v4l2src_set_capture (GstV4l2Src * v4l2src, - struct v4l2_fmtdesc *fmt, gint width, gint height); -gboolean gst_v4l2src_capture_init (GstV4l2Src * v4l2src); -gboolean gst_v4l2src_capture_start (GstV4l2Src * v4l2src); -gint gst_v4l2src_grab_frame (GstV4l2Src * v4l2src); -guint8 *gst_v4l2src_get_buffer (GstV4l2Src * v4l2src, gint num); -gboolean gst_v4l2src_queue_frame (GstV4l2Src * v4l2src, guint i); -gboolean gst_v4l2src_capture_stop (GstV4l2Src * v4l2src); -gboolean gst_v4l2src_capture_deinit (GstV4l2Src * v4l2src); - -gboolean gst_v4l2src_fill_format_list (GstV4l2Src * v4l2src); -gboolean gst_v4l2src_clear_format_list (GstV4l2Src * v4l2src); +gboolean gst_v4l2src_get_capture (GstV4l2Src *v4l2src); +gboolean gst_v4l2src_set_capture (GstV4l2Src *v4l2src, + struct v4l2_fmtdesc *fmt, + gint width, + gint height); +gboolean gst_v4l2src_capture_init (GstV4l2Src *v4l2src); +gboolean gst_v4l2src_capture_start (GstV4l2Src *v4l2src); +gint gst_v4l2src_grab_frame (GstV4l2Src *v4l2src); +guint8 * gst_v4l2src_get_buffer (GstV4l2Src *v4l2src, + gint num); +gboolean gst_v4l2src_queue_frame (GstV4l2Src *v4l2src, + guint i); +gboolean gst_v4l2src_capture_stop (GstV4l2Src *v4l2src); +gboolean gst_v4l2src_capture_deinit (GstV4l2Src *v4l2src); + +gboolean gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src); +gboolean gst_v4l2src_clear_format_list (GstV4l2Src *v4l2src); /* hacky */ -gboolean gst_v4l2src_get_size_limits (GstV4l2Src * v4l2src, - struct v4l2_fmtdesc *fmt, - gint * min_w, gint * max_w, gint * min_h, gint * max_h); - -void gst_v4l2src_free_buffer (GstBuffer * buffer); +gboolean gst_v4l2src_get_size_limits (GstV4l2Src *v4l2src, + struct v4l2_fmtdesc *fmt, + gint *min_w, gint *max_w, + gint *min_h, gint *max_h); +void gst_v4l2src_free_buffer (GstBuffer *buffer); + #endif /* __V4L2SRC_CALLS_H__ */ |