summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/arts/gst_arts.h31
-rw-r--r--ext/arts/gst_artsio_impl.h14
-rw-r--r--ext/artsd/gstartsdsink.h56
-rw-r--r--ext/audiofile/gstafparse.h104
-rw-r--r--ext/audiofile/gstafsink.h82
-rw-r--r--ext/audiofile/gstafsrc.h86
-rw-r--r--ext/divx/gstdivxdec.h49
-rw-r--r--ext/divx/gstdivxenc.h65
-rw-r--r--ext/faac/gstfaac.h23
-rw-r--r--ext/faad/gstfaad.h13
-rw-r--r--ext/gsm/gstgsmdec.h39
-rw-r--r--ext/gsm/gstgsmenc.h47
-rw-r--r--ext/ivorbis/vorbisenc.h82
-rw-r--r--ext/jack/gstjack.h72
-rw-r--r--ext/ladspa/gstladspa.h78
-rw-r--r--ext/ladspa/utils.h18
-rw-r--r--ext/libfame/gstlibfame.h69
-rw-r--r--ext/musicbrainz/gsttrm.h59
-rw-r--r--ext/nas/nassink.h68
-rw-r--r--ext/sdl/sdlvideosink.h18
-rw-r--r--ext/shout/gstshout.h67
-rw-r--r--ext/smoothwave/gstsmoothwave.h39
-rw-r--r--ext/snapshot/gstsnapshot.h51
-rw-r--r--ext/sndfile/gstsf.h29
-rw-r--r--ext/swfdec/gstswfdec.h65
-rw-r--r--ext/tarkin/bitcoder.h152
-rw-r--r--ext/tarkin/golomb.h134
-rw-r--r--ext/tarkin/gsttarkindec.h59
-rw-r--r--ext/tarkin/gsttarkinenc.h61
-rw-r--r--ext/tarkin/mem.h9
-rw-r--r--ext/tarkin/rle.h146
-rw-r--r--ext/tarkin/tarkin.h273
-rw-r--r--ext/tarkin/wavelet.h53
-rw-r--r--ext/tarkin/yuv.h17
-rw-r--r--ext/xine/gstxine.h43
-rw-r--r--ext/xvid/gstxvid.h14
-rw-r--r--ext/xvid/gstxviddec.h45
-rw-r--r--ext/xvid/gstxvidenc.h65
38 files changed, 1175 insertions, 1220 deletions
diff --git a/ext/arts/gst_arts.h b/ext/arts/gst_arts.h
index ace4f14e6..cf0ead064 100644
--- a/ext/arts/gst_arts.h
+++ b/ext/arts/gst_arts.h
@@ -28,9 +28,8 @@
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_ARTS \
(gst_arts_get_type())
@@ -43,26 +42,24 @@ extern "C"
#define GST_IS_ARTS_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ARTS))
- typedef struct _GstARTS GstARTS;
- typedef struct _GstARTSClass GstARTSClass;
+typedef struct _GstARTS GstARTS;
+typedef struct _GstARTSClass GstARTSClass;
- struct _GstARTS
- {
- GstElement element;
+struct _GstARTS {
+ GstElement element;
- GstPad *sinkpad, *srcpad;
- void *wrapper;
- };
+ GstPad *sinkpad, *srcpad;
+ void *wrapper;
+};
- struct _GstARTSClass
- {
- GstElementClass parent_class;
- };
+struct _GstARTSClass {
+ GstElementClass parent_class;
+};
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_ARTS_H__ */
+#endif /* __GST_ARTS_H__ */
diff --git a/ext/arts/gst_artsio_impl.h b/ext/arts/gst_artsio_impl.h
index c67fbd2b3..8ffb29b6f 100644
--- a/ext/arts/gst_artsio_impl.h
+++ b/ext/arts/gst_artsio_impl.h
@@ -1,14 +1,14 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
- void *gst_arts_wrapper_new (GstPad * sinkpad, GstPad * sourcepad);
- void gst_arts_wrapper_free (void *wrapper);
- void gst_arts_wrapper_do (void *wrapper);
+void *gst_arts_wrapper_new(GstPad *sinkpad, GstPad *sourcepad);
+void gst_arts_wrapper_free(void *wrapper);
+void gst_arts_wrapper_do(void *wrapper);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
+
diff --git a/ext/artsd/gstartsdsink.h b/ext/artsd/gstartsdsink.h
index 539685685..6cece2735 100644
--- a/ext/artsd/gstartsdsink.h
+++ b/ext/artsd/gstartsdsink.h
@@ -25,9 +25,8 @@
#include <artsc.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_ARTSDSINK \
@@ -41,42 +40,39 @@ extern "C"
#define GST_IS_ARTSDSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ARTSDSINK))
- typedef enum
- {
- GST_ARTSDSINK_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_ARTSDSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } GstArtsdSinkFlags;
+typedef enum {
+ GST_ARTSDSINK_OPEN = GST_ELEMENT_FLAG_LAST,
+ GST_ARTSDSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
+} GstArtsdSinkFlags;
- typedef struct _GstArtsdsink GstArtsdsink;
- typedef struct _GstArtsdsinkClass GstArtsdsinkClass;
+typedef struct _GstArtsdsink GstArtsdsink;
+typedef struct _GstArtsdsinkClass GstArtsdsinkClass;
- struct _GstArtsdsink
- {
- GstElement element;
+struct _GstArtsdsink {
+ GstElement element;
- GstPad *sinkpad;
+ GstPad *sinkpad;
- gboolean connected;
- arts_stream_t stream;
- gboolean mute;
- gboolean signd;
- gint depth;
- gint channels;
- gint frequency;
- gchar *connect_name;
- };
+ gboolean connected;
+ arts_stream_t stream;
+ gboolean mute;
+ gboolean signd;
+ gint depth;
+ gint channels;
+ gint frequency;
+ gchar* connect_name;
+};
- struct _GstArtsdsinkClass
- {
- GstElementClass parent_class;
- };
+struct _GstArtsdsinkClass {
+ GstElementClass parent_class;
+};
- GType gst_artsdsink_get_type (void);
+GType gst_artsdsink_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_ARTSDSINK_H__ */
+#endif /* __GST_ARTSDSINK_H__ */
diff --git a/ext/audiofile/gstafparse.h b/ext/audiofile/gstafparse.h
index 941b427bc..0f636dcd3 100644
--- a/ext/audiofile/gstafparse.h
+++ b/ext/audiofile/gstafparse.h
@@ -27,14 +27,13 @@
#include <gst/gst.h>
#include <gst/bytestream/bytestream.h>
-#include <audiofile.h> /* what else are we to do */
+#include <audiofile.h> /* what else are we to do */
#include <af_vfs.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
/*GstElementDetails gst_afparse_details;*/
@@ -51,58 +50,55 @@ extern "C"
#define GST_IS_AFPARSE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AFPARSE))
- typedef struct _GstAFParse GstAFParse;
- typedef struct _GstAFParseClass GstAFParseClass;
-
- typedef enum
- {
- GST_AFPARSE_OPEN = GST_ELEMENT_FLAG_LAST,
-
- GST_AFPARSE_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } GstAFParseFlags;
-
- struct _GstAFParse
- {
- GstElement element;
- GstPad *srcpad;
- GstPad *sinkpad;
-
- AFvirtualfile *vfile;
- AFfilehandle file;
- int format;
- int channels;
- int width;
- unsigned int rate;
- gboolean is_signed;
- int type; /* type of output, compare to audiofile.h
- * RAW, AIFF, AIFFC, NEXTSND, WAVE
- */
- /* blocking */
- gulong curoffset;
- gulong bytes_per_read;
- gint frames_per_read;
-
- gulong seq;
- gint64 timestamp;
- /* FIXME : endianness is a little cryptic at this point */
- int endianness_data; /* 4321 or 1234 */
- int endianness_wanted; /* same thing, but what the output format wants */
- int endianness_output; /* what the output endianness will be */
- };
-
- struct _GstAFParseClass
- {
- GstElementClass parent_class;
-
- /* signals */
- void (*handoff) (GstElement * element, GstPad * pad);
- };
-
- gboolean gst_afparse_plugin_init (GstPlugin * plugin);
+typedef struct _GstAFParse GstAFParse;
+typedef struct _GstAFParseClass GstAFParseClass;
+
+typedef enum {
+ GST_AFPARSE_OPEN = GST_ELEMENT_FLAG_LAST,
+
+ GST_AFPARSE_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+} GstAFParseFlags;
+
+struct _GstAFParse {
+ GstElement element;
+ GstPad *srcpad;
+ GstPad *sinkpad;
+
+ AFvirtualfile *vfile;
+ AFfilehandle file;
+ int format;
+ int channels;
+ int width;
+ unsigned int rate;
+ gboolean is_signed;
+ int type; /* type of output, compare to audiofile.h
+ * RAW, AIFF, AIFFC, NEXTSND, WAVE
+ */
+ /* blocking */
+ gulong curoffset;
+ gulong bytes_per_read;
+ gint frames_per_read;
+
+ gulong seq;
+ gint64 timestamp;
+ /* FIXME : endianness is a little cryptic at this point */
+ int endianness_data; /* 4321 or 1234 */
+ int endianness_wanted; /* same thing, but what the output format wants */
+ int endianness_output; /* what the output endianness will be */
+};
+
+struct _GstAFParseClass {
+ GstElementClass parent_class;
+
+ /* signals */
+ void (*handoff) (GstElement *element,GstPad *pad);
+};
+
+gboolean gst_afparse_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_AFPARSE_H__ */
+#endif /* __GST_AFPARSE_H__ */
diff --git a/ext/audiofile/gstafsink.h b/ext/audiofile/gstafsink.h
index 4e894ee7c..76ce30af3 100644
--- a/ext/audiofile/gstafsink.h
+++ b/ext/audiofile/gstafsink.h
@@ -26,13 +26,12 @@
#include <gst/gst.h>
-#include <audiofile.h> /* what else are we to do */
+#include <audiofile.h> /* what else are we to do */
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
/*GstElementDetails gst_afsink_details;*/
@@ -49,56 +48,53 @@ extern "C"
#define GST_IS_AFSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AFSINK))
- typedef struct _GstAFSink GstAFSink;
- typedef struct _GstAFSinkClass GstAFSinkClass;
+typedef struct _GstAFSink GstAFSink;
+typedef struct _GstAFSinkClass GstAFSinkClass;
- typedef enum
- {
- GST_AFSINK_OPEN = GST_ELEMENT_FLAG_LAST,
+typedef enum {
+ GST_AFSINK_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_AFSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } GstAFSinkFlags;
+ GST_AFSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+} GstAFSinkFlags;
- struct _GstAFSink
- {
- GstElement element;
- GstPad *sinkpad;
+struct _GstAFSink {
+ GstElement element;
+ GstPad *sinkpad;
- gchar *filename;
+ gchar *filename;
/* FILE *file; */
/* AFfilesetup outfilesetup; */
- AFfilehandle file;
- int format;
- int channels;
- int width;
- unsigned int rate;
- gboolean is_signed;
- int type; /* type of output, compare to audiofile.h
- * RAW, AIFF, AIFFC, NEXTSND, WAVE
- */
- /* FIXME : endianness is a little cryptic at this point */
- int endianness_data; /* 4321 or 1234 */
- int endianness_wanted; /* same thing, but what the output format wants */
- int endianness_output; /* what the output endianness will be */
- };
-
- struct _GstAFSinkClass
- {
- GstElementClass parent_class;
-
- /* signals */
- void (*handoff) (GstElement * element, GstPad * pad);
- };
-
- GType gst_afsink_get_type (void);
- gboolean gst_afsink_plugin_init (GstPlugin * plugin);
+ AFfilehandle file;
+ int format;
+ int channels;
+ int width;
+ unsigned int rate;
+ gboolean is_signed;
+ int type; /* type of output, compare to audiofile.h
+ * RAW, AIFF, AIFFC, NEXTSND, WAVE
+ */
+ /* FIXME : endianness is a little cryptic at this point */
+ int endianness_data; /* 4321 or 1234 */
+ int endianness_wanted; /* same thing, but what the output format wants */
+ int endianness_output; /* what the output endianness will be */
+};
+
+struct _GstAFSinkClass {
+ GstElementClass parent_class;
+
+ /* signals */
+ void (*handoff) (GstElement *element,GstPad *pad);
+};
+
+GType gst_afsink_get_type (void);
+gboolean gst_afsink_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_AFSINK_H__ */
+#endif /* __GST_AFSINK_H__ */
diff --git a/ext/audiofile/gstafsrc.h b/ext/audiofile/gstafsrc.h
index ff607564e..c96c20c3d 100644
--- a/ext/audiofile/gstafsrc.h
+++ b/ext/audiofile/gstafsrc.h
@@ -26,13 +26,12 @@
#include <gst/gst.h>
-#include <audiofile.h> /* what else are we to do */
+#include <audiofile.h> /* what else are we to do */
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
/*GstElementDetails gst_afsrc_details;*/
@@ -49,63 +48,60 @@ extern "C"
#define GST_IS_AFSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AFSRC))
- typedef struct _GstAFSrc GstAFSrc;
- typedef struct _GstAFSrcClass GstAFSrcClass;
+typedef struct _GstAFSrc GstAFSrc;
+typedef struct _GstAFSrcClass GstAFSrcClass;
- typedef enum
- {
- GST_AFSRC_OPEN = GST_ELEMENT_FLAG_LAST,
+typedef enum {
+ GST_AFSRC_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_AFSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } GstAFSrcFlags;
+ GST_AFSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+} GstAFSrcFlags;
- struct _GstAFSrc
- {
- GstElement element;
- GstPad *srcpad;
+struct _GstAFSrc {
+ GstElement element;
+ GstPad *srcpad;
- gchar *filename;
+ gchar *filename;
/* FILE *file; */
/* AFfilesetup outfilesetup; */
- AFfilehandle file;
- int format;
- int channels;
- int width;
- unsigned int rate;
- gboolean is_signed;
- int type; /* type of output, compare to audiofile.h
- * RAW, AIFF, AIFFC, NEXTSND, WAVE
- */
- /* blocking */
- gulong curoffset;
- gulong bytes_per_read;
+ AFfilehandle file;
+ int format;
+ int channels;
+ int width;
+ unsigned int rate;
+ gboolean is_signed;
+ int type; /* type of output, compare to audiofile.h
+ * RAW, AIFF, AIFFC, NEXTSND, WAVE
+ */
+ /* blocking */
+ gulong curoffset;
+ gulong bytes_per_read;
- gulong seq;
- guint64 framestamp;
- /* FIXME : endianness is a little cryptic at this point */
- int endianness_data; /* 4321 or 1234 */
- int endianness_wanted; /* same thing, but what the output format wants */
- int endianness_output; /* what the output endianness will be */
- };
+ gulong seq;
+ guint64 framestamp;
+ /* FIXME : endianness is a little cryptic at this point */
+ int endianness_data; /* 4321 or 1234 */
+ int endianness_wanted; /* same thing, but what the output format wants */
+ int endianness_output; /* what the output endianness will be */
+};
- struct _GstAFSrcClass
- {
- GstElementClass parent_class;
+struct _GstAFSrcClass {
+ GstElementClass parent_class;
- /* signals */
- void (*handoff) (GstElement * element, GstPad * pad);
- };
+ /* signals */
+ void (*handoff) (GstElement *element,GstPad *pad);
+};
- GType gst_afsrc_get_type (void);
- gboolean gst_afsrc_plugin_init (GstPlugin * plugin);
+GType gst_afsrc_get_type (void);
+gboolean gst_afsrc_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_AFSRC_H__ */
+#endif /* __GST_AFSRC_H__ */
diff --git a/ext/divx/gstdivxdec.h b/ext/divx/gstdivxdec.h
index 4bf2d364c..0468ff0a9 100644
--- a/ext/divx/gstdivxdec.h
+++ b/ext/divx/gstdivxdec.h
@@ -24,9 +24,8 @@
#include <decore.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_DIVXDEC \
@@ -40,36 +39,34 @@ extern "C"
#define GST_IS_DIVXDEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DIVXDEC))
- typedef struct _GstDivxDec GstDivxDec;
- typedef struct _GstDivxDecClass GstDivxDecClass;
+typedef struct _GstDivxDec GstDivxDec;
+typedef struct _GstDivxDecClass GstDivxDecClass;
- struct _GstDivxDec
- {
- GstElement element;
+struct _GstDivxDec {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad, *srcpad;
- /* divx handle */
- void *handle;
+ /* divx handle */
+ void *handle;
- /* video (output) settings */
- guint32 csp;
- int bitcnt, bpp;
- int version;
- int width, height;
- gdouble fps;
- };
+ /* video (output) settings */
+ guint32 csp;
+ int bitcnt, bpp;
+ int version;
+ int width, height;
+ gdouble fps;
+};
- struct _GstDivxDecClass
- {
- GstElementClass parent_class;
- };
+struct _GstDivxDecClass {
+ GstElementClass parent_class;
+};
- GType gst_divxdec_get_type (void);
+GType gst_divxdec_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_DIVXDEC_H__ */
+#endif /* __GST_DIVXDEC_H__ */
diff --git a/ext/divx/gstdivxenc.h b/ext/divx/gstdivxenc.h
index 906145bb6..206659d32 100644
--- a/ext/divx/gstdivxenc.h
+++ b/ext/divx/gstdivxenc.h
@@ -23,9 +23,8 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_DIVXENC \
@@ -39,48 +38,46 @@ extern "C"
#define GST_IS_DIVXENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DIVXENC))
- typedef struct _GstDivxEnc GstDivxEnc;
- typedef struct _GstDivxEncClass GstDivxEncClass;
+typedef struct _GstDivxEnc GstDivxEnc;
+typedef struct _GstDivxEncClass GstDivxEncClass;
- struct _GstDivxEnc
- {
- GstElement element;
+struct _GstDivxEnc {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad, *srcpad;
- /* quality of encoded image */
- gulong bitrate;
+ /* quality of encoded image */
+ gulong bitrate;
- /* size of the buffers */
- gulong buffer_size;
+ /* size of the buffers */
+ gulong buffer_size;
- /* max key interval */
- gint max_key_interval;
+ /* max key interval */
+ gint max_key_interval;
- /* amount of motion estimation to do */
- gint quality;
+ /* amount of motion estimation to do */
+ gint quality;
- /* divx handle */
- void *handle;
- guint32 csp;
- gint bitcnt;
- gint width, height;
- gfloat fps;
- };
+ /* divx handle */
+ void *handle;
+ guint32 csp;
+ gint bitcnt;
+ gint width, height;
+ gfloat fps;
+};
- struct _GstDivxEncClass
- {
- GstElementClass parent_class;
+struct _GstDivxEncClass {
+ GstElementClass parent_class;
- /* signals */
- void (*frame_encoded) (GstElement * element);
- };
+ /* signals */
+ void (*frame_encoded) (GstElement *element);
+};
- GType gst_divxenc_get_type (void);
+GType gst_divxenc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_DIVXENC_H__ */
+#endif /* __GST_DIVXENC_H__ */
diff --git a/ext/faac/gstfaac.h b/ext/faac/gstfaac.h
index b888ed346..55daea678 100644
--- a/ext/faac/gstfaac.h
+++ b/ext/faac/gstfaac.h
@@ -24,6 +24,7 @@
#include <faac.h>
G_BEGIN_DECLS
+
#define GST_TYPE_FAAC \
(gst_faac_get_type ())
#define GST_FAAC(obj) \
@@ -34,17 +35,25 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FAAC))
#define GST_IS_FAAC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FAAC))
- typedef struct _GstFaac
-{
+
+typedef struct _GstFaac {
GstElement element;
/* pads */
GstPad *srcpad, *sinkpad;
/* stream properties */
- gint samplerate, channels, format, bps, bitrate, profile, shortctl;
- gboolean tns, midside;
- gulong bytes, samples;
+ gint samplerate,
+ channels,
+ format,
+ bps,
+ bitrate,
+ profile,
+ shortctl;
+ gboolean tns,
+ midside;
+ gulong bytes,
+ samples;
/* FAAC object */
faacEncHandle handle;
@@ -54,12 +63,12 @@ G_BEGIN_DECLS
guint64 cache_time, cache_duration;
} GstFaac;
-typedef struct _GstFaacClass
-{
+typedef struct _GstFaacClass {
GstElementClass parent_class;
} GstFaacClass;
GType gst_faac_get_type (void);
G_END_DECLS
+
#endif /* __GST_FAAC_H__ */
diff --git a/ext/faad/gstfaad.h b/ext/faad/gstfaad.h
index 394d90ac9..c834f0987 100644
--- a/ext/faad/gstfaad.h
+++ b/ext/faad/gstfaad.h
@@ -24,6 +24,7 @@
#include <faad.h>
G_BEGIN_DECLS
+
#define GST_TYPE_FAAD \
(gst_faad_get_type ())
#define GST_FAAD(obj) \
@@ -34,26 +35,28 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FAAD))
#define GST_IS_FAAD_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FAAD))
- typedef struct _GstFaad
-{
+
+typedef struct _GstFaad {
GstElement element;
/* pads */
GstPad *srcpad, *sinkpad;
/* cache for latest MPEG-frame */
- gint samplerate, channels, bps;
+ gint samplerate,
+ channels,
+ bps;
/* FAAD object */
faacDecHandle handle;
} GstFaad;
-typedef struct _GstFaadClass
-{
+typedef struct _GstFaadClass {
GstElementClass parent_class;
} GstFaadClass;
GType gst_faad_get_type (void);
G_END_DECLS
+
#endif /* __GST_FAAD_H__ */
diff --git a/ext/gsm/gstgsmdec.h b/ext/gsm/gstgsmdec.h
index da2d4ca69..0544128b5 100644
--- a/ext/gsm/gstgsmdec.h
+++ b/ext/gsm/gstgsmdec.h
@@ -31,9 +31,8 @@
#endif
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_GSMDEC \
@@ -47,32 +46,30 @@ extern "C"
#define GST_IS_GSMDEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GSMDEC))
- typedef struct _GstGSMDec GstGSMDec;
- typedef struct _GstGSMDecClass GstGSMDecClass;
+typedef struct _GstGSMDec GstGSMDec;
+typedef struct _GstGSMDecClass GstGSMDecClass;
- struct _GstGSMDec
- {
- GstElement element;
+struct _GstGSMDec {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad,*srcpad;
- gsm state;
- gsm_byte buffer[33];
- gint bufsize;
- };
+ gsm state;
+ gsm_byte buffer[33];
+ gint bufsize;
+};
- struct _GstGSMDecClass
- {
- GstElementClass parent_class;
- };
+struct _GstGSMDecClass {
+ GstElementClass parent_class;
+};
- GType gst_gsmdec_get_type (void);
+GType gst_gsmdec_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_GSMDEC_H__ */
+#endif /* __GST_GSMDEC_H__ */
diff --git a/ext/gsm/gstgsmenc.h b/ext/gsm/gstgsmenc.h
index 397ff633b..2366ed69c 100644
--- a/ext/gsm/gstgsmenc.h
+++ b/ext/gsm/gstgsmenc.h
@@ -31,9 +31,8 @@
#endif
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_GSMENC \
@@ -47,38 +46,36 @@ extern "C"
#define GST_IS_GSMENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GSMENC))
- typedef struct _GstGSMEnc GstGSMEnc;
- typedef struct _GstGSMEncClass GstGSMEncClass;
+typedef struct _GstGSMEnc GstGSMEnc;
+typedef struct _GstGSMEncClass GstGSMEncClass;
- struct _GstGSMEnc
- {
- GstElement element;
+struct _GstGSMEnc {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad,*srcpad;
- gsm state;
- gsm_signal buffer[160];
- gint bufsize;
+ gsm state;
+ gsm_signal buffer[160];
+ gint bufsize;
- guint64 next_ts;
- gint rate;
- };
+ guint64 next_ts;
+ gint rate;
+};
- struct _GstGSMEncClass
- {
- GstElementClass parent_class;
+struct _GstGSMEncClass {
+ GstElementClass parent_class;
- /* signals */
- void (*frame_encoded) (GstElement * element);
- };
+ /* signals */
+ void (*frame_encoded) (GstElement *element);
+};
- GType gst_gsmenc_get_type (void);
+GType gst_gsmenc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_GSMENC_H__ */
+#endif /* __GST_GSMENC_H__ */
diff --git a/ext/ivorbis/vorbisenc.h b/ext/ivorbis/vorbisenc.h
index e33fb1d9d..60fdf6707 100644
--- a/ext/ivorbis/vorbisenc.h
+++ b/ext/ivorbis/vorbisenc.h
@@ -27,9 +27,8 @@
#include <tremor/ivorbiscodec.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_VORBISENC \
(vorbisenc_get_type())
@@ -42,61 +41,60 @@ extern "C"
#define GST_IS_VORBISENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VORBISENC))
- typedef struct _VorbisEnc VorbisEnc;
- typedef struct _VorbisEncClass VorbisEncClass;
+typedef struct _VorbisEnc VorbisEnc;
+typedef struct _VorbisEncClass VorbisEncClass;
- struct _VorbisEnc
- {
- GstElement element;
+struct _VorbisEnc {
+ GstElement element;
- GstPad *sinkpad, *srcpad;
+ GstPad *sinkpad,
+ *srcpad;
- ogg_stream_state os; /* take physical pages, weld into a logical
- stream of packets */
- ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
- ogg_packet op; /* one raw packet of data for decode */
+ ogg_stream_state os; /* take physical pages, weld into a logical
+ stream of packets */
+ ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
+ ogg_packet op; /* one raw packet of data for decode */
- vorbis_info vi; /* struct that stores all the static vorbis bitstream
- settings */
- vorbis_comment vc; /* struct that stores all the user comments */
+ vorbis_info vi; /* struct that stores all the static vorbis bitstream
+ settings */
+ vorbis_comment vc; /* struct that stores all the user comments */
- vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
- vorbis_block vb; /* local working space for packet->PCM decode */
+ vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
+ vorbis_block vb; /* local working space for packet->PCM decode */
- gboolean eos;
+ gboolean eos;
- gboolean managed;
- gint bitrate;
- gint min_bitrate;
- gint max_bitrate;
- gfloat quality;
- gboolean quality_set;
- gint serial;
+ gboolean managed;
+ gint bitrate;
+ gint min_bitrate;
+ gint max_bitrate;
+ gfloat quality;
+ gboolean quality_set;
+ gint serial;
- gint channels;
- gint frequency;
+ gint channels;
+ gint frequency;
- guint64 samples_in;
- guint64 bytes_out;
+ guint64 samples_in;
+ guint64 bytes_out;
- GstCaps *metadata;
+ GstCaps *metadata;
- gboolean setup;
- gboolean flush_header;
- gchar *last_message;
- };
+ gboolean setup;
+ gboolean flush_header;
+ gchar *last_message;
+};
- struct _VorbisEncClass
- {
- GstElementClass parent_class;
- };
+struct _VorbisEncClass {
+ GstElementClass parent_class;
+};
- GType vorbisenc_get_type (void);
+GType vorbisenc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __VORBISENC_H__ */
+#endif /* __VORBISENC_H__ */
diff --git a/ext/jack/gstjack.h b/ext/jack/gstjack.h
index f5a5416fb..87d7d6115 100644
--- a/ext/jack/gstjack.h
+++ b/ext/jack/gstjack.h
@@ -51,7 +51,7 @@
#define GST_IS_JACK_BIN_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_JACK_BIN)
#define GST_TYPE_JACK_BIN gst_jack_bin_get_type()
-#define GST_JACK_PAD(l) ((GstJackPad*)l->data) /* l is a GList */
+#define GST_JACK_PAD(l) ((GstJackPad*)l->data) /* l is a GList */
typedef struct _GstJack GstJack;
@@ -64,65 +64,59 @@ typedef GstJack GstJackSrc;
typedef GstJackClass GstJackSrcClass;
-enum
-{
- GST_JACK_OPEN = GST_BIN_FLAG_LAST,
- GST_JACK_ACTIVE,
- GST_JACK_FLAG_LAST = GST_BIN_FLAG_LAST + 3,
+enum {
+ GST_JACK_OPEN = GST_BIN_FLAG_LAST,
+ GST_JACK_ACTIVE,
+ GST_JACK_FLAG_LAST = GST_BIN_FLAG_LAST + 3,
};
typedef jack_default_audio_sample_t sample_t;
-typedef struct
-{
- GstPad *pad;
- void *data;
- const gchar *name;
- const gchar *peer_name;
- jack_port_t *port;
+typedef struct {
+ GstPad *pad;
+ void *data;
+ const gchar *name;
+ const gchar *peer_name;
+ jack_port_t *port;
} GstJackPad;
-struct _GstJack
-{
- GstElement element;
+struct _GstJack {
+ GstElement element;
- /* list of GstJackPads */
- GList *pads;
+ /* list of GstJackPads */
+ GList *pads;
- /* for convenience */
- GstPadDirection direction;
+ /* for convenience */
+ GstPadDirection direction;
- gchar *port_name_prefix;
+ gchar *port_name_prefix;
- GstJackBin *bin;
+ GstJackBin *bin;
};
-struct _GstJackClass
-{
- GstElementClass parent_class;
+struct _GstJackClass {
+ GstElementClass parent_class;
};
-struct _GstJackBin
-{
- GstBin bin;
+struct _GstJackBin {
+ GstBin bin;
- jack_client_t *client;
- gint default_new_port_number;
+ jack_client_t *client;
+ gint default_new_port_number;
- /* lists of GstJackPads */
- GList *sink_pads;
- GList *src_pads;
+ /* lists of GstJackPads */
+ GList *sink_pads;
+ GList *src_pads;
- gchar *client_name;
+ gchar *client_name;
- guint rate;
- jack_nframes_t nframes;
+ guint rate;
+ jack_nframes_t nframes;
};
-struct _GstJackBinClass
-{
- GstBinClass parent_class;
+struct _GstJackBinClass {
+ GstBinClass parent_class;
};
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/libfame/gstlibfame.h b/ext/libfame/gstlibfame.h
index 74726bb6e..15affdafe 100644
--- a/ext/libfame/gstlibfame.h
+++ b/ext/libfame/gstlibfame.h
@@ -25,9 +25,8 @@
#include <fame.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_FAMEENC \
@@ -41,50 +40,48 @@ extern "C"
#define GST_IS_FAMEENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FAMEENC))
- typedef struct _GstFameEnc GstFameEnc;
- typedef struct _GstFameEncClass GstFameEncClass;
+typedef struct _GstFameEnc GstFameEnc;
+typedef struct _GstFameEncClass GstFameEncClass;
- struct _GstFameEnc
- {
- GstElement element;
+struct _GstFameEnc {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad, *srcpad;
- /* the timestamp of the next frame */
- guint64 next_time;
- /* the interval between frames */
- guint64 time_interval;
+ /* the timestamp of the next frame */
+ guint64 next_time;
+ /* the interval between frames */
+ guint64 time_interval;
- /* video state */
- gint format;
- /* the size of the output buffer */
- gint outsize;
+ /* video state */
+ gint format;
+ /* the size of the output buffer */
+ gint outsize;
- /* encoding pattern string */
- gchar *pattern;
+ /* encoding pattern string */
+ gchar *pattern;
- /* fameenc stuff */
- gboolean verbose;
- fame_context_t *fc;
- fame_parameters_t fp;
- fame_yuv_t fy;
- gulong buffer_size;
- unsigned char *buffer;
- gboolean initialized;
- };
+ /* fameenc stuff */
+ gboolean verbose;
+ fame_context_t *fc;
+ fame_parameters_t fp;
+ fame_yuv_t fy;
+ gulong buffer_size;
+ unsigned char *buffer;
+ gboolean initialized;
+};
- struct _GstFameEncClass
- {
- GstElementClass parent_class;
- };
+struct _GstFameEncClass {
+ GstElementClass parent_class;
+};
- GType gst_fameenc_get_type (void);
+GType gst_fameenc_get_type (void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_FAMEENC_H__ */
+#endif /* __GST_FAMEENC_H__ */
diff --git a/ext/musicbrainz/gsttrm.h b/ext/musicbrainz/gsttrm.h
index 717826b7c..6516f94d7 100644
--- a/ext/musicbrainz/gsttrm.h
+++ b/ext/musicbrainz/gsttrm.h
@@ -26,9 +26,8 @@
#include <musicbrainz/mb_c.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_MUSICBRAINZ \
@@ -43,43 +42,41 @@ extern "C"
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MUSICBRAINZ))
- typedef struct _GstMusicBrainz GstMusicBrainz;
- typedef struct _GstMusicBrainzClass GstMusicBrainzClass;
+typedef struct _GstMusicBrainz GstMusicBrainz;
+typedef struct _GstMusicBrainzClass GstMusicBrainzClass;
- struct _GstMusicBrainz
- {
- GstElement element;
+struct _GstMusicBrainz {
+ GstElement element;
- GstPad *sinkpad;
- GstPad *srcpad;
- const GstCaps *caps;
+ GstPad *sinkpad;
+ GstPad *srcpad;
+ const GstCaps *caps;
- trm_t trm;
- gchar signature[17];
- gchar ascii_signature[37];
+ trm_t trm;
+ gchar signature[17];
+ gchar ascii_signature[37];
- guint depth;
- guint rate;
- guint channels;
- gboolean linked;
- gboolean data_available;
- gboolean signature_available;
- guint64 total_time;
- };
+ guint depth;
+ guint rate;
+ guint channels;
+ gboolean linked;
+ gboolean data_available;
+ gboolean signature_available;
+ guint64 total_time;
+};
- struct _GstMusicBrainzClass
- {
- GstElementClass parent_class;
+struct _GstMusicBrainzClass {
+ GstElementClass parent_class;
- /* signals */
- void (*signature_available) (GstElement * element);
- };
+ /* signals */
+ void (*signature_available) (GstElement *element);
+};
- GType gst_musicbrainz_get_type (void);
+GType gst_musicbrainz_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_MUSICBRAINZE_H__ */
+#endif /* __GST_MUSICBRAINZE_H__ */
diff --git a/ext/nas/nassink.h b/ext/nas/nassink.h
index afebe9ba3..3206541c3 100644
--- a/ext/nas/nassink.h
+++ b/ext/nas/nassink.h
@@ -24,9 +24,8 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_NASSINK \
@@ -40,54 +39,51 @@ extern "C"
#define GST_IS_NASSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NASSINK))
- typedef enum
- {
- GST_NASSINK_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_NASSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2
- } GstNasSinkFlags;
+typedef enum {
+ GST_NASSINK_OPEN = GST_ELEMENT_FLAG_LAST,
+ GST_NASSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2
+} GstNasSinkFlags;
- typedef struct _GstNassink GstNassink;
- typedef struct _GstNassinkClass GstNassinkClass;
+typedef struct _GstNassink GstNassink;
+typedef struct _GstNassinkClass GstNassinkClass;
- struct _GstNassink
- {
- GstElement element;
+struct _GstNassink {
+ GstElement element;
- GstPad *sinkpad;
+ GstPad *sinkpad;
- /* instance properties */
+ /* instance properties */
- gboolean mute;
- gint depth;
- gint tracks;
- gint rate;
- gchar *host;
+ gboolean mute;
+ gint depth;
+ gint tracks;
+ gint rate;
+ gchar* host;
- /* Server info */
+ /* Server info */
- AuServer *audio;
- AuFlowID flow;
- AuDeviceID device;
+ AuServer *audio;
+ AuFlowID flow;
+ AuDeviceID device;
- /* buffer */
+ /* buffer */
- AuUint32 size;
- AuUint32 pos;
+ AuUint32 size;
+ AuUint32 pos;
- char *buf;
- };
+ char *buf;
+};
- struct _GstNassinkClass
- {
- GstElementClass parent_class;
- };
+struct _GstNassinkClass {
+ GstElementClass parent_class;
+};
- GType gst_nassink_get_type (void);
+GType gst_nassink_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_NASSINK_H__ */
+#endif /* __GST_NASSINK_H__ */
diff --git a/ext/sdl/sdlvideosink.h b/ext/sdl/sdlvideosink.h
index 5c42abc42..ad6823857 100644
--- a/ext/sdl/sdlvideosink.h
+++ b/ext/sdl/sdlvideosink.h
@@ -25,6 +25,7 @@
#include <SDL.h>
G_BEGIN_DECLS
+
#define GST_TYPE_SDLVIDEOSINK \
(gst_sdlvideosink_get_type())
#define GST_SDLVIDEOSINK(obj) \
@@ -35,9 +36,9 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SDLVIDEOSINK))
#define GST_IS_SDLVIDEOSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SDLVIDEOSINK))
- typedef enum
-{
- GST_SDLVIDEOSINK_OPEN = GST_ELEMENT_FLAG_LAST,
+
+typedef enum {
+ GST_SDLVIDEOSINK_OPEN = GST_ELEMENT_FLAG_LAST,
GST_SDLVIDEOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} GstSDLVideoSinkFlags;
@@ -45,12 +46,11 @@ G_BEGIN_DECLS
typedef struct _GstSDLVideoSink GstSDLVideoSink;
typedef struct _GstSDLVideoSinkClass GstSDLVideoSinkClass;
-struct _GstSDLVideoSink
-{
+struct _GstSDLVideoSink {
GstVideoSink videosink;
guint32 format;
- gint width, height; /* the size of the incoming YUV stream */
+ gint width, height; /* the size of the incoming YUV stream */
unsigned long xwindow_id;
gboolean init;
@@ -62,13 +62,13 @@ struct _GstSDLVideoSink
GMutex *lock;
};
-struct _GstSDLVideoSinkClass
-{
+struct _GstSDLVideoSinkClass {
GstVideoSinkClass parent_class;
};
-GType gst_sdlsink_get_type (void);
+GType gst_sdlsink_get_type(void);
G_END_DECLS
+
#endif /* __GST_SDLVIDEOSINK_H__ */
diff --git a/ext/shout/gstshout.h b/ext/shout/gstshout.h
index 210b6b5d3..129fcba86 100644
--- a/ext/shout/gstshout.h
+++ b/ext/shout/gstshout.h
@@ -25,43 +25,40 @@
#include <shout/shout.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
/* Definition of structure storing data for this element. */
- typedef struct _GstIcecastSend GstIcecastSend;
- struct _GstIcecastSend
- {
- GstElement element;
-
- GstPad *sinkpad, *srcpad;
-
- shout_conn_t conn;
-
- gchar *ip;
- guint port;
- gchar *password;
- gboolean public;
- gchar *name;
- gchar *description;
- gchar *genre;
- gchar *mount;
- gchar *dumpfile;
- gboolean icy;
- gchar *aim;
- gchar *icq;
- gchar *irc;
-
- };
+typedef struct _GstIcecastSend GstIcecastSend;
+struct _GstIcecastSend {
+ GstElement element;
+
+ GstPad *sinkpad,*srcpad;
+
+ shout_conn_t conn;
+
+ gchar *ip;
+ guint port;
+ gchar *password;
+ gboolean public;
+ gchar *name;
+ gchar *description;
+ gchar *genre;
+ gchar *mount;
+ gchar *dumpfile;
+ gboolean icy;
+ gchar *aim;
+ gchar *icq;
+ gchar *irc;
+
+};
/* Standard definition defining a class for this element. */
- typedef struct _GstIcecastSendClass GstIcecastSendClass;
- struct _GstIcecastSendClass
- {
- GstElementClass parent_class;
- };
+typedef struct _GstIcecastSendClass GstIcecastSendClass;
+struct _GstIcecastSendClass {
+ GstElementClass parent_class;
+};
/* Standard macros for defining types for this element. */
#define GST_TYPE_ICECASTSEND \
@@ -76,12 +73,12 @@ extern "C"
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ICECASTSEND))
/* Standard function returning type information. */
- GType gst_icecastsend_get_type (void);
+GType gst_icecastsend_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_ICECASTSEND_H__ */
+#endif /* __GST_ICECASTSEND_H__ */
diff --git a/ext/smoothwave/gstsmoothwave.h b/ext/smoothwave/gstsmoothwave.h
index df4d87634..871651310 100644
--- a/ext/smoothwave/gstsmoothwave.h
+++ b/ext/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/ext/snapshot/gstsnapshot.h b/ext/snapshot/gstsnapshot.h
index 23cca9111..0ca1fb933 100644
--- a/ext/snapshot/gstsnapshot.h
+++ b/ext/snapshot/gstsnapshot.h
@@ -26,9 +26,8 @@
#include <png.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_SNAPSHOT \
@@ -42,38 +41,36 @@ extern "C"
#define GST_IS_SNAPSHOT_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SNAPSHOT))
- typedef struct _GstSnapshot GstSnapshot;
- typedef struct _GstSnapshotClass GstSnapshotClass;
+typedef struct _GstSnapshot GstSnapshot;
+typedef struct _GstSnapshotClass GstSnapshotClass;
- struct _GstSnapshot
- {
- GstElement element;
+struct _GstSnapshot {
+ GstElement element;
- guint32 format;
- gint width;
- gint height;
- gint to_bpp;
- glong frame;
- glong cur_frame;
- const gchar *location;
- gboolean snapshot_asked;
+ guint32 format;
+ gint width;
+ gint height;
+ gint to_bpp;
+ glong frame;
+ glong cur_frame;
+ const gchar *location;
+ gboolean snapshot_asked;
- png_structp png_struct_ptr;
- png_infop png_info_ptr;
+ png_structp png_struct_ptr;
+ png_infop png_info_ptr;
- GstPad *sinkpad, *srcpad;
- };
+ GstPad *sinkpad,*srcpad;
+};
- struct _GstSnapshotClass
- {
- GstElementClass parent_class;
+struct _GstSnapshotClass {
+ GstElementClass parent_class;
- void (*snapshot) (GstElement * elem);
- };
+ void (*snapshot) (GstElement *elem);
+};
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_SNAPSHOT_H__ */
+#endif /* __GST_SNAPSHOT_H__ */
diff --git a/ext/sndfile/gstsf.h b/ext/sndfile/gstsf.h
index 135176256..a25311122 100644
--- a/ext/sndfile/gstsf.h
+++ b/ext/sndfile/gstsf.h
@@ -27,6 +27,8 @@
G_BEGIN_DECLS
+
+
#define GST_TYPE_SF \
(gst_sf_get_type())
#define GST_SF(obj) \
@@ -37,6 +39,7 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SF))
#define GST_IS_SF_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SF))
+
#define GST_TYPE_SFSRC \
(gst_sfsrc_get_type())
#define GST_SFSRC(obj) \
@@ -47,6 +50,7 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SFSRC))
#define GST_IS_SFSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SFSRC))
+
#define GST_TYPE_SFSINK \
(gst_sfsink_get_type())
#define GST_SFSINK(obj) \
@@ -57,17 +61,16 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SFSINK))
#define GST_IS_SFSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SFSINK))
+
typedef struct _GstSF GstSF;
typedef struct _GstSFClass GstSFClass;
-typedef enum
-{
- GST_SF_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_SF_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+typedef enum {
+ GST_SF_OPEN = GST_ELEMENT_FLAG_LAST,
+ GST_SF_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} GstSFlags;
-typedef struct
-{
+typedef struct {
GstPad *pad;
gint num;
gboolean caps_set;
@@ -75,8 +78,7 @@ typedef struct
#define GST_SF_CHANNEL(l) ((GstSFChannel*)l->data)
-struct _GstSF
-{
+struct _GstSF {
GstElement element;
GList *channels;
@@ -100,15 +102,16 @@ struct _GstSF
guint64 time;
};
-struct _GstSFClass
-{
+struct _GstSFClass {
GstElementClass parent_class;
};
-GType gst_sf_get_type (void);
-GType gst_sfsrc_get_type (void);
-GType gst_sfsink_get_type (void);
+GType gst_sf_get_type (void);
+GType gst_sfsrc_get_type (void);
+GType gst_sfsink_get_type (void);
G_END_DECLS
+
+
#endif /* __GST_SFSINK_H__ */
diff --git a/ext/swfdec/gstswfdec.h b/ext/swfdec/gstswfdec.h
index dab1ac17e..050156822 100644
--- a/ext/swfdec/gstswfdec.h
+++ b/ext/swfdec/gstswfdec.h
@@ -26,9 +26,8 @@
#include <swfdec.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_SWFDEC \
@@ -42,49 +41,47 @@ extern "C"
#define GST_IS_SWFDEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SWFDEC))
- typedef struct _GstSwfdec GstSwfdec;
- typedef struct _GstSwfdecClass GstSwfdecClass;
+typedef struct _GstSwfdec GstSwfdec;
+typedef struct _GstSwfdecClass GstSwfdecClass;
- struct _GstSwfdec
- {
- GstElement element;
+struct _GstSwfdec {
+ GstElement element;
- /* pads */
- GstPad *sinkpad;
- GstPad *videopad;
- GstPad *audiopad;
+ /* pads */
+ GstPad *sinkpad;
+ GstPad *videopad;
+ GstPad *audiopad;
- SwfdecDecoder *state;
- gboolean closed;
+ SwfdecDecoder *state;
+ gboolean closed;
- /* the timestamp of the next frame */
- gboolean first;
- gboolean have_format;
+ /* the timestamp of the next frame */
+ gboolean first;
+ gboolean have_format;
- double rate;
- gint64 timestamp;
- gint64 interval;
- double frame_rate;
+ double rate;
+ gint64 timestamp;
+ gint64 interval;
+ double frame_rate;
- /* video state */
- gint format;
- gint width;
- gint height;
- gint64 total_frames;
+ /* video state */
+ gint format;
+ gint width;
+ gint height;
+ gint64 total_frames;
- };
+};
- struct _GstSwfdecClass
- {
- GstElementClass parent_class;
- };
+struct _GstSwfdecClass {
+ GstElementClass parent_class;
+};
- GType gst_swfdec_get_type (void);
+GType gst_swfdec_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_SWFDEC_H__ */
+#endif /* __GST_SWFDEC_H__ */
diff --git a/ext/tarkin/bitcoder.h b/ext/tarkin/bitcoder.h
index fe1e6eaee..312cd8871 100644
--- a/ext/tarkin/bitcoder.h
+++ b/ext/tarkin/bitcoder.h
@@ -15,7 +15,7 @@
#define ENTROPY_ENCODER_FLUSH(coder) bitcoder_flush(coder)
#define ENTROPY_DECODER_INIT(coder,bitstream,limit) \
bitcoder_decoder_init(coder,bitstream,limit)
-#define ENTROPY_DECODER_DONE(coder) /* nothing to do ... */
+#define ENTROPY_DECODER_DONE(coder) /* nothing to do ... */
#define ENTROPY_CODER_BITSTREAM(coder) (coder)->bitstream
#define ENTROPY_CODER_SYMBOL(coder) 1
@@ -25,107 +25,106 @@
#endif
-typedef struct
-{
- int32_t bit_count; /* number of valid bits in byte */
- uint8_t byte; /* buffer to save bits */
- uint32_t byte_count; /* number of bytes written */
- uint8_t *bitstream;
- uint32_t limit; /* don't write more bytes to bitstream ... */
- int eos; /* end of stream reached */
+typedef struct {
+ int32_t bit_count; /* number of valid bits in byte */
+ uint8_t byte; /* buffer to save bits */
+ uint32_t byte_count; /* number of bytes written */
+ uint8_t *bitstream;
+ uint32_t limit; /* don't write more bytes to bitstream ... */
+ int eos; /* end of stream reached */
} BitCoderState;
-static inline void
-bitcoder_encoder_init (BitCoderState * s, uint32_t limit)
+static inline
+void bitcoder_encoder_init (BitCoderState *s, uint32_t limit)
{
- s->bit_count = 0;
- s->byte = 0;
- s->byte_count = 0;
- s->bitstream = (uint8_t *) MALLOC (limit);
- s->limit = limit;
- s->eos = 0;
+ s->bit_count = 0;
+ s->byte = 0;
+ s->byte_count = 0;
+ s->bitstream = (uint8_t*) MALLOC (limit);
+ s->limit = limit;
+ s->eos = 0;
}
-static inline void
-bitcoder_encoder_done (BitCoderState * s)
+static inline
+void bitcoder_encoder_done (BitCoderState *s)
{
- FREE (s->bitstream);
+ FREE (s->bitstream);
}
-static inline void
-bitcoder_decoder_init (BitCoderState * s, uint8_t * bitstream, uint32_t limit)
+static inline
+void bitcoder_decoder_init (BitCoderState *s, uint8_t *bitstream, uint32_t limit)
{
- s->bit_count = -1;
- s->byte = 0;
- s->byte_count = 0;
- s->bitstream = bitstream;
- s->limit = limit;
- s->eos = 0;
+ s->bit_count = -1;
+ s->byte = 0;
+ s->byte_count = 0;
+ s->bitstream = bitstream;
+ s->limit = limit;
+ s->eos = 0;
}
-static inline uint32_t
-bitcoder_flush (BitCoderState * s)
+static inline
+uint32_t bitcoder_flush (BitCoderState *s)
{
- if (s->bit_count > 0 && s->byte_count < s->limit)
- s->bitstream[s->byte_count++] = s->byte << (8 - s->bit_count);
+ if (s->bit_count > 0 && s->byte_count < s->limit)
+ s->bitstream [s->byte_count++] = s->byte << (8 - s->bit_count);
/*printf ("%s: %i bytes written.\n", __FUNCTION__, s->byte_count); */
/*printf ("%s: last bit %i\n", __FUNCTION__, s->bit_count); */
- return s->byte_count;
+ return s->byte_count;
}
-static inline void
-bitcoder_write_bit (BitCoderState * s, int bit)
+static inline
+void bitcoder_write_bit (BitCoderState *s, int bit)
{
- s->byte <<= 1;
- s->byte |= bit & 1;
-
- s->bit_count++;
-
- if (s->bit_count == 8) {
- if (s->byte_count < s->limit) {
- s->bitstream[s->byte_count++] = s->byte;
- s->bit_count = 0;
- } else {
- s->eos = 1;
- }
- }
+ s->byte <<= 1;
+ s->byte |= bit & 1;
+
+ s->bit_count++;
+
+ if (s->bit_count == 8) {
+ if (s->byte_count < s->limit) {
+ s->bitstream [s->byte_count++] = s->byte;
+ s->bit_count = 0;
+ } else {
+ s->eos = 1;
+ }
+ }
}
-static inline int
-bitcoder_read_bit (BitCoderState * s)
+static inline
+int bitcoder_read_bit (BitCoderState *s)
{
- int ret;
+ int ret;
- if (s->bit_count <= 0) {
- if (!s->bitstream) {
- s->eos = 1;
- return 0;
- }
+ if (s->bit_count <= 0) {
+ if (!s->bitstream) {
+ s->eos = 1;
+ return 0;
+ }
- if (s->byte_count < s->limit) {
- s->byte = s->bitstream[s->byte_count++];
- } else {
- s->eos = 1;
- s->byte = 0;
- }
+ if (s->byte_count < s->limit) {
+ s->byte = s->bitstream [s->byte_count++];
+ } else {
+ s->eos = 1;
+ s->byte = 0;
+ }
- s->bit_count = 8;
- }
+ s->bit_count = 8;
+ }
- ret = s->byte >> 7;
- s->byte <<= 1;
- s->bit_count--;
+ ret = s->byte >> 7;
+ s->byte <<= 1;
+ s->bit_count--;
- return ret & 1;
+ return ret & 1;
}
@@ -133,16 +132,17 @@ bitcoder_read_bit (BitCoderState * s)
-static inline void
-bit_print (TYPE byte)
+static inline
+void bit_print (TYPE byte)
{
- int bit = 8 * sizeof (TYPE);
+ int bit = 8*sizeof(TYPE);
- do {
- bit--;
- printf ((byte & (1 << bit)) ? "1" : "0");
- } while (bit);
- printf ("\n");
+ do {
+ bit--;
+ printf ((byte & (1 << bit)) ? "1" : "0");
+ } while (bit);
+ printf ("\n");
}
#endif
+
diff --git a/ext/tarkin/golomb.h b/ext/tarkin/golomb.h
index 47c23b441..95e63c304 100644
--- a/ext/tarkin/golomb.h
+++ b/ext/tarkin/golomb.h
@@ -5,126 +5,128 @@
#include "bitcoder.h"
-static inline unsigned int
-required_bits (unsigned int x)
+static inline
+unsigned int required_bits (unsigned int x)
{
- int bits = 31;
+ int bits = 31;
- while ((x & (1 << bits)) == 0 && bits)
- bits--;
+ while ((x & (1 << bits)) == 0 && bits)
+ bits--;
- return bits;
+ return bits;
}
-static inline void
-write_number_binary (BitCoderState * b, unsigned int x, int bits, int u)
+static inline
+void write_number_binary (BitCoderState *b, unsigned int x, int bits, int u)
{
/*printf ("wrote %i with %i bits (%i+%i)\n", x, u+bits, u, bits); */
- while (bits) {
- bits--;
- bitcoder_write_bit (b, (x >> bits) & 1);
- }
+ while (bits) {
+ bits--;
+ bitcoder_write_bit (b, (x >> bits) & 1);
+ }
}
-static inline unsigned int
-read_number_binary (BitCoderState * b, int bits)
+static inline
+unsigned int read_number_binary (BitCoderState *b, int bits)
{
- unsigned int x = 0;
+ unsigned int x = 0;
- while (bits) {
- bits--;
- x |= bitcoder_read_bit (b) << bits;
- }
+ while (bits) {
+ bits--;
+ x |= bitcoder_read_bit (b) << bits;
+ }
- return x;
+ return x;
}
-static inline void
-golomb_write_number (BitCoderState * b, unsigned int x, int bits)
+static inline
+void golomb_write_number (BitCoderState *b, unsigned int x, int bits)
{
- unsigned int q, r;
- int i = 0;
+ unsigned int q, r;
+int i = 0;
- assert (x > 0);
+ assert (x > 0);
- while ((q = (x - 1) >> bits) > 0) {
- bitcoder_write_bit (b, 1); /* fast temporary adaption, write */
- bits++; /* unary representation of q */
- i++;
- };
+ while ((q = (x - 1) >> bits) > 0) {
+ bitcoder_write_bit (b, 1); /* fast temporary adaption, write */
+ bits++; /* unary representation of q */
+i++;
+ };
- bitcoder_write_bit (b, 0);
+ bitcoder_write_bit (b, 0);
- r = x - 1 - (q << bits);
+ r = x - 1 - (q << bits);
- write_number_binary (b, r, bits, i + 1);
+ write_number_binary (b, r, bits, i+1);
}
-static inline unsigned int
-golomb_read_number (BitCoderState * b, int bits)
+static inline
+unsigned int golomb_read_number (BitCoderState *b, int bits)
{
- unsigned int q = 0, r, x;
+ unsigned int q = 0, r, x;
- while (bitcoder_read_bit (b) != 0) {
- bits++;
- }
+ while (bitcoder_read_bit (b) != 0) {
+ bits++;
+ }
- r = read_number_binary (b, bits);
- x = (q << bits) + r + 1;
+ r = read_number_binary (b, bits);
+ x = (q << bits) + r + 1;
- return x;
+ return x;
}
-typedef struct
-{
- uint8_t count;
- uint8_t bits; /* a 5.3 fixed point integer */
+typedef struct {
+ uint8_t count;
+ uint8_t bits; /* a 5.3 fixed point integer */
} GolombAdaptiveCoderState;
#define GOLOMB_ADAPTIVE_CODER_STATE_INITIALIZER { 8<<3, 0 }
-static const int golomb_w_tab[] = { 256, 128, 64 };
+static const int golomb_w_tab [] = { 256, 128, 64 };
-static inline void
-golombcoder_encode_number (GolombAdaptiveCoderState * g,
- BitCoderState * b, unsigned int x)
+static inline
+void golombcoder_encode_number (GolombAdaptiveCoderState *g,
+ BitCoderState *b,
+ unsigned int x)
{
- golomb_write_number (b, x, g->bits >> 3);
+ golomb_write_number (b, x, g->bits >> 3);
- g->bits = ((256 - golomb_w_tab[g->count]) * (int) g->bits +
- golomb_w_tab[g->count] * (required_bits (x) << 3)) / 256;
- g->count++;
+ g->bits = ((256 - golomb_w_tab[g->count]) * (int) g->bits +
+ golomb_w_tab[g->count] * (required_bits(x)<<3)) / 256;
+ g->count++;
- if (g->count > 2)
- g->count = 2;
+ if (g->count > 2)
+ g->count = 2;
}
-static inline unsigned int
-golombcoder_decode_number (GolombAdaptiveCoderState * g, BitCoderState * b)
+static inline
+unsigned int golombcoder_decode_number (GolombAdaptiveCoderState *g,
+ BitCoderState *b)
{
- unsigned int x;
+ unsigned int x;
- x = golomb_read_number (b, g->bits >> 3);
+ x = golomb_read_number (b, g->bits >> 3);
- g->bits = ((256 - golomb_w_tab[g->count]) * g->bits +
- golomb_w_tab[g->count] * (required_bits (x) << 3)) / 256;
- g->count++;
+ g->bits = ((256 - golomb_w_tab[g->count]) * g->bits +
+ golomb_w_tab[g->count] * (required_bits(x)<<3)) / 256;
+ g->count++;
- if (g->count > 2)
- g->count = 2;
+ if (g->count > 2)
+ g->count = 2;
- return x;
+ return x;
}
#endif
+
diff --git a/ext/tarkin/gsttarkindec.h b/ext/tarkin/gsttarkindec.h
index 77b8954da..b1baf4f30 100644
--- a/ext/tarkin/gsttarkindec.h
+++ b/ext/tarkin/gsttarkindec.h
@@ -27,9 +27,8 @@
#include "tarkin.h"
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_TARKINDEC \
(tarkindec_get_type())
@@ -42,44 +41,42 @@ extern "C"
#define GST_IS_TARKINDEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TARKINDEC))
- typedef struct _TarkinDec TarkinDec;
- typedef struct _TarkinDecClass TarkinDecClass;
+typedef struct _TarkinDec TarkinDec;
+typedef struct _TarkinDecClass TarkinDecClass;
- struct _TarkinDec
- {
- GstElement element;
+struct _TarkinDec {
+ GstElement element;
- GstPad *sinkpad, *srcpad;
+ GstPad *sinkpad,*srcpad;
- ogg_sync_state oy;
- ogg_stream_state os;
- ogg_page og;
- ogg_packet op;
+ ogg_sync_state oy;
+ ogg_stream_state os;
+ ogg_page og;
+ ogg_packet op;
- TarkinStream *tarkin_stream;
- TarkinComment tc;
- TarkinInfo ti;
- TarkinVideoLayerDesc layer[1];
+ TarkinStream *tarkin_stream;
+ TarkinComment tc;
+ TarkinInfo ti;
+ TarkinVideoLayerDesc layer[1];
- gint frame_num;
- gint nheader;
+ gint frame_num;
+ gint nheader;
+
+ gboolean eos;
+ gint bitrate;
+ gboolean setup;
+};
- gboolean eos;
- gint bitrate;
- gboolean setup;
- };
+struct _TarkinDecClass {
+ GstElementClass parent_class;
+};
- struct _TarkinDecClass
- {
- GstElementClass parent_class;
- };
-
- GType tarkindec_get_type (void);
+GType tarkindec_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __TARKINDEC_H__ */
+#endif /* __TARKINDEC_H__ */
diff --git a/ext/tarkin/gsttarkinenc.h b/ext/tarkin/gsttarkinenc.h
index 9e03e5cab..b6252a88a 100644
--- a/ext/tarkin/gsttarkinenc.h
+++ b/ext/tarkin/gsttarkinenc.h
@@ -27,9 +27,8 @@
#include "tarkin.h"
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_TARKINENC \
(tarkinenc_get_type())
@@ -42,45 +41,43 @@ extern "C"
#define GST_IS_TARKINENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TARKINENC))
- typedef struct _TarkinEnc TarkinEnc;
- typedef struct _TarkinEncClass TarkinEncClass;
+typedef struct _TarkinEnc TarkinEnc;
+typedef struct _TarkinEncClass TarkinEncClass;
- struct _TarkinEnc
- {
- GstElement element;
+struct _TarkinEnc {
+ GstElement element;
- GstPad *sinkpad, *srcpad;
+ GstPad *sinkpad,*srcpad;
- ogg_stream_state os; /* take physical pages, weld into a logical
- stream of packets */
- ogg_page og; /* one Ogg bitstream page. Tarkin packets are inside */
- ogg_packet op[3]; /* one raw packet of data for decode */
+ ogg_stream_state os; /* take physical pages, weld into a logical
+ stream of packets */
+ ogg_page og; /* one Ogg bitstream page. Tarkin packets are inside */
+ ogg_packet op[3]; /* one raw packet of data for decode */
- TarkinStream *tarkin_stream;
- TarkinComment tc;
- TarkinInfo ti;
- TarkinVideoLayerDesc layer[1];
+ TarkinStream *tarkin_stream;
+ TarkinComment tc;
+ TarkinInfo ti;
+ TarkinVideoLayerDesc layer[1];
- gint frame_num;
+ gint frame_num;
+
+ gboolean eos;
+ gint bitrate;
+ gint s_moments;
+ gint a_moments;
+ gboolean setup;
+};
- gboolean eos;
- gint bitrate;
- gint s_moments;
- gint a_moments;
- gboolean setup;
- };
+struct _TarkinEncClass {
+ GstElementClass parent_class;
+};
- struct _TarkinEncClass
- {
- GstElementClass parent_class;
- };
-
- GType tarkinenc_get_type (void);
+GType tarkinenc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __TARKINENC_H__ */
+#endif /* __TARKINENC_H__ */
diff --git a/ext/tarkin/mem.h b/ext/tarkin/mem.h
index f6e4c726a..f218f8e49 100644
--- a/ext/tarkin/mem.h
+++ b/ext/tarkin/mem.h
@@ -9,11 +9,9 @@
#if defined(DBG_MEMLEAKS)
-extern void *dbg_malloc (char *file, int line, char *func, size_t bytes);
-extern void *dbg_calloc (char *file, int line, char *func, size_t count,
- size_t bytes);
-extern void *dbg_realloc (char *file, int line, char *func, char *what,
- void *mem, size_t bytes);
+extern void* dbg_malloc (char *file, int line, char *func, size_t bytes);
+extern void* dbg_calloc (char *file, int line, char *func, size_t count, size_t bytes);
+extern void* dbg_realloc (char *file, int line, char *func, char *what, void *mem, size_t bytes);
extern void dbg_free (char *file, int line, char *func, char *what, void *mem);
#define MALLOC(bytes) dbg_malloc(__FILE__,__LINE__,__FUNCTION__,bytes)
@@ -31,3 +29,4 @@ extern void dbg_free (char *file, int line, char *func, char *what, void *mem);
#endif
#endif
+
diff --git a/ext/tarkin/rle.h b/ext/tarkin/rle.h
index 6ccef22bd..7cf795173 100644
--- a/ext/tarkin/rle.h
+++ b/ext/tarkin/rle.h
@@ -19,7 +19,7 @@
#define ENTROPY_ENCODER_FLUSH(coder) rlecoder_encoder_flush(coder)
#define ENTROPY_DECODER_INIT(coder,bitstream,limit) \
rlecoder_decoder_init(coder,bitstream,limit)
-#define ENTROPY_DECODER_DONE(coder) /* nothing to do ... */
+#define ENTROPY_DECODER_DONE(coder) /* nothing to do ... */
#define ENTROPY_CODER_BITSTREAM(coder) ((coder)->bitcoder.bitstream)
#define ENTROPY_CODER_EOS(coder) ((coder)->bitcoder.eos)
@@ -31,13 +31,12 @@
-typedef struct
-{
- int symbol;
- uint32_t count; /* have seen count symbol's */
- BitCoderState bitcoder;
- GolombAdaptiveCoderState golomb_state[2]; /* 2 states for 2 symbols... */
- int have_seen_1;
+typedef struct {
+ int symbol;
+ uint32_t count; /* have seen count symbol's */
+ BitCoderState bitcoder;
+ GolombAdaptiveCoderState golomb_state [2]; /* 2 states for 2 symbols... */
+ int have_seen_1;
} RLECoderState;
@@ -45,99 +44,100 @@ typedef struct
/*
* bit should be 0 or 1 !!!
*/
-static inline void
-rlecoder_write_bit (RLECoderState * s, int bit)
+static inline
+void rlecoder_write_bit (RLECoderState *s, int bit)
{
- assert (bit == 0 || bit == 1);
-
- if (s->symbol == -1) {
- s->symbol = bit & 1;
- s->count = 1;
- s->have_seen_1 = bit;
- bitcoder_write_bit (&s->bitcoder, bit);
- }
-
- if (s->symbol != bit) {
- golombcoder_encode_number (&s->golomb_state[s->symbol],
- &s->bitcoder, s->count);
- s->symbol = ~s->symbol & 1;
- s->have_seen_1 = 1;
- s->count = 1;
- } else
- s->count++;
+ assert (bit == 0 || bit == 1);
+
+ if (s->symbol == -1) {
+ s->symbol = bit & 1;
+ s->count = 1;
+ s->have_seen_1 = bit;
+ bitcoder_write_bit (&s->bitcoder, bit);
+ }
+
+ if (s->symbol != bit) {
+ golombcoder_encode_number (&s->golomb_state[s->symbol],
+ &s->bitcoder, s->count);
+ s->symbol = ~s->symbol & 1;
+ s->have_seen_1 = 1;
+ s->count = 1;
+ } else
+ s->count++;
}
-static inline int
-rlecoder_read_bit (RLECoderState * s)
+static inline
+int rlecoder_read_bit (RLECoderState *s)
{
- if (s->count == 0) {
- s->symbol = ~s->symbol & 1;
- s->count = golombcoder_decode_number (&s->golomb_state[s->symbol],
- &s->bitcoder);
- if (s->bitcoder.eos) {
- s->symbol = 0;
- s->count = ~0;
- }
- }
- s->count--;
- return (s->symbol);
+ if (s->count == 0) {
+ s->symbol = ~s->symbol & 1;
+ s->count = golombcoder_decode_number (&s->golomb_state[s->symbol],
+ &s->bitcoder);
+ if (s->bitcoder.eos) {
+ s->symbol = 0;
+ s->count = ~0;
+ }
+ }
+ s->count--;
+ return (s->symbol);
}
int coder_id = 0;
FILE *file = NULL;
-static inline void
-rlecoder_encoder_init (RLECoderState * s, uint32_t limit)
+static inline
+void rlecoder_encoder_init (RLECoderState *s, uint32_t limit)
{
- bitcoder_encoder_init (&s->bitcoder, limit);
- s->symbol = -1;
- s->have_seen_1 = 0;
- s->golomb_state[0].count = 0;
- s->golomb_state[1].count = 0;
- s->golomb_state[0].bits = 5 << 3;
- s->golomb_state[1].bits = 5 << 3;
+ bitcoder_encoder_init (&s->bitcoder, limit);
+ s->symbol = -1;
+ s->have_seen_1 = 0;
+ s->golomb_state[0].count = 0;
+ s->golomb_state[1].count = 0;
+ s->golomb_state[0].bits = 5 << 3;
+ s->golomb_state[1].bits = 5 << 3;
}
/**
* once you called this, you better should not encode any more symbols ...
*/
-static inline uint32_t
-rlecoder_encoder_flush (RLECoderState * s)
+static inline
+uint32_t rlecoder_encoder_flush (RLECoderState *s)
{
- if (s->symbol == -1 || !s->have_seen_1)
- return 0;
+ if (s->symbol == -1 || !s->have_seen_1)
+ return 0;
- golombcoder_encode_number (&s->golomb_state[s->symbol],
- &s->bitcoder, s->count);
- return bitcoder_flush (&s->bitcoder);
+ golombcoder_encode_number (&s->golomb_state[s->symbol],
+ &s->bitcoder, s->count);
+ return bitcoder_flush (&s->bitcoder);
}
-static inline void
-rlecoder_decoder_init (RLECoderState * s, uint8_t * bitstream, uint32_t limit)
+static inline
+void rlecoder_decoder_init (RLECoderState *s, uint8_t *bitstream, uint32_t limit)
{
- bitcoder_decoder_init (&s->bitcoder, bitstream, limit);
- s->golomb_state[0].count = 0;
- s->golomb_state[1].count = 0;
- s->golomb_state[0].bits = 5 << 3;
- s->golomb_state[1].bits = 5 << 3;
- s->symbol = bitcoder_read_bit (&s->bitcoder);
- s->count = golombcoder_decode_number (&s->golomb_state[s->symbol],
- &s->bitcoder) - 1;
- if (s->bitcoder.eos) {
- s->symbol = 0;
- s->count = ~0;
- }
+ bitcoder_decoder_init (&s->bitcoder, bitstream, limit);
+ s->golomb_state[0].count = 0;
+ s->golomb_state[1].count = 0;
+ s->golomb_state[0].bits = 5 << 3;
+ s->golomb_state[1].bits = 5 << 3;
+ s->symbol = bitcoder_read_bit (&s->bitcoder);
+ s->count = golombcoder_decode_number (&s->golomb_state[s->symbol],
+ &s->bitcoder) - 1;
+ if (s->bitcoder.eos) {
+ s->symbol = 0;
+ s->count = ~0;
+ }
}
-static inline void
-rlecoder_encoder_done (RLECoderState * s)
+static inline
+void rlecoder_encoder_done (RLECoderState *s)
{
- bitcoder_encoder_done (&s->bitcoder);
+ bitcoder_encoder_done (&s->bitcoder);
}
#endif
+
diff --git a/ext/tarkin/tarkin.h b/ext/tarkin/tarkin.h
index 680ba4b9e..633f9a141 100644
--- a/ext/tarkin/tarkin.h
+++ b/ext/tarkin/tarkin.h
@@ -18,115 +18,105 @@
/* Theses determine what infos the packet comes with */
#define TARKIN_PACK_EXAMPLE 1
-typedef struct
-{
- uint8_t *data;
- uint32_t data_len;
- uint32_t storage;
-} TarkinPacket;
-
-
-typedef enum
-{
- TARKIN_GRAYSCALE,
- TARKIN_RGB24, /* tight packed RGB */
- TARKIN_RGB32, /* 32bit, no alphachannel */
- TARKIN_RGBA, /* dito w/ alphachannel */
- TARKIN_YUV2, /* 16 bits YUV */
- TARKIN_YUV12, /* 12 bits YUV */
- TARKIN_FYUV, /* Tarkin's Fast YUV-like? */
+typedef struct {
+ uint8_t *data;
+ uint32_t data_len;
+ uint32_t storage;
+} TarkinPacket;
+
+
+typedef enum {
+ TARKIN_GRAYSCALE,
+ TARKIN_RGB24, /* tight packed RGB */
+ TARKIN_RGB32, /* 32bit, no alphachannel */
+ TARKIN_RGBA, /* dito w/ alphachannel */
+ TARKIN_YUV2, /* 16 bits YUV */
+ TARKIN_YUV12, /* 12 bits YUV */
+ TARKIN_FYUV, /* Tarkin's Fast YUV-like? */
} TarkinColorFormat;
#define TARKIN_INTERNAL_FORMAT TARKIN_FYUV
-typedef enum
-{
- TARKIN_OK = 0,
- TARKIN_IO_ERROR,
- TARKIN_SIGNATURE_NOT_FOUND,
- TARKIN_INVALID_LAYER,
- TARKIN_INVALID_COLOR_FORMAT,
- TARKIN_VERSION,
- TARKIN_BAD_HEADER,
- TARKIN_NOT_TARKIN,
- TARKIN_FAULT,
- TARKIN_UNUSED,
- TARKIN_NEED_MORE,
- TARKIN_NOT_IMPLEMENTED
+typedef enum {
+ TARKIN_OK = 0,
+ TARKIN_IO_ERROR,
+ TARKIN_SIGNATURE_NOT_FOUND,
+ TARKIN_INVALID_LAYER,
+ TARKIN_INVALID_COLOR_FORMAT,
+ TARKIN_VERSION,
+ TARKIN_BAD_HEADER,
+ TARKIN_NOT_TARKIN,
+ TARKIN_FAULT,
+ TARKIN_UNUSED,
+ TARKIN_NEED_MORE,
+ TARKIN_NOT_IMPLEMENTED
} TarkinError;
-typedef struct
-{
- uint32_t width;
- uint32_t height;
- uint32_t a_moments;
- uint32_t s_moments;
- uint32_t frames_per_buf;
- uint32_t bitstream_len; /* for all color components, bytes */
- TarkinColorFormat format;
+typedef struct {
+ uint32_t width;
+ uint32_t height;
+ uint32_t a_moments;
+ uint32_t s_moments;
+ uint32_t frames_per_buf;
+ uint32_t bitstream_len; /* for all color components, bytes */
+ TarkinColorFormat format;
} TarkinVideoLayerDesc;
-typedef struct
-{
- TarkinVideoLayerDesc desc;
- uint32_t n_comp; /* number of color components */
- Wavelet3DBuf **waveletbuf;
- TarkinPacket *packet;
- uint32_t current_frame_in_buf;
- uint32_t frameno;
+typedef struct {
+ TarkinVideoLayerDesc desc;
+ uint32_t n_comp; /* number of color components */
+ Wavelet3DBuf **waveletbuf;
+ TarkinPacket *packet;
+ uint32_t current_frame_in_buf;
+ uint32_t frameno;
- void (*color_fwd_xform) (uint8_t * rgba, Wavelet3DBuf * yuva[],
- uint32_t count);
- void (*color_inv_xform) (Wavelet3DBuf * yuva[], uint8_t * rgba,
- uint32_t count);
+ void (*color_fwd_xform) (uint8_t *rgba, Wavelet3DBuf *yuva [], uint32_t count);
+ void (*color_inv_xform) (Wavelet3DBuf *yuva [], uint8_t *rgba, uint32_t count);
} TarkinVideoLayer;
-typedef struct
-{
- uint32_t numerator;
- uint32_t denominator;
-} TarkinTime; /* Let's say the unit is 1 second */
-
-typedef struct TarkinInfo
-{
- int version;
- int n_layers;
- TarkinVideoLayer *layer;
- TarkinTime inter; /* numerator == O if per-frame time info. */
- int frames_per_block;
- int comp_per_block; /* AKA "packets per block" for now */
- uint32_t max_bitstream_len;
+typedef struct {
+ uint32_t numerator;
+ uint32_t denominator;
+} TarkinTime; /* Let's say the unit is 1 second */
+
+typedef struct TarkinInfo {
+ int version;
+ int n_layers;
+ TarkinVideoLayer *layer;
+ TarkinTime inter; /* numerator == O if per-frame time info. */
+ int frames_per_block;
+ int comp_per_block; /* AKA "packets per block" for now */
+ uint32_t max_bitstream_len;
/* The below bitrate declarations are *hints*.
Combinations of the three values carry the following implications:
-
+
all three set to the same value:
- implies a fixed rate bitstream
+ implies a fixed rate bitstream
only nominal set:
- implies a VBR stream that averages the nominal bitrate. No hard
- upper/lower limit
+ implies a VBR stream that averages the nominal bitrate. No hard
+ upper/lower limit
upper and or lower set:
- implies a VBR bitstream that obeys the bitrate limits. nominal
- may also be set to give a nominal rate.
+ implies a VBR bitstream that obeys the bitrate limits. nominal
+ may also be set to give a nominal rate.
none set:
- the coder does not care to speculate.
- */
+ the coder does not care to speculate.
+ */
- long bitrate_upper;
- long bitrate_nominal;
- long bitrate_lower;
- long bitrate_window;
+ long bitrate_upper;
+ long bitrate_nominal;
+ long bitrate_lower;
+ long bitrate_window;
} TarkinInfo;
/* This is used for encoding */
-typedef struct
-{
- unsigned char *header;
- unsigned char *header1;
- unsigned char *header2;
+typedef struct {
+ unsigned char *header;
+ unsigned char *header1;
+ unsigned char *header2;
} tarkin_header_store;
@@ -134,33 +124,31 @@ typedef struct
/* Some of the fields in TarkinStream are redundent with TarkinInfo ones
* and will probably get deleted, namely n_layers and frames_per_buf */
-typedef struct TarkinStream
-{
- uint32_t n_layers;
- TarkinVideoLayer *layer;
- uint32_t current_frame;
- uint32_t current_frame_in_buf;
- ogg_int64_t packetno;
- uint32_t frames_per_buf;
- uint32_t max_bitstream_len;
- TarkinInfo *ti;
- tarkin_header_store headers;
- /* These callbacks are only used for encoding */
- TarkinError (*free_frame) (void *tarkinstream, void *ptr);
- /* These thing allows not to buffer but it needs global var in caller. */
- TarkinError (*packet_out) (void *tarkinstream, ogg_packet * ptr);
- void *user_ptr;
+typedef struct TarkinStream {
+ uint32_t n_layers;
+ TarkinVideoLayer *layer;
+ uint32_t current_frame;
+ uint32_t current_frame_in_buf;
+ ogg_int64_t packetno;
+ uint32_t frames_per_buf;
+ uint32_t max_bitstream_len;
+ TarkinInfo *ti;
+ tarkin_header_store headers;
+ /* These callbacks are only used for encoding */
+ TarkinError (*free_frame)(void *tarkinstream, void *ptr);
+ /* These thing allows not to buffer but it needs global var in caller. */
+ TarkinError (*packet_out)(void *tarkinstream, ogg_packet *ptr);
+ void * user_ptr;
} TarkinStream;
-typedef struct TarkinComment
-{
+typedef struct TarkinComment{
/* unlimited user comment fields. libtarkin writes 'libtarkin'
whatever vendor is set to in encode */
char **user_comments;
- int *comment_lengths;
- int comments;
- char *vendor;
+ int *comment_lengths;
+ int comments;
+ char *vendor;
} TarkinComment;
@@ -173,17 +161,17 @@ typedef struct TarkinComment
/* Theses are the very same than Vorbis versions, they could be shared. */
-extern TarkinStream *tarkin_stream_new ();
-extern void tarkin_stream_destroy (TarkinStream * s);
-extern void tarkin_info_init (TarkinInfo * vi);
-extern void tarkin_info_clear (TarkinInfo * vi);
-extern void tarkin_comment_init (TarkinComment * vc);
-extern void tarkin_comment_add (TarkinComment * vc, char *comment);
-extern void tarkin_comment_add_tag (TarkinComment * vc,
- char *tag, char *contents);
-extern char *tarkin_comment_query (TarkinComment * vc, char *tag, int count);
-extern int tarkin_comment_query_count (TarkinComment * vc, char *tag);
-extern void tarkin_comment_clear (TarkinComment * vc);
+extern TarkinStream* tarkin_stream_new ();
+extern void tarkin_stream_destroy (TarkinStream *s);
+extern void tarkin_info_init(TarkinInfo *vi);
+extern void tarkin_info_clear(TarkinInfo *vi);
+extern void tarkin_comment_init(TarkinComment *vc);
+extern void tarkin_comment_add(TarkinComment *vc, char *comment);
+extern void tarkin_comment_add_tag(TarkinComment *vc,
+ char *tag, char *contents);
+extern char *tarkin_comment_query(TarkinComment *vc, char *tag, int count);
+extern int tarkin_comment_query_count(TarkinComment *vc, char *tag);
+extern void tarkin_comment_clear(TarkinComment *vc);
/* Tarkin PRIMITIVES: analysis layer ****************************/
/* Tarkin encoding is done this way : you init it passing a fresh
@@ -193,50 +181,59 @@ extern void tarkin_comment_clear (TarkinComment * vc);
* is called when a packet is ready. The pointers given as arguments to
* these callback functions are of course only valid at the function call
* time. The user_ptr is stored in s and can be used by packet_out(). */
-extern int tarkin_analysis_init (TarkinStream * s,
- TarkinInfo * ti,
- TarkinError (*free_frame) (void *tarkinstream, void *ptr),
- TarkinError (*packet_out) (void *tarkinstream, ogg_packet * ptr),
- void *user_ptr);
+extern int tarkin_analysis_init(TarkinStream *s,
+ TarkinInfo *ti,
+ TarkinError (*free_frame)(void *tarkinstream, void *ptr),
+ TarkinError (*packet_out)(void *tarkinstream, ogg_packet *ptr),
+ void *user_ptr
+ );
/* Then you need to add at least a layer in your stream, passing a
* TarkinVideoLayerDesc renseigned at least on the width, height and
* format parameters. */
-extern int tarkin_analysis_add_layer (TarkinStream * s,
- TarkinVideoLayerDesc * tvld);
+extern int tarkin_analysis_add_layer(TarkinStream *s,
+ TarkinVideoLayerDesc *tvld);
/* At that point you are ready to get headers out the lib by calling
* tarkin_analysis_headerout() passing it a renseigned TarkinComment
* structure. It does fill your 3 ogg_packet headers, which are valid
* till next call */
-extern int TarkinCommentheader_out (TarkinComment * vc, ogg_packet * op);
-extern TarkinError tarkin_analysis_headerout (TarkinStream * s,
- TarkinComment * vc,
- ogg_packet * op, ogg_packet * op_comm, ogg_packet * op_code);
+extern int TarkinCommentheader_out(TarkinComment *vc, ogg_packet *op);
+extern TarkinError tarkin_analysis_headerout(TarkinStream *s,
+ TarkinComment *vc,
+ ogg_packet *op,
+ ogg_packet *op_comm,
+ ogg_packet *op_code);
/* You are now ready to pass in frames to the codec, however don't free
* them before the codec told you so. It'll tell you when packets are
* ready to be taken out. When you have no more frame, simply pass NULL.
* If you encode multiple layers you have to do it synchronously, putting
* one frame from each layer at a time. */
-extern uint32_t tarkin_analysis_framein (TarkinStream * s, uint8_t * frame, /* NULL for EOS */
- uint32_t layer, TarkinTime * date);
+extern uint32_t tarkin_analysis_framein(TarkinStream *s,
+ uint8_t *frame, /* NULL for EOS */
+ uint32_t layer,
+ TarkinTime *date);
/* Tarkin PRIMITIVES: synthesis layer *******************************/
/* For decoding, you needs first to give the three first packet of the
* stream to tarkin_synthesis_headerin() which will fill for you blank
* TarkinInfo and TarkinComment. */
-extern TarkinError tarkin_synthesis_headerin (TarkinInfo * vi,
- TarkinComment * vc, ogg_packet * op);
+extern TarkinError tarkin_synthesis_headerin(TarkinInfo *vi,TarkinComment *vc,
+ ogg_packet *op);
/* Then you can init your stream with your TarkinInfo struct. */
-extern TarkinError tarkin_synthesis_init (TarkinStream * s, TarkinInfo * ti);
-
+extern TarkinError tarkin_synthesis_init(TarkinStream *s,TarkinInfo *ti);
/* All subsequent packets are to this be passed to tarkin_synthesis_packetin*/
-extern TarkinError tarkin_synthesis_packetin (TarkinStream * s,
- ogg_packet * op);
+extern TarkinError tarkin_synthesis_packetin(TarkinStream *s, ogg_packet *op);
/* and then tarkin_synthesis_frameout gives you ptr on next frame, or NULL. It
* also fills for you date. */
-extern TarkinError tarkin_synthesis_frameout (TarkinStream * s,
- uint8_t ** frame, uint32_t layer_id, TarkinTime * date);
+extern TarkinError tarkin_synthesis_frameout(TarkinStream *s,
+ uint8_t **frame, uint32_t layer_id, TarkinTime *date);
/* When you're done with a frame, tell it to the codec with this. */
-extern int tarkin_synthesis_freeframe (TarkinStream * s, uint8_t * frame);
+extern int tarkin_synthesis_freeframe(TarkinStream *s, uint8_t *frame);
#endif
+
+
+
+
+
+
diff --git a/ext/tarkin/wavelet.h b/ext/tarkin/wavelet.h
index 13d84e8b5..914c27993 100644
--- a/ext/tarkin/wavelet.h
+++ b/ext/tarkin/wavelet.h
@@ -4,25 +4,24 @@
#include <stdint.h>
-typedef struct
-{
- TYPE *data;
- uint32_t width;
- uint32_t height;
- uint32_t frames;
- uint32_t scales;
- uint32_t *w;
- uint32_t *h;
- uint32_t *f;
- uint32_t (*offset)[8];
- TYPE *scratchbuf;
+typedef struct {
+ TYPE *data;
+ uint32_t width;
+ uint32_t height;
+ uint32_t frames;
+ uint32_t scales;
+ uint32_t *w;
+ uint32_t *h;
+ uint32_t *f;
+ uint32_t (*offset)[8];
+ TYPE *scratchbuf;
} Wavelet3DBuf;
-extern Wavelet3DBuf *wavelet_3d_buf_new (uint32_t width, uint32_t height,
- uint32_t frames);
+extern Wavelet3DBuf* wavelet_3d_buf_new (uint32_t width, uint32_t height,
+ uint32_t frames);
-extern void wavelet_3d_buf_destroy (Wavelet3DBuf * buf);
+extern void wavelet_3d_buf_destroy (Wavelet3DBuf* buf);
/**
* transform buf->data
@@ -30,21 +29,25 @@ extern void wavelet_3d_buf_destroy (Wavelet3DBuf * buf);
* highpass filter,
* s_moments the one of the synthesizing lowpass filter.
*/
-extern void wavelet_3d_buf_fwd_xform (Wavelet3DBuf * buf,
- int a_moments, int s_moments);
-extern void wavelet_3d_buf_inv_xform (Wavelet3DBuf * buf,
- int a_moments, int s_moments);
+extern void wavelet_3d_buf_fwd_xform (Wavelet3DBuf* buf,
+ int a_moments, int s_moments);
+extern void wavelet_3d_buf_inv_xform (Wavelet3DBuf* buf,
+ int a_moments, int s_moments);
-extern int wavelet_3d_buf_encode_coeff (const Wavelet3DBuf * buf,
- uint8_t * bitstream, uint32_t limit);
+extern int wavelet_3d_buf_encode_coeff (const Wavelet3DBuf* buf,
+ uint8_t *bitstream,
+ uint32_t limit);
-extern void wavelet_3d_buf_decode_coeff (Wavelet3DBuf * buf,
- uint8_t * bitstream, uint32_t limit);
+extern void wavelet_3d_buf_decode_coeff (Wavelet3DBuf* buf,
+ uint8_t *bitstream,
+ uint32_t limit);
#if defined(DBG_XFORM)
extern void wavelet_3d_buf_dump (char *fmt,
- uint32_t first_frame_in_buf,
- uint32_t id, Wavelet3DBuf * buf, int16_t offset);
+ uint32_t first_frame_in_buf,
+ uint32_t id,
+ Wavelet3DBuf* buf,
+ int16_t offset);
#else
#define wavelet_3d_buf_dump(x...)
#endif
diff --git a/ext/tarkin/yuv.h b/ext/tarkin/yuv.h
index 31711bc6f..42ceb0726 100644
--- a/ext/tarkin/yuv.h
+++ b/ext/tarkin/yuv.h
@@ -5,16 +5,17 @@
#include <stdint.h>
#include "wavelet.h"
-extern void rgb24_to_yuv (uint8_t * rgb, Wavelet3DBuf * yuv[], uint32_t frame);
-extern void yuv_to_rgb24 (Wavelet3DBuf * yuv[], uint8_t * rgb, uint32_t frame);
+extern void rgb24_to_yuv (uint8_t *rgb, Wavelet3DBuf *yuv [], uint32_t frame);
+extern void yuv_to_rgb24 (Wavelet3DBuf *yuv [], uint8_t *rgb, uint32_t frame);
-extern void rgb32_to_yuv (uint8_t * rgb, Wavelet3DBuf * yuv[], uint32_t frame);
-extern void yuv_to_rgb32 (Wavelet3DBuf * yuv[], uint8_t * rgb, uint32_t frame);
+extern void rgb32_to_yuv (uint8_t *rgb, Wavelet3DBuf *yuv [], uint32_t frame);
+extern void yuv_to_rgb32 (Wavelet3DBuf *yuv [], uint8_t *rgb, uint32_t frame);
-extern void rgba_to_yuv (uint8_t * rgba, Wavelet3DBuf * yuva[], uint32_t frame);
-extern void yuv_to_rgba (Wavelet3DBuf * yuva[], uint8_t * rgba, uint32_t frame);
+extern void rgba_to_yuv (uint8_t *rgba, Wavelet3DBuf *yuva [], uint32_t frame);
+extern void yuv_to_rgba (Wavelet3DBuf *yuva [], uint8_t *rgba, uint32_t frame);
-extern void grayscale_to_y (uint8_t * rgba, Wavelet3DBuf * y[], uint32_t frame);
-extern void y_to_grayscale (Wavelet3DBuf * y[], uint8_t * rgba, uint32_t frame);
+extern void grayscale_to_y (uint8_t *rgba, Wavelet3DBuf *y [], uint32_t frame);
+extern void y_to_grayscale (Wavelet3DBuf *y [], uint8_t *rgba, uint32_t frame);
#endif
+
diff --git a/ext/xine/gstxine.h b/ext/xine/gstxine.h
index 53d40a230..61ab50ef5 100644
--- a/ext/xine/gstxine.h
+++ b/ext/xine/gstxine.h
@@ -25,6 +25,7 @@
#include <xine/buffer.h>
G_BEGIN_DECLS
+
#define GST_TYPE_XINE \
(gst_xine_get_type())
#define GST_XINE(obj) \
@@ -37,45 +38,47 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XINE))
#define GST_IS_XINE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XINE))
-typedef struct _GstXine GstXine;
+
+typedef struct _GstXine GstXine;
typedef struct _GstXineClass GstXineClass;
struct _GstXine
{
- GstElement element;
+ GstElement element;
- xine_stream_t *stream;
- xine_ao_driver_t *audio_driver;
- xine_vo_driver_t *video_driver;
+ xine_stream_t * stream;
+ xine_ao_driver_t * audio_driver;
+ xine_vo_driver_t * video_driver;
};
-struct _GstXineClass
+struct _GstXineClass
{
- GstElementClass parent_class;
+ GstElementClass parent_class;
- xine_t *xine;
+ xine_t * xine;
- xine_ao_driver_t *(*create_audio_driver) (GstXine * xine);
- xine_vo_driver_t *(*create_video_driver) (GstXine * xine);
+ xine_ao_driver_t * (* create_audio_driver) (GstXine * xine);
+ xine_vo_driver_t * (* create_video_driver) (GstXine * xine);
};
-GType gst_xine_get_type (void);
+GType gst_xine_get_type (void);
-xine_stream_t *gst_xine_get_stream (GstXine * xine);
-void gst_xine_free_stream (GstXine * xine);
+xine_stream_t * gst_xine_get_stream (GstXine *xine);
+void gst_xine_free_stream (GstXine *xine);
-void gst_buffer_to_xine_buffer (buf_element_t * element, GstBuffer * buffer);
+void gst_buffer_to_xine_buffer (buf_element_t *element, GstBuffer *buffer);
/* conversion functions from xinecaps.c */
-const gchar *gst_xine_get_caps_for_format (guint32 format);
-guint32 gst_xine_get_format_for_caps (const GstCaps * caps);
+const gchar * gst_xine_get_caps_for_format (guint32 format);
+guint32 gst_xine_get_format_for_caps (const GstCaps *caps);
/* init functions for the plugins */
-gboolean gst_xine_audio_sink_init_plugin (GstPlugin * plugin);
-gboolean gst_xine_audio_dec_init_plugin (GstPlugin * plugin);
-gboolean gst_xine_input_init_plugin (GstPlugin * plugin);
-
+gboolean gst_xine_audio_sink_init_plugin (GstPlugin *plugin);
+gboolean gst_xine_audio_dec_init_plugin (GstPlugin *plugin);
+gboolean gst_xine_input_init_plugin (GstPlugin *plugin);
+
G_END_DECLS
+
#endif /* __GST_XINE_H__ */
diff --git a/ext/xvid/gstxvid.h b/ext/xvid/gstxvid.h
index e204ae4ae..100f93b8a 100644
--- a/ext/xvid/gstxvid.h
+++ b/ext/xvid/gstxvid.h
@@ -23,11 +23,13 @@
#include <gst/gst.h>
G_BEGIN_DECLS
+
#define gst_xvid_init_struct(s) \
do { \
memset (&s, 0, sizeof(s)); \
s.version = XVID_VERSION; \
} while (0);
+
#define RGB_24_32_STATIC_CAPS(bpp, r_mask,g_mask,b_mask) \
"video/x-raw-rgb, " \
"width = (int) [ 0, MAX ], " \
@@ -39,12 +41,14 @@ G_BEGIN_DECLS
"red_mask = (int) " G_STRINGIFY (r_mask) ", " \
"green_mask = (int) " G_STRINGIFY (g_mask) ", " \
"blue_mask = (int) " G_STRINGIFY (b_mask)
-extern gchar *gst_xvid_error (int errorcode);
-extern gboolean gst_xvid_init (void);
-extern gint gst_xvid_structure_to_csp (GstStructure * structure,
- gint w, gint * stride, gint * bpp);
-extern GstCaps *gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps);
+extern gchar * gst_xvid_error (int errorcode);
+extern gboolean gst_xvid_init (void);
+
+extern gint gst_xvid_structure_to_csp (GstStructure *structure,
+ gint w, gint *stride, gint *bpp);
+extern GstCaps *gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps);
G_END_DECLS
+
#endif /* __GST_XVID_H__ */
diff --git a/ext/xvid/gstxviddec.h b/ext/xvid/gstxviddec.h
index 105381757..fa90d06af 100644
--- a/ext/xvid/gstxviddec.h
+++ b/ext/xvid/gstxviddec.h
@@ -24,9 +24,8 @@
#include "gstxvid.h"
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_XVIDDEC \
@@ -40,34 +39,32 @@ extern "C"
#define GST_IS_XVIDDEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XVIDDEC))
- typedef struct _GstXvidDec GstXvidDec;
- typedef struct _GstXvidDecClass GstXvidDecClass;
+typedef struct _GstXvidDec GstXvidDec;
+typedef struct _GstXvidDecClass GstXvidDecClass;
- struct _GstXvidDec
- {
- GstElement element;
+struct _GstXvidDec {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad, *srcpad;
- /* xvid handle */
- void *handle;
+ /* xvid handle */
+ void *handle;
- /* video (output) settings */
- gint csp, bpp, stride;
- gint width, height;
- double fps;
- };
+ /* video (output) settings */
+ gint csp, bpp, stride;
+ gint width, height;
+ double fps;
+};
- struct _GstXvidDecClass
- {
- GstElementClass parent_class;
- };
+struct _GstXvidDecClass {
+ GstElementClass parent_class;
+};
- GType gst_xviddec_get_type (void);
+GType gst_xviddec_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_XVIDDEC_H__ */
+#endif /* __GST_XVIDDEC_H__ */
diff --git a/ext/xvid/gstxvidenc.h b/ext/xvid/gstxvidenc.h
index fa7866178..356ce53f6 100644
--- a/ext/xvid/gstxvidenc.h
+++ b/ext/xvid/gstxvidenc.h
@@ -24,9 +24,8 @@
#include "gstxvid.h"
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define GST_TYPE_XVIDENC \
@@ -40,48 +39,46 @@ extern "C"
#define GST_IS_XVIDENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XVIDENC))
- typedef struct _GstXvidEnc GstXvidEnc;
- typedef struct _GstXvidEncClass GstXvidEncClass;
+typedef struct _GstXvidEnc GstXvidEnc;
+typedef struct _GstXvidEncClass GstXvidEncClass;
- struct _GstXvidEnc
- {
- GstElement element;
+struct _GstXvidEnc {
+ GstElement element;
- /* pads */
- GstPad *sinkpad, *srcpad;
+ /* pads */
+ GstPad *sinkpad, *srcpad;
- /* encoding profile */
- gint profile;
+ /* encoding profile */
+ gint profile;
- /* quality of encoded image */
- gint bitrate;
- gint buffer_size;
+ /* quality of encoded image */
+ gint bitrate;
+ gint buffer_size;
- /* max number of B frames between I/P */
- gint max_b_frames;
+ /* max number of B frames between I/P */
+ gint max_b_frames;
- /* max key interval */
- gint max_key_interval;
+ /* max key interval */
+ gint max_key_interval;
- /* xvid handle */
- void *handle;
- gint csp;
- gint width, height, stride;
- gdouble fps;
- };
+ /* xvid handle */
+ void *handle;
+ gint csp;
+ gint width, height, stride;
+ gdouble fps;
+};
- struct _GstXvidEncClass
- {
- GstElementClass parent_class;
+struct _GstXvidEncClass {
+ GstElementClass parent_class;
- /* signals */
- void (*frame_encoded) (GstElement * element);
- };
+ /* signals */
+ void (*frame_encoded) (GstElement *element);
+};
- GType gst_xvidenc_get_type (void);
+GType gst_xvidenc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_XVIDENC_H__ */
+#endif /* __GST_XVIDENC_H__ */