summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog83
-rw-r--r--docs/plugins/gst-plugins-bad-plugins-undocumented.txt6
-rw-r--r--ext/audiofile/gstafparse.h14
-rw-r--r--ext/audiofile/gstafsink.c2
-rw-r--r--ext/audiofile/gstafsink.h16
-rw-r--r--ext/audiofile/gstafsrc.c2
-rw-r--r--ext/audiofile/gstafsrc.h14
-rw-r--r--ext/cdaudio/gstcdaudio.c10
-rw-r--r--ext/divx/gstdivxenc.c16
-rw-r--r--ext/dts/gstdtsdec.h30
-rw-r--r--ext/faac/gstfaac.h4
-rw-r--r--ext/ivorbis/vorbisenc.h14
-rw-r--r--ext/ivorbis/vorbisfile.c10
-rw-r--r--ext/musepack/gstmusepackdec.h4
-rw-r--r--ext/nas/nassink.c2
-rw-r--r--ext/snapshot/gstsnapshot.c2
-rw-r--r--ext/sndfile/gstsf.h10
-rw-r--r--ext/tarkin/gsttarkindec.h24
-rw-r--r--ext/tarkin/gsttarkinenc.h18
-rw-r--r--ext/xine/gstxine.h34
-rw-r--r--ext/xine/xinecaps.c84
-rw-r--r--ext/xvid/gstxvid.h6
-rw-r--r--gst-libs/gst/play/play.h2
-rw-r--r--gst/apetag/apedemux.h2
-rw-r--r--gst/cdxaparse/gstcdxaparse.h2
-rw-r--r--gst/cdxaparse/gstcdxastrip.h12
-rw-r--r--gst/cdxaparse/gstvcdparse.h12
-rw-r--r--gst/colorspace/yuv2rgb.c24
-rw-r--r--gst/colorspace/yuv2rgb.h8
-rw-r--r--gst/equalizer/gstiirequalizer.c102
-rw-r--r--gst/festival/gstfestival.h4
-rw-r--r--gst/games/gstpuzzle.c4
-rw-r--r--gst/games/gstvideoimage.c2
-rw-r--r--gst/games/gstvideoimage.h96
-rw-r--r--gst/modplug/gstmodplug.h2
-rw-r--r--gst/modplug/libmodplug/it_defs.h194
-rw-r--r--gst/modplug/libmodplug/modplug.h52
-rw-r--r--gst/modplug/libmodplug/sndfile.h1430
-rw-r--r--gst/modplug/libmodplug/stdafx.h8
-rw-r--r--gst/mpeg1sys/buffer.c4
-rw-r--r--gst/mpeg1sys/gstmpeg1systemencode.h2
-rw-r--r--gst/mpeg1sys/main.h160
-rw-r--r--gst/mpeg1sys/systems.c24
-rw-r--r--gst/mpeg1videoparse/gstmp1videoparse.h2
-rw-r--r--gst/mpeg2sub/gstmpeg2subt.h4
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c16
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.h2
-rw-r--r--gst/multifilesink/gstmultifilesink.h2
-rw-r--r--gst/overlay/gstoverlay.h30
-rw-r--r--gst/qtdemux/qtdemux.c152
-rw-r--r--gst/qtdemux/qtdemux.h2
-rw-r--r--gst/rtjpeg/RTjpeg.c78
-rw-r--r--gst/rtjpeg/RTjpeg.h2
-rw-r--r--gst/tta/crc32.h142
-rw-r--r--gst/tta/filters.h114
-rw-r--r--gst/tta/ttadec.h68
-rw-r--r--gst/videodrop/gstvideodrop.h2
-rw-r--r--sys/cdrom/gstcdplayer.h42
-rw-r--r--sys/cdrom/gstcdplayer_ioctl.c16
-rw-r--r--sys/cdrom/gstcdplayer_ioctl.h20
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_bsd.h516
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_irix.h66
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_solaris.h264
-rw-r--r--sys/dxr3/dxr3audiosink.c4
-rw-r--r--sys/dxr3/dxr3audiosink.h6
-rw-r--r--sys/dxr3/dxr3spusink.c2
-rw-r--r--sys/dxr3/dxr3spusink.h16
-rw-r--r--sys/dxr3/dxr3videosink.c2
-rw-r--r--sys/dxr3/dxr3videosink.h28
-rw-r--r--sys/qcam/dark.c58
-rw-r--r--sys/qcam/gstqcamsrc.c26
-rw-r--r--sys/v4l2/gstv4l2colorbalance.h8
-rw-r--r--sys/v4l2/gstv4l2element.h110
-rw-r--r--sys/v4l2/gstv4l2src.h92
-rw-r--r--sys/v4l2/gstv4l2tuner.h14
-rw-r--r--sys/v4l2/gstv4l2xoverlay.h6
-rw-r--r--sys/v4l2/v4l2_calls.c6
-rw-r--r--sys/v4l2/v4l2_calls.h102
-rw-r--r--sys/v4l2/v4l2src_calls.c6
-rw-r--r--sys/v4l2/v4l2src_calls.h42
-rw-r--r--sys/vcd/vcdsrc.h10
81 files changed, 2357 insertions, 2272 deletions
diff --git a/ChangeLog b/ChangeLog
index be4a175a..02837238 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,86 @@
+2005-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * docs/plugins/gst-plugins-bad-plugins-undocumented.txt:
+ * ext/audiofile/gstafparse.h:
+ * ext/audiofile/gstafsink.c: (gst_afsink_chain):
+ * ext/audiofile/gstafsink.h:
+ * ext/audiofile/gstafsrc.c: (gst_afsrc_close_file):
+ * ext/audiofile/gstafsrc.h:
+ * ext/cdaudio/gstcdaudio.c:
+ * ext/divx/gstdivxenc.c:
+ * ext/dts/gstdtsdec.h:
+ * ext/faac/gstfaac.h:
+ * ext/ivorbis/vorbisenc.h:
+ * ext/ivorbis/vorbisfile.c:
+ * ext/musepack/gstmusepackdec.h:
+ * ext/nas/nassink.c:
+ * ext/snapshot/gstsnapshot.c:
+ * ext/sndfile/gstsf.h:
+ * ext/tarkin/gsttarkindec.h:
+ * ext/tarkin/gsttarkinenc.h:
+ * ext/xine/gstxine.h:
+ * ext/xine/xinecaps.c:
+ * ext/xvid/gstxvid.h:
+ * gst-libs/gst/play/play.h:
+ * gst/apetag/apedemux.h:
+ * gst/cdxaparse/gstcdxaparse.h:
+ * gst/cdxaparse/gstcdxastrip.h:
+ * gst/colorspace/yuv2rgb.c:
+ * gst/colorspace/yuv2rgb.h:
+ * gst/equalizer/gstiirequalizer.c:
+ * gst/festival/gstfestival.h:
+ * gst/games/gstpuzzle.c:
+ * gst/games/gstvideoimage.c:
+ * gst/games/gstvideoimage.h:
+ * gst/modplug/gstmodplug.h:
+ * gst/modplug/libmodplug/it_defs.h:
+ * gst/modplug/libmodplug/modplug.h:
+ * gst/modplug/libmodplug/sndfile.h:
+ * gst/modplug/libmodplug/stdafx.h:
+ * gst/mpeg1sys/buffer.c:
+ * gst/mpeg1sys/gstmpeg1systemencode.h:
+ * gst/mpeg1sys/main.h:
+ * gst/mpeg1sys/systems.c:
+ * gst/mpeg1videoparse/gstmp1videoparse.h:
+ * gst/mpeg2sub/gstmpeg2subt.h:
+ * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain):
+ * gst/mpegaudioparse/gstmpegaudioparse.h:
+ * gst/multifilesink/gstmultifilesink.h:
+ * gst/overlay/gstoverlay.h:
+ * gst/qtdemux/qtdemux.c:
+ * gst/qtdemux/qtdemux.h:
+ * gst/rtjpeg/RTjpeg.c: (RTjpeg_dctY), (RTjpeg_idct):
+ * gst/rtjpeg/RTjpeg.h:
+ * gst/tta/crc32.h:
+ * gst/tta/filters.h:
+ * gst/tta/ttadec.h:
+ * gst/videodrop/gstvideodrop.h:
+ * sys/cdrom/gstcdplayer.h:
+ * sys/cdrom/gstcdplayer_ioctl.c:
+ * sys/cdrom/gstcdplayer_ioctl.h:
+ * sys/cdrom/gstcdplayer_ioctl_bsd.h:
+ * sys/cdrom/gstcdplayer_ioctl_irix.h:
+ * sys/cdrom/gstcdplayer_ioctl_solaris.h:
+ * sys/dxr3/dxr3audiosink.c:
+ * sys/dxr3/dxr3audiosink.h:
+ * sys/dxr3/dxr3spusink.c:
+ * sys/dxr3/dxr3spusink.h:
+ * sys/dxr3/dxr3videosink.c:
+ * sys/dxr3/dxr3videosink.h:
+ * sys/qcam/dark.c:
+ * sys/qcam/gstqcamsrc.c:
+ * sys/v4l2/gstv4l2colorbalance.h:
+ * sys/v4l2/gstv4l2element.h:
+ * sys/v4l2/gstv4l2src.h:
+ * sys/v4l2/gstv4l2tuner.h:
+ * sys/v4l2/gstv4l2xoverlay.h:
+ * sys/v4l2/v4l2_calls.c:
+ * sys/v4l2/v4l2_calls.h:
+ * sys/v4l2/v4l2src_calls.c:
+ * sys/v4l2/v4l2src_calls.h:
+ * sys/vcd/vcdsrc.h:
+ expand tabs
+
=== release 0.10.0 ===
2005-12-05 <thomas (at) apestaart (dot) org>
diff --git a/docs/plugins/gst-plugins-bad-plugins-undocumented.txt b/docs/plugins/gst-plugins-bad-plugins-undocumented.txt
index 8c069436..298053be 100644
--- a/docs/plugins/gst-plugins-bad-plugins-undocumented.txt
+++ b/docs/plugins/gst-plugins-bad-plugins-undocumented.txt
@@ -1,7 +1,9 @@
-50% symbol docs coverage.
-1 symbols documented.
+75% symbol docs coverage.
+3 symbols documented.
+0 symbols incomplete.
1 not documented.
GstDfbVideoSink
+
diff --git a/ext/audiofile/gstafparse.h b/ext/audiofile/gstafparse.h
index 43f64f4f..08539f1e 100644
--- a/ext/audiofile/gstafparse.h
+++ b/ext/audiofile/gstafparse.h
@@ -27,7 +27,7 @@
#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>
@@ -56,7 +56,7 @@ typedef struct _GstAFParseClass GstAFParseClass;
typedef enum {
GST_AFPARSE_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- GST_AFPARSE_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ GST_AFPARSE_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstAFParseFlags;
struct _GstAFParse {
@@ -71,9 +71,9 @@ struct _GstAFParse {
int width;
unsigned int rate;
gboolean is_signed;
- int type; /* type of output, compare to audiofile.h
- * RAW, AIFF, AIFFC, NEXTSND, WAVE
- */
+ int type; /* type of output, compare to audiofile.h
+ * RAW, AIFF, AIFFC, NEXTSND, WAVE
+ */
/* blocking */
gulong curoffset;
gulong bytes_per_read;
@@ -82,7 +82,7 @@ struct _GstAFParse {
gulong seq;
gint64 timestamp;
/* FIXME : endianness is a little cryptic at this point */
- int endianness_data; /* 4321 or 1234 */
+ 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 */
};
@@ -94,7 +94,7 @@ struct _GstAFParseClass {
void (*handoff) (GstElement *element,GstPad *pad);
};
-gboolean gst_afparse_plugin_init (GstPlugin *plugin);
+gboolean gst_afparse_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index b513a198..ace3c388 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -399,7 +399,7 @@ gst_afsink_chain (GstPad * pad, GstData * _data)
if (bytes_written < GST_BUFFER_SIZE (buf))
{
printf ("afsink : Warning : %d bytes should be written, only %d bytes written\n",
- GST_BUFFER_SIZE (buf), bytes_written);
+ GST_BUFFER_SIZE (buf), bytes_written);
}
}
*/
diff --git a/ext/audiofile/gstafsink.h b/ext/audiofile/gstafsink.h
index 9b0d0e4e..6e5379a9 100644
--- a/ext/audiofile/gstafsink.h
+++ b/ext/audiofile/gstafsink.h
@@ -26,7 +26,7 @@
#include <gst/gst.h>
-#include <audiofile.h> /* what else are we to do */
+#include <audiofile.h> /* what else are we to do */
#ifdef __cplusplus
@@ -54,7 +54,7 @@ typedef struct _GstAFSinkClass GstAFSinkClass;
typedef enum {
GST_AFSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- GST_AFSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ GST_AFSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstAFSinkFlags;
struct _GstAFSink {
@@ -71,11 +71,11 @@ struct _GstAFSink {
int width;
unsigned int rate;
gboolean is_signed;
- int type; /* type of output, compare to audiofile.h
- * RAW, AIFF, AIFFC, NEXTSND, WAVE
- */
+ 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_data; /* 4321 or 1234 */
int endianness_wanted; /* same thing, but what the output format wants */
int endianness_output; /* what the output endianness will be */
};
@@ -87,8 +87,8 @@ struct _GstAFSinkClass {
void (*handoff) (GstElement *element,GstPad *pad);
};
-GType gst_afsink_get_type (void);
-gboolean gst_afsink_plugin_init (GstPlugin *plugin);
+GType gst_afsink_get_type (void);
+gboolean gst_afsink_plugin_init (GstPlugin *plugin);
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index b17a8770..e864cf8f 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -364,7 +364,7 @@ gst_afsrc_close_file (GstAFSrc * src)
/* g_print ("DEBUG: closing srcfile...\n"); */
g_return_if_fail (GST_OBJECT_FLAG_IS_SET (src, GST_AFSRC_OPEN));
/* g_print ("DEBUG: past flag test\n"); */
-/* if (fclose (src->file) != 0) */
+/* if (fclose (src->file) != 0) */
if (afCloseFile (src->file) != 0) {
GST_ELEMENT_ERROR (src, RESOURCE, CLOSE,
(_("Error closing file \"%s\"."), src->filename), GST_ERROR_SYSTEM);
diff --git a/ext/audiofile/gstafsrc.h b/ext/audiofile/gstafsrc.h
index b5dcfba3..ae55bb8d 100644
--- a/ext/audiofile/gstafsrc.h
+++ b/ext/audiofile/gstafsrc.h
@@ -26,7 +26,7 @@
#include <gst/gst.h>
-#include <audiofile.h> /* what else are we to do */
+#include <audiofile.h> /* what else are we to do */
#ifdef __cplusplus
@@ -54,7 +54,7 @@ typedef struct _GstAFSrcClass GstAFSrcClass;
typedef enum {
GST_AFSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- GST_AFSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ GST_AFSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstAFSrcFlags;
struct _GstAFSrc {
@@ -71,9 +71,9 @@ struct _GstAFSrc {
int width;
unsigned int rate;
gboolean is_signed;
- int type; /* type of output, compare to audiofile.h
- * RAW, AIFF, AIFFC, NEXTSND, WAVE
- */
+ int type; /* type of output, compare to audiofile.h
+ * RAW, AIFF, AIFFC, NEXTSND, WAVE
+ */
/* blocking */
gulong curoffset;
gulong bytes_per_read;
@@ -81,7 +81,7 @@ struct _GstAFSrc {
gulong seq;
guint64 framestamp;
/* FIXME : endianness is a little cryptic at this point */
- int endianness_data; /* 4321 or 1234 */
+ 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 */
};
@@ -93,7 +93,7 @@ struct _GstAFSrcClass {
void (*handoff) (GstElement *element,GstPad *pad);
};
-GType gst_afsrc_get_type (void);
+GType gst_afsrc_get_type (void);
gboolean gst_afsrc_plugin_init (GstPlugin *plugin);
diff --git a/ext/cdaudio/gstcdaudio.c b/ext/cdaudio/gstcdaudio.c
index e278a687..e07e0f2b 100644
--- a/ext/cdaudio/gstcdaudio.c
+++ b/ext/cdaudio/gstcdaudio.c
@@ -25,11 +25,11 @@
#include <gst/gst.h>
-#define GST_TYPE_CDAUDIO (gst_cdaudio_get_type())
-#define GST_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDAUDIO,GstCDAudio))
-#define GST_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDAUDIO,GstCDAudioClass))
-#define GST_IS_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDAUDIO))
-#define GST_IS_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDAUDIO))
+#define GST_TYPE_CDAUDIO (gst_cdaudio_get_type())
+#define GST_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDAUDIO,GstCDAudio))
+#define GST_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDAUDIO,GstCDAudioClass))
+#define GST_IS_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDAUDIO))
+#define GST_IS_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDAUDIO))
typedef struct _GstCDAudio GstCDAudio;
typedef struct _GstCDAudioClass GstCDAudioClass;
diff --git a/ext/divx/gstdivxenc.c b/ext/divx/gstdivxenc.c
index 00ec93d1..591bb90e 100644
--- a/ext/divx/gstdivxenc.c
+++ b/ext/divx/gstdivxenc.c
@@ -366,14 +366,14 @@ gst_divxenc_chain (GstPad * pad, GstData * _data)
case GST_MAKE_FOURCC ('R', 'G', 'B', ' '):
gst_caps_get_int (caps, "depth", &d);
switch (d) {
- case 24:
- divx_cs = 0;
- bitcnt = 24;
- break;
- case 32:
- divx_cs = 0;
- bitcnt = 32;
- break;
+ case 24:
+ divx_cs = 0;
+ bitcnt = 24;
+ break;
+ case 32:
+ divx_cs = 0;
+ bitcnt = 32;
+ break;
*/
static GstPadLinkReturn
diff --git a/ext/dts/gstdtsdec.h b/ext/dts/gstdtsdec.h
index 04b7f687..6da751ed 100644
--- a/ext/dts/gstdtsdec.h
+++ b/ext/dts/gstdtsdec.h
@@ -41,31 +41,31 @@ typedef struct _GstDtsDec GstDtsDec;
typedef struct _GstDtsDecClass GstDtsDecClass;
struct _GstDtsDec {
- GstElement element;
+ GstElement element;
/* pads */
- GstPad *sinkpad,
- *srcpad;
+ GstPad *sinkpad,
+ *srcpad;
/* stream properties */
- gint bit_rate;
- gint sample_rate;
- gint stream_channels;
- gint request_channels;
- gint using_channels;
+ gint bit_rate;
+ gint sample_rate;
+ gint stream_channels;
+ gint request_channels;
+ gint using_channels;
/* decoding properties */
- sample_t level;
- sample_t bias;
- gboolean dynamic_range_compression;
- sample_t *samples;
- dts_state_t *state;
+ sample_t level;
+ sample_t bias;
+ gboolean dynamic_range_compression;
+ sample_t *samples;
+ dts_state_t *state;
/* Data left over from the previous buffer */
- GstBuffer *cache;
+ GstBuffer *cache;
/* keep track of time */
- GstClockTime current_ts;
+ GstClockTime current_ts;
};
struct _GstDtsDecClass {
diff --git a/ext/faac/gstfaac.h b/ext/faac/gstfaac.h
index b45f849e..4a17e108 100644
--- a/ext/faac/gstfaac.h
+++ b/ext/faac/gstfaac.h
@@ -52,9 +52,9 @@ typedef struct _GstFaac {
shortctl,
outputformat;
gboolean tns,
- midside;
+ midside;
gulong bytes,
- samples;
+ samples;
/* FAAC object */
faacEncHandle handle;
diff --git a/ext/ivorbis/vorbisenc.h b/ext/ivorbis/vorbisenc.h
index 60fdf670..fe44be34 100644
--- a/ext/ivorbis/vorbisenc.h
+++ b/ext/ivorbis/vorbisenc.h
@@ -45,18 +45,18 @@ typedef struct _VorbisEnc VorbisEnc;
typedef struct _VorbisEncClass VorbisEncClass;
struct _VorbisEnc {
- GstElement element;
+ GstElement element;
GstPad *sinkpad,
*srcpad;
ogg_stream_state os; /* take physical pages, weld into a logical
- stream of packets */
+ 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 */
+ settings */
vorbis_comment vc; /* struct that stores all the user comments */
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
@@ -69,20 +69,20 @@ struct _VorbisEnc {
gint min_bitrate;
gint max_bitrate;
gfloat quality;
- gboolean quality_set;
+ gboolean quality_set;
gint serial;
gint channels;
gint frequency;
- guint64 samples_in;
- guint64 bytes_out;
+ guint64 samples_in;
+ guint64 bytes_out;
GstCaps *metadata;
gboolean setup;
gboolean flush_header;
- gchar *last_message;
+ gchar *last_message;
};
struct _VorbisEncClass {
diff --git a/ext/ivorbis/vorbisfile.c b/ext/ivorbis/vorbisfile.c
index 22668a8a..353a2b43 100644
--- a/ext/ivorbis/vorbisfile.c
+++ b/ext/ivorbis/vorbisfile.c
@@ -31,15 +31,15 @@
GST_DEBUG_CATEGORY_STATIC (ivorbisfile_debug);
#define GST_CAT_DEFAULT ivorbisfile_debug
-#define GST_TYPE_IVORBISFILE \
+#define GST_TYPE_IVORBISFILE \
(ivorbisfile_get_type())
-#define GST_IVORBISFILE(obj) \
+#define GST_IVORBISFILE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IVORBISFILE,Ivorbisfile))
-#define GST_IVORBISFILE_CLASS(klass) \
+#define GST_IVORBISFILE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IVORBISFILE,IvorbisfileClass))
-#define GST_IS_IVORBISFILE(obj) \
+#define GST_IS_IVORBISFILE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IVORBISFILE))
-#define GST_IS_IVORBISFILE_CLASS(obj) \
+#define GST_IS_IVORBISFILE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IVORBISFILE))
typedef struct _Ivorbisfile Ivorbisfile;
diff --git a/ext/musepack/gstmusepackdec.h b/ext/musepack/gstmusepackdec.h
index 3b931cad..3743519c 100644
--- a/ext/musepack/gstmusepackdec.h
+++ b/ext/musepack/gstmusepackdec.h
@@ -71,8 +71,8 @@ typedef struct _GstMusepackDecClass {
GType gst_musepackdec_get_type (void);
extern gboolean gst_musepackdec_src_convert (GstPad * pad,
- GstFormat src_format,
- gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
+ GstFormat src_format,
+ gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
G_END_DECLS
diff --git a/ext/nas/nassink.c b/ext/nas/nassink.c
index dafe71bc..b647861a 100644
--- a/ext/nas/nassink.c
+++ b/ext/nas/nassink.c
@@ -30,7 +30,7 @@
#include <audio/soundlib.h>
#include "nassink.h"
-#define NAS_SOUND_PORT_DURATION (2)
+#define NAS_SOUND_PORT_DURATION (2)
GST_DEBUG_CATEGORY (NAS);
/* Signals and args */
diff --git a/ext/snapshot/gstsnapshot.c b/ext/snapshot/gstsnapshot.c
index cc259460..d037de00 100644
--- a/ext/snapshot/gstsnapshot.c
+++ b/ext/snapshot/gstsnapshot.c
@@ -26,7 +26,7 @@
#include "gstsnapshot.h"
#include <gst/video/video.h>
-#define MAX_HEIGHT 2048
+#define MAX_HEIGHT 2048
/* elementfactory information */
static GstElementDetails snapshot_details = {
diff --git a/ext/sndfile/gstsf.h b/ext/sndfile/gstsf.h
index 54ef6297..c415ff85 100644
--- a/ext/sndfile/gstsf.h
+++ b/ext/sndfile/gstsf.h
@@ -66,8 +66,8 @@ typedef struct _GstSF GstSF;
typedef struct _GstSFClass GstSFClass;
typedef enum {
- GST_SF_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- GST_SF_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ GST_SF_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
+ GST_SF_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstSFlags;
typedef struct {
@@ -106,9 +106,9 @@ 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
diff --git a/ext/tarkin/gsttarkindec.h b/ext/tarkin/gsttarkindec.h
index b1baf4f3..8651da16 100644
--- a/ext/tarkin/gsttarkindec.h
+++ b/ext/tarkin/gsttarkindec.h
@@ -49,18 +49,18 @@ struct _TarkinDec {
GstPad *sinkpad,*srcpad;
- ogg_sync_state oy;
- ogg_stream_state os;
- ogg_page og;
- ogg_packet op;
-
- TarkinStream *tarkin_stream;
- TarkinComment tc;
- TarkinInfo ti;
- TarkinVideoLayerDesc layer[1];
-
- gint frame_num;
- gint nheader;
+ ogg_sync_state oy;
+ ogg_stream_state os;
+ ogg_page og;
+ ogg_packet op;
+
+ TarkinStream *tarkin_stream;
+ TarkinComment tc;
+ TarkinInfo ti;
+ TarkinVideoLayerDesc layer[1];
+
+ gint frame_num;
+ gint nheader;
gboolean eos;
gint bitrate;
diff --git a/ext/tarkin/gsttarkinenc.h b/ext/tarkin/gsttarkinenc.h
index b6252a88..61b02e9a 100644
--- a/ext/tarkin/gsttarkinenc.h
+++ b/ext/tarkin/gsttarkinenc.h
@@ -49,17 +49,17 @@ struct _TarkinEnc {
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;
diff --git a/ext/xine/gstxine.h b/ext/xine/gstxine.h
index 61ab50ef..e222d7f1 100644
--- a/ext/xine/gstxine.h
+++ b/ext/xine/gstxine.h
@@ -44,40 +44,40 @@ 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
{
- 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
diff --git a/ext/xine/xinecaps.c b/ext/xine/xinecaps.c
index 1df3ab97..1cf46463 100644
--- a/ext/xine/xinecaps.c
+++ b/ext/xine/xinecaps.c
@@ -29,56 +29,56 @@ typedef struct
static GstXineCapsMap _gst_xine_caps_map[] = {
{BUF_AUDIO_QDESIGN2, "audio/x-qdm2"},
/* FIXME:
-#define BUF_AUDIO_A52 0x03000000
-#define BUF_AUDIO_MPEG 0x03010000
-#define BUF_AUDIO_LPCM_BE 0x03020000
-#define BUF_AUDIO_LPCM_LE 0x03030000
-#define BUF_AUDIO_WMAV1 0x03040000
-#define BUF_AUDIO_DTS 0x03050000
-#define BUF_AUDIO_MSADPCM 0x03060000
-#define BUF_AUDIO_MSIMAADPCM 0x03070000
-#define BUF_AUDIO_MSGSM 0x03080000
+#define BUF_AUDIO_A52 0x03000000
+#define BUF_AUDIO_MPEG 0x03010000
+#define BUF_AUDIO_LPCM_BE 0x03020000
+#define BUF_AUDIO_LPCM_LE 0x03030000
+#define BUF_AUDIO_WMAV1 0x03040000
+#define BUF_AUDIO_DTS 0x03050000
+#define BUF_AUDIO_MSADPCM 0x03060000
+#define BUF_AUDIO_MSIMAADPCM 0x03070000
+#define BUF_AUDIO_MSGSM 0x03080000
#define BUF_AUDIO_VORBIS 0x03090000
#define BUF_AUDIO_IMC 0x030a0000
#define BUF_AUDIO_LH 0x030b0000
#define BUF_AUDIO_VOXWARE 0x030c0000
#define BUF_AUDIO_ACELPNET 0x030d0000
#define BUF_AUDIO_AAC 0x030e0000
-#define BUF_AUDIO_DNET 0x030f0000
+#define BUF_AUDIO_DNET 0x030f0000
#define BUF_AUDIO_VIVOG723 0x03100000
-#define BUF_AUDIO_DK3ADPCM 0x03110000
-#define BUF_AUDIO_DK4ADPCM 0x03120000
-#define BUF_AUDIO_ROQ 0x03130000
-#define BUF_AUDIO_QTIMAADPCM 0x03140000
-#define BUF_AUDIO_MAC3 0x03150000
-#define BUF_AUDIO_MAC6 0x03160000
-#define BUF_AUDIO_QDESIGN1 0x03170000
-#define BUF_AUDIO_QDESIGN2 0x03180000
-#define BUF_AUDIO_QCLP 0x03190000
-#define BUF_AUDIO_SMJPEG_IMA 0x031A0000
-#define BUF_AUDIO_VQA_IMA 0x031B0000
-#define BUF_AUDIO_MULAW 0x031C0000
-#define BUF_AUDIO_ALAW 0x031D0000
-#define BUF_AUDIO_GSM610 0x031E0000
+#define BUF_AUDIO_DK3ADPCM 0x03110000
+#define BUF_AUDIO_DK4ADPCM 0x03120000
+#define BUF_AUDIO_ROQ 0x03130000
+#define BUF_AUDIO_QTIMAADPCM 0x03140000
+#define BUF_AUDIO_MAC3 0x03150000
+#define BUF_AUDIO_MAC6 0x03160000
+#define BUF_AUDIO_QDESIGN1 0x03170000
+#define BUF_AUDIO_QDESIGN2 0x03180000
+#define BUF_AUDIO_QCLP 0x03190000
+#define BUF_AUDIO_SMJPEG_IMA 0x031A0000
+#define BUF_AUDIO_VQA_IMA 0x031B0000
+#define BUF_AUDIO_MULAW 0x031C0000
+#define BUF_AUDIO_ALAW 0x031D0000
+#define BUF_AUDIO_GSM610 0x031E0000
#define BUF_AUDIO_EA_ADPCM 0x031F0000
-#define BUF_AUDIO_WMAV2 0x03200000
-#define BUF_AUDIO_COOK 0x03210000
-#define BUF_AUDIO_ATRK 0x03220000
-#define BUF_AUDIO_14_4 0x03230000
-#define BUF_AUDIO_28_8 0x03240000
-#define BUF_AUDIO_SIPRO 0x03250000
-#define BUF_AUDIO_WMAV3 0x03260000
-#define BUF_AUDIO_INTERPLAY 0x03270000
-#define BUF_AUDIO_XA_ADPCM 0x03280000
-#define BUF_AUDIO_WESTWOOD 0x03290000
-#define BUF_AUDIO_DIALOGIC_IMA 0x032A0000
-#define BUF_AUDIO_NSF 0x032B0000
-#define BUF_AUDIO_FLAC 0x032C0000
-#define BUF_AUDIO_DV 0x032D0000
-#define BUF_AUDIO_WMAV 0x032E0000
-#define BUF_AUDIO_SPEEX 0x032F0000
-#define BUF_AUDIO_RAWPCM 0x03300000
-#define BUF_AUDIO_4X_ADPCM 0x03310000
+#define BUF_AUDIO_WMAV2 0x03200000
+#define BUF_AUDIO_COOK 0x03210000
+#define BUF_AUDIO_ATRK 0x03220000
+#define BUF_AUDIO_14_4 0x03230000
+#define BUF_AUDIO_28_8 0x03240000
+#define BUF_AUDIO_SIPRO 0x03250000
+#define BUF_AUDIO_WMAV3 0x03260000
+#define BUF_AUDIO_INTERPLAY 0x03270000
+#define BUF_AUDIO_XA_ADPCM 0x03280000
+#define BUF_AUDIO_WESTWOOD 0x03290000
+#define BUF_AUDIO_DIALOGIC_IMA 0x032A0000
+#define BUF_AUDIO_NSF 0x032B0000
+#define BUF_AUDIO_FLAC 0x032C0000
+#define BUF_AUDIO_DV 0x032D0000
+#define BUF_AUDIO_WMAV 0x032E0000
+#define BUF_AUDIO_SPEEX 0x032F0000
+#define BUF_AUDIO_RAWPCM 0x03300000
+#define BUF_AUDIO_4X_ADPCM 0x03310000
*/
{0, NULL}
};
diff --git a/ext/xvid/gstxvid.h b/ext/xvid/gstxvid.h
index 100f93b8..5b855b5d 100644
--- a/ext/xvid/gstxvid.h
+++ b/ext/xvid/gstxvid.h
@@ -42,11 +42,11 @@ G_BEGIN_DECLS
"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 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);
+ gint w, gint *stride, gint *bpp);
extern GstCaps *gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps);
G_END_DECLS
diff --git a/gst-libs/gst/play/play.h b/gst-libs/gst/play/play.h
index a5ca4142..eeec9fd8 100644
--- a/gst-libs/gst/play/play.h
+++ b/gst-libs/gst/play/play.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
/* GError stuff */
-#define GST_PLAY_ERROR gst_play_error_quark ()
+#define GST_PLAY_ERROR gst_play_error_quark ()
/* GObject stuff */
#define GST_TYPE_PLAY (gst_play_get_type())
diff --git a/gst/apetag/apedemux.h b/gst/apetag/apedemux.h
index e0be1589..5f82f279 100644
--- a/gst/apetag/apedemux.h
+++ b/gst/apetag/apedemux.h
@@ -57,7 +57,7 @@ typedef struct _GstApeDemuxClass {
GstElementClass parent_class;
} GstApeDemuxClass;
-GType gst_ape_demux_get_type (void);
+GType gst_ape_demux_get_type (void);
G_END_DECLS
diff --git a/gst/cdxaparse/gstcdxaparse.h b/gst/cdxaparse/gstcdxaparse.h
index 0177b94b..afe4111c 100644
--- a/gst/cdxaparse/gstcdxaparse.h
+++ b/gst/cdxaparse/gstcdxaparse.h
@@ -67,7 +67,7 @@ struct _GstCDXAParseClass {
GstElementClass parent_class;
};
-GType gst_cdxaparse_get_type (void);
+GType gst_cdxaparse_get_type (void);
G_END_DECLS
diff --git a/gst/cdxaparse/gstcdxastrip.h b/gst/cdxaparse/gstcdxastrip.h
index 59cf4ab6..932352f6 100644
--- a/gst/cdxaparse/gstcdxastrip.h
+++ b/gst/cdxaparse/gstcdxastrip.h
@@ -35,9 +35,9 @@ G_BEGIN_DECLS
#define GST_IS_CDXASTRIP_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXASTRIP))
-#define GST_CDXA_SECTOR_SIZE 2352
-#define GST_CDXA_DATA_SIZE 2324
-#define GST_CDXA_HEADER_SIZE 24
+#define GST_CDXA_SECTOR_SIZE 2352
+#define GST_CDXA_DATA_SIZE 2324
+#define GST_CDXA_HEADER_SIZE 24
typedef struct _GstCDXAStrip GstCDXAStrip;
typedef struct _GstCDXAStripClass GstCDXAStripClass;
@@ -54,13 +54,13 @@ struct _GstCDXAStripClass {
GstElementClass parent_class;
};
-GType gst_cdxastrip_get_type (void);
+GType gst_cdxastrip_get_type (void);
/*
* Also useful for CDXAparse.
*/
-GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
-gint gst_cdxastrip_sync (GstBuffer * buf);
+GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
+gint gst_cdxastrip_sync (GstBuffer * buf);
G_END_DECLS
diff --git a/gst/cdxaparse/gstvcdparse.h b/gst/cdxaparse/gstvcdparse.h
index 59cf4ab6..932352f6 100644
--- a/gst/cdxaparse/gstvcdparse.h
+++ b/gst/cdxaparse/gstvcdparse.h
@@ -35,9 +35,9 @@ G_BEGIN_DECLS
#define GST_IS_CDXASTRIP_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXASTRIP))
-#define GST_CDXA_SECTOR_SIZE 2352
-#define GST_CDXA_DATA_SIZE 2324
-#define GST_CDXA_HEADER_SIZE 24
+#define GST_CDXA_SECTOR_SIZE 2352
+#define GST_CDXA_DATA_SIZE 2324
+#define GST_CDXA_HEADER_SIZE 24
typedef struct _GstCDXAStrip GstCDXAStrip;
typedef struct _GstCDXAStripClass GstCDXAStripClass;
@@ -54,13 +54,13 @@ struct _GstCDXAStripClass {
GstElementClass parent_class;
};
-GType gst_cdxastrip_get_type (void);
+GType gst_cdxastrip_get_type (void);
/*
* Also useful for CDXAparse.
*/
-GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
-gint gst_cdxastrip_sync (GstBuffer * buf);
+GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
+gint gst_cdxastrip_sync (GstBuffer * buf);
G_END_DECLS
diff --git a/gst/colorspace/yuv2rgb.c b/gst/colorspace/yuv2rgb.c
index 290f07bc..d9232513 100644
--- a/gst/colorspace/yuv2rgb.c
+++ b/gst/colorspace/yuv2rgb.c
@@ -46,17 +46,17 @@ static int U_b_tab[256];
#define GAMMA_CORRECTION(x) ((int)(pow((x) / 255.0, 1.0 / gammaCorrect) * 255.0))
#define CHROMA_CORRECTION256(x) ((x) >= 128 \
- ? 128 + Min(127, (int)(((x) - 128.0) * chromaCorrect)) \
- : 128 - Min(128, (int)((128.0 - (x)) * chromaCorrect)))
+ ? 128 + Min(127, (int)(((x) - 128.0) * chromaCorrect)) \
+ : 128 - Min(128, (int)((128.0 - (x)) * chromaCorrect)))
#define CHROMA_CORRECTION128(x) ((x) >= 0 \
- ? Min(127, (int)(((x) * chromaCorrect))) \
- : Max(-128, (int)(((x) * chromaCorrect))))
+ ? Min(127, (int)(((x) * chromaCorrect))) \
+ : Max(-128, (int)(((x) * chromaCorrect))))
#define CHROMA_CORRECTION256D(x) ((x) >= 128 \
- ? 128.0 + Min(127.0, (((x) - 128.0) * chromaCorrect)) \
- : 128.0 - Min(128.0, (((128.0 - (x)) * chromaCorrect))))
+ ? 128.0 + Min(127.0, (((x) - 128.0) * chromaCorrect)) \
+ : 128.0 - Min(128.0, (((128.0 - (x)) * chromaCorrect))))
#define CHROMA_CORRECTION128D(x) ((x) >= 0 \
- ? Min(127.0, ((x) * chromaCorrect)) \
- : Max(-128.0, ((x) * chromaCorrect)))
+ ? Min(127.0, ((x) * chromaCorrect)) \
+ : Max(-128.0, ((x) * chromaCorrect)))
void gst_colorspace_I420_to_rgb16 (GstColorspace * space, unsigned char *src,
@@ -345,14 +345,14 @@ free_bits_at_bottom (a)
*
* InitColor16Dither --
*
- * To get rid of the multiply and other conversions in color
- * dither, we use a lookup table.
+ * To get rid of the multiply and other conversions in color
+ * dither, we use a lookup table.
*
* Results:
- * None.
+ * None.
*
* Side effects:
- * The lookup tables are initialized.
+ * The lookup tables are initialized.
*
*--------------------------------------------------------------
*/
diff --git a/gst/colorspace/yuv2rgb.h b/gst/colorspace/yuv2rgb.h
index e136f4d8..ed701cbd 100644
--- a/gst/colorspace/yuv2rgb.h
+++ b/gst/colorspace/yuv2rgb.h
@@ -85,10 +85,10 @@ GstColorspaceYUVTables * gst_colorspace_init_yuv(long depth,
#if 0
-GstColorspaceConverter* gst_colorspace_yuv2rgb_get_converter (const GstCaps *from, const GstCaps *to);
-#define gst_colorspace_convert(converter, src, dest) \
- (converter)->convert((converter), (src), (dest))
-void gst_colorspace_converter_destroy (GstColorspaceConverter *space);
+GstColorspaceConverter* gst_colorspace_yuv2rgb_get_converter (const GstCaps *from, const GstCaps *to);
+#define gst_colorspace_convert(converter, src, dest) \
+ (converter)->convert((converter), (src), (dest))
+void gst_colorspace_converter_destroy (GstColorspaceConverter *space);
#endif
G_END_DECLS
diff --git a/gst/equalizer/gstiirequalizer.c b/gst/equalizer/gstiirequalizer.c
index 0a4a24dc..5b19f48c 100644
--- a/gst/equalizer/gstiirequalizer.c
+++ b/gst/equalizer/gstiirequalizer.c
@@ -340,57 +340,57 @@ gst_iir_equalizer_get_property (GObject * object, guint prop_id,
/* start of code that is type specific */
-#define CREATE_OPTIMIZED_FUNCTIONS(TYPE,BIG_TYPE,MIN_VAL,MAX_VAL) \
-typedef struct { \
- TYPE x1, x2; /* history of input values for a filter */ \
- TYPE y1, y2; /* history of output values for a filter */ \
-} SecondOrderHistory ## TYPE; \
- \
-static inline TYPE \
-one_step_ ## TYPE (SecondOrderFilter *filter, \
- SecondOrderHistory ## TYPE *history, TYPE input) \
-{ \
- /* calculate output */ \
- TYPE output = filter->alpha * (input - history->x2) + \
- filter->gamma * history->y1 - filter->beta * history->y2; \
- /* update history */ \
- history->y2 = history->y1; \
- history->y1 = output; \
- history->x2 = history->x1; \
- history->x1 = input; \
- \
- return output; \
-} \
- \
-static const guint \
-history_size_ ## TYPE = sizeof (SecondOrderHistory ## TYPE); \
- \
-static void \
-gst_iir_equ_process_ ## TYPE (GstIirEqualizer *equ, guint8 *data, \
-guint size, guint channels) \
-{ \
- guint frames = size / channels / sizeof (TYPE); \
- guint i, c, f; \
- BIG_TYPE cur; \
- TYPE val; \
- \
- for (i = 0; i < frames; i++) { \
- for (c = 0; c < channels; c++) { \
- SecondOrderHistory ## TYPE *history = equ->history; \
- val = *((TYPE *) data); \
- cur = 0; \
- for (f = 0; f < equ->freq_count; f++) { \
- SecondOrderFilter *filter = &equ->filter[f]; \
- \
- cur += one_step_ ## TYPE (filter, history, val); \
- history++; \
- } \
- cur += val * 0.25; \
- cur = CLAMP (cur, MIN_VAL, MAX_VAL); \
- *((TYPE *) data) = (TYPE) cur; \
- data += sizeof (TYPE); \
- } \
- } \
+#define CREATE_OPTIMIZED_FUNCTIONS(TYPE,BIG_TYPE,MIN_VAL,MAX_VAL) \
+typedef struct { \
+ TYPE x1, x2; /* history of input values for a filter */ \
+ TYPE y1, y2; /* history of output values for a filter */ \
+} SecondOrderHistory ## TYPE; \
+ \
+static inline TYPE \
+one_step_ ## TYPE (SecondOrderFilter *filter, \
+ SecondOrderHistory ## TYPE *history, TYPE input) \
+{ \
+ /* calculate output */ \
+ TYPE output = filter->alpha * (input - history->x2) + \
+ filter->gamma * history->y1 - filter->beta * history->y2; \
+ /* update history */ \
+ history->y2 = history->y1; \
+ history->y1 = output; \
+ history->x2 = history->x1; \
+ history->x1 = input; \
+ \
+ return output; \
+} \
+ \
+static const guint \
+history_size_ ## TYPE = sizeof (SecondOrderHistory ## TYPE); \
+ \
+static void \
+gst_iir_equ_process_ ## TYPE (GstIirEqualizer *equ, guint8 *data, \
+guint size, guint channels) \
+{ \
+ guint frames = size / channels / sizeof (TYPE); \
+ guint i, c, f; \
+ BIG_TYPE cur; \
+ TYPE val; \
+ \
+ for (i = 0; i < frames; i++) { \
+ for (c = 0; c < channels; c++) { \
+ SecondOrderHistory ## TYPE *history = equ->history; \
+ val = *((TYPE *) data); \
+ cur = 0; \
+ for (f = 0; f < equ->freq_count; f++) { \
+ SecondOrderFilter *filter = &equ->filter[f]; \
+ \
+ cur += one_step_ ## TYPE (filter, history, val); \
+ history++; \
+ } \
+ cur += val * 0.25; \
+ cur = CLAMP (cur, MIN_VAL, MAX_VAL); \
+ *((TYPE *) data) = (TYPE) cur; \
+ data += sizeof (TYPE); \
+ } \
+ } \
}
CREATE_OPTIMIZED_FUNCTIONS (gint16, gint, -32768, 32767);
diff --git a/gst/festival/gstfestival.h b/gst/festival/gstfestival.h
index c7c91e32..296538ee 100644
--- a/gst/festival/gstfestival.h
+++ b/gst/festival/gstfestival.h
@@ -94,9 +94,9 @@ typedef struct FT_Info
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FESTIVAL))
typedef enum {
- GST_FESTIVAL_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
+ GST_FESTIVAL_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- GST_FESTIVAL_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ GST_FESTIVAL_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstFestivalFlags;
typedef struct _GstFestival GstFestival;
diff --git a/gst/games/gstpuzzle.c b/gst/games/gstpuzzle.c
index f15e4839..6ebc5100 100644
--- a/gst/games/gstpuzzle.c
+++ b/gst/games/gstpuzzle.c
@@ -1,7 +1,7 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- * <2003> David Schleef <ds@schleef.org>
- * <2004> Benjamin Otte <otte@gnome.org>
+ * <2003> David Schleef <ds@schleef.org>
+ * <2004> Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/gst/games/gstvideoimage.c b/gst/games/gstvideoimage.c
index c18843c8..5c660a25 100644
--- a/gst/games/gstvideoimage.c
+++ b/gst/games/gstvideoimage.c
@@ -1,6 +1,6 @@
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- * <2004> Benjamin Otte <otte@gnome.org>
+ * <2004> Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/gst/games/gstvideoimage.h b/gst/games/gstvideoimage.h
index 7392d0d1..06677781 100644
--- a/gst/games/gstvideoimage.h
+++ b/gst/games/gstvideoimage.h
@@ -1,6 +1,6 @@
/* GStreamer
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
- * <2004> Benjamin Otte <otte@gnome.org
+ * <2004> Benjamin Otte <otte@gnome.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -31,8 +31,8 @@ typedef struct _GstVideoImage GstVideoImage;
typedef struct _GstVideoFormat GstVideoFormat;
struct _GstVideoColor {
- int Y, U, V;
- int R, G, B;
+ int Y, U, V;
+ int R, G, B;
};
extern const GstVideoColor GST_VIDEO_COLOR_WHITE;
extern const GstVideoColor GST_VIDEO_COLOR_YELLOW;
@@ -50,64 +50,64 @@ extern const GstVideoColor GST_VIDEO_COLOR_DARK_GREY;
struct _GstVideoImage
{
- guint8 * dest; /* pointer to first byte of video data */
- guint8 * yp, *up, *vp; /* pointers to first byte of each component
- * for both packed/planar YUV and RGB */
- guint8 * endptr; /* pointer to byte beyond last video data */
- guint ystride;
- guint ustride;
- guint vstride;
- guint width;
- guint height;
+ guint8 * dest; /* pointer to first byte of video data */
+ guint8 * yp, *up, *vp; /* pointers to first byte of each component
+ * for both packed/planar YUV and RGB */
+ guint8 * endptr; /* pointer to byte beyond last video data */
+ guint ystride;
+ guint ustride;
+ guint vstride;
+ guint width;
+ guint height;
const GstVideoFormat * format;
};
struct _GstVideoFormat
{
- char * fourcc;
- char * name;
- int bitspp;
- void (* paint_setup) (GstVideoImage * p, char *dest);
- void (* paint_hline) (GstVideoImage * p, int x, int y, int w, const GstVideoColor *c);
- void (* copy_hline) (GstVideoImage * dest, int destx, int desty,
+ char * fourcc;
+ char * name;
+ int bitspp;
+ void (* paint_setup) (GstVideoImage * p, char *dest);
+ void (* paint_hline) (GstVideoImage * p, int x, int y, int w, const GstVideoColor *c);
+ void (* copy_hline) (GstVideoImage * dest, int destx, int desty,
GstVideoImage * src, int srcx, int srcy, int w);
- int ext_caps;
- int depth;
- guint red_mask;
- guint green_mask;
- guint blue_mask;
+ int ext_caps;
+ int depth;
+ guint red_mask;
+ guint green_mask;
+ guint blue_mask;
};
-const GstVideoFormat * gst_video_format_find_by_fourcc (int find_fourcc);
-const GstVideoFormat * gst_video_format_find_by_name (const char *name);
-const GstVideoFormat * gst_video_format_find_by_structure (const GstStructure *structure);
-GstStructure * gst_video_format_get_structure (const GstVideoFormat *format);
-guint gst_video_format_get_size (const GstVideoFormat *format,
- guint w, guint h);
+const GstVideoFormat * gst_video_format_find_by_fourcc (int find_fourcc);
+const GstVideoFormat * gst_video_format_find_by_name (const char *name);
+const GstVideoFormat * gst_video_format_find_by_structure (const GstStructure *structure);
+GstStructure * gst_video_format_get_structure (const GstVideoFormat *format);
+guint gst_video_format_get_size (const GstVideoFormat *format,
+ guint w, guint h);
extern const GstVideoFormat gst_video_format_list[];
extern const guint gst_video_format_count;
-void gst_video_image_setup (GstVideoImage *image,
- const GstVideoFormat *format,
- guint8 *data, guint w, guint h);
-
+void gst_video_image_setup (GstVideoImage *image,
+ const GstVideoFormat *format,
+ guint8 *data, guint w, guint h);
+
/* drawing operations */
-void gst_video_image_draw_hline (GstVideoImage *image,
- gint x, gint y, gint w,
- const GstVideoColor *c);
-void gst_video_image_draw_rectangle (GstVideoImage *image,
- gint x, gint y, gint w, gint h,
- const GstVideoColor *c, gboolean filled);
-void gst_video_image_copy_hline (GstVideoImage *dest,
- gint xdest, gint ydest,
- GstVideoImage *src,
- gint xsrc, gint ysrc, gint w);
-void gst_video_image_copy_area (GstVideoImage *dest,
- gint xdest, gint ydest,
- GstVideoImage *src,
- gint xsrc, gint ysrc,
- gint w, gint h);
+void gst_video_image_draw_hline (GstVideoImage *image,
+ gint x, gint y, gint w,
+ const GstVideoColor *c);
+void gst_video_image_draw_rectangle (GstVideoImage *image,
+ gint x, gint y, gint w, gint h,
+ const GstVideoColor *c, gboolean filled);
+void gst_video_image_copy_hline (GstVideoImage *dest,
+ gint xdest, gint ydest,
+ GstVideoImage *src,
+ gint xsrc, gint ysrc, gint w);
+void gst_video_image_copy_area (GstVideoImage *dest,
+ gint xdest, gint ydest,
+ GstVideoImage *src,
+ gint xsrc, gint ysrc,
+ gint w, gint h);
G_END_DECLS
diff --git a/gst/modplug/gstmodplug.h b/gst/modplug/gstmodplug.h
index c4a98b86..faddc0cd 100644
--- a/gst/modplug/gstmodplug.h
+++ b/gst/modplug/gstmodplug.h
@@ -27,7 +27,7 @@ extern "C" {
#include <gst/gst.h>
#include <gst/bytestream/bytestream.h>
-
+
#define GST_TYPE_MODPLUG \
(gst_modplug_get_type())
diff --git a/gst/modplug/libmodplug/it_defs.h b/gst/modplug/libmodplug/it_defs.h
index 732ce45c..3bc3ef35 100644
--- a/gst/modplug/libmodplug/it_defs.h
+++ b/gst/modplug/libmodplug/it_defs.h
@@ -5,125 +5,125 @@
typedef struct tagITFILEHEADER
{
- DWORD id; /* 0x4D504D49 */
- CHAR songname[26];
- WORD reserved1; /* 0x1004 */
- WORD ordnum;
- WORD insnum;
- WORD smpnum;
- WORD patnum;
- WORD cwtv;
- WORD cmwt;
- WORD flags;
- WORD special;
- BYTE globalvol;
- BYTE mv;
- BYTE speed;
- BYTE tempo;
- BYTE sep;
- BYTE zero;
- WORD msglength;
- DWORD msgoffset;
- DWORD reserved2;
- BYTE chnpan[64];
- BYTE chnvol[64];
+ DWORD id; /* 0x4D504D49 */
+ CHAR songname[26];
+ WORD reserved1; /* 0x1004 */
+ WORD ordnum;
+ WORD insnum;
+ WORD smpnum;
+ WORD patnum;
+ WORD cwtv;
+ WORD cmwt;
+ WORD flags;
+ WORD special;
+ BYTE globalvol;
+ BYTE mv;
+ BYTE speed;
+ BYTE tempo;
+ BYTE sep;
+ BYTE zero;
+ WORD msglength;
+ DWORD msgoffset;
+ DWORD reserved2;
+ BYTE chnpan[64];
+ BYTE chnvol[64];
} ITFILEHEADER;
typedef struct tagITENVELOPE
{
- BYTE flags;
- BYTE num;
- BYTE lpb;
- BYTE lpe;
- BYTE slb;
- BYTE sle;
- BYTE data[25*3];
- BYTE reserved;
+ BYTE flags;
+ BYTE num;
+ BYTE lpb;
+ BYTE lpe;
+ BYTE slb;
+ BYTE sle;
+ BYTE data[25*3];
+ BYTE reserved;
} ITENVELOPE;
/* Old Impulse Instrument Format (cmwt < 0x200) */
typedef struct tagITOLDINSTRUMENT
{
- DWORD id; /* IMPI = 0x49504D49 */
- CHAR filename[12]; /* DOS file name */
- BYTE zero;
- BYTE flags;
- BYTE vls;
- BYTE vle;
- BYTE sls;
- BYTE sle;
- WORD reserved1;
- WORD fadeout;
- BYTE nna;
- BYTE dnc;
- WORD trkvers;
- BYTE nos;
- BYTE reserved2;
- CHAR name[26];
- WORD reserved3[3];
- BYTE keyboard[240];
- BYTE volenv[200];
- BYTE nodes[50];
+ DWORD id; /* IMPI = 0x49504D49 */
+ CHAR filename[12]; /* DOS file name */
+ BYTE zero;
+ BYTE flags;
+ BYTE vls;
+ BYTE vle;
+ BYTE sls;
+ BYTE sle;
+ WORD reserved1;
+ WORD fadeout;
+ BYTE nna;
+ BYTE dnc;
+ WORD trkvers;
+ BYTE nos;
+ BYTE reserved2;
+ CHAR name[26];
+ WORD reserved3[3];
+ BYTE keyboard[240];
+ BYTE volenv[200];
+ BYTE nodes[50];
} ITOLDINSTRUMENT;
/* Impulse Instrument Format */
typedef struct tagITINSTRUMENT
{
- DWORD id;
- CHAR filename[12];
- BYTE zero;
- BYTE nna;
- BYTE dct;
- BYTE dca;
- WORD fadeout;
- signed char pps;
- BYTE ppc;
- BYTE gbv;
- BYTE dfp;
- BYTE rv;
- BYTE rp;
- WORD trkvers;
- BYTE nos;
- BYTE reserved1;
- CHAR name[26];
- BYTE ifc;
- BYTE ifr;
- BYTE mch;
- BYTE mpr;
- WORD mbank;
- BYTE keyboard[240];
- ITENVELOPE volenv;
- ITENVELOPE panenv;
- ITENVELOPE pitchenv;
- BYTE dummy[4]; /* was 7, but IT v2.17 saves 554 bytes */
+ DWORD id;
+ CHAR filename[12];
+ BYTE zero;
+ BYTE nna;
+ BYTE dct;
+ BYTE dca;
+ WORD fadeout;
+ signed char pps;
+ BYTE ppc;
+ BYTE gbv;
+ BYTE dfp;
+ BYTE rv;
+ BYTE rp;
+ WORD trkvers;
+ BYTE nos;
+ BYTE reserved1;
+ CHAR name[26];
+ BYTE ifc;
+ BYTE ifr;
+ BYTE mch;
+ BYTE mpr;
+ WORD mbank;
+ BYTE keyboard[240];
+ ITENVELOPE volenv;
+ ITENVELOPE panenv;
+ ITENVELOPE pitchenv;
+ BYTE dummy[4]; /* was 7, but IT v2.17 saves 554 bytes */
} ITINSTRUMENT;
/* IT Sample Format */
typedef struct ITSAMPLESTRUCT
{
- DWORD id; /* 0x53504D49 */
- CHAR filename[12];
- BYTE zero;
- BYTE gvl;
- BYTE flags;
- BYTE vol;
- CHAR name[26];
- BYTE cvt;
- BYTE dfp;
- DWORD length;
- DWORD loopbegin;
- DWORD loopend;
- DWORD C5Speed;
- DWORD susloopbegin;
- DWORD susloopend;
- DWORD samplepointer;
- BYTE vis;
- BYTE vid;
- BYTE vir;
- BYTE vit;
+ DWORD id; /* 0x53504D49 */
+ CHAR filename[12];
+ BYTE zero;
+ BYTE gvl;
+ BYTE flags;
+ BYTE vol;
+ CHAR name[26];
+ BYTE cvt;
+ BYTE dfp;
+ DWORD length;
+ DWORD loopbegin;
+ DWORD loopend;
+ DWORD C5Speed;
+ DWORD susloopbegin;
+ DWORD susloopend;
+ DWORD samplepointer;
+ BYTE vis;
+ BYTE vid;
+ BYTE vir;
+ BYTE vit;
} ITSAMPLESTRUCT;
#pragma pack()
diff --git a/gst/modplug/libmodplug/modplug.h b/gst/modplug/libmodplug/modplug.h
index fd8ec02f..ead6d627 100644
--- a/gst/modplug/libmodplug/modplug.h
+++ b/gst/modplug/libmodplug/modplug.h
@@ -43,40 +43,40 @@ void ModPlug_Seek(ModPlugFile* file, int millisecond);
enum _ModPlug_Flags
{
- MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (*highly* recommended) */
- MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */
- MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */
- MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */
- MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */
+ MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (*highly* recommended) */
+ MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */
+ MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */
+ MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */
+ MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */
};
enum _ModPlug_ResamplingMode
{
- MODPLUG_RESAMPLE_NEAREST = 0, /* No interpolation (very fast, extremely bad sound quality) */
- MODPLUG_RESAMPLE_LINEAR = 1, /* Linear interpolation (fast, good quality) */
- MODPLUG_RESAMPLE_SPLINE = 2, /* Cubic spline interpolation (high quality) */
- MODPLUG_RESAMPLE_FIR = 3 /* 8-tap fir filter (extremely high quality) */
+ MODPLUG_RESAMPLE_NEAREST = 0, /* No interpolation (very fast, extremely bad sound quality) */
+ MODPLUG_RESAMPLE_LINEAR = 1, /* Linear interpolation (fast, good quality) */
+ MODPLUG_RESAMPLE_SPLINE = 2, /* Cubic spline interpolation (high quality) */
+ MODPLUG_RESAMPLE_FIR = 3 /* 8-tap fir filter (extremely high quality) */
};
typedef struct _ModPlug_Settings
{
- int mFlags; /* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed */
-
- /* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
- * down-mixes to the settings you choose. */
- int mChannels; /* Number of channels - 1 for mono or 2 for stereo */
- int mBits; /* Bits per sample - 8, 16, or 32 */
- int mFrequency; /* Sampling rate - 11025, 22050, or 44100 */
- int mResamplingMode; /* One of MODPLUG_RESAMPLE_*, above */
-
- int mReverbDepth; /* Reverb level 0(quiet)-100(loud) */
- int mReverbDelay; /* Reverb delay in ms, usually 40-200ms */
- int mBassAmount; /* XBass level 0(quiet)-100(loud) */
- int mBassRange; /* XBass cutoff in Hz 10-100 */
- int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */
- int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */
- int mLoopCount; /* Number of times to loop. Zero prevents looping.
- -1 loops forever. */
+ int mFlags; /* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed */
+
+ /* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
+ * down-mixes to the settings you choose. */
+ int mChannels; /* Number of channels - 1 for mono or 2 for stereo */
+ int mBits; /* Bits per sample - 8, 16, or 32 */
+ int mFrequency; /* Sampling rate - 11025, 22050, or 44100 */
+ int mResamplingMode; /* One of MODPLUG_RESAMPLE_*, above */
+
+ int mReverbDepth; /* Reverb level 0(quiet)-100(loud) */
+ int mReverbDelay; /* Reverb delay in ms, usually 40-200ms */
+ int mBassAmount; /* XBass level 0(quiet)-100(loud) */
+ int mBassRange; /* XBass cutoff in Hz 10-100 */
+ int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */
+ int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */
+ int mLoopCount; /* Number of times to loop. Zero prevents looping.
+ -1 loops forever. */
} ModPlug_Settings;
/* Get and set the mod decoder settings. All options, except for channels, bits-per-sample,
diff --git a/gst/modplug/libmodplug/sndfile.h b/gst/modplug/libmodplug/sndfile.h
index 0fe6f459..0bfb51f2 100644
--- a/gst/modplug/libmodplug/sndfile.h
+++ b/gst/modplug/libmodplug/sndfile.h
@@ -12,500 +12,500 @@
typedef const BYTE * LPCBYTE;
#endif
-#define MOD_AMIGAC2 0x1AB
-#define MAX_SAMPLE_LENGTH 16000000
-#define MAX_SAMPLE_RATE 50000
-#define MAX_ORDERS 256
-#define MAX_PATTERNS 240
-#define MAX_SAMPLES 240
-#define MAX_INSTRUMENTS MAX_SAMPLES
+#define MOD_AMIGAC2 0x1AB
+#define MAX_SAMPLE_LENGTH 16000000
+#define MAX_SAMPLE_RATE 50000
+#define MAX_ORDERS 256
+#define MAX_PATTERNS 240
+#define MAX_SAMPLES 240
+#define MAX_INSTRUMENTS MAX_SAMPLES
#ifdef FASTSOUNDLIB
-#define MAX_CHANNELS 80
+#define MAX_CHANNELS 80
#else
-#define MAX_CHANNELS 128
+#define MAX_CHANNELS 128
#endif
-#define MAX_BASECHANNELS 64
-#define MAX_ENVPOINTS 32
-#define MIN_PERIOD 0x0020
-#define MAX_PERIOD 0xFFFF
-#define MAX_PATTERNNAME 32
-#define MAX_CHANNELNAME 20
-#define MAX_INFONAME 80
-#define MAX_EQ_BANDS 6
-#define MAX_MIXPLUGINS 8
-
-
-#define MOD_TYPE_NONE 0x00
-#define MOD_TYPE_MOD 0x01
-#define MOD_TYPE_S3M 0x02
-#define MOD_TYPE_XM 0x04
-#define MOD_TYPE_MED 0x08
-#define MOD_TYPE_MTM 0x10
-#define MOD_TYPE_IT 0x20
-#define MOD_TYPE_669 0x40
-#define MOD_TYPE_ULT 0x80
-#define MOD_TYPE_STM 0x100
-#define MOD_TYPE_FAR 0x200
-#define MOD_TYPE_WAV 0x400
-#define MOD_TYPE_AMF 0x800
-#define MOD_TYPE_AMS 0x1000
-#define MOD_TYPE_DSM 0x2000
-#define MOD_TYPE_MDL 0x4000
-#define MOD_TYPE_OKT 0x8000
-#define MOD_TYPE_MID 0x10000
-#define MOD_TYPE_DMF 0x20000
-#define MOD_TYPE_PTM 0x40000
-#define MOD_TYPE_DBM 0x80000
-#define MOD_TYPE_MT2 0x100000
-#define MOD_TYPE_AMF0 0x200000
-#define MOD_TYPE_PSM 0x400000
-#define MOD_TYPE_J2B 0x800000
-#define MOD_TYPE_UMX 0x80000000 /* Fake type */
-#define MAX_MODTYPE 23
+#define MAX_BASECHANNELS 64
+#define MAX_ENVPOINTS 32
+#define MIN_PERIOD 0x0020
+#define MAX_PERIOD 0xFFFF
+#define MAX_PATTERNNAME 32
+#define MAX_CHANNELNAME 20
+#define MAX_INFONAME 80
+#define MAX_EQ_BANDS 6
+#define MAX_MIXPLUGINS 8
+
+
+#define MOD_TYPE_NONE 0x00
+#define MOD_TYPE_MOD 0x01
+#define MOD_TYPE_S3M 0x02
+#define MOD_TYPE_XM 0x04
+#define MOD_TYPE_MED 0x08
+#define MOD_TYPE_MTM 0x10
+#define MOD_TYPE_IT 0x20
+#define MOD_TYPE_669 0x40
+#define MOD_TYPE_ULT 0x80
+#define MOD_TYPE_STM 0x100
+#define MOD_TYPE_FAR 0x200
+#define MOD_TYPE_WAV 0x400
+#define MOD_TYPE_AMF 0x800
+#define MOD_TYPE_AMS 0x1000
+#define MOD_TYPE_DSM 0x2000
+#define MOD_TYPE_MDL 0x4000
+#define MOD_TYPE_OKT 0x8000
+#define MOD_TYPE_MID 0x10000
+#define MOD_TYPE_DMF 0x20000
+#define MOD_TYPE_PTM 0x40000
+#define MOD_TYPE_DBM 0x80000
+#define MOD_TYPE_MT2 0x100000
+#define MOD_TYPE_AMF0 0x200000
+#define MOD_TYPE_PSM 0x400000
+#define MOD_TYPE_J2B 0x800000
+#define MOD_TYPE_UMX 0x80000000 /* Fake type */
+#define MAX_MODTYPE 23
/* Channel flags: */
-/* Bits 0-7: Sample Flags */
-#define CHN_16BIT 0x01
-#define CHN_LOOP 0x02
-#define CHN_PINGPONGLOOP 0x04
-#define CHN_SUSTAINLOOP 0x08
-#define CHN_PINGPONGSUSTAIN 0x10
-#define CHN_PANNING 0x20
-#define CHN_STEREO 0x40
-#define CHN_PINGPONGFLAG 0x80
-/* Bits 8-31: Channel Flags */
-#define CHN_MUTE 0x100
-#define CHN_KEYOFF 0x200
-#define CHN_NOTEFADE 0x400
-#define CHN_SURROUND 0x800
-#define CHN_NOIDO 0x1000
-#define CHN_HQSRC 0x2000
-#define CHN_FILTER 0x4000
-#define CHN_VOLUMERAMP 0x8000
-#define CHN_VIBRATO 0x10000
-#define CHN_TREMOLO 0x20000
-#define CHN_PANBRELLO 0x40000
-#define CHN_PORTAMENTO 0x80000
-#define CHN_GLISSANDO 0x100000
-#define CHN_VOLENV 0x200000
-#define CHN_PANENV 0x400000
-#define CHN_PITCHENV 0x800000
-#define CHN_FASTVOLRAMP 0x1000000
-#define CHN_EXTRALOUD 0x2000000
-#define CHN_REVERB 0x4000000
-#define CHN_NOREVERB 0x8000000
-
-
-#define ENV_VOLUME 0x0001
-#define ENV_VOLSUSTAIN 0x0002
-#define ENV_VOLLOOP 0x0004
-#define ENV_PANNING 0x0008
-#define ENV_PANSUSTAIN 0x0010
-#define ENV_PANLOOP 0x0020
-#define ENV_PITCH 0x0040
-#define ENV_PITCHSUSTAIN 0x0080
-#define ENV_PITCHLOOP 0x0100
-#define ENV_SETPANNING 0x0200
-#define ENV_FILTER 0x0400
-#define ENV_VOLCARRY 0x0800
-#define ENV_PANCARRY 0x1000
-#define ENV_PITCHCARRY 0x2000
-
-#define CMD_NONE 0
-#define CMD_ARPEGGIO 1
-#define CMD_PORTAMENTOUP 2
-#define CMD_PORTAMENTODOWN 3
-#define CMD_TONEPORTAMENTO 4
-#define CMD_VIBRATO 5
-#define CMD_TONEPORTAVOL 6
-#define CMD_VIBRATOVOL 7
-#define CMD_TREMOLO 8
-#define CMD_PANNING8 9
-#define CMD_OFFSET 10
-#define CMD_VOLUMESLIDE 11
-#define CMD_POSITIONJUMP 12
-#define CMD_VOLUME 13
-#define CMD_PATTERNBREAK 14
-#define CMD_RETRIG 15
-#define CMD_SPEED 16
-#define CMD_TEMPO 17
-#define CMD_TREMOR 18
-#define CMD_MODCMDEX 19
-#define CMD_S3MCMDEX 20
-#define CMD_CHANNELVOLUME 21
-#define CMD_CHANNELVOLSLIDE 22
-#define CMD_GLOBALVOLUME 23
-#define CMD_GLOBALVOLSLIDE 24
-#define CMD_KEYOFF 25
-#define CMD_FINEVIBRATO 26
-#define CMD_PANBRELLO 27
-#define CMD_XFINEPORTAUPDOWN 28
-#define CMD_PANNINGSLIDE 29
-#define CMD_SETENVPOSITION 30
-#define CMD_MIDI 31
+/* Bits 0-7: Sample Flags */
+#define CHN_16BIT 0x01
+#define CHN_LOOP 0x02
+#define CHN_PINGPONGLOOP 0x04
+#define CHN_SUSTAINLOOP 0x08
+#define CHN_PINGPONGSUSTAIN 0x10
+#define CHN_PANNING 0x20
+#define CHN_STEREO 0x40
+#define CHN_PINGPONGFLAG 0x80
+/* Bits 8-31: Channel Flags */
+#define CHN_MUTE 0x100
+#define CHN_KEYOFF 0x200
+#define CHN_NOTEFADE 0x400
+#define CHN_SURROUND 0x800
+#define CHN_NOIDO 0x1000
+#define CHN_HQSRC 0x2000
+#define CHN_FILTER 0x4000
+#define CHN_VOLUMERAMP 0x8000
+#define CHN_VIBRATO 0x10000
+#define CHN_TREMOLO 0x20000
+#define CHN_PANBRELLO 0x40000
+#define CHN_PORTAMENTO 0x80000
+#define CHN_GLISSANDO 0x100000
+#define CHN_VOLENV 0x200000
+#define CHN_PANENV 0x400000
+#define CHN_PITCHENV 0x800000
+#define CHN_FASTVOLRAMP 0x1000000
+#define CHN_EXTRALOUD 0x2000000
+#define CHN_REVERB 0x4000000
+#define CHN_NOREVERB 0x8000000
+
+
+#define ENV_VOLUME 0x0001
+#define ENV_VOLSUSTAIN 0x0002
+#define ENV_VOLLOOP 0x0004
+#define ENV_PANNING 0x0008
+#define ENV_PANSUSTAIN 0x0010
+#define ENV_PANLOOP 0x0020
+#define ENV_PITCH 0x0040
+#define ENV_PITCHSUSTAIN 0x0080
+#define ENV_PITCHLOOP 0x0100
+#define ENV_SETPANNING 0x0200
+#define ENV_FILTER 0x0400
+#define ENV_VOLCARRY 0x0800
+#define ENV_PANCARRY 0x1000
+#define ENV_PITCHCARRY 0x2000
+
+#define CMD_NONE 0
+#define CMD_ARPEGGIO 1
+#define CMD_PORTAMENTOUP 2
+#define CMD_PORTAMENTODOWN 3
+#define CMD_TONEPORTAMENTO 4
+#define CMD_VIBRATO 5
+#define CMD_TONEPORTAVOL 6
+#define CMD_VIBRATOVOL 7
+#define CMD_TREMOLO 8
+#define CMD_PANNING8 9
+#define CMD_OFFSET 10
+#define CMD_VOLUMESLIDE 11
+#define CMD_POSITIONJUMP 12
+#define CMD_VOLUME 13
+#define CMD_PATTERNBREAK 14
+#define CMD_RETRIG 15
+#define CMD_SPEED 16
+#define CMD_TEMPO 17
+#define CMD_TREMOR 18
+#define CMD_MODCMDEX 19
+#define CMD_S3MCMDEX 20
+#define CMD_CHANNELVOLUME 21
+#define CMD_CHANNELVOLSLIDE 22
+#define CMD_GLOBALVOLUME 23
+#define CMD_GLOBALVOLSLIDE 24
+#define CMD_KEYOFF 25
+#define CMD_FINEVIBRATO 26
+#define CMD_PANBRELLO 27
+#define CMD_XFINEPORTAUPDOWN 28
+#define CMD_PANNINGSLIDE 29
+#define CMD_SETENVPOSITION 30
+#define CMD_MIDI 31
/* Volume Column commands */
-#define VOLCMD_VOLUME 1
-#define VOLCMD_PANNING 2
-#define VOLCMD_VOLSLIDEUP 3
-#define VOLCMD_VOLSLIDEDOWN 4
-#define VOLCMD_FINEVOLUP 5
-#define VOLCMD_FINEVOLDOWN 6
-#define VOLCMD_VIBRATOSPEED 7
-#define VOLCMD_VIBRATO 8
-#define VOLCMD_PANSLIDELEFT 9
-#define VOLCMD_PANSLIDERIGHT 10
-#define VOLCMD_TONEPORTAMENTO 11
-#define VOLCMD_PORTAUP 12
-#define VOLCMD_PORTADOWN 13
-
-#define RSF_16BIT 0x04
-#define RSF_STEREO 0x08
-
-#define RS_PCM8S 0 /* 8-bit signed */
-#define RS_PCM8U 1 /* 8-bit unsigned */
-#define RS_PCM8D 2 /* 8-bit delta values */
-#define RS_ADPCM4 3 /* 4-bit ADPCM-packed */
-#define RS_PCM16D 4 /* 16-bit delta values */
-#define RS_PCM16S 5 /* 16-bit signed */
-#define RS_PCM16U 6 /* 16-bit unsigned */
-#define RS_PCM16M 7 /* 16-bit motorola order */
-#define RS_STPCM8S (RS_PCM8S|RSF_STEREO) /* stereo 8-bit signed */
-#define RS_STPCM8U (RS_PCM8U|RSF_STEREO) /* stereo 8-bit unsigned */
-#define RS_STPCM8D (RS_PCM8D|RSF_STEREO) /* stereo 8-bit delta values */
-#define RS_STPCM16S (RS_PCM16S|RSF_STEREO) /* stereo 16-bit signed */
-#define RS_STPCM16U (RS_PCM16U|RSF_STEREO) /* stereo 16-bit unsigned */
-#define RS_STPCM16D (RS_PCM16D|RSF_STEREO) /* stereo 16-bit delta values */
-#define RS_STPCM16M (RS_PCM16M|RSF_STEREO) /* stereo 16-bit signed big endian */
+#define VOLCMD_VOLUME 1
+#define VOLCMD_PANNING 2
+#define VOLCMD_VOLSLIDEUP 3
+#define VOLCMD_VOLSLIDEDOWN 4
+#define VOLCMD_FINEVOLUP 5
+#define VOLCMD_FINEVOLDOWN 6
+#define VOLCMD_VIBRATOSPEED 7
+#define VOLCMD_VIBRATO 8
+#define VOLCMD_PANSLIDELEFT 9
+#define VOLCMD_PANSLIDERIGHT 10
+#define VOLCMD_TONEPORTAMENTO 11
+#define VOLCMD_PORTAUP 12
+#define VOLCMD_PORTADOWN 13
+
+#define RSF_16BIT 0x04
+#define RSF_STEREO 0x08
+
+#define RS_PCM8S 0 /* 8-bit signed */
+#define RS_PCM8U 1 /* 8-bit unsigned */
+#define RS_PCM8D 2 /* 8-bit delta values */
+#define RS_ADPCM4 3 /* 4-bit ADPCM-packed */
+#define RS_PCM16D 4 /* 16-bit delta values */
+#define RS_PCM16S 5 /* 16-bit signed */
+#define RS_PCM16U 6 /* 16-bit unsigned */
+#define RS_PCM16M 7 /* 16-bit motorola order */
+#define RS_STPCM8S (RS_PCM8S|RSF_STEREO) /* stereo 8-bit signed */
+#define RS_STPCM8U (RS_PCM8U|RSF_STEREO) /* stereo 8-bit unsigned */
+#define RS_STPCM8D (RS_PCM8D|RSF_STEREO) /* stereo 8-bit delta values */
+#define RS_STPCM16S (RS_PCM16S|RSF_STEREO) /* stereo 16-bit signed */
+#define RS_STPCM16U (RS_PCM16U|RSF_STEREO) /* stereo 16-bit unsigned */
+#define RS_STPCM16D (RS_PCM16D|RSF_STEREO) /* stereo 16-bit delta values */
+#define RS_STPCM16M (RS_PCM16M|RSF_STEREO) /* stereo 16-bit signed big endian */
/* IT 2.14 compressed samples */
-#define RS_IT2148 0x10
-#define RS_IT21416 0x14
-#define RS_IT2158 0x12
-#define RS_IT21516 0x16
+#define RS_IT2148 0x10
+#define RS_IT21416 0x14
+#define RS_IT2158 0x12
+#define RS_IT21516 0x16
/* AMS Packed Samples */
-#define RS_AMS8 0x11
-#define RS_AMS16 0x15
+#define RS_AMS8 0x11
+#define RS_AMS16 0x15
/* DMF Huffman compression */
-#define RS_DMF8 0x13
-#define RS_DMF16 0x17
+#define RS_DMF8 0x13
+#define RS_DMF16 0x17
/* MDL Huffman compression */
-#define RS_MDL8 0x20
-#define RS_MDL16 0x24
-#define RS_PTM8DTO16 0x25
+#define RS_MDL8 0x20
+#define RS_MDL16 0x24
+#define RS_PTM8DTO16 0x25
/* Stereo Interleaved Samples */
-#define RS_STIPCM8S (RS_PCM8S|0x40|RSF_STEREO) /* stereo 8-bit signed */
-#define RS_STIPCM8U (RS_PCM8U|0x40|RSF_STEREO) /* stereo 8-bit unsigned */
-#define RS_STIPCM16S (RS_PCM16S|0x40|RSF_STEREO) /* stereo 16-bit signed */
-#define RS_STIPCM16U (RS_PCM16U|0x40|RSF_STEREO) /* stereo 16-bit unsigned */
-#define RS_STIPCM16M (RS_PCM16M|0x40|RSF_STEREO) /* stereo 16-bit signed big endian */
+#define RS_STIPCM8S (RS_PCM8S|0x40|RSF_STEREO) /* stereo 8-bit signed */
+#define RS_STIPCM8U (RS_PCM8U|0x40|RSF_STEREO) /* stereo 8-bit unsigned */
+#define RS_STIPCM16S (RS_PCM16S|0x40|RSF_STEREO) /* stereo 16-bit signed */
+#define RS_STIPCM16U (RS_PCM16U|0x40|RSF_STEREO) /* stereo 16-bit unsigned */
+#define RS_STIPCM16M (RS_PCM16M|0x40|RSF_STEREO) /* stereo 16-bit signed big endian */
/* 24-bit signed */
-#define RS_PCM24S (RS_PCM16S|0x80) /* mono 24-bit signed */
-#define RS_STIPCM24S (RS_PCM16S|0x80|RSF_STEREO) /* stereo 24-bit signed */
-#define RS_PCM32S (RS_PCM16S|0xC0) /* mono 24-bit signed */
-#define RS_STIPCM32S (RS_PCM16S|0xC0|RSF_STEREO) /* stereo 24-bit signed */
+#define RS_PCM24S (RS_PCM16S|0x80) /* mono 24-bit signed */
+#define RS_STIPCM24S (RS_PCM16S|0x80|RSF_STEREO) /* stereo 24-bit signed */
+#define RS_PCM32S (RS_PCM16S|0xC0) /* mono 24-bit signed */
+#define RS_STIPCM32S (RS_PCM16S|0xC0|RSF_STEREO) /* stereo 24-bit signed */
/* NNA types */
-#define NNA_NOTECUT 0
-#define NNA_CONTINUE 1
-#define NNA_NOTEOFF 2
-#define NNA_NOTEFADE 3
+#define NNA_NOTECUT 0
+#define NNA_CONTINUE 1
+#define NNA_NOTEOFF 2
+#define NNA_NOTEFADE 3
/* DCT types */
-#define DCT_NONE 0
-#define DCT_NOTE 1
-#define DCT_SAMPLE 2
-#define DCT_INSTRUMENT 3
+#define DCT_NONE 0
+#define DCT_NOTE 1
+#define DCT_SAMPLE 2
+#define DCT_INSTRUMENT 3
/* DNA types */
-#define DNA_NOTECUT 0
-#define DNA_NOTEOFF 1
-#define DNA_NOTEFADE 2
+#define DNA_NOTECUT 0
+#define DNA_NOTEOFF 1
+#define DNA_NOTEFADE 2
/* Mixer Hardware-Dependent features */
-#define SYSMIX_ENABLEMMX 0x01
-#define SYSMIX_WINDOWSNT 0x02
-#define SYSMIX_SLOWCPU 0x04
-#define SYSMIX_FASTCPU 0x08
+#define SYSMIX_ENABLEMMX 0x01
+#define SYSMIX_WINDOWSNT 0x02
+#define SYSMIX_SLOWCPU 0x04
+#define SYSMIX_FASTCPU 0x08
/* Module flags */
-#define SONG_EMBEDMIDICFG 0x0001
-#define SONG_FASTVOLSLIDES 0x0002
-#define SONG_ITOLDEFFECTS 0x0004
-#define SONG_ITCOMPATMODE 0x0008
-#define SONG_LINEARSLIDES 0x0010
-#define SONG_PATTERNLOOP 0x0020
-#define SONG_STEP 0x0040
-#define SONG_PAUSED 0x0080
-#define SONG_FADINGSONG 0x0100
-#define SONG_ENDREACHED 0x0200
-#define SONG_GLOBALFADE 0x0400
-#define SONG_CPUVERYHIGH 0x0800
-#define SONG_FIRSTTICK 0x1000
-#define SONG_MPTFILTERMODE 0x2000
-#define SONG_SURROUNDPAN 0x4000
-#define SONG_EXFILTERRANGE 0x8000
-#define SONG_AMIGALIMITS 0x10000
+#define SONG_EMBEDMIDICFG 0x0001
+#define SONG_FASTVOLSLIDES 0x0002
+#define SONG_ITOLDEFFECTS 0x0004
+#define SONG_ITCOMPATMODE 0x0008
+#define SONG_LINEARSLIDES 0x0010
+#define SONG_PATTERNLOOP 0x0020
+#define SONG_STEP 0x0040
+#define SONG_PAUSED 0x0080
+#define SONG_FADINGSONG 0x0100
+#define SONG_ENDREACHED 0x0200
+#define SONG_GLOBALFADE 0x0400
+#define SONG_CPUVERYHIGH 0x0800
+#define SONG_FIRSTTICK 0x1000
+#define SONG_MPTFILTERMODE 0x2000
+#define SONG_SURROUNDPAN 0x4000
+#define SONG_EXFILTERRANGE 0x8000
+#define SONG_AMIGALIMITS 0x10000
/* Global Options (Renderer) */
-#define SNDMIX_REVERSESTEREO 0x0001
-#define SNDMIX_NOISEREDUCTION 0x0002
-#define SNDMIX_AGC 0x0004
-#define SNDMIX_NORESAMPLING 0x0008
-#define SNDMIX_HQRESAMPLER 0x0010
-#define SNDMIX_MEGABASS 0x0020
-#define SNDMIX_SURROUND 0x0040
-#define SNDMIX_REVERB 0x0080
-#define SNDMIX_EQ 0x0100
-#define SNDMIX_SOFTPANNING 0x0200
-#define SNDMIX_ULTRAHQSRCMODE 0x0400
+#define SNDMIX_REVERSESTEREO 0x0001
+#define SNDMIX_NOISEREDUCTION 0x0002
+#define SNDMIX_AGC 0x0004
+#define SNDMIX_NORESAMPLING 0x0008
+#define SNDMIX_HQRESAMPLER 0x0010
+#define SNDMIX_MEGABASS 0x0020
+#define SNDMIX_SURROUND 0x0040
+#define SNDMIX_REVERB 0x0080
+#define SNDMIX_EQ 0x0100
+#define SNDMIX_SOFTPANNING 0x0200
+#define SNDMIX_ULTRAHQSRCMODE 0x0400
/* Misc Flags (can safely be turned on or off) */
-#define SNDMIX_DIRECTTODISK 0x10000
-#define SNDMIX_ENABLEMMX 0x20000
-#define SNDMIX_NOBACKWARDJUMPS 0x40000
-#define SNDMIX_MAXDEFAULTPAN 0x80000 /* Used by the MOD loader */
+#define SNDMIX_DIRECTTODISK 0x10000
+#define SNDMIX_ENABLEMMX 0x20000
+#define SNDMIX_NOBACKWARDJUMPS 0x40000
+#define SNDMIX_MAXDEFAULTPAN 0x80000 /* Used by the MOD loader */
/* Reverb Types (GM2 Presets) */
enum {
- REVERBTYPE_SMALLROOM,
- REVERBTYPE_MEDIUMROOM,
- REVERBTYPE_LARGEROOM,
- REVERBTYPE_SMALLHALL,
- REVERBTYPE_MEDIUMHALL,
- REVERBTYPE_LARGEHALL,
- NUM_REVERBTYPES
+ REVERBTYPE_SMALLROOM,
+ REVERBTYPE_MEDIUMROOM,
+ REVERBTYPE_LARGEROOM,
+ REVERBTYPE_SMALLHALL,
+ REVERBTYPE_MEDIUMHALL,
+ REVERBTYPE_LARGEHALL,
+ NUM_REVERBTYPES
};
enum {
- SRCMODE_NEAREST,
- SRCMODE_LINEAR,
- SRCMODE_SPLINE,
- SRCMODE_POLYPHASE,
- NUM_SRC_MODES
+ SRCMODE_NEAREST,
+ SRCMODE_LINEAR,
+ SRCMODE_SPLINE,
+ SRCMODE_POLYPHASE,
+ NUM_SRC_MODES
};
/* Sample Struct */
typedef struct _MODINSTRUMENT
{
- UINT nLength,nLoopStart,nLoopEnd;
- UINT nSustainStart, nSustainEnd;
- signed char *pSample;
- UINT nC4Speed;
- WORD nPan;
- WORD nVolume;
- WORD nGlobalVol;
- WORD uFlags;
- signed char RelativeTone;
- signed char nFineTune;
- BYTE nVibType;
- BYTE nVibSweep;
- BYTE nVibDepth;
- BYTE nVibRate;
- CHAR name[22];
+ UINT nLength,nLoopStart,nLoopEnd;
+ UINT nSustainStart, nSustainEnd;
+ signed char *pSample;
+ UINT nC4Speed;
+ WORD nPan;
+ WORD nVolume;
+ WORD nGlobalVol;
+ WORD uFlags;
+ signed char RelativeTone;
+ signed char nFineTune;
+ BYTE nVibType;
+ BYTE nVibSweep;
+ BYTE nVibDepth;
+ BYTE nVibRate;
+ CHAR name[22];
} MODINSTRUMENT;
/* Instrument Struct */
typedef struct _INSTRUMENTHEADER
{
- UINT nFadeOut;
- DWORD dwFlags;
- WORD nGlobalVol;
- WORD nPan;
- WORD VolPoints[MAX_ENVPOINTS];
- WORD PanPoints[MAX_ENVPOINTS];
- WORD PitchPoints[MAX_ENVPOINTS];
- BYTE VolEnv[MAX_ENVPOINTS];
- BYTE PanEnv[MAX_ENVPOINTS];
- BYTE PitchEnv[MAX_ENVPOINTS];
- BYTE Keyboard[128];
- BYTE NoteMap[128];
-
- BYTE nVolEnv;
- BYTE nPanEnv;
- BYTE nPitchEnv;
- BYTE nVolLoopStart;
- BYTE nVolLoopEnd;
- BYTE nVolSustainBegin;
- BYTE nVolSustainEnd;
- BYTE nPanLoopStart;
- BYTE nPanLoopEnd;
- BYTE nPanSustainBegin;
- BYTE nPanSustainEnd;
- BYTE nPitchLoopStart;
- BYTE nPitchLoopEnd;
- BYTE nPitchSustainBegin;
- BYTE nPitchSustainEnd;
- BYTE nNNA;
- BYTE nDCT;
- BYTE nDNA;
- BYTE nPanSwing;
- BYTE nVolSwing;
- BYTE nIFC;
- BYTE nIFR;
- WORD wMidiBank;
- BYTE nMidiProgram;
- BYTE nMidiChannel;
- BYTE nMidiDrumKey;
- signed char nPPS;
- unsigned char nPPC;
- CHAR name[32];
- CHAR filename[12];
+ UINT nFadeOut;
+ DWORD dwFlags;
+ WORD nGlobalVol;
+ WORD nPan;
+ WORD VolPoints[MAX_ENVPOINTS];
+ WORD PanPoints[MAX_ENVPOINTS];
+ WORD PitchPoints[MAX_ENVPOINTS];
+ BYTE VolEnv[MAX_ENVPOINTS];
+ BYTE PanEnv[MAX_ENVPOINTS];
+ BYTE PitchEnv[MAX_ENVPOINTS];
+ BYTE Keyboard[128];
+ BYTE NoteMap[128];
+
+ BYTE nVolEnv;
+ BYTE nPanEnv;
+ BYTE nPitchEnv;
+ BYTE nVolLoopStart;
+ BYTE nVolLoopEnd;
+ BYTE nVolSustainBegin;
+ BYTE nVolSustainEnd;
+ BYTE nPanLoopStart;
+ BYTE nPanLoopEnd;
+ BYTE nPanSustainBegin;
+ BYTE nPanSustainEnd;
+ BYTE nPitchLoopStart;
+ BYTE nPitchLoopEnd;
+ BYTE nPitchSustainBegin;
+ BYTE nPitchSustainEnd;
+ BYTE nNNA;
+ BYTE nDCT;
+ BYTE nDNA;
+ BYTE nPanSwing;
+ BYTE nVolSwing;
+ BYTE nIFC;
+ BYTE nIFR;
+ WORD wMidiBank;
+ BYTE nMidiProgram;
+ BYTE nMidiChannel;
+ BYTE nMidiDrumKey;
+ signed char nPPS;
+ unsigned char nPPC;
+ CHAR name[32];
+ CHAR filename[12];
} INSTRUMENTHEADER;
/* Channel Struct */
typedef struct _MODCHANNEL
{
- /* First 32-bytes: Most used mixing information: don't change it */
- signed char * pCurrentSample;
- DWORD nPos;
- DWORD nPosLo; /* actually 16-bit */
- LONG nInc; /* 16.16 */
- LONG nRightVol;
- LONG nLeftVol;
- LONG nRightRamp;
- LONG nLeftRamp;
- /* 2nd cache line */
- DWORD nLength;
- DWORD dwFlags;
- DWORD nLoopStart;
- DWORD nLoopEnd;
- LONG nRampRightVol;
- LONG nRampLeftVol;
- LONG nFilter_Y1, nFilter_Y2, nFilter_Y3, nFilter_Y4;
- LONG nFilter_A0, nFilter_B0, nFilter_B1;
- LONG nROfs, nLOfs;
- LONG nRampLength;
- /* Information not used in the mixer */
- signed char * pSample;
- LONG nNewRightVol, nNewLeftVol;
- LONG nRealVolume, nRealPan;
- LONG nVolume, nPan, nFadeOutVol;
- LONG nPeriod, nC4Speed, nPortamentoDest;
- INSTRUMENTHEADER *pHeader;
- MODINSTRUMENT *pInstrument;
- DWORD nVolEnvPosition, nPanEnvPosition, nPitchEnvPosition;
- DWORD nMasterChn, nVUMeter;
- LONG nGlobalVol, nInsVol;
- LONG nFineTune, nTranspose;
- LONG nPortamentoSlide, nAutoVibDepth;
- UINT nAutoVibPos, nVibratoPos, nTremoloPos, nPanbrelloPos;
- /* 16-bit members */
- signed short nVolSwing, nPanSwing;
- /* 8-bit members */
- BYTE nNote, nNNA;
- BYTE nNewNote, nNewIns, nCommand, nArpeggio;
- BYTE nOldVolumeSlide, nOldFineVolUpDown;
- BYTE nOldPortaUpDown, nOldFinePortaUpDown;
- BYTE nOldPanSlide, nOldChnVolSlide;
- BYTE nVibratoType, nVibratoSpeed, nVibratoDepth;
- BYTE nTremoloType, nTremoloSpeed, nTremoloDepth;
- BYTE nPanbrelloType, nPanbrelloSpeed, nPanbrelloDepth;
- BYTE nOldCmdEx, nOldVolParam, nOldTempo;
- BYTE nOldOffset, nOldHiOffset;
- BYTE nCutOff, nResonance;
- BYTE nRetrigCount, nRetrigParam;
- BYTE nTremorCount, nTremorParam;
- BYTE nPatternLoop, nPatternLoopCount;
- BYTE nRowNote, nRowInstr;
- BYTE nRowVolCmd, nRowVolume;
- BYTE nRowCommand, nRowParam;
- BYTE nLeftVU, nRightVU;
- BYTE nActiveMacro, nPadding;
+ /* First 32-bytes: Most used mixing information: don't change it */
+ signed char * pCurrentSample;
+ DWORD nPos;
+ DWORD nPosLo; /* actually 16-bit */
+ LONG nInc; /* 16.16 */
+ LONG nRightVol;
+ LONG nLeftVol;
+ LONG nRightRamp;
+ LONG nLeftRamp;
+ /* 2nd cache line */
+ DWORD nLength;
+ DWORD dwFlags;
+ DWORD nLoopStart;
+ DWORD nLoopEnd;
+ LONG nRampRightVol;
+ LONG nRampLeftVol;
+ LONG nFilter_Y1, nFilter_Y2, nFilter_Y3, nFilter_Y4;
+ LONG nFilter_A0, nFilter_B0, nFilter_B1;
+ LONG nROfs, nLOfs;
+ LONG nRampLength;
+ /* Information not used in the mixer */
+ signed char * pSample;
+ LONG nNewRightVol, nNewLeftVol;
+ LONG nRealVolume, nRealPan;
+ LONG nVolume, nPan, nFadeOutVol;
+ LONG nPeriod, nC4Speed, nPortamentoDest;
+ INSTRUMENTHEADER *pHeader;
+ MODINSTRUMENT *pInstrument;
+ DWORD nVolEnvPosition, nPanEnvPosition, nPitchEnvPosition;
+ DWORD nMasterChn, nVUMeter;
+ LONG nGlobalVol, nInsVol;
+ LONG nFineTune, nTranspose;
+ LONG nPortamentoSlide, nAutoVibDepth;
+ UINT nAutoVibPos, nVibratoPos, nTremoloPos, nPanbrelloPos;
+ /* 16-bit members */
+ signed short nVolSwing, nPanSwing;
+ /* 8-bit members */
+ BYTE nNote, nNNA;
+ BYTE nNewNote, nNewIns, nCommand, nArpeggio;
+ BYTE nOldVolumeSlide, nOldFineVolUpDown;
+ BYTE nOldPortaUpDown, nOldFinePortaUpDown;
+ BYTE nOldPanSlide, nOldChnVolSlide;
+ BYTE nVibratoType, nVibratoSpeed, nVibratoDepth;
+ BYTE nTremoloType, nTremoloSpeed, nTremoloDepth;
+ BYTE nPanbrelloType, nPanbrelloSpeed, nPanbrelloDepth;
+ BYTE nOldCmdEx, nOldVolParam, nOldTempo;
+ BYTE nOldOffset, nOldHiOffset;
+ BYTE nCutOff, nResonance;
+ BYTE nRetrigCount, nRetrigParam;
+ BYTE nTremorCount, nTremorParam;
+ BYTE nPatternLoop, nPatternLoopCount;
+ BYTE nRowNote, nRowInstr;
+ BYTE nRowVolCmd, nRowVolume;
+ BYTE nRowCommand, nRowParam;
+ BYTE nLeftVU, nRightVU;
+ BYTE nActiveMacro, nPadding;
} MODCHANNEL;
typedef struct _MODCHANNELSETTINGS
{
- UINT nPan;
- UINT nVolume;
- DWORD dwFlags;
- UINT nMixPlugin;
+ UINT nPan;
+ UINT nVolume;
+ DWORD dwFlags;
+ UINT nMixPlugin;
char szName[MAX_CHANNELNAME]; /* changed from CHAR */
} MODCHANNELSETTINGS;
typedef struct _MODCOMMAND
{
- BYTE note;
- BYTE instr;
- BYTE volcmd;
- BYTE command;
- BYTE vol;
- BYTE param;
+ BYTE note;
+ BYTE instr;
+ BYTE volcmd;
+ BYTE command;
+ BYTE vol;
+ BYTE param;
} MODCOMMAND, *LPMODCOMMAND;
/*////////////////////////////////////////////////////////////////// */
/* Mix Plugins */
-#define MIXPLUG_MIXREADY 0x01 /* Set when cleared */
+#define MIXPLUG_MIXREADY 0x01 /* Set when cleared */
class IMixPlugin
{
public:
- virtual int AddRef() = 0;
- virtual int Release() = 0;
- virtual void SaveAllParameters() = 0;
- virtual void RestoreAllParameters() = 0;
- virtual void Process(float *pOutL, float *pOutR, unsigned long nSamples) = 0;
- virtual void Init(unsigned long nFreq, int bReset) = 0;
- virtual void MidiSend(DWORD dwMidiCode) = 0;
- virtual void MidiCommand(UINT nMidiCh, UINT nMidiProg, UINT note, UINT vol) = 0;
+ virtual int AddRef() = 0;
+ virtual int Release() = 0;
+ virtual void SaveAllParameters() = 0;
+ virtual void RestoreAllParameters() = 0;
+ virtual void Process(float *pOutL, float *pOutR, unsigned long nSamples) = 0;
+ virtual void Init(unsigned long nFreq, int bReset) = 0;
+ virtual void MidiSend(DWORD dwMidiCode) = 0;
+ virtual void MidiCommand(UINT nMidiCh, UINT nMidiProg, UINT note, UINT vol) = 0;
};
-#define MIXPLUG_INPUTF_MASTEREFFECT 0x01 /* Apply to master mix */
-#define MIXPLUG_INPUTF_BYPASS 0x02 /* Bypass effect */
-#define MIXPLUG_INPUTF_WETMIX 0x04 /* Wet Mix (dry added) */
+#define MIXPLUG_INPUTF_MASTEREFFECT 0x01 /* Apply to master mix */
+#define MIXPLUG_INPUTF_BYPASS 0x02 /* Bypass effect */
+#define MIXPLUG_INPUTF_WETMIX 0x04 /* Wet Mix (dry added) */
typedef struct _SNDMIXPLUGINSTATE
{
- DWORD dwFlags; /* MIXPLUG_XXXX */
- LONG nVolDecayL, nVolDecayR; /* Buffer click removal */
- int *pMixBuffer; /* Stereo effect send buffer */
- float *pOutBufferL; /* Temp storage for int -> float conversion */
- float *pOutBufferR;
+ DWORD dwFlags; /* MIXPLUG_XXXX */
+ LONG nVolDecayL, nVolDecayR; /* Buffer click removal */
+ int *pMixBuffer; /* Stereo effect send buffer */
+ float *pOutBufferL; /* Temp storage for int -> float conversion */
+ float *pOutBufferR;
} SNDMIXPLUGINSTATE, *PSNDMIXPLUGINSTATE;
typedef struct _SNDMIXPLUGININFO
{
- DWORD dwPluginId1;
- DWORD dwPluginId2;
- DWORD dwInputRouting; /* MIXPLUG_INPUTF_XXXX */
- DWORD dwOutputRouting; /* 0=mix 0x80+=fx */
- DWORD dwReserved[4]; /* Reserved for routing info */
- CHAR szName[32];
- CHAR szLibraryName[64]; /* original DLL name */
+ DWORD dwPluginId1;
+ DWORD dwPluginId2;
+ DWORD dwInputRouting; /* MIXPLUG_INPUTF_XXXX */
+ DWORD dwOutputRouting; /* 0=mix 0x80+=fx */
+ DWORD dwReserved[4]; /* Reserved for routing info */
+ CHAR szName[32];
+ CHAR szLibraryName[64]; /* original DLL name */
} SNDMIXPLUGININFO, *PSNDMIXPLUGININFO; /* Size should be 128 */
typedef struct _SNDMIXPLUGIN
{
- IMixPlugin *pMixPlugin;
- PSNDMIXPLUGINSTATE pMixState;
- ULONG nPluginDataSize;
- PVOID pPluginData;
- SNDMIXPLUGININFO Info;
+ IMixPlugin *pMixPlugin;
+ PSNDMIXPLUGINSTATE pMixState;
+ ULONG nPluginDataSize;
+ PVOID pPluginData;
+ SNDMIXPLUGININFO Info;
} SNDMIXPLUGIN, *PSNDMIXPLUGIN;
-typedef BOOL (*PMIXPLUGINCREATEPROC)(PSNDMIXPLUGIN);
+typedef BOOL (*PMIXPLUGINCREATEPROC)(PSNDMIXPLUGIN);
/*////////////////////////////////////////////////////////////////// */
enum {
- MIDIOUT_START=0,
- MIDIOUT_STOP,
- MIDIOUT_TICK,
- MIDIOUT_NOTEON,
- MIDIOUT_NOTEOFF,
- MIDIOUT_VOLUME,
- MIDIOUT_PAN,
- MIDIOUT_BANKSEL,
- MIDIOUT_PROGRAM
+ MIDIOUT_START=0,
+ MIDIOUT_STOP,
+ MIDIOUT_TICK,
+ MIDIOUT_NOTEON,
+ MIDIOUT_NOTEOFF,
+ MIDIOUT_VOLUME,
+ MIDIOUT_PAN,
+ MIDIOUT_BANKSEL,
+ MIDIOUT_PROGRAM
};
@@ -525,251 +525,251 @@ typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); /* buffe
class CSoundFile
/*============== */
{
-public: /* Static Members */
- static UINT m_nXBassDepth, m_nXBassRange;
- static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType;
- static UINT m_nProLogicDepth, m_nProLogicDelay;
- static UINT m_nStereoSeparation;
- static UINT m_nMaxMixChannels;
- static LONG m_nStreamVolume;
- static DWORD gdwSysInfo, gdwSoundSetup, gdwMixingFreq, gnBitsPerSample, gnChannels;
- static UINT gnAGC, gnVolumeRampSamples, gnVUMeter, gnCPUUsage;
- static LPSNDMIXHOOKPROC gpSndMixHook;
- static PMIXPLUGINCREATEPROC gpMixPluginCreateProc;
-
-public: /* for Editing */
- MODCHANNEL Chn[MAX_CHANNELS]; /* Channels */
- UINT ChnMix[MAX_CHANNELS]; /* Channels to be mixed */
- MODINSTRUMENT Ins[MAX_SAMPLES]; /* Instruments */
- INSTRUMENTHEADER *Headers[MAX_INSTRUMENTS]; /* Instrument Headers */
- MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; /* Channels settings */
- MODCOMMAND *Patterns[MAX_PATTERNS]; /* Patterns */
- WORD PatternSize[MAX_PATTERNS]; /* Patterns Lengths */
- BYTE Order[MAX_ORDERS]; /* Pattern Orders */
- MODMIDICFG m_MidiCfg; /* Midi macro config table */
- SNDMIXPLUGIN m_MixPlugins[MAX_MIXPLUGINS]; /* Mix plugins */
- UINT m_nDefaultSpeed, m_nDefaultTempo, m_nDefaultGlobalVolume;
- DWORD m_dwSongFlags; /* Song flags SONG_XXXX */
- UINT m_nChannels, m_nMixChannels, m_nMixStat, m_nBufferCount;
- UINT m_nType, m_nSamples, m_nInstruments;
- UINT m_nTickCount, m_nTotalCount, m_nPatternDelay, m_nFrameDelay;
- UINT m_nMusicSpeed, m_nMusicTempo;
- UINT m_nNextRow, m_nRow;
- UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos;
- UINT m_nMasterVolume, m_nGlobalVolume, m_nSongPreAmp;
- UINT m_nFreqFactor, m_nTempoFactor, m_nOldGlbVolSlide;
- LONG m_nMinPeriod, m_nMaxPeriod, m_nRepeatCount, m_nInitialRepeatCount;
- DWORD m_nGlobalFadeSamples, m_nGlobalFadeMaxSamples;
- UINT m_nMaxOrderPosition;
- UINT m_nPatternNames;
- LPSTR m_lpszSongComments, m_lpszPatternNames;
- char m_szNames[MAX_INSTRUMENTS][32]; /* changed from CHAR */
- CHAR CompressionTable[16];
+public: /* Static Members */
+ static UINT m_nXBassDepth, m_nXBassRange;
+ static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType;
+ static UINT m_nProLogicDepth, m_nProLogicDelay;
+ static UINT m_nStereoSeparation;
+ static UINT m_nMaxMixChannels;
+ static LONG m_nStreamVolume;
+ static DWORD gdwSysInfo, gdwSoundSetup, gdwMixingFreq, gnBitsPerSample, gnChannels;
+ static UINT gnAGC, gnVolumeRampSamples, gnVUMeter, gnCPUUsage;
+ static LPSNDMIXHOOKPROC gpSndMixHook;
+ static PMIXPLUGINCREATEPROC gpMixPluginCreateProc;
+
+public: /* for Editing */
+ MODCHANNEL Chn[MAX_CHANNELS]; /* Channels */
+ UINT ChnMix[MAX_CHANNELS]; /* Channels to be mixed */
+ MODINSTRUMENT Ins[MAX_SAMPLES]; /* Instruments */
+ INSTRUMENTHEADER *Headers[MAX_INSTRUMENTS]; /* Instrument Headers */
+ MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; /* Channels settings */
+ MODCOMMAND *Patterns[MAX_PATTERNS]; /* Patterns */
+ WORD PatternSize[MAX_PATTERNS]; /* Patterns Lengths */
+ BYTE Order[MAX_ORDERS]; /* Pattern Orders */
+ MODMIDICFG m_MidiCfg; /* Midi macro config table */
+ SNDMIXPLUGIN m_MixPlugins[MAX_MIXPLUGINS]; /* Mix plugins */
+ UINT m_nDefaultSpeed, m_nDefaultTempo, m_nDefaultGlobalVolume;
+ DWORD m_dwSongFlags; /* Song flags SONG_XXXX */
+ UINT m_nChannels, m_nMixChannels, m_nMixStat, m_nBufferCount;
+ UINT m_nType, m_nSamples, m_nInstruments;
+ UINT m_nTickCount, m_nTotalCount, m_nPatternDelay, m_nFrameDelay;
+ UINT m_nMusicSpeed, m_nMusicTempo;
+ UINT m_nNextRow, m_nRow;
+ UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos;
+ UINT m_nMasterVolume, m_nGlobalVolume, m_nSongPreAmp;
+ UINT m_nFreqFactor, m_nTempoFactor, m_nOldGlbVolSlide;
+ LONG m_nMinPeriod, m_nMaxPeriod, m_nRepeatCount, m_nInitialRepeatCount;
+ DWORD m_nGlobalFadeSamples, m_nGlobalFadeMaxSamples;
+ UINT m_nMaxOrderPosition;
+ UINT m_nPatternNames;
+ LPSTR m_lpszSongComments, m_lpszPatternNames;
+ char m_szNames[MAX_INSTRUMENTS][32]; /* changed from CHAR */
+ CHAR CompressionTable[16];
public:
- CSoundFile();
- ~CSoundFile();
+ CSoundFile();
+ ~CSoundFile();
public:
- BOOL Create(LPCBYTE lpStream, DWORD dwMemLength=0);
- BOOL Destroy();
- UINT GetType() const { return m_nType; }
- UINT GetNumChannels() const;
- UINT GetLogicalChannels() const { return m_nChannels; }
- BOOL SetMasterVolume(UINT vol, BOOL bAdjustAGC=FALSE);
- UINT GetMasterVolume() const { return m_nMasterVolume; }
- UINT GetNumPatterns() const;
- UINT GetNumInstruments() const;
- UINT GetNumSamples() const { return m_nSamples; }
- UINT GetCurrentPos() const;
- UINT GetCurrentPattern() const { return m_nPattern; }
- UINT GetCurrentOrder() const { return m_nCurrentPattern; }
- UINT GetSongComments(LPSTR s, UINT cbsize, UINT linesize=32);
- UINT GetRawSongComments(LPSTR s, UINT cbsize, UINT linesize=32);
- UINT GetMaxPosition() const;
- void SetCurrentPos(UINT nPos);
- void SetCurrentOrder(UINT nOrder);
- void GetTitle(LPSTR s) const { lstrcpyn(s,m_szNames[0],32); }
- LPCSTR GetTitle() const { return m_szNames[0]; }
- UINT GetSampleName(UINT nSample,LPSTR s=NULL) const;
- UINT GetInstrumentName(UINT nInstr,LPSTR s=NULL) const;
- UINT GetMusicSpeed() const { return m_nMusicSpeed; }
- UINT GetMusicTempo() const { return m_nMusicTempo; }
- DWORD GetLength(BOOL bAdjust, BOOL bTotal=FALSE);
- DWORD GetSongTime() { return GetLength(FALSE, TRUE); }
- void SetRepeatCount(int n) { m_nRepeatCount = n; m_nInitialRepeatCount = n; }
- int GetRepeatCount() const { return m_nRepeatCount; }
- BOOL IsPaused() const { return (m_dwSongFlags & SONG_PAUSED) ? TRUE : FALSE; }
- void LoopPattern(int nPat, int nRow=0);
- void CheckCPUUsage(UINT nCPU);
- BOOL SetPatternName(UINT nPat, LPCSTR lpszName);
- BOOL GetPatternName(UINT nPat, LPSTR lpszName, UINT cbSize=MAX_PATTERNNAME) const;
- /* Module Loaders */
- BOOL ReadXM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadS3M(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadMod(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadMed(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadMTM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadSTM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadIT(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL Read669(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadUlt(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadWav(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadDSM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadFAR(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadAMS(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadAMS2(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadMDL(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadOKT(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadDMF(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadPTM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadDBM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadAMF(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadMT2(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadPSM(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadJ2B(LPCBYTE lpStream, DWORD dwMemLength);
- BOOL ReadUMX(LPCBYTE lpStream, DWORD dwMemLength);
- /* Save Functions */
+ BOOL Create(LPCBYTE lpStream, DWORD dwMemLength=0);
+ BOOL Destroy();
+ UINT GetType() const { return m_nType; }
+ UINT GetNumChannels() const;
+ UINT GetLogicalChannels() const { return m_nChannels; }
+ BOOL SetMasterVolume(UINT vol, BOOL bAdjustAGC=FALSE);
+ UINT GetMasterVolume() const { return m_nMasterVolume; }
+ UINT GetNumPatterns() const;
+ UINT GetNumInstruments() const;
+ UINT GetNumSamples() const { return m_nSamples; }
+ UINT GetCurrentPos() const;
+ UINT GetCurrentPattern() const { return m_nPattern; }
+ UINT GetCurrentOrder() const { return m_nCurrentPattern; }
+ UINT GetSongComments(LPSTR s, UINT cbsize, UINT linesize=32);
+ UINT GetRawSongComments(LPSTR s, UINT cbsize, UINT linesize=32);
+ UINT GetMaxPosition() const;
+ void SetCurrentPos(UINT nPos);
+ void SetCurrentOrder(UINT nOrder);
+ void GetTitle(LPSTR s) const { lstrcpyn(s,m_szNames[0],32); }
+ LPCSTR GetTitle() const { return m_szNames[0]; }
+ UINT GetSampleName(UINT nSample,LPSTR s=NULL) const;
+ UINT GetInstrumentName(UINT nInstr,LPSTR s=NULL) const;
+ UINT GetMusicSpeed() const { return m_nMusicSpeed; }
+ UINT GetMusicTempo() const { return m_nMusicTempo; }
+ DWORD GetLength(BOOL bAdjust, BOOL bTotal=FALSE);
+ DWORD GetSongTime() { return GetLength(FALSE, TRUE); }
+ void SetRepeatCount(int n) { m_nRepeatCount = n; m_nInitialRepeatCount = n; }
+ int GetRepeatCount() const { return m_nRepeatCount; }
+ BOOL IsPaused() const { return (m_dwSongFlags & SONG_PAUSED) ? TRUE : FALSE; }
+ void LoopPattern(int nPat, int nRow=0);
+ void CheckCPUUsage(UINT nCPU);
+ BOOL SetPatternName(UINT nPat, LPCSTR lpszName);
+ BOOL GetPatternName(UINT nPat, LPSTR lpszName, UINT cbSize=MAX_PATTERNNAME) const;
+ /* Module Loaders */
+ BOOL ReadXM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadS3M(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadMod(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadMed(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadMTM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadSTM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadIT(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL Read669(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadUlt(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadWav(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadDSM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadFAR(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadAMS(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadAMS2(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadMDL(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadOKT(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadDMF(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadPTM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadDBM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadAMF(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadMT2(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadPSM(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadJ2B(LPCBYTE lpStream, DWORD dwMemLength);
+ BOOL ReadUMX(LPCBYTE lpStream, DWORD dwMemLength);
+ /* Save Functions */
#ifndef MODPLUG_NO_FILESAVE
- UINT WriteSample(FILE *f, MODINSTRUMENT *pins, UINT nFlags, UINT nMaxLen=0);
- BOOL SaveXM(LPCSTR lpszFileName, UINT nPacking=0);
- BOOL SaveS3M(LPCSTR lpszFileName, UINT nPacking=0);
- BOOL SaveMod(LPCSTR lpszFileName, UINT nPacking=0);
- BOOL SaveIT(LPCSTR lpszFileName, UINT nPacking=0);
+ UINT WriteSample(FILE *f, MODINSTRUMENT *pins, UINT nFlags, UINT nMaxLen=0);
+ BOOL SaveXM(LPCSTR lpszFileName, UINT nPacking=0);
+ BOOL SaveS3M(LPCSTR lpszFileName, UINT nPacking=0);
+ BOOL SaveMod(LPCSTR lpszFileName, UINT nPacking=0);
+ BOOL SaveIT(LPCSTR lpszFileName, UINT nPacking=0);
#endif /* MODPLUG_NO_FILESAVE */
- /* MOD Convert function */
- UINT GetBestSaveFormat() const;
- UINT GetSaveFormats() const;
- void ConvertModCommand(MODCOMMAND *) const;
- void S3MConvert(MODCOMMAND *m, BOOL bIT) const;
- void S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT) const;
- WORD ModSaveCommand(const MODCOMMAND *m, BOOL bXM) const;
+ /* MOD Convert function */
+ UINT GetBestSaveFormat() const;
+ UINT GetSaveFormats() const;
+ void ConvertModCommand(MODCOMMAND *) const;
+ void S3MConvert(MODCOMMAND *m, BOOL bIT) const;
+ void S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT) const;
+ WORD ModSaveCommand(const MODCOMMAND *m, BOOL bXM) const;
public:
- /* Real-time sound functions */
- VOID ResetChannels();
+ /* Real-time sound functions */
+ VOID ResetChannels();
- UINT Read(LPVOID lpBuffer, UINT cbBuffer);
- UINT CreateStereoMix(int count);
- BOOL FadeSong(UINT msec);
- BOOL GlobalFadeSong(UINT msec);
- UINT GetTotalTickCount() const { return m_nTotalCount; }
- VOID ResetTotalTickCount() { m_nTotalCount = 0; }
+ UINT Read(LPVOID lpBuffer, UINT cbBuffer);
+ UINT CreateStereoMix(int count);
+ BOOL FadeSong(UINT msec);
+ BOOL GlobalFadeSong(UINT msec);
+ UINT GetTotalTickCount() const { return m_nTotalCount; }
+ VOID ResetTotalTickCount() { m_nTotalCount = 0; }
public:
- /* Mixer Config */
- static BOOL InitPlayer(BOOL bReset=FALSE);
- static BOOL SetWaveConfig(UINT nRate,UINT nBits,UINT nChannels,BOOL bMMX=FALSE);
- static BOOL SetResamplingMode(UINT nMode); /* SRCMODE_XXXX */
- static BOOL IsStereo() { return (gnChannels > 1) ? TRUE : FALSE; }
- static DWORD GetSampleRate() { return gdwMixingFreq; }
- static DWORD GetBitsPerSample() { return gnBitsPerSample; }
- static DWORD InitSysInfo();
- static DWORD GetSysInfo() { return gdwSysInfo; }
- /* AGC */
- static BOOL GetAGC() { return (gdwSoundSetup & SNDMIX_AGC) ? TRUE : FALSE; }
- static void SetAGC(BOOL b);
- static void ResetAGC();
- static void ProcessAGC(int count);
-
- /*GCCFIX -- added these functions back in! */
- static BOOL SetWaveConfigEx(BOOL bSurround,BOOL bNoOverSampling,BOOL bReverb,BOOL hqido,BOOL bMegaBass,BOOL bNR,BOOL bEQ);
- /* DSP Effects */
- static void InitializeDSP(BOOL bReset);
- static void ProcessStereoDSP(int count);
- static void ProcessMonoDSP(int count);
- /* [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] */
- static BOOL SetReverbParameters(UINT nDepth, UINT nDelay);
- /* [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100] */
- static BOOL SetXBassParameters(UINT nDepth, UINT nRange);
- /* [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms] */
- static BOOL SetSurroundParameters(UINT nDepth, UINT nDelay);
+ /* Mixer Config */
+ static BOOL InitPlayer(BOOL bReset=FALSE);
+ static BOOL SetWaveConfig(UINT nRate,UINT nBits,UINT nChannels,BOOL bMMX=FALSE);
+ static BOOL SetResamplingMode(UINT nMode); /* SRCMODE_XXXX */
+ static BOOL IsStereo() { return (gnChannels > 1) ? TRUE : FALSE; }
+ static DWORD GetSampleRate() { return gdwMixingFreq; }
+ static DWORD GetBitsPerSample() { return gnBitsPerSample; }
+ static DWORD InitSysInfo();
+ static DWORD GetSysInfo() { return gdwSysInfo; }
+ /* AGC */
+ static BOOL GetAGC() { return (gdwSoundSetup & SNDMIX_AGC) ? TRUE : FALSE; }
+ static void SetAGC(BOOL b);
+ static void ResetAGC();
+ static void ProcessAGC(int count);
+
+ /*GCCFIX -- added these functions back in! */
+ static BOOL SetWaveConfigEx(BOOL bSurround,BOOL bNoOverSampling,BOOL bReverb,BOOL hqido,BOOL bMegaBass,BOOL bNR,BOOL bEQ);
+ /* DSP Effects */
+ static void InitializeDSP(BOOL bReset);
+ static void ProcessStereoDSP(int count);
+ static void ProcessMonoDSP(int count);
+ /* [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] */
+ static BOOL SetReverbParameters(UINT nDepth, UINT nDelay);
+ /* [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100] */
+ static BOOL SetXBassParameters(UINT nDepth, UINT nRange);
+ /* [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms] */
+ static BOOL SetSurroundParameters(UINT nDepth, UINT nDelay);
public:
- BOOL ReadNote();
- BOOL ProcessRow();
- BOOL ProcessEffects();
- UINT GetNNAChannel(UINT nChn) const;
- void CheckNNA(UINT nChn, UINT instr, int note, BOOL bForceCut);
- void NoteChange(UINT nChn, int note, BOOL bPorta=FALSE, BOOL bResetEnv=TRUE);
- void InstrumentChange(MODCHANNEL *pChn, UINT instr, BOOL bPorta=FALSE,BOOL bUpdVol=TRUE,BOOL bResetEnv=TRUE);
- /* Channel Effects */
- void PortamentoUp(MODCHANNEL *pChn, UINT param);
- void PortamentoDown(MODCHANNEL *pChn, UINT param);
- void FinePortamentoUp(MODCHANNEL *pChn, UINT param);
- void FinePortamentoDown(MODCHANNEL *pChn, UINT param);
- void ExtraFinePortamentoUp(MODCHANNEL *pChn, UINT param);
- void ExtraFinePortamentoDown(MODCHANNEL *pChn, UINT param);
- void TonePortamento(MODCHANNEL *pChn, UINT param);
- void Vibrato(MODCHANNEL *pChn, UINT param);
- void FineVibrato(MODCHANNEL *pChn, UINT param);
- void VolumeSlide(MODCHANNEL *pChn, UINT param);
- void PanningSlide(MODCHANNEL *pChn, UINT param);
- void ChannelVolSlide(MODCHANNEL *pChn, UINT param);
- void FineVolumeUp(MODCHANNEL *pChn, UINT param);
- void FineVolumeDown(MODCHANNEL *pChn, UINT param);
- void Tremolo(MODCHANNEL *pChn, UINT param);
- void Panbrello(MODCHANNEL *pChn, UINT param);
- void RetrigNote(UINT nChn, UINT param);
- void NoteCut(UINT nChn, UINT nTick);
- void KeyOff(UINT nChn);
- int PatternLoop(MODCHANNEL *, UINT param);
- void ExtendedMODCommands(UINT nChn, UINT param);
- void ExtendedS3MCommands(UINT nChn, UINT param);
- void ExtendedChannelEffect(MODCHANNEL *, UINT param);
- void ProcessMidiMacro(UINT nChn, LPCSTR pszMidiMacro, UINT param=0);
- void SetupChannelFilter(MODCHANNEL *pChn, BOOL bReset, int flt_modifier=256) const;
- /* Low-Level effect processing */
- void DoFreqSlide(MODCHANNEL *pChn, LONG nFreqSlide);
- /* Global Effects */
- void SetTempo(UINT param);
- void SetSpeed(UINT param);
- void GlobalVolSlide(UINT param);
- DWORD IsSongFinished(UINT nOrder, UINT nRow) const;
- BOOL IsValidBackwardJump(UINT nStartOrder, UINT nStartRow, UINT nJumpOrder, UINT nJumpRow) const;
- /* Read/Write sample functions */
- signed char GetDeltaValue(signed char prev, UINT n) const { return (signed char)(prev + CompressionTable[n & 0x0F]); }
- UINT PackSample(int &sample, int next);
- BOOL CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result=NULL);
- UINT ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR pMemFile, DWORD dwMemLength);
- BOOL DestroySample(UINT nSample);
- BOOL DestroyInstrument(UINT nInstr);
- BOOL IsSampleUsed(UINT nSample);
- BOOL IsInstrumentUsed(UINT nInstr);
- BOOL RemoveInstrumentSamples(UINT nInstr);
- UINT DetectUnusedSamples(BOOL *);
- BOOL RemoveSelectedSamples(BOOL *);
- void AdjustSampleLoop(MODINSTRUMENT *pIns);
- /* I/O from another sound file */
- BOOL ReadInstrumentFromSong(UINT nInstr, CSoundFile *, UINT nSrcInstrument);
- BOOL ReadSampleFromSong(UINT nSample, CSoundFile *, UINT nSrcSample);
- /* Period/Note functions */
- UINT GetNoteFromPeriod(UINT period) const;
- UINT GetPeriodFromNote(UINT note, int nFineTune, UINT nC4Speed) const;
- UINT GetFreqFromPeriod(UINT period, UINT nC4Speed, int nPeriodFrac=0) const;
- /* Misc functions */
- MODINSTRUMENT *GetSample(UINT n) { return Ins+n; }
- void ResetMidiCfg();
- UINT MapMidiInstrument(DWORD dwProgram, UINT nChannel, UINT nNote);
- BOOL ITInstrToMPT(const void *p, INSTRUMENTHEADER *penv, UINT trkvers);
- UINT SaveMixPlugins(FILE *f=NULL, BOOL bUpdate=TRUE);
- UINT LoadMixPlugins(const void *pData, UINT nLen);
+ BOOL ReadNote();
+ BOOL ProcessRow();
+ BOOL ProcessEffects();
+ UINT GetNNAChannel(UINT nChn) const;
+ void CheckNNA(UINT nChn, UINT instr, int note, BOOL bForceCut);
+ void NoteChange(UINT nChn, int note, BOOL bPorta=FALSE, BOOL bResetEnv=TRUE);
+ void InstrumentChange(MODCHANNEL *pChn, UINT instr, BOOL bPorta=FALSE,BOOL bUpdVol=TRUE,BOOL bResetEnv=TRUE);
+ /* Channel Effects */
+ void PortamentoUp(MODCHANNEL *pChn, UINT param);
+ void PortamentoDown(MODCHANNEL *pChn, UINT param);
+ void FinePortamentoUp(MODCHANNEL *pChn, UINT param);
+ void FinePortamentoDown(MODCHANNEL *pChn, UINT param);
+ void ExtraFinePortamentoUp(MODCHANNEL *pChn, UINT param);
+ void ExtraFinePortamentoDown(MODCHANNEL *pChn, UINT param);
+ void TonePortamento(MODCHANNEL *pChn, UINT param);
+ void Vibrato(MODCHANNEL *pChn, UINT param);
+ void FineVibrato(MODCHANNEL *pChn, UINT param);
+ void VolumeSlide(MODCHANNEL *pChn, UINT param);
+ void PanningSlide(MODCHANNEL *pChn, UINT param);
+ void ChannelVolSlide(MODCHANNEL *pChn, UINT param);
+ void FineVolumeUp(MODCHANNEL *pChn, UINT param);
+ void FineVolumeDown(MODCHANNEL *pChn, UINT param);
+ void Tremolo(MODCHANNEL *pChn, UINT param);
+ void Panbrello(MODCHANNEL *pChn, UINT param);
+ void RetrigNote(UINT nChn, UINT param);
+ void NoteCut(UINT nChn, UINT nTick);
+ void KeyOff(UINT nChn);
+ int PatternLoop(MODCHANNEL *, UINT param);
+ void ExtendedMODCommands(UINT nChn, UINT param);
+ void ExtendedS3MCommands(UINT nChn, UINT param);
+ void ExtendedChannelEffect(MODCHANNEL *, UINT param);
+ void ProcessMidiMacro(UINT nChn, LPCSTR pszMidiMacro, UINT param=0);
+ void SetupChannelFilter(MODCHANNEL *pChn, BOOL bReset, int flt_modifier=256) const;
+ /* Low-Level effect processing */
+ void DoFreqSlide(MODCHANNEL *pChn, LONG nFreqSlide);
+ /* Global Effects */
+ void SetTempo(UINT param);
+ void SetSpeed(UINT param);
+ void GlobalVolSlide(UINT param);
+ DWORD IsSongFinished(UINT nOrder, UINT nRow) const;
+ BOOL IsValidBackwardJump(UINT nStartOrder, UINT nStartRow, UINT nJumpOrder, UINT nJumpRow) const;
+ /* Read/Write sample functions */
+ signed char GetDeltaValue(signed char prev, UINT n) const { return (signed char)(prev + CompressionTable[n & 0x0F]); }
+ UINT PackSample(int &sample, int next);
+ BOOL CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result=NULL);
+ UINT ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR pMemFile, DWORD dwMemLength);
+ BOOL DestroySample(UINT nSample);
+ BOOL DestroyInstrument(UINT nInstr);
+ BOOL IsSampleUsed(UINT nSample);
+ BOOL IsInstrumentUsed(UINT nInstr);
+ BOOL RemoveInstrumentSamples(UINT nInstr);
+ UINT DetectUnusedSamples(BOOL *);
+ BOOL RemoveSelectedSamples(BOOL *);
+ void AdjustSampleLoop(MODINSTRUMENT *pIns);
+ /* I/O from another sound file */
+ BOOL ReadInstrumentFromSong(UINT nInstr, CSoundFile *, UINT nSrcInstrument);
+ BOOL ReadSampleFromSong(UINT nSample, CSoundFile *, UINT nSrcSample);
+ /* Period/Note functions */
+ UINT GetNoteFromPeriod(UINT period) const;
+ UINT GetPeriodFromNote(UINT note, int nFineTune, UINT nC4Speed) const;
+ UINT GetFreqFromPeriod(UINT period, UINT nC4Speed, int nPeriodFrac=0) const;
+ /* Misc functions */
+ MODINSTRUMENT *GetSample(UINT n) { return Ins+n; }
+ void ResetMidiCfg();
+ UINT MapMidiInstrument(DWORD dwProgram, UINT nChannel, UINT nNote);
+ BOOL ITInstrToMPT(const void *p, INSTRUMENTHEADER *penv, UINT trkvers);
+ UINT SaveMixPlugins(FILE *f=NULL, BOOL bUpdate=TRUE);
+ UINT LoadMixPlugins(const void *pData, UINT nLen);
#ifndef NO_FILTER
- DWORD CutOffToFrequency(UINT nCutOff, int flt_modifier=256) const; /* [0-255] => [1-10KHz] */
+ DWORD CutOffToFrequency(UINT nCutOff, int flt_modifier=256) const; /* [0-255] => [1-10KHz] */
#endif
- /* Static helper functions */
+ /* Static helper functions */
public:
- static DWORD TransposeToFrequency(int transp, int ftune=0);
- static int FrequencyToTranspose(DWORD freq);
- static void FrequencyToTranspose(MODINSTRUMENT *psmp);
+ static DWORD TransposeToFrequency(int transp, int ftune=0);
+ static int FrequencyToTranspose(DWORD freq);
+ static void FrequencyToTranspose(MODINSTRUMENT *psmp);
- /* System-Dependant functions */
+ /* System-Dependant functions */
public:
- static MODCOMMAND *AllocatePattern(UINT rows, UINT nchns);
- static signed char* AllocateSample(UINT nbytes);
- static void FreePattern(LPVOID pat);
- static void FreeSample(LPVOID p);
- static UINT Normalize24BitBuffer(LPBYTE pbuffer, UINT cbsizebytes, DWORD lmax24, DWORD dwByteInc);
+ static MODCOMMAND *AllocatePattern(UINT rows, UINT nchns);
+ static signed char* AllocateSample(UINT nbytes);
+ static void FreePattern(LPVOID pat);
+ static void FreeSample(LPVOID p);
+ static UINT Normalize24BitBuffer(LPBYTE pbuffer, UINT cbsizebytes, DWORD lmax24, DWORD dwByteInc);
};
@@ -783,117 +783,117 @@ public:
#pragma pack(1)
/* Standard IFF chunks IDs */
-#define IFFID_FORM 0x4d524f46
-#define IFFID_RIFF 0x46464952
-#define IFFID_WAVE 0x45564157
-#define IFFID_LIST 0x5453494C
-#define IFFID_INFO 0x4F464E49
+#define IFFID_FORM 0x4d524f46
+#define IFFID_RIFF 0x46464952
+#define IFFID_WAVE 0x45564157
+#define IFFID_LIST 0x5453494C
+#define IFFID_INFO 0x4F464E49
/* IFF Info fields */
-#define IFFID_ICOP 0x504F4349
-#define IFFID_IART 0x54524149
-#define IFFID_IPRD 0x44525049
-#define IFFID_INAM 0x4D414E49
-#define IFFID_ICMT 0x544D4349
-#define IFFID_IENG 0x474E4549
-#define IFFID_ISFT 0x54465349
-#define IFFID_ISBJ 0x4A425349
-#define IFFID_IGNR 0x524E4749
-#define IFFID_ICRD 0x44524349
+#define IFFID_ICOP 0x504F4349
+#define IFFID_IART 0x54524149
+#define IFFID_IPRD 0x44525049
+#define IFFID_INAM 0x4D414E49
+#define IFFID_ICMT 0x544D4349
+#define IFFID_IENG 0x474E4549
+#define IFFID_ISFT 0x54465349
+#define IFFID_ISBJ 0x4A425349
+#define IFFID_IGNR 0x524E4749
+#define IFFID_ICRD 0x44524349
/* Wave IFF chunks IDs */
-#define IFFID_wave 0x65766177
-#define IFFID_fmt 0x20746D66
-#define IFFID_wsmp 0x706D7377
-#define IFFID_pcm 0x206d6370
-#define IFFID_data 0x61746164
-#define IFFID_smpl 0x6C706D73
-#define IFFID_xtra 0x61727478
+#define IFFID_wave 0x65766177
+#define IFFID_fmt 0x20746D66
+#define IFFID_wsmp 0x706D7377
+#define IFFID_pcm 0x206d6370
+#define IFFID_data 0x61746164
+#define IFFID_smpl 0x6C706D73
+#define IFFID_xtra 0x61727478
typedef struct WAVEFILEHEADER
{
- DWORD id_RIFF; /* "RIFF" */
- DWORD filesize; /* file length-8 */
- DWORD id_WAVE;
+ DWORD id_RIFF; /* "RIFF" */
+ DWORD filesize; /* file length-8 */
+ DWORD id_WAVE;
} WAVEFILEHEADER;
typedef struct WAVEFORMATHEADER
{
- DWORD id_fmt; /* "fmt " */
- DWORD hdrlen; /* 16 */
- WORD format; /* 1 */
- WORD channels; /* 1:mono, 2:stereo */
- DWORD freqHz; /* sampling freq */
- DWORD bytessec; /* bytes/sec=freqHz*samplesize */
- WORD samplesize; /* sizeof(sample) */
- WORD bitspersample; /* bits per sample (8/16) */
+ DWORD id_fmt; /* "fmt " */
+ DWORD hdrlen; /* 16 */
+ WORD format; /* 1 */
+ WORD channels; /* 1:mono, 2:stereo */
+ DWORD freqHz; /* sampling freq */
+ DWORD bytessec; /* bytes/sec=freqHz*samplesize */
+ WORD samplesize; /* sizeof(sample) */
+ WORD bitspersample; /* bits per sample (8/16) */
} WAVEFORMATHEADER;
typedef struct WAVEDATAHEADER
{
- DWORD id_data; /* "data" */
- DWORD length; /* length of data */
+ DWORD id_data; /* "data" */
+ DWORD length; /* length of data */
} WAVEDATAHEADER;
typedef struct WAVESMPLHEADER
{
- /* SMPL */
- DWORD smpl_id; /* "smpl" -> 0x6C706D73 */
- DWORD smpl_len; /* length of smpl: 3Ch (54h with sustain loop) */
- DWORD dwManufacturer;
- DWORD dwProduct;
- DWORD dwSamplePeriod; /* 1000000000/freqHz */
- DWORD dwBaseNote; /* 3Ch = C-4 -> 60 + RelativeTone */
- DWORD dwPitchFraction;
- DWORD dwSMPTEFormat;
- DWORD dwSMPTEOffset;
- DWORD dwSampleLoops; /* number of loops */
- DWORD cbSamplerData;
+ /* SMPL */
+ DWORD smpl_id; /* "smpl" -> 0x6C706D73 */
+ DWORD smpl_len; /* length of smpl: 3Ch (54h with sustain loop) */
+ DWORD dwManufacturer;
+ DWORD dwProduct;
+ DWORD dwSamplePeriod; /* 1000000000/freqHz */
+ DWORD dwBaseNote; /* 3Ch = C-4 -> 60 + RelativeTone */
+ DWORD dwPitchFraction;
+ DWORD dwSMPTEFormat;
+ DWORD dwSMPTEOffset;
+ DWORD dwSampleLoops; /* number of loops */
+ DWORD cbSamplerData;
} WAVESMPLHEADER;
typedef struct SAMPLELOOPSTRUCT
{
- DWORD dwIdentifier;
- DWORD dwLoopType; /* 0=normal, 1=bidi */
- DWORD dwLoopStart;
- DWORD dwLoopEnd; /* Byte offset ? */
- DWORD dwFraction;
- DWORD dwPlayCount; /* Loop Count, 0=infinite */
+ DWORD dwIdentifier;
+ DWORD dwLoopType; /* 0=normal, 1=bidi */
+ DWORD dwLoopStart;
+ DWORD dwLoopEnd; /* Byte offset ? */
+ DWORD dwFraction;
+ DWORD dwPlayCount; /* Loop Count, 0=infinite */
} SAMPLELOOPSTRUCT;
typedef struct WAVESAMPLERINFO
{
- WAVESMPLHEADER wsiHdr;
- SAMPLELOOPSTRUCT wsiLoops[2];
+ WAVESMPLHEADER wsiHdr;
+ SAMPLELOOPSTRUCT wsiLoops[2];
} WAVESAMPLERINFO;
typedef struct WAVELISTHEADER
{
- DWORD list_id; /* "LIST" -> 0x5453494C */
- DWORD list_len;
- DWORD info; /* "INFO" */
+ DWORD list_id; /* "LIST" -> 0x5453494C */
+ DWORD list_len;
+ DWORD info; /* "INFO" */
} WAVELISTHEADER;
typedef struct WAVEEXTRAHEADER
{
- DWORD xtra_id; /* "xtra" -> 0x61727478 */
- DWORD xtra_len;
- DWORD dwFlags;
- WORD wPan;
- WORD wVolume;
- WORD wGlobalVol;
- WORD wReserved;
- BYTE nVibType;
- BYTE nVibSweep;
- BYTE nVibDepth;
- BYTE nVibRate;
+ DWORD xtra_id; /* "xtra" -> 0x61727478 */
+ DWORD xtra_len;
+ DWORD dwFlags;
+ WORD wPan;
+ WORD wVolume;
+ WORD wGlobalVol;
+ WORD wReserved;
+ BYTE nVibType;
+ BYTE nVibSweep;
+ BYTE nVibDepth;
+ BYTE nVibRate;
} WAVEEXTRAHEADER;
#pragma pack()
@@ -901,27 +901,27 @@ typedef struct WAVEEXTRAHEADER
/*///////////////////////////////////////////////////////// */
/* Low-level Mixing functions */
-#define MIXBUFFERSIZE 512
-#define MIXING_ATTENUATION 4
-#define MIXING_CLIPMIN (-0x08000000)
-#define MIXING_CLIPMAX (0x07FFFFFF)
-#define VOLUMERAMPPRECISION 12
-#define FADESONGDELAY 100
-#define EQ_BUFFERSIZE (MIXBUFFERSIZE)
-#define AGC_PRECISION 9
-#define AGC_UNITY (1 << AGC_PRECISION)
+#define MIXBUFFERSIZE 512
+#define MIXING_ATTENUATION 4
+#define MIXING_CLIPMIN (-0x08000000)
+#define MIXING_CLIPMAX (0x07FFFFFF)
+#define VOLUMERAMPPRECISION 12
+#define FADESONGDELAY 100
+#define EQ_BUFFERSIZE (MIXBUFFERSIZE)
+#define AGC_PRECISION 9
+#define AGC_UNITY (1 << AGC_PRECISION)
/* Calling conventions */
#ifdef MSC_VER
-#define MPPASMCALL __cdecl
-#define MPPFASTCALL __fastcall
+#define MPPASMCALL __cdecl
+#define MPPFASTCALL __fastcall
#else
#define MPPASMCALL
#define MPPFASTCALL
#endif
-#define MOD2XMFineTune(k) ((int)( (signed char)((k)<<4) ))
-#define XM2MODFineTune(k) ((int)( (k>>4)&0x0f ))
+#define MOD2XMFineTune(k) ((int)( (signed char)((k)<<4) ))
+#define XM2MODFineTune(k) ((int)( (k>>4)&0x0f ))
int _muldiv(long a, long b, long c);
int _muldivr(long a, long b, long c);
@@ -932,8 +932,8 @@ int _muldivr(long a, long b, long c);
/* Swap bytes in 16 bit value. */
#ifdef __GNUC__
# define bswap_16(x) \
- (__extension__ \
- ({ unsigned short int __bsx = (x); \
+ (__extension__ \
+ ({ unsigned short int __bsx = (x); \
((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
#else
static inline unsigned short int
@@ -946,16 +946,16 @@ bswap_16 (unsigned short int __bsx)
/* Swap bytes in 32 bit value. */
#ifdef __GNUC__
# define bswap_32(x) \
- (__extension__ \
- ({ unsigned int __bsx = (x); \
+ (__extension__ \
+ ({ unsigned int __bsx = (x); \
((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \
- (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
+ (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); }))
#else
static inline unsigned int
bswap_32 (unsigned int __bsx)
{
return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) |
- (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
+ (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24));
}
#endif
diff --git a/gst/modplug/libmodplug/stdafx.h b/gst/modplug/libmodplug/stdafx.h
index dc71ea8f..1659f89c 100644
--- a/gst/modplug/libmodplug/stdafx.h
+++ b/gst/modplug/libmodplug/stdafx.h
@@ -79,15 +79,15 @@ inline void ProcessPlugins(int n) {}
#define GlobalFreePtr(p) free((void *)(p))
-#define strnicmp(a,b,c) strncasecmp(a,b,c)
-#define wsprintf sprintf
+#define strnicmp(a,b,c) strncasecmp(a,b,c)
+#define wsprintf sprintf
#ifndef FALSE
-#define FALSE false
+#define FALSE false
#endif
#ifndef TRUE
-#define TRUE true
+#define TRUE true
#endif
#endif /* MSC_VER */
diff --git a/gst/mpeg1sys/buffer.c b/gst/mpeg1sys/buffer.c
index 6c326940..be26b22f 100644
--- a/gst/mpeg1sys/buffer.c
+++ b/gst/mpeg1sys/buffer.c
@@ -71,8 +71,8 @@ static double picture_rates[16] = {
/* defined but not used
static double ratio [16] = { 0., 1., 0.6735, 0.7031, 0.7615, 0.8055,
- 0.8437, 0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575,
- 1.2015, 0.};
+ 0.8437, 0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575,
+ 1.2015, 0.};
*/
#ifndef GST_DISABLE_GST_DEBUG
diff --git a/gst/mpeg1sys/gstmpeg1systemencode.h b/gst/mpeg1sys/gstmpeg1systemencode.h
index 44555332..750e4292 100644
--- a/gst/mpeg1sys/gstmpeg1systemencode.h
+++ b/gst/mpeg1sys/gstmpeg1systemencode.h
@@ -87,7 +87,7 @@ struct _GstMPEG1SystemEncode {
GList *mta;
/* stream input pads */
- GstPad *private_1_pad[8]; /* up to 8 ac3 audio tracks <grumble> */
+ GstPad *private_1_pad[8]; /* up to 8 ac3 audio tracks <grumble> */
GstPad *private_2_pad;
GstPad *video_pad[16];
GstPad *audio_pad[32];
diff --git a/gst/mpeg1sys/main.h b/gst/mpeg1sys/main.h
index 434f57f5..56e90e99 100644
--- a/gst/mpeg1sys/main.h
+++ b/gst/mpeg1sys/main.h
@@ -1,37 +1,37 @@
/*************************************************************************
-* Generating a MPEG/SYSTEMS *
-* MULTIPLEXED VIDEO/AUDIO STREAM *
-* from two MPEG source streams *
-* Christoph Moar *
-* SIEMENS CORPORATE RESEARCH AND DEVELOPMENT ST SN 11 / T SN 6 *
-* (C) 1994 1995 *
+* Generating a MPEG/SYSTEMS *
+* MULTIPLEXED VIDEO/AUDIO STREAM *
+* from two MPEG source streams *
+* Christoph Moar *
+* SIEMENS CORPORATE RESEARCH AND DEVELOPMENT ST SN 11 / T SN 6 *
+* (C) 1994 1995 *
**************************************************************************
* Restrictions apply. Will not support the whole MPEG/SYSTEM Standard. *
-* Basically, will generate Constrained System Parameter Files. *
-* Mixes only one audio and/or one video stream. Might be expanded. *
+* Basically, will generate Constrained System Parameter Files. *
+* Mixes only one audio and/or one video stream. Might be expanded. *
*************************************************************************/
/*************************************************************************
-* mplex - MPEG/SYSTEMS multiplexer *
-* Copyright (C) 1994 1995 Christoph Moar *
-* Siemens ZFE ST SN 11 / T SN 6 *
-* *
-* moar@informatik.tu-muenchen.de *
-* (Christoph Moar) *
-* *
-* This program is free software; you can redistribute it and/or modify *
-* it under the terms of the GNU General Public License as published by *
-* the Free Software Foundation; either version 2 of the License, or *
-* (at your option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, *
-* but WITHOUT ANY WARRANTY; without even the implied warranty of *
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
-* GNU General Public License for more details. *
-* *
-* You should have received a copy of the GNU General Public License *
-* along with this program; if not, write to the Free Software *
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
+* mplex - MPEG/SYSTEMS multiplexer *
+* Copyright (C) 1994 1995 Christoph Moar *
+* Siemens ZFE ST SN 11 / T SN 6 *
+* *
+* moar@informatik.tu-muenchen.de *
+* (Christoph Moar) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the Free Software *
+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
*************************************************************************/
@@ -40,83 +40,83 @@
#include <glib.h>
-#define PACK_START 0x000001ba
-#define SYS_HEADER_START 0x000001bb
-#define ISO11172_END 0x000001b9
-#define PACKET_START 0x000001
+#define PACK_START 0x000001ba
+#define SYS_HEADER_START 0x000001bb
+#define ISO11172_END 0x000001b9
+#define PACKET_START 0x000001
-#define CLOCKS 90000.0 /* System Clock Hertz */
+#define CLOCKS 90000.0 /* System Clock Hertz */
-#define AFTER_PACKET_LENGTH 15 /* No of non-data-bytes */
- /* following the packet */
- /* length field */
-#define LAST_SCR_BYTE_IN_PACK 9 /* No of bytes in pack */
- /* preceding, and */
- /* including, the SCR */
+#define AFTER_PACKET_LENGTH 15 /* No of non-data-bytes */
+ /* following the packet */
+ /* length field */
+#define LAST_SCR_BYTE_IN_PACK 9 /* No of bytes in pack */
+ /* preceding, and */
+ /* including, the SCR */
/* The following values for sys_header_length & size are only valid for */
/* System streams consisting of two basic streams. When wrapping around */
/* the system layer on a single video or a single audio stream, those */
/* values get decreased by 3. */
-#define SYS_HEADER_LENGTH 12 /* length of Sys Header */
- /* after start code and */
- /* length field */
+#define SYS_HEADER_LENGTH 12 /* length of Sys Header */
+ /* after start code and */
+ /* length field */
-#define SYS_HEADER_SIZE 18 /* incl. start code and */
- /* length field */
-#define PACK_HEADER_SIZE 12
+#define SYS_HEADER_SIZE 18 /* incl. start code and */
+ /* length field */
+#define PACK_HEADER_SIZE 12
-#define PACKET_HEADER_SIZE 6
+#define PACKET_HEADER_SIZE 6
-#define MAX_SECTOR_SIZE 0x20000 /* Max Sektor Groesse */
+#define MAX_SECTOR_SIZE 0x20000 /* Max Sektor Groesse */
#define STREAMS_VIDEO 1
#define STREAMS_AUDIO 2
#define STREAMS_BOTH 3
-#define AUDIO_STREAMS 0xb8 /* Marker Audio Streams */
-#define VIDEO_STREAMS 0xb9 /* Marker Video Streams */
-#define AUDIO_STR_0 0xc0 /* Marker Audio Stream0 */
-#define VIDEO_STR_0 0xe0 /* Marker Video Stream0 */
-#define PADDING_STR 0xbe /* Marker Padding Stream*/
-
-#define ZERO_STUFFING_BYTE 0
-#define STUFFING_BYTE 0xff
-#define RESERVED_BYTE 0xff
-#define TIMESTAMPS_NO 0 /* Flag NO timestamps */
-#define TIMESTAMPS_PTS 1 /* Flag PTS timestamp */
-#define TIMESTAMPS_PTS_DTS 2 /* Flag BOTH timestamps */
-
-#define MARKER_SCR 2 /* Marker SCR */
-#define MARKER_JUST_PTS 2 /* Marker only PTS */
-#define MARKER_PTS 3 /* Marker PTS */
-#define MARKER_DTS 1 /* Marker DTS */
-#define MARKER_NO_TIMESTAMPS 0x0f /* Marker NO timestamps */
-
-#define STATUS_AUDIO_END 0 /* Statusmessage A end */
-#define STATUS_VIDEO_END 1 /* Statusmessage V end */
-#define STATUS_AUDIO_TIME_OUT 2 /* Statusmessage A out */
-#define STATUS_VIDEO_TIME_OUT 3 /* Statusmessage V out */
+#define AUDIO_STREAMS 0xb8 /* Marker Audio Streams */
+#define VIDEO_STREAMS 0xb9 /* Marker Video Streams */
+#define AUDIO_STR_0 0xc0 /* Marker Audio Stream0 */
+#define VIDEO_STR_0 0xe0 /* Marker Video Stream0 */
+#define PADDING_STR 0xbe /* Marker Padding Stream*/
+
+#define ZERO_STUFFING_BYTE 0
+#define STUFFING_BYTE 0xff
+#define RESERVED_BYTE 0xff
+#define TIMESTAMPS_NO 0 /* Flag NO timestamps */
+#define TIMESTAMPS_PTS 1 /* Flag PTS timestamp */
+#define TIMESTAMPS_PTS_DTS 2 /* Flag BOTH timestamps */
+
+#define MARKER_SCR 2 /* Marker SCR */
+#define MARKER_JUST_PTS 2 /* Marker only PTS */
+#define MARKER_PTS 3 /* Marker PTS */
+#define MARKER_DTS 1 /* Marker DTS */
+#define MARKER_NO_TIMESTAMPS 0x0f /* Marker NO timestamps */
+
+#define STATUS_AUDIO_END 0 /* Statusmessage A end */
+#define STATUS_VIDEO_END 1 /* Statusmessage V end */
+#define STATUS_AUDIO_TIME_OUT 2 /* Statusmessage A out */
+#define STATUS_VIDEO_TIME_OUT 3 /* Statusmessage V out */
/*************************************************************************
Typ- und Strukturdefinitionen
*************************************************************************/
-typedef struct sector_struc /* A sector, can contain pack, sys header */
- /* and packet. */
+typedef struct sector_struc /* A sector, can contain pack, sys header */
+ /* and packet. */
{ unsigned char buf [MAX_SECTOR_SIZE] ;
unsigned int length_of_sector ;
unsigned int length_of_packet_data ;
guint64 TS ;
} Sector_struc;
-typedef struct pack_struc /* Pack Info */
+typedef struct pack_struc /* Pack Info */
{ unsigned char buf [PACK_HEADER_SIZE];
guint64 SCR;
} Pack_struc;
-typedef struct sys_header_struc /* System Header Info */
+typedef struct sys_header_struc /* System Header Info */
{ unsigned char buf [SYS_HEADER_SIZE];
} Sys_header_struc;
@@ -126,15 +126,15 @@ typedef struct sys_header_struc /* System Header Info */
/* systems.c */
void create_sector (Sector_struc *sector, Pack_struc *pack, Sys_header_struc *sys_header,
- unsigned int packet_size, unsigned char *inputbuffer, unsigned char type, unsigned char buffer_scale,
- unsigned int buffer_size, unsigned char buffers, guint64 PTS, guint64 DTS,
- unsigned char timestamps, unsigned int which_streams);
+ unsigned int packet_size, unsigned char *inputbuffer, unsigned char type, unsigned char buffer_scale,
+ unsigned int buffer_size, unsigned char buffers, guint64 PTS, guint64 DTS,
+ unsigned char timestamps, unsigned int which_streams);
void create_pack (Pack_struc *pack, guint64 SCR, unsigned int mux_rate);
void create_sys_header (Sys_header_struc *sys_header, unsigned int rate_bound, unsigned char audio_bound,
- unsigned char fixed, unsigned char CSPS, unsigned char audio_lock, unsigned char video_lock,
- unsigned char video_bound, unsigned char stream1, unsigned char buffer1_scale, unsigned int buffer1_size,
- unsigned char stream2, unsigned char buffer2_scale, unsigned int buffer2_size, unsigned int which_streams);
+ unsigned char fixed, unsigned char CSPS, unsigned char audio_lock, unsigned char video_lock,
+ unsigned char video_bound, unsigned char stream1, unsigned char buffer1_scale, unsigned int buffer1_size,
+ unsigned char stream2, unsigned char buffer2_scale, unsigned int buffer2_size, unsigned int which_streams);
#endif
diff --git a/gst/mpeg1sys/systems.c b/gst/mpeg1sys/systems.c
index 6cff5034..847f365d 100644
--- a/gst/mpeg1sys/systems.c
+++ b/gst/mpeg1sys/systems.c
@@ -29,10 +29,10 @@ buffer_timecode (timecode, marker, buffer)
}
/*************************************************************************
- creates a complete sector.
- Also copies Pack and Sys_Header informations into the
- sector buffer, then reads a packet full of data from
- the input stream into the sector buffer.
+ creates a complete sector.
+ Also copies Pack and Sys_Header informations into the
+ sector buffer, then reads a packet full of data from
+ the input stream into the sector buffer.
*************************************************************************/
@@ -170,8 +170,8 @@ create_sector (sector, pack, sys_header,
/* zero byte stuffing in the last Packet of a stream */
/* we don't need this any more, since we shortenend the packet */
-/* for (j=tmp; j<i; j++) */
-/* *(index++)=(unsigned char) ZERO_STUFFING_BYTE; */
+/* for (j=tmp; j<i; j++) */
+/* *(index++)=(unsigned char) ZERO_STUFFING_BYTE; */
}
}
@@ -184,9 +184,9 @@ create_sector (sector, pack, sys_header,
}
/*************************************************************************
- writes specifical pack header information into a buffer
- later this will be copied from the sector routine into
- the sector buffer
+ writes specifical pack header information into a buffer
+ later this will be copied from the sector routine into
+ the sector buffer
*************************************************************************/
void
@@ -214,9 +214,9 @@ create_pack (pack, SCR, mux_rate)
/*************************************************************************
- writes specifical system header information into a buffer
- later this will be copied from the sector routine into
- the sector buffer
+ writes specifical system header information into a buffer
+ later this will be copied from the sector routine into
+ the sector buffer
*************************************************************************/
void
diff --git a/gst/mpeg1videoparse/gstmp1videoparse.h b/gst/mpeg1videoparse/gstmp1videoparse.h
index 05f5d9a5..fb75b90d 100644
--- a/gst/mpeg1videoparse/gstmp1videoparse.h
+++ b/gst/mpeg1videoparse/gstmp1videoparse.h
@@ -49,7 +49,7 @@ struct _Mp1VideoParse {
GstPad *sinkpad,*srcpad;
- GstBuffer *partialbuf; /* previous buffer (if carryover) */
+ GstBuffer *partialbuf; /* previous buffer (if carryover) */
gulong next_buffer_offset;
gboolean need_resync;
gboolean in_flush;
diff --git a/gst/mpeg2sub/gstmpeg2subt.h b/gst/mpeg2sub/gstmpeg2subt.h
index 8a078171..533b3880 100644
--- a/gst/mpeg2sub/gstmpeg2subt.h
+++ b/gst/mpeg2sub/gstmpeg2subt.h
@@ -57,8 +57,8 @@ struct _GstMpeg2Subt {
GstPad *videopad,*subtitlepad,*srcpad;
- GstBuffer *partialbuf; /* Collect together subtitle buffers until we have a full control sequence */
- GstBuffer *hold_frame; /* Hold back one frame of video */
+ GstBuffer *partialbuf; /* Collect together subtitle buffers until we have a full control sequence */
+ GstBuffer *hold_frame; /* Hold back one frame of video */
GstBuffer *still_frame;
guint16 packet_size;
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 08213529..507b30dc 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -180,12 +180,12 @@ mp3_type_frame_length_from_header (guint32 header, guint * put_layer,
* (0.024%) per try. This makes the function for calculating false positives
* 1 - (1 - ((63 / 2 ^18) ^ GST_MP3_TYPEFIND_MIN_HEADERS)) ^ buffersize)
* This has the following probabilities of false positives:
- * bufsize MIN_HEADERS
- * (bytes) 1 2 3 4
- * 4096 62.6% 0.02% 0% 0%
- * 16384 98% 0.09% 0% 0%
- * 1 MiB 100% 5.88% 0% 0%
- * 1 GiB 100% 100% 1.44% 0%
+ * bufsize MIN_HEADERS
+ * (bytes) 1 2 3 4
+ * 4096 62.6% 0.02% 0% 0%
+ * 16384 98% 0.09% 0% 0%
+ * 1 MiB 100% 5.88% 0% 0%
+ * 1 GiB 100% 100% 1.44% 0%
* 1 TiB 100% 100% 100% 0.35%
* This means that the current choice (3 headers by most of the time 4096 byte
* buffers is pretty safe for now.
@@ -361,8 +361,8 @@ gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
/* mask the bits which are allowed to differ between frames */
#define HDRMASK ~((0xF << 12) /* bitrate */ | \
- (0x1 << 9) /* padding */ | \
- (0x3 << 4)) /*mode extension */
+ (0x1 << 9) /* padding */ | \
+ (0x3 << 4)) /*mode extension */
if ((header2 & HDRMASK) != (header & HDRMASK)) { /* require 2 matching headers in a row */
GST_DEBUG
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.h b/gst/mpegaudioparse/gstmpegaudioparse.h
index a8c2a235..7375eedb 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.h
+++ b/gst/mpegaudioparse/gstmpegaudioparse.h
@@ -45,7 +45,7 @@ struct _GstMPEGAudioParse {
GstPad *sinkpad,*srcpad;
- GstBuffer *partialbuf; /* previous buffer (if carryover) */
+ GstBuffer *partialbuf; /* previous buffer (if carryover) */
guint skip; /* number of frames to skip */
guint bit_rate;
gint channels, rate, layer;
diff --git a/gst/multifilesink/gstmultifilesink.h b/gst/multifilesink/gstmultifilesink.h
index 89a741a0..d336742f 100644
--- a/gst/multifilesink/gstmultifilesink.h
+++ b/gst/multifilesink/gstmultifilesink.h
@@ -47,7 +47,7 @@ typedef enum {
GST_MULTIFILESINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_MULTIFILESINK_NEWFILE = (GST_ELEMENT_FLAG_LAST << 1),
- GST_MULTIFILESINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 4)
+ GST_MULTIFILESINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 4)
} GstMultiFileSinkFlags;
struct _GstMultiFileSink {
diff --git a/gst/overlay/gstoverlay.h b/gst/overlay/gstoverlay.h
index 523656e0..cfc60254 100644
--- a/gst/overlay/gstoverlay.h
+++ b/gst/overlay/gstoverlay.h
@@ -38,26 +38,26 @@ typedef struct _GstOverlay GstOverlay;
typedef struct _GstOverlayClass GstOverlayClass;
struct _GstOverlay {
- GstElement element;
+ GstElement element;
- GstPad *srcpad;
- GstPad *sinkpad1;
- GstPad *sinkpad2;
- GstPad *sinkpad3;
+ GstPad *srcpad;
+ GstPad *sinkpad1;
+ GstPad *sinkpad2;
+ GstPad *sinkpad3;
- gint format;
- gint width;
- gint height;
+ gint format;
+ gint width;
+ gint height;
- gint duration;
- gint position;
+ gint duration;
+ gint position;
- gint type;
- gint fps;
- gint border;
- gint depth;
+ gint type;
+ gint fps;
+ gint border;
+ gint depth;
- gdouble framerate;
+ gdouble framerate;
};
struct _GstOverlayClass {
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index a5699688..16417f1c 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -33,13 +33,13 @@ GST_DEBUG_CATEGORY_EXTERN (qtdemux_debug);
/* temporary hack */
#define gst_util_dump_mem(a,b) /* */
-#define QTDEMUX_GUINT32_GET(a) (GST_READ_UINT32_BE(a))
-#define QTDEMUX_GUINT24_GET(a) (GST_READ_UINT32_BE(a) >> 8)
-#define QTDEMUX_GUINT16_GET(a) (GST_READ_UINT16_BE(a))
+#define QTDEMUX_GUINT32_GET(a) (GST_READ_UINT32_BE(a))
+#define QTDEMUX_GUINT24_GET(a) (GST_READ_UINT32_BE(a) >> 8)
+#define QTDEMUX_GUINT16_GET(a) (GST_READ_UINT16_BE(a))
#define QTDEMUX_GUINT8_GET(a) (*(guint8 *)(a))
-#define QTDEMUX_FP32_GET(a) ((GST_READ_UINT32_BE(a))/65536.0)
-#define QTDEMUX_FP16_GET(a) ((GST_READ_UINT16_BE(a))/256.0)
-#define QTDEMUX_FOURCC_GET(a) (GST_READ_UINT32_LE(a))
+#define QTDEMUX_FP32_GET(a) ((GST_READ_UINT32_BE(a))/65536.0)
+#define QTDEMUX_FP16_GET(a) ((GST_READ_UINT16_BE(a))/256.0)
+#define QTDEMUX_FOURCC_GET(a) (GST_READ_UINT32_LE(a))
#define QTDEMUX_GUINT64_GET(a) ((((guint64)QTDEMUX_GUINT32_GET(a))<<32)|QTDEMUX_GUINT32_GET(((void *)a)+4))
@@ -781,76 +781,76 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
#define QT_CONTAINER 1
-#define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v')
-#define FOURCC_mvhd GST_MAKE_FOURCC('m','v','h','d')
-#define FOURCC_clip GST_MAKE_FOURCC('c','l','i','p')
-#define FOURCC_trak GST_MAKE_FOURCC('t','r','a','k')
-#define FOURCC_udta GST_MAKE_FOURCC('u','d','t','a')
-#define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b')
-#define FOURCC_tkhd GST_MAKE_FOURCC('t','k','h','d')
-#define FOURCC_crgn GST_MAKE_FOURCC('c','r','g','n')
-#define FOURCC_matt GST_MAKE_FOURCC('m','a','t','t')
-#define FOURCC_kmat GST_MAKE_FOURCC('k','m','a','t')
-#define FOURCC_edts GST_MAKE_FOURCC('e','d','t','s')
-#define FOURCC_elst GST_MAKE_FOURCC('e','l','s','t')
-#define FOURCC_load GST_MAKE_FOURCC('l','o','a','d')
-#define FOURCC_tref GST_MAKE_FOURCC('t','r','e','f')
-#define FOURCC_imap GST_MAKE_FOURCC('i','m','a','p')
-#define FOURCC___in GST_MAKE_FOURCC(' ',' ','i','n')
-#define FOURCC___ty GST_MAKE_FOURCC(' ',' ','t','y')
-#define FOURCC_mdia GST_MAKE_FOURCC('m','d','i','a')
-#define FOURCC_mdhd GST_MAKE_FOURCC('m','d','h','d')
-#define FOURCC_hdlr GST_MAKE_FOURCC('h','d','l','r')
-#define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f')
-#define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d')
-#define FOURCC_smhd GST_MAKE_FOURCC('s','m','h','d')
-#define FOURCC_gmhd GST_MAKE_FOURCC('g','m','h','d')
-#define FOURCC_gmin GST_MAKE_FOURCC('g','m','i','n')
-#define FOURCC_dinf GST_MAKE_FOURCC('d','i','n','f')
-#define FOURCC_dref GST_MAKE_FOURCC('d','r','e','f')
-#define FOURCC_stbl GST_MAKE_FOURCC('s','t','b','l')
-#define FOURCC_stsd GST_MAKE_FOURCC('s','t','s','d')
-#define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s')
-#define FOURCC_stss GST_MAKE_FOURCC('s','t','s','s')
-#define FOURCC_stsc GST_MAKE_FOURCC('s','t','s','c')
-#define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z')
-#define FOURCC_stco GST_MAKE_FOURCC('s','t','c','o')
-#define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e')
-#define FOURCC_soun GST_MAKE_FOURCC('s','o','u','n')
-#define FOURCC_co64 GST_MAKE_FOURCC('c','o','6','4')
-#define FOURCC_cmov GST_MAKE_FOURCC('c','m','o','v')
-#define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m')
-#define FOURCC_cmvd GST_MAKE_FOURCC('c','m','v','d')
-#define FOURCC_hint GST_MAKE_FOURCC('h','i','n','t')
-#define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a')
-#define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v')
-#define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e')
-#define FOURCC_appl GST_MAKE_FOURCC('a','p','p','l')
-#define FOURCC_esds GST_MAKE_FOURCC('e','s','d','s')
-#define FOURCC_hnti GST_MAKE_FOURCC('h','n','t','i')
-#define FOURCC_rtp_ GST_MAKE_FOURCC('r','t','p',' ')
-#define FOURCC_sdp_ GST_MAKE_FOURCC('s','d','p',' ')
-#define FOURCC_meta GST_MAKE_FOURCC('m','e','t','a')
-#define FOURCC_ilst GST_MAKE_FOURCC('i','l','s','t')
-#define FOURCC__nam GST_MAKE_FOURCC(0xa9,'n','a','m')
-#define FOURCC__ART GST_MAKE_FOURCC(0xa9,'A','R','T')
-#define FOURCC__wrt GST_MAKE_FOURCC(0xa9,'w','r','t')
-#define FOURCC__grp GST_MAKE_FOURCC(0xa9,'g','r','p')
-#define FOURCC__alb GST_MAKE_FOURCC(0xa9,'a','l','b')
-#define FOURCC_gnre GST_MAKE_FOURCC('g','n','r','e')
-#define FOURCC_disc GST_MAKE_FOURCC('d','i','s','c')
-#define FOURCC_trkn GST_MAKE_FOURCC('t','r','k','n')
-#define FOURCC_cpil GST_MAKE_FOURCC('c','p','i','l')
-#define FOURCC_tmpo GST_MAKE_FOURCC('t','m','p','o')
-#define FOURCC__too GST_MAKE_FOURCC(0xa9,'t','o','o')
-#define FOURCC_____ GST_MAKE_FOURCC('-','-','-','-')
-#define FOURCC_free GST_MAKE_FOURCC('f','r','e','e')
-#define FOURCC_data GST_MAKE_FOURCC('d','a','t','a')
-#define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3')
-#define FOURCC_rmra GST_MAKE_FOURCC('r','m','r','a')
-#define FOURCC_rmda GST_MAKE_FOURCC('r','m','d','a')
-#define FOURCC_rdrf GST_MAKE_FOURCC('r','d','r','f')
-#define FOURCC__gen GST_MAKE_FOURCC(0xa9, 'g', 'e', 'n')
+#define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v')
+#define FOURCC_mvhd GST_MAKE_FOURCC('m','v','h','d')
+#define FOURCC_clip GST_MAKE_FOURCC('c','l','i','p')
+#define FOURCC_trak GST_MAKE_FOURCC('t','r','a','k')
+#define FOURCC_udta GST_MAKE_FOURCC('u','d','t','a')
+#define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b')
+#define FOURCC_tkhd GST_MAKE_FOURCC('t','k','h','d')
+#define FOURCC_crgn GST_MAKE_FOURCC('c','r','g','n')
+#define FOURCC_matt GST_MAKE_FOURCC('m','a','t','t')
+#define FOURCC_kmat GST_MAKE_FOURCC('k','m','a','t')
+#define FOURCC_edts GST_MAKE_FOURCC('e','d','t','s')
+#define FOURCC_elst GST_MAKE_FOURCC('e','l','s','t')
+#define FOURCC_load GST_MAKE_FOURCC('l','o','a','d')
+#define FOURCC_tref GST_MAKE_FOURCC('t','r','e','f')
+#define FOURCC_imap GST_MAKE_FOURCC('i','m','a','p')
+#define FOURCC___in GST_MAKE_FOURCC(' ',' ','i','n')
+#define FOURCC___ty GST_MAKE_FOURCC(' ',' ','t','y')
+#define FOURCC_mdia GST_MAKE_FOURCC('m','d','i','a')
+#define FOURCC_mdhd GST_MAKE_FOURCC('m','d','h','d')
+#define FOURCC_hdlr GST_MAKE_FOURCC('h','d','l','r')
+#define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f')
+#define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d')
+#define FOURCC_smhd GST_MAKE_FOURCC('s','m','h','d')
+#define FOURCC_gmhd GST_MAKE_FOURCC('g','m','h','d')
+#define FOURCC_gmin GST_MAKE_FOURCC('g','m','i','n')
+#define FOURCC_dinf GST_MAKE_FOURCC('d','i','n','f')
+#define FOURCC_dref GST_MAKE_FOURCC('d','r','e','f')
+#define FOURCC_stbl GST_MAKE_FOURCC('s','t','b','l')
+#define FOURCC_stsd GST_MAKE_FOURCC('s','t','s','d')
+#define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s')
+#define FOURCC_stss GST_MAKE_FOURCC('s','t','s','s')
+#define FOURCC_stsc GST_MAKE_FOURCC('s','t','s','c')
+#define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z')
+#define FOURCC_stco GST_MAKE_FOURCC('s','t','c','o')
+#define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e')
+#define FOURCC_soun GST_MAKE_FOURCC('s','o','u','n')
+#define FOURCC_co64 GST_MAKE_FOURCC('c','o','6','4')
+#define FOURCC_cmov GST_MAKE_FOURCC('c','m','o','v')
+#define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m')
+#define FOURCC_cmvd GST_MAKE_FOURCC('c','m','v','d')
+#define FOURCC_hint GST_MAKE_FOURCC('h','i','n','t')
+#define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a')
+#define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v')
+#define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e')
+#define FOURCC_appl GST_MAKE_FOURCC('a','p','p','l')
+#define FOURCC_esds GST_MAKE_FOURCC('e','s','d','s')
+#define FOURCC_hnti GST_MAKE_FOURCC('h','n','t','i')
+#define FOURCC_rtp_ GST_MAKE_FOURCC('r','t','p',' ')
+#define FOURCC_sdp_ GST_MAKE_FOURCC('s','d','p',' ')
+#define FOURCC_meta GST_MAKE_FOURCC('m','e','t','a')
+#define FOURCC_ilst GST_MAKE_FOURCC('i','l','s','t')
+#define FOURCC__nam GST_MAKE_FOURCC(0xa9,'n','a','m')
+#define FOURCC__ART GST_MAKE_FOURCC(0xa9,'A','R','T')
+#define FOURCC__wrt GST_MAKE_FOURCC(0xa9,'w','r','t')
+#define FOURCC__grp GST_MAKE_FOURCC(0xa9,'g','r','p')
+#define FOURCC__alb GST_MAKE_FOURCC(0xa9,'a','l','b')
+#define FOURCC_gnre GST_MAKE_FOURCC('g','n','r','e')
+#define FOURCC_disc GST_MAKE_FOURCC('d','i','s','c')
+#define FOURCC_trkn GST_MAKE_FOURCC('t','r','k','n')
+#define FOURCC_cpil GST_MAKE_FOURCC('c','p','i','l')
+#define FOURCC_tmpo GST_MAKE_FOURCC('t','m','p','o')
+#define FOURCC__too GST_MAKE_FOURCC(0xa9,'t','o','o')
+#define FOURCC_____ GST_MAKE_FOURCC('-','-','-','-')
+#define FOURCC_free GST_MAKE_FOURCC('f','r','e','e')
+#define FOURCC_data GST_MAKE_FOURCC('d','a','t','a')
+#define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3')
+#define FOURCC_rmra GST_MAKE_FOURCC('r','m','r','a')
+#define FOURCC_rmda GST_MAKE_FOURCC('r','m','d','a')
+#define FOURCC_rdrf GST_MAKE_FOURCC('r','d','r','f')
+#define FOURCC__gen GST_MAKE_FOURCC(0xa9, 'g', 'e', 'n')
static void qtdemux_dump_mvhd (GstQTDemux * qtdemux, void *buffer, int depth);
static void qtdemux_dump_tkhd (GstQTDemux * qtdemux, void *buffer, int depth);
diff --git a/gst/qtdemux/qtdemux.h b/gst/qtdemux/qtdemux.h
index 37fbd3b3..a5653fe2 100644
--- a/gst/qtdemux/qtdemux.h
+++ b/gst/qtdemux/qtdemux.h
@@ -39,7 +39,7 @@ extern "C" {
#define GST_IS_QTDEMUX_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QTDEMUX))
-#define GST_QTDEMUX_MAX_STREAMS 8
+#define GST_QTDEMUX_MAX_STREAMS 8
typedef struct _GstQTDemux GstQTDemux;
typedef struct _GstQTDemuxClass GstQTDemuxClass;
diff --git a/gst/rtjpeg/RTjpeg.c b/gst/rtjpeg/RTjpeg.c
index eaf8a5ab..8f959a5a 100644
--- a/gst/rtjpeg/RTjpeg.c
+++ b/gst/rtjpeg/RTjpeg.c
@@ -648,7 +648,7 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
movq_r2r (mm3, mm4); /* write result 4 */
/************************************************************************************************
- End of Transpose
+ End of Transpose
************************************************************************************************/
@@ -743,8 +743,8 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
movq_r2m (mm0, *(dataptr + 14)); /*save y7 */
/************************************************
- * End of 1st 4 rows
- ************************************************/
+ * End of 1st 4 rows
+ ************************************************/
movq_m2r (*(dataptr + 3), mm1); /* load x1: stage 1 */
movq_r2r (mm7, mm0); /* copy x0 */
@@ -864,7 +864,7 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
psubw_r2r (mm2, mm0); /* y7 */
/************************************************************************************************
- Start of Transpose
+ Start of Transpose
************************************************************************************************/
movq_m2r (*(dataptr + 13), mm6); /* m23:m22|m21:m20 - third line (line 6)and copy into m2 */
@@ -999,7 +999,7 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
movq_r2r (mm3, mm4); /* write result 4 */
/************************************************************************************************
- End of Transpose 2
+ End of Transpose 2
************************************************************************************************/
paddw_m2r (*(dataptr + 8), mm3); /* tmp03=x3+x4: stage 1 */
@@ -1092,8 +1092,8 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
movq_r2m (mm0, *(dataptr + 14)); /*save y7 */
/************************************************
- * End of 1st 4 rows
- ************************************************/
+ * End of 1st 4 rows
+ ************************************************/
movq_m2r (*(dataptr + 3), mm1); /* load x1 : stage 1 */
movq_r2r (mm7, mm0); /* copy x0 */
@@ -1585,8 +1585,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
/*ok */
-/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
-/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
+/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
+/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
movq_r2r (mm0, mm2);
@@ -1718,8 +1718,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
movq_r2r (mm5, mm1);
punpckldq_r2r (mm2, mm3); /* wsptr[0,z12],[1,z12],[2,z12],[3,z12] */
-/* tmp7 = z11 + z13; : phase 5 */
-/* tmp8 = z11 - z13; : phase 5 */
+/* tmp7 = z11 + z13; : phase 5 */
+/* tmp8 = z11 - z13; : phase 5 */
psubw_r2r (mm4, mm1); /* tmp8 */
paddw_r2r (mm4, mm5); /* tmp7 */
@@ -1730,7 +1730,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
pmulhw_m2r (fix_141, mm1); /* tmp21 */
/* tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) 2*(c2-c6) */
-/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
+/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
psllw_i2r (2, mm3);
movq_r2r (mm0, mm7);
@@ -1740,8 +1740,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
movq_m2r (*(wsptr), mm2); /* tmp0,final1 */
pmulhw_m2r (fix_108n184, mm6);
-/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
-/* + MULTIPLY(z12, FIX_1_847759065); 2*c2 */
+/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
+/* + MULTIPLY(z12, FIX_1_847759065); 2*c2 */
movq_r2r (mm2, mm4); /* final1 */
pmulhw_m2r (fix_184n261, mm0);
@@ -1750,7 +1750,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
pmulhw_m2r (fix_184, mm3);
psubw_r2r (mm5, mm4); /* tmp0-tmp7,final1 */
-/* tmp6 = tmp22 - tmp7; phase 2 */
+/* tmp6 = tmp22 - tmp7; phase 2 */
psraw_i2r (3, mm2); /* outptr[0,0],[1,0],[2,0],[3,0],final1 */
paddw_r2r (mm6, mm7); /* tmp20 */
@@ -1772,15 +1772,15 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
/* outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) */
-/* & RANGE_MASK]; final1 */
+/* & RANGE_MASK]; final1 */
/* outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) */
-/* & RANGE_MASK]; final2 */
+/* & RANGE_MASK]; final2 */
psubw_r2r (mm3, mm6); /* tmp1-tmp6,final2 */
psraw_i2r (3, mm0); /* outptr[0,1],[1,1],[2,1],[3,1] */
@@ -1792,9 +1792,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
packuswb_r2r (mm6, mm2); /* out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] */
/* outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) */
-/* & RANGE_MASK]; final3 */
+/* & RANGE_MASK]; final3 */
paddw_r2r (mm1, mm7); /* tmp4 */
movq_r2r (mm5, mm3);
@@ -1809,9 +1809,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
/* outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) */
-/* & RANGE_MASK]; final4 */
+/* & RANGE_MASK]; final4 */
movq_r2r (mm4, mm6);
paddw_r2r (mm7, mm4); /* tmp3+tmp4 */
@@ -1946,8 +1946,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
/*OK */
-/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
-/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
+/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
+/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
movq_r2r (mm0, mm2);
punpckhdq_r2r (mm4, mm6); /* wsptr[0,tmp14],[1,tmp14],[2,tmp14],[3,tmp14] */
@@ -2079,8 +2079,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
movq_r2r (mm5, mm1);
punpckldq_r2r (mm2, mm3); /* wsptr[0,z12],[1,z12],[2,z12],[3,z12] */
-/* tmp7 = z11 + z13; : phase 5 */
-/* tmp8 = z11 - z13; : phase 5 */
+/* tmp7 = z11 + z13; : phase 5 */
+/* tmp8 = z11 - z13; : phase 5 */
psubw_r2r (mm4, mm1); /* tmp8 */
paddw_r2r (mm4, mm5); /* tmp7 */
@@ -2091,7 +2091,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
pmulhw_m2r (fix_141, mm1); /* tmp21 */
/* tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) : 2*(c2-c6) */
-/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
+/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
psllw_i2r (2, mm3);
movq_r2r (mm0, mm7);
@@ -2101,8 +2101,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
movq_m2r (*(wsptr), mm2); /* tmp0,final1 */
pmulhw_m2r (fix_108n184, mm6);
-/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
-/* + MULTIPLY(z12, FIX_1_847759065); : 2*c2 */
+/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
+/* + MULTIPLY(z12, FIX_1_847759065); : 2*c2 */
movq_r2r (mm2, mm4); /* final1 */
pmulhw_m2r (fix_184n261, mm0);
@@ -2111,7 +2111,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
pmulhw_m2r (fix_184, mm3);
psubw_r2r (mm5, mm4); /* tmp0-tmp7,final1 */
-/* tmp6 = tmp22 - tmp7; phase 2 */
+/* tmp6 = tmp22 - tmp7; phase 2 */
psraw_i2r (3, mm2); /* outptr[0,0],[1,0],[2,0],[3,0],final1 */
paddw_r2r (mm6, mm7); /* tmp20 */
@@ -2132,15 +2132,15 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
/* Final output stage: scale down by a factor of 8 and range-limit */
/* outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) */
-/* & RANGE_MASK]; final1 */
+/* & RANGE_MASK]; final1 */
/* outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) */
-/* & RANGE_MASK]; final2 */
+/* & RANGE_MASK]; final2 */
psubw_r2r (mm3, mm6); /* tmp1-tmp6,final2 */
psraw_i2r (3, mm0); /* outptr[0,1],[1,1],[2,1],[3,1] */
@@ -2152,9 +2152,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
packuswb_r2r (mm6, mm2); /* out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] */
/* outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) */
-/* & RANGE_MASK]; final3 */
+/* & RANGE_MASK]; final3 */
paddw_r2r (mm1, mm7); /* tmp4 */
movq_r2r (mm5, mm3);
@@ -2169,9 +2169,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
/* outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) */
-/* & RANGE_MASK]; */
+/* & RANGE_MASK]; */
/* outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) */
-/* & RANGE_MASK]; final4 */
+/* & RANGE_MASK]; final4 */
movq_r2r (mm4, mm6);
paddw_r2r (mm7, mm4); /* tmp3+tmp4 */
diff --git a/gst/rtjpeg/RTjpeg.h b/gst/rtjpeg/RTjpeg.h
index 92b35242..155e9a33 100644
--- a/gst/rtjpeg/RTjpeg.h
+++ b/gst/rtjpeg/RTjpeg.h
@@ -49,4 +49,4 @@ extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb);
extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb);
extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb);
extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb);
-
+
diff --git a/gst/tta/crc32.h b/gst/tta/crc32.h
index c4833917..e5fdd4d0 100644
--- a/gst/tta/crc32.h
+++ b/gst/tta/crc32.h
@@ -1,7 +1,7 @@
/*
* crc32.h
*
- * Description: CRC32 functions
+ * Description: CRC32 functions
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
* Pavel Zhilin <pzh@iszf.irk.ru>
*
@@ -32,83 +32,83 @@
#define CRC32_H
static const unsigned long crc32_table[256] = {
- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
- 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
- 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
- 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
- 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
- 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
- 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
- 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
- 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
- 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
- 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
- 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
- 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
- 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
- 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
- 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
- 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
- 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
- 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
- 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
- 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
- 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
- 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
- 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
- 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
- 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
- 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
- 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
- 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
- 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
- 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
- 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
- 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
- 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
- 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
- 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
- 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
- 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
- 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
- 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
- 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
- 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
- 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
- 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
- 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
- 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
- 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
- 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
- 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
- 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
- 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
- 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
- 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
- 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
- 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
- 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
- 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
- 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
- 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
- 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
- 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
- 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
+ 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+ 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+ 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
+ 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+ 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
+ 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
+ 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+ 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+ 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
+ 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
+ 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+ 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
+ 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+ 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+ 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
+ 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
+ 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+ 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+ 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
+ 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+ 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
+ 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
+ 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+ 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+ 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
+ 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
+ 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+ 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
+ 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+ 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+ 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
+ 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
+ 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+ 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
#define UPDATE_CRC32(x, crc) crc = \
- (((crc>>8) & 0x00FFFFFF) ^ crc32_table[(crc^x) & 0xFF])
+ (((crc>>8) & 0x00FFFFFF) ^ crc32_table[(crc^x) & 0xFF])
static unsigned long
crc32 (unsigned char *buffer, unsigned long len) {
- unsigned long i;
- unsigned long crc = 0xFFFFFFFF;
+ unsigned long i;
+ unsigned long crc = 0xFFFFFFFF;
- for (i = 0; i < len; i++) UPDATE_CRC32(buffer[i], crc);
+ for (i = 0; i < len; i++) UPDATE_CRC32(buffer[i], crc);
- return (crc ^ 0xFFFFFFFF);
+ return (crc ^ 0xFFFFFFFF);
}
-#endif /* CRC32_H */
+#endif /* CRC32_H */
diff --git a/gst/tta/filters.h b/gst/tta/filters.h
index e2c176e1..3c0694a2 100644
--- a/gst/tta/filters.h
+++ b/gst/tta/filters.h
@@ -1,7 +1,7 @@
/*
* filters.h
*
- * Description: TTAv1 filter functions
+ * Description: TTAv1 filter functions
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
* Pavel Zhilin <pzh@iszf.irk.ru>
*
@@ -36,75 +36,75 @@ static long flt_set[3] = {10, 9, 10};
static void
memshl (register long *pA, register long *pB) {
- *pA++ = *pB++;
- *pA++ = *pB++;
- *pA++ = *pB++;
- *pA++ = *pB++;
- *pA++ = *pB++;
- *pA++ = *pB++;
- *pA++ = *pB++;
- *pA = *pB;
+ *pA++ = *pB++;
+ *pA++ = *pB++;
+ *pA++ = *pB++;
+ *pA++ = *pB++;
+ *pA++ = *pB++;
+ *pA++ = *pB++;
+ *pA++ = *pB++;
+ *pA = *pB;
}
static void
hybrid_filter (fltst *fs, long *in) {
- register long *pA = fs->dl;
- register long *pB = fs->qm;
- register long *pM = fs->dx;
- register long sum = fs->round;
+ register long *pA = fs->dl;
+ register long *pB = fs->qm;
+ register long *pM = fs->dx;
+ register long sum = fs->round;
- if (!fs->error) {
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++;
- sum += *pA++ * *pB, pB++; pM += 8;
- } else if (fs->error < 0) {
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- sum += *pA++ * (*pB -= *pM++), pB++;
- } else {
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- sum += *pA++ * (*pB += *pM++), pB++;
- }
+ if (!fs->error) {
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++;
+ sum += *pA++ * *pB, pB++; pM += 8;
+ } else if (fs->error < 0) {
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ sum += *pA++ * (*pB -= *pM++), pB++;
+ } else {
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ sum += *pA++ * (*pB += *pM++), pB++;
+ }
- *(pM-0) = ((*(pA-1) >> 30) | 1) << 2;
- *(pM-1) = ((*(pA-2) >> 30) | 1) << 1;
- *(pM-2) = ((*(pA-3) >> 30) | 1) << 1;
- *(pM-3) = ((*(pA-4) >> 30) | 1);
+ *(pM-0) = ((*(pA-1) >> 30) | 1) << 2;
+ *(pM-1) = ((*(pA-2) >> 30) | 1) << 1;
+ *(pM-2) = ((*(pA-3) >> 30) | 1) << 1;
+ *(pM-3) = ((*(pA-4) >> 30) | 1);
- fs->error = *in;
- *in += (sum >> fs->shift);
- *pA = *in;
+ fs->error = *in;
+ *in += (sum >> fs->shift);
+ *pA = *in;
- *(pA-1) = *(pA-0) - *(pA-1);
- *(pA-2) = *(pA-1) - *(pA-2);
- *(pA-3) = *(pA-2) - *(pA-3);
+ *(pA-1) = *(pA-0) - *(pA-1);
+ *(pA-2) = *(pA-1) - *(pA-2);
+ *(pA-3) = *(pA-2) - *(pA-3);
- memshl (fs->dl, fs->dl + 1);
- memshl (fs->dx, fs->dx + 1);
+ memshl (fs->dl, fs->dl + 1);
+ memshl (fs->dx, fs->dx + 1);
}
static void
filter_init (fltst *fs, long shift) {
- memset (fs, 0, sizeof(fltst));
- fs->shift = shift;
- fs->round = 1 << (shift - 1);
+ memset (fs, 0, sizeof(fltst));
+ fs->shift = shift;
+ fs->round = 1 << (shift - 1);
}
-#endif /* FILTERS_H */
+#endif /* FILTERS_H */
diff --git a/gst/tta/ttadec.h b/gst/tta/ttadec.h
index a49ba653..147210b6 100644
--- a/gst/tta/ttadec.h
+++ b/gst/tta/ttadec.h
@@ -1,7 +1,7 @@
/*
* ttadec.h
*
- * Description: TTAv1 decoder definitions and prototypes
+ * Description: TTAv1 decoder definitions and prototypes
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
* Pavel Zhilin <pzh@iszf.irk.ru>
*
@@ -35,21 +35,21 @@
#pragma pack(1)
#define __ATTRIBUTE_PACKED__
#else
-#define __ATTRIBUTE_PACKED__ __attribute__((packed))
+#define __ATTRIBUTE_PACKED__ __attribute__((packed))
#endif
-#define TTA1_SIGN 0x31415454
-#define FRAME_TIME 1.04489795918367346939
-#define MAX_ORDER 8
+#define TTA1_SIGN 0x31415454
+#define FRAME_TIME 1.04489795918367346939
+#define MAX_ORDER 8
#ifndef WAVE_FORMAT_PCM
-#define WAVE_FORMAT_PCM 1
+#define WAVE_FORMAT_PCM 1
#endif
#ifdef _WIN32
- typedef unsigned __int64 uint64;
+ typedef unsigned __int64 uint64;
#else
- typedef unsigned long long uint64;
+ typedef unsigned long long uint64;
#endif
/**
@@ -87,23 +87,23 @@ static const unsigned long *shift_16 = bit_shift + 4;
typedef unsigned char byte;
#ifdef _BIG_ENDIAN
-#define ENDSWAP_INT16(x) (((((x)>>8)&0xFF)|(((x)&0xFF)<<8)))
-#define ENDSWAP_INT32(x) (((((x)>>24)&0xFF)|(((x)>>8)&0xFF00)|(((x)&0xFF00)<<8)|(((x)&0xFF)<<24)))
+#define ENDSWAP_INT16(x) (((((x)>>8)&0xFF)|(((x)&0xFF)<<8)))
+#define ENDSWAP_INT32(x) (((((x)>>24)&0xFF)|(((x)>>8)&0xFF00)|(((x)&0xFF00)<<8)|(((x)&0xFF)<<24)))
#define WRITE_BUFFER(x, bsize, out) { \
- if (bsize > 2) *out++ = (byte)(*x >> 16); \
- if (bsize > 1) *out++ = (byte)(*x >> 8); \
- *out++ = (byte) *x; }
+ if (bsize > 2) *out++ = (byte)(*x >> 16); \
+ if (bsize > 1) *out++ = (byte)(*x >> 8); \
+ *out++ = (byte) *x; }
#else
-#define ENDSWAP_INT16(x) (x)
-#define ENDSWAP_INT32(x) (x)
+#define ENDSWAP_INT16(x) (x)
+#define ENDSWAP_INT32(x) (x)
#define WRITE_BUFFER(x, bsize, out) { \
- *out++ = (byte) *x; \
- if (bsize > 1) *out++ = (byte)(*x >> 8); \
- if (bsize > 2) *out++ = (byte)(*x >> 16); }
+ *out++ = (byte) *x; \
+ if (bsize > 1) *out++ = (byte)(*x >> 8); \
+ if (bsize > 2) *out++ = (byte)(*x >> 16); }
#endif
-#define PREDICTOR1(x, k) ((long)((((uint64)x << k) - x) >> k))
-#define DEC(x) (((x)&1)?(++(x)>>1):(-(x)>>1))
+#define PREDICTOR1(x, k) ((long)((((uint64)x << k) - x) >> k))
+#define DEC(x) (((x)&1)?(++(x)>>1):(-(x)>>1))
#if 0
/* This doesn't compile on non-gcc compilers */
@@ -119,26 +119,26 @@ typedef struct {
#endif
typedef struct {
- unsigned long k0;
- unsigned long k1;
- unsigned long sum0;
- unsigned long sum1;
+ unsigned long k0;
+ unsigned long k1;
+ unsigned long sum0;
+ unsigned long sum1;
} adapt;
typedef struct {
- long shift;
- long round;
- long error;
- long mutex;
- long qm[MAX_ORDER+1];
- long dx[MAX_ORDER+1];
- long dl[MAX_ORDER+1];
+ long shift;
+ long round;
+ long error;
+ long mutex;
+ long qm[MAX_ORDER+1];
+ long dx[MAX_ORDER+1];
+ long dl[MAX_ORDER+1];
} fltst;
typedef struct {
- fltst fst;
- adapt rice;
- long last;
+ fltst fst;
+ adapt rice;
+ long last;
} decoder;
#endif /* TTADEC_H_ */
diff --git a/gst/videodrop/gstvideodrop.h b/gst/videodrop/gstvideodrop.h
index 20f954a4..3d6f6060 100644
--- a/gst/videodrop/gstvideodrop.h
+++ b/gst/videodrop/gstvideodrop.h
@@ -46,7 +46,7 @@ struct _GstVideodrop {
/* video state */
gboolean inited;
gfloat from_fps,
- to_fps;
+ to_fps;
gfloat speed;
guint64 pass, total, time_adjust;
};
diff --git a/sys/cdrom/gstcdplayer.h b/sys/cdrom/gstcdplayer.h
index 7c6c4bf9..70f0c973 100644
--- a/sys/cdrom/gstcdplayer.h
+++ b/sys/cdrom/gstcdplayer.h
@@ -25,40 +25,40 @@
#include "gstcdplayer_ioctl.h"
-#define GST_TYPE_CDPLAYER (cdplayer_get_type())
-#define CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDPLAYER,CDPlayer))
-#define CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDPLAYER,CDPlayerClass))
-#define GST_IS_CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDPLAYER))
-#define GST_IS_CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPLAYER))
+#define GST_TYPE_CDPLAYER (cdplayer_get_type())
+#define CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDPLAYER,CDPlayer))
+#define CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDPLAYER,CDPlayerClass))
+#define GST_IS_CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDPLAYER))
+#define GST_IS_CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPLAYER))
typedef struct _CDPlayer CDPlayer;
typedef struct _CDPlayerClass CDPlayerClass;
struct _CDPlayer {
- GstBin element;
-
- /* properties */
- gchar *device;
- gint num_tracks;
- gint start_track;
- gint end_track;
- gint current_track;
- guint32 cddb_discid;
+ GstBin element;
+
+ /* properties */
+ gchar *device;
+ gint num_tracks;
+ gint start_track;
+ gint end_track;
+ gint current_track;
+ guint32 cddb_discid;
- /* private */
- struct cd cd;
- gboolean paused;
+ /* private */
+ struct cd cd;
+ gboolean paused;
};
struct _CDPlayerClass {
- GstBinClass parent_class;
+ GstBinClass parent_class;
- /* signal callbacks */
- void (*track_change) (GstElement *element,guint track);
+ /* signal callbacks */
+ void (*track_change) (GstElement *element,guint track);
};
GType cdplayer_get_type(void);
-#endif
+#endif
diff --git a/sys/cdrom/gstcdplayer_ioctl.c b/sys/cdrom/gstcdplayer_ioctl.c
index 8cb3891b..abcab5c9 100644
--- a/sys/cdrom/gstcdplayer_ioctl.c
+++ b/sys/cdrom/gstcdplayer_ioctl.c
@@ -51,14 +51,14 @@ irix cdaudio works quite a bit differently than ioctl(), so its not ready
#endif
/* these headers define low level functions:
- gboolean cd_init(struct cd *cd,const gchar *device);
- gboolean cd_start(struct cd *cd,gint start_track,gint end_track);
- gboolean cd_pause(struct cd *cd);
- gboolean cd_resume(struct cd *cd);
- gboolean cd_stop(struct cd *cd);
- CDStatus cd_status(struct cd *cd);
- gint cd_current_track(struct cd *cd);
- gboolean cd_close(struct cd *cd);
+ gboolean cd_init(struct cd *cd,const gchar *device);
+ gboolean cd_start(struct cd *cd,gint start_track,gint end_track);
+ gboolean cd_pause(struct cd *cd);
+ gboolean cd_resume(struct cd *cd);
+ gboolean cd_stop(struct cd *cd);
+ CDStatus cd_status(struct cd *cd);
+ gint cd_current_track(struct cd *cd);
+ gboolean cd_close(struct cd *cd);
*/
#if defined(HAVE_CDROM_SOLARIS)
#include "gstcdplayer_ioctl_solaris.h"
diff --git a/sys/cdrom/gstcdplayer_ioctl.h b/sys/cdrom/gstcdplayer_ioctl.h
index 65bc2c66..ac560976 100644
--- a/sys/cdrom/gstcdplayer_ioctl.h
+++ b/sys/cdrom/gstcdplayer_ioctl.h
@@ -29,23 +29,23 @@
#define CDPLAYER_MAX_TRACKS 128
typedef enum {
- CD_PLAYING,
- CD_COMPLETED,
- CD_ERROR
+ CD_PLAYING,
+ CD_COMPLETED,
+ CD_ERROR
} CDStatus;
struct cd_msf {
- guint8 minute;
- guint8 second;
- guint8 frame;
+ guint8 minute;
+ guint8 second;
+ guint8 frame;
- gboolean data_track;
+ gboolean data_track;
};
struct cd {
- gint fd;
- gint num_tracks;
- struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
+ gint fd;
+ gint num_tracks;
+ struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
};
diff --git a/sys/cdrom/gstcdplayer_ioctl_bsd.h b/sys/cdrom/gstcdplayer_ioctl_bsd.h
index f8a94cd7..ce575d49 100644
--- a/sys/cdrom/gstcdplayer_ioctl_bsd.h
+++ b/sys/cdrom/gstcdplayer_ioctl_bsd.h
@@ -23,323 +23,323 @@
#endif
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct ioc_toc_header toc_header;
- struct ioc_read_toc_entry toc_entry;
- struct cd_toc_entry toc_entry_data;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.ending_track; i++) {
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = i;
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.data->addr.msf.minute;
- cd->tracks[i].second = toc_entry.data->addr.msf.second;
- cd->tracks[i].frame = toc_entry.data->addr.msf.frame;
- cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
- }
-
- /* read the leadout */
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = 0xAA; /* leadout */
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[LEADOUT].minute = toc_entry.data->addr.msf.minute;
- cd->tracks[LEADOUT].second = toc_entry.data->addr.msf.second;
- cd->tracks[LEADOUT].frame = toc_entry.data->addr.msf.frame;
-
- cd->num_tracks = toc_header.ending_track;
-
- return TRUE;
+ struct ioc_toc_header toc_header;
+ struct ioc_read_toc_entry toc_entry;
+ struct cd_toc_entry toc_entry_data;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.ending_track; i++) {
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = i;
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.data->addr.msf.minute;
+ cd->tracks[i].second = toc_entry.data->addr.msf.second;
+ cd->tracks[i].frame = toc_entry.data->addr.msf.frame;
+ cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
+ }
+
+ /* read the leadout */
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = 0xAA; /* leadout */
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[LEADOUT].minute = toc_entry.data->addr.msf.minute;
+ cd->tracks[LEADOUT].second = toc_entry.data->addr.msf.second;
+ cd->tracks[LEADOUT].frame = toc_entry.data->addr.msf.frame;
+
+ cd->num_tracks = toc_header.ending_track;
+
+ return TRUE;
}
#elif defined HAVE_CDROM_BSD_DARWIN
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct ioc_toc_header toc_header;
- struct ioc_read_toc_entry toc_entry;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.ending_track; i++) {
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = i;
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.data->addr[1];
- cd->tracks[i].second = toc_entry.data->addr[2];
- cd->tracks[i].frame = toc_entry.data->addr[3];
- cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
- }
-
- /* read the leadout */
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = 0xAA; /* leadout */
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[LEADOUT].minute = toc_entry.data->addr[1];
- cd->tracks[LEADOUT].second = toc_entry.data->addr[2];
- cd->tracks[LEADOUT].frame = toc_entry.data->addr[3];
-
- cd->num_tracks = toc_header.ending_track;
-
- return TRUE;
+ struct ioc_toc_header toc_header;
+ struct ioc_read_toc_entry toc_entry;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.ending_track; i++) {
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = i;
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.data->addr[1];
+ cd->tracks[i].second = toc_entry.data->addr[2];
+ cd->tracks[i].frame = toc_entry.data->addr[3];
+ cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
+ }
+
+ /* read the leadout */
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = 0xAA; /* leadout */
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[LEADOUT].minute = toc_entry.data->addr[1];
+ cd->tracks[LEADOUT].second = toc_entry.data->addr[2];
+ cd->tracks[LEADOUT].frame = toc_entry.data->addr[3];
+
+ cd->num_tracks = toc_header.ending_track;
+
+ return TRUE;
}
#else /* free */
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct ioc_toc_header toc_header;
- struct ioc_read_toc_entry toc_entry;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.ending_track; i++) {
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = i;
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.entry.addr.msf.minute;
- cd->tracks[i].second = toc_entry.entry.addr.msf.second;
- cd->tracks[i].frame = toc_entry.entry.addr.msf.frame;
- cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
- }
-
- /* read the leadout */
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = 0xAA; /* leadout */
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[LEADOUT].minute = toc_entry.entry.addr.msf.minute;
- cd->tracks[LEADOUT].second = toc_entry.entry.addr.msf.second;
- cd->tracks[LEADOUT].frame = toc_entry.entry.addr.msf.frame;
-
- cd->num_tracks = toc_header.ending_track;
-
- return TRUE;
+ struct ioc_toc_header toc_header;
+ struct ioc_read_toc_entry toc_entry;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.ending_track; i++) {
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = i;
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.entry.addr.msf.minute;
+ cd->tracks[i].second = toc_entry.entry.addr.msf.second;
+ cd->tracks[i].frame = toc_entry.entry.addr.msf.frame;
+ cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
+ }
+
+ /* read the leadout */
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = 0xAA; /* leadout */
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[LEADOUT].minute = toc_entry.entry.addr.msf.minute;
+ cd->tracks[LEADOUT].second = toc_entry.entry.addr.msf.second;
+ cd->tracks[LEADOUT].frame = toc_entry.entry.addr.msf.frame;
+
+ cd->num_tracks = toc_header.ending_track;
+
+ return TRUE;
}
#endif
gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- struct ioc_play_msf msf;
+ struct ioc_play_msf msf;
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- cd_fix_track_range(cd,&start_track,&end_track);
+ cd_fix_track_range(cd,&start_track,&end_track);
- msf.start_m = cd->tracks[start_track].minute;
- msf.start_s = cd->tracks[start_track].second;
- msf.start_f = cd->tracks[start_track].frame;
+ msf.start_m = cd->tracks[start_track].minute;
+ msf.start_s = cd->tracks[start_track].second;
+ msf.start_f = cd->tracks[start_track].frame;
- if (end_track == LEADOUT) {
- msf.end_m = cd->tracks[end_track].minute;
- msf.end_s = cd->tracks[end_track].second;
- msf.end_f = cd->tracks[end_track].frame;
- } else {
- msf.end_m = cd->tracks[end_track+1].minute;
- msf.end_s = cd->tracks[end_track+1].second;
- msf.end_f = cd->tracks[end_track+1].frame;
- }
+ if (end_track == LEADOUT) {
+ msf.end_m = cd->tracks[end_track].minute;
+ msf.end_s = cd->tracks[end_track].second;
+ msf.end_f = cd->tracks[end_track].frame;
+ } else {
+ msf.end_m = cd->tracks[end_track+1].minute;
+ msf.end_s = cd->tracks[end_track+1].second;
+ msf.end_f = cd->tracks[end_track+1].frame;
+ }
- if (ioctl(cd->fd,CDIOCPLAYMSF,&msf) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCPLAYMSF,&msf) != 0) {
+ return FALSE;
+ }
}
gboolean cd_pause(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDIOCPAUSE,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCPAUSE,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_resume(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDIOCRESUME,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCRESUME,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_stop(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDIOCSTOP,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCSTOP,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
/* -1 for error, 0 for not playing, 1 for playing */
CDStatus cd_status(struct cd *cd)
{
- struct ioc_read_subchannel sub_channel;
- struct cd_sub_channel_info sub_channel_info;
-
- if (cd->fd == -1) {
- return -1;
- }
-
- sub_channel.address_format = CD_MSF_FORMAT;
- sub_channel.data_format = CD_CURRENT_POSITION;
- sub_channel.track = 0;
- sub_channel.data = &sub_channel_info;
- sub_channel.data_len = sizeof(sub_channel_info);
-
- if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
- return FALSE;
- }
-
- switch (sub_channel.data->header.audio_status) {
- case CD_AS_PLAY_IN_PROGRESS:
- case CD_AS_PLAY_PAUSED:
- return CD_PLAYING;
- break;
- case CD_AS_PLAY_COMPLETED:
- return CD_COMPLETED;
- break;
- case CD_AS_AUDIO_INVALID:
- case CD_AS_PLAY_ERROR:
- default:
- return CD_ERROR;
- break;
-
- }
+ struct ioc_read_subchannel sub_channel;
+ struct cd_sub_channel_info sub_channel_info;
+
+ if (cd->fd == -1) {
+ return -1;
+ }
+
+ sub_channel.address_format = CD_MSF_FORMAT;
+ sub_channel.data_format = CD_CURRENT_POSITION;
+ sub_channel.track = 0;
+ sub_channel.data = &sub_channel_info;
+ sub_channel.data_len = sizeof(sub_channel_info);
+
+ if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
+ return FALSE;
+ }
+
+ switch (sub_channel.data->header.audio_status) {
+ case CD_AS_PLAY_IN_PROGRESS:
+ case CD_AS_PLAY_PAUSED:
+ return CD_PLAYING;
+ break;
+ case CD_AS_PLAY_COMPLETED:
+ return CD_COMPLETED;
+ break;
+ case CD_AS_AUDIO_INVALID:
+ case CD_AS_PLAY_ERROR:
+ default:
+ return CD_ERROR;
+ break;
+
+ }
}
gint cd_current_track(struct cd *cd)
{
- struct ioc_read_subchannel sub_channel;
- struct cd_sub_channel_info sub_channel_info;
+ struct ioc_read_subchannel sub_channel;
+ struct cd_sub_channel_info sub_channel_info;
- if (cd->fd == -1) {
- return -1;
- }
+ if (cd->fd == -1) {
+ return -1;
+ }
- sub_channel.address_format = CD_MSF_FORMAT;
- sub_channel.data_format = CD_TRACK_INFO;
- sub_channel.track = 0;
- sub_channel.data = &sub_channel_info;
- sub_channel.data_len = sizeof(sub_channel_info);
+ sub_channel.address_format = CD_MSF_FORMAT;
+ sub_channel.data_format = CD_TRACK_INFO;
+ sub_channel.track = 0;
+ sub_channel.data = &sub_channel_info;
+ sub_channel.data_len = sizeof(sub_channel_info);
- if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
- return -1;
- }
+ if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
+ return -1;
+ }
#ifdef __NetBSD__
- return sub_channel.data->what.track_info.track_number;
+ return sub_channel.data->what.track_info.track_number;
#else
- return sub_channel.data->track_number;
+ return sub_channel.data->track_number;
#endif
}
gboolean cd_close(struct cd *cd)
{
- if (cd->fd == -1) {
- return TRUE;
- }
+ if (cd->fd == -1) {
+ return TRUE;
+ }
- if (close(cd->fd) != 0) {
- return FALSE;
- }
+ if (close(cd->fd) != 0) {
+ return FALSE;
+ }
- cd->fd = -1;
+ cd->fd = -1;
- return TRUE;
+ return TRUE;
}
diff --git a/sys/cdrom/gstcdplayer_ioctl_irix.h b/sys/cdrom/gstcdplayer_ioctl_irix.h
index 2f6be35c..a6643bab 100644
--- a/sys/cdrom/gstcdplayer_ioctl_irix.h
+++ b/sys/cdrom/gstcdplayer_ioctl_irix.h
@@ -24,55 +24,55 @@
gboolean cd_init(struct cd *cd,const gchar *device)
{
- CDPLAYER *cdplayer;
- CDSTATUS status;
- CDTRACKINFO info;
- guint i;
+ CDPLAYER *cdplayer;
+ CDSTATUS status;
+ CDTRACKINFO info;
+ guint i;
- cdplayer = CDOpen(device,"r");
+ cdplayer = CDOpen(device,"r");
- if (cdplayer == NULL) {
- return FALSE;
- }
+ if (cdplayer == NULL) {
+ return FALSE;
+ }
- cd->fd = FD(cdplayer);
+ cd->fd = FD(cdplayer);
- if (CDgetstatus(cdplayer,&status) == 0) {
- CDclose(cdplayer);
- cd->fd = 0;
- return FALSE;
- }
+ if (CDgetstatus(cdplayer,&status) == 0) {
+ CDclose(cdplayer);
+ cd->fd = 0;
+ return FALSE;
+ }
- for (i = 1; i < status.last; i++) {
- if (CDgettrackinfo(cdplayer,i,&info) == 0) {
- CDclose(cdplayer);
- cd->fd = 0;
- return FALSE;
- }
+ for (i = 1; i < status.last; i++) {
+ if (CDgettrackinfo(cdplayer,i,&info) == 0) {
+ CDclose(cdplayer);
+ cd->fd = 0;
+ return FALSE;
+ }
- cd->tracks[i].minute = info.start_min;
- cd->tracks[i].second = info.start_sec;
- cd->tracks[i].frame = info.start_frame;
+ cd->tracks[i].minute = info.start_min;
+ cd->tracks[i].second = info.start_sec;
+ cd->tracks[i].frame = info.start_frame;
- }
+ }
- /* there is no leadout information */
-
+ /* there is no leadout information */
+
- cd->num_tracks = status.last;
+ cd->num_tracks = status.last;
- return TRUE;
+ return TRUE;
}
gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- if (cd->fd == 0) {
- return FALSE;
- }
+ if (cd->fd == 0) {
+ return FALSE;
+ }
- cd_fix_track_range(cd,&start_track,&end_track);
+ cd_fix_track_range(cd,&start_track,&end_track);
-
+
}
diff --git a/sys/cdrom/gstcdplayer_ioctl_solaris.h b/sys/cdrom/gstcdplayer_ioctl_solaris.h
index 868fb251..e0515e6d 100644
--- a/sys/cdrom/gstcdplayer_ioctl_solaris.h
+++ b/sys/cdrom/gstcdplayer_ioctl_solaris.h
@@ -19,186 +19,186 @@
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct cdrom_tochdr toc_header;
- struct cdrom_tocentry toc_entry;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDROMREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.cdth_trk1; i++) {
- toc_entry.cdte_format = CDROM_MSF;
- toc_entry.cdte_track = i;
-
- if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.cdte_addr.msf.minute;
- cd->tracks[i].second = toc_entry.cdte_addr.msf.second;
- cd->tracks[i].frame = toc_entry.cdte_addr.msf.frame;
- cd->tracks[i].data_track = (toc_entry.cdte_ctrl == CDROM_DATA_TRACK);
- }
-
- /* read the leadout */
- toc_entry.cdte_track = CDROM_LEADOUT;
- toc_entry.cdte_format = CDROM_MSF;
- if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
- cd->tracks[LEADOUT].minute = toc_entry.cdte_addr.msf.minute;
- cd->tracks[LEADOUT].second = toc_entry.cdte_addr.msf.second;
- cd->tracks[LEADOUT].frame = toc_entry.cdte_addr.msf.frame;
-
- cd->num_tracks = toc_header.cdth_trk1;
-
- return TRUE;
+ struct cdrom_tochdr toc_header;
+ struct cdrom_tocentry toc_entry;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDROMREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.cdth_trk1; i++) {
+ toc_entry.cdte_format = CDROM_MSF;
+ toc_entry.cdte_track = i;
+
+ if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.cdte_addr.msf.minute;
+ cd->tracks[i].second = toc_entry.cdte_addr.msf.second;
+ cd->tracks[i].frame = toc_entry.cdte_addr.msf.frame;
+ cd->tracks[i].data_track = (toc_entry.cdte_ctrl == CDROM_DATA_TRACK);
+ }
+
+ /* read the leadout */
+ toc_entry.cdte_track = CDROM_LEADOUT;
+ toc_entry.cdte_format = CDROM_MSF;
+ if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+ cd->tracks[LEADOUT].minute = toc_entry.cdte_addr.msf.minute;
+ cd->tracks[LEADOUT].second = toc_entry.cdte_addr.msf.second;
+ cd->tracks[LEADOUT].frame = toc_entry.cdte_addr.msf.frame;
+
+ cd->num_tracks = toc_header.cdth_trk1;
+
+ return TRUE;
}
gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- struct cdrom_msf msf;
+ struct cdrom_msf msf;
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- cd_fix_track_range(cd,&start_track,&end_track);
+ cd_fix_track_range(cd,&start_track,&end_track);
- msf.cdmsf_min0 = cd->tracks[start_track].minute;
- msf.cdmsf_sec0 = cd->tracks[start_track].second;
- msf.cdmsf_frame0 = cd->tracks[start_track].frame;
+ msf.cdmsf_min0 = cd->tracks[start_track].minute;
+ msf.cdmsf_sec0 = cd->tracks[start_track].second;
+ msf.cdmsf_frame0 = cd->tracks[start_track].frame;
- if (end_track == LEADOUT) {
- msf.cdmsf_min1 = cd->tracks[end_track].minute;
- msf.cdmsf_sec1 = cd->tracks[end_track].second;
- msf.cdmsf_frame1 = cd->tracks[end_track].frame;
- } else {
- msf.cdmsf_min1 = cd->tracks[end_track+1].minute;
- msf.cdmsf_sec1 = cd->tracks[end_track+1].second;
- msf.cdmsf_frame1 = cd->tracks[end_track+1].frame;
- }
+ if (end_track == LEADOUT) {
+ msf.cdmsf_min1 = cd->tracks[end_track].minute;
+ msf.cdmsf_sec1 = cd->tracks[end_track].second;
+ msf.cdmsf_frame1 = cd->tracks[end_track].frame;
+ } else {
+ msf.cdmsf_min1 = cd->tracks[end_track+1].minute;
+ msf.cdmsf_sec1 = cd->tracks[end_track+1].second;
+ msf.cdmsf_frame1 = cd->tracks[end_track+1].frame;
+ }
- if (ioctl(cd->fd,CDROMPLAYMSF,&msf) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMPLAYMSF,&msf) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_pause(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDROMPAUSE,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMPAUSE,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_resume(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDROMRESUME,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMRESUME,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_stop(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDROMSTOP,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMSTOP,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
/* -1 for error, 0 for not playing, 1 for playing */
CDStatus cd_status(struct cd *cd)
{
- struct cdrom_subchnl sub_channel;
-
- if (cd->fd == -1) {
- return -1;
- }
-
- sub_channel.cdsc_format = CDROM_MSF;
-
- if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
- return -1;
- }
-
- switch (sub_channel.cdsc_audiostatus) {
- case CDROM_AUDIO_COMPLETED:
- return CD_COMPLETED;
- break;
- case CDROM_AUDIO_PLAY:
- case CDROM_AUDIO_PAUSED:
- return CD_PLAYING;
- break;
- case CDROM_AUDIO_ERROR:
- default:
- return CD_ERROR;
- }
+ struct cdrom_subchnl sub_channel;
+
+ if (cd->fd == -1) {
+ return -1;
+ }
+
+ sub_channel.cdsc_format = CDROM_MSF;
+
+ if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
+ return -1;
+ }
+
+ switch (sub_channel.cdsc_audiostatus) {
+ case CDROM_AUDIO_COMPLETED:
+ return CD_COMPLETED;
+ break;
+ case CDROM_AUDIO_PLAY:
+ case CDROM_AUDIO_PAUSED:
+ return CD_PLAYING;
+ break;
+ case CDROM_AUDIO_ERROR:
+ default:
+ return CD_ERROR;
+ }
}
gint cd_current_track(struct cd *cd)
{
- struct cdrom_subchnl sub_channel;
+ struct cdrom_subchnl sub_channel;
- if (cd->fd == -1) {
- return -1;
- }
+ if (cd->fd == -1) {
+ return -1;
+ }
- sub_channel.cdsc_format = CDROM_MSF;
+ sub_channel.cdsc_format = CDROM_MSF;
- if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
- return -1;
- }
+ if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
+ return -1;
+ }
- return sub_channel.cdsc_trk;
+ return sub_channel.cdsc_trk;
}
gboolean cd_close(struct cd *cd)
{
- if (cd->fd == -1) {
- return TRUE;
- }
+ if (cd->fd == -1) {
+ return TRUE;
+ }
- if (close(cd->fd) != 0) {
- return FALSE;
- }
+ if (close(cd->fd) != 0) {
+ return FALSE;
+ }
- cd->fd = -1;
+ cd->fd = -1;
- return TRUE;
+ return TRUE;
}
diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c
index 494aba26..671359ae 100644
--- a/sys/dxr3/dxr3audiosink.c
+++ b/sys/dxr3/dxr3audiosink.c
@@ -113,9 +113,9 @@ static gboolean dxr3audiosink_handle_event (GstPad * pad, GstEvent * event);
static void dxr3audiosink_chain_pcm (GstPad * pad, GstData * buf);
static void dxr3audiosink_chain_ac3 (GstPad * pad, GstData * buf);
-/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
+/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
/* GstClockTime time); */
-/* static int dxr3audiosink_mvcommand (Dxr3AudioSink *sink, */
+/* static int dxr3audiosink_mvcommand (Dxr3AudioSink *sink, */
/* int command); */
static GstStateChangeReturn dxr3audiosink_change_state (GstElement * element,
diff --git a/sys/dxr3/dxr3audiosink.h b/sys/dxr3/dxr3audiosink.h
index 787e20f7..458aa029 100644
--- a/sys/dxr3/dxr3audiosink.h
+++ b/sys/dxr3/dxr3audiosink.h
@@ -93,7 +93,7 @@ struct _Dxr3AudioSink {
ac3_padder *padder; /* AC3 to SPDIF padder object. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
};
@@ -105,8 +105,8 @@ struct _Dxr3AudioSinkClass {
};
-extern GType dxr3audiosink_get_type (void);
-extern gboolean dxr3audiosink_factory_init (GstPlugin *plugin);
+extern GType dxr3audiosink_get_type (void);
+extern gboolean dxr3audiosink_factory_init (GstPlugin *plugin);
G_END_DECLS
diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c
index 31c1d4cf..31c2534e 100644
--- a/sys/dxr3/dxr3spusink.c
+++ b/sys/dxr3/dxr3spusink.c
@@ -90,7 +90,7 @@ static void dxr3spusink_chain (GstPad * pad, GstData * _data);
static GstStateChangeReturn dxr3spusink_change_state (GstElement * element,
GstStateChange transition);
-/* static void dxr3spusink_wait (Dxr3SpuSink *sink, */
+/* static void dxr3spusink_wait (Dxr3SpuSink *sink, */
/* GstClockTime time); */
static void dxr3spusink_set_clut (Dxr3SpuSink * sink, const guint32 * clut);
diff --git a/sys/dxr3/dxr3spusink.h b/sys/dxr3/dxr3spusink.h
index e1563ab6..e68b1b2c 100644
--- a/sys/dxr3/dxr3spusink.h
+++ b/sys/dxr3/dxr3spusink.h
@@ -52,16 +52,16 @@ typedef enum {
struct _Dxr3SpuSink {
GstElement element;
- int card_number; /* The number of the card to open. */
+ int card_number; /* The number of the card to open. */
- gchar *spu_filename; /* File name for the spu device. */
- int spu_fd; /* File descriptor for the spu device. */
+ gchar *spu_filename; /* File name for the spu device. */
+ int spu_fd; /* File descriptor for the spu device. */
- gchar *control_filename; /* File name for the control device. */
- int control_fd; /* File descriptor for the control
+ gchar *control_filename; /* File name for the control device. */
+ int control_fd; /* File descriptor for the control
device. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
};
@@ -79,8 +79,8 @@ struct _Dxr3SpuSinkClass {
};
-extern GType dxr3spusink_get_type (void);
-extern gboolean dxr3spusink_factory_init (GstPlugin *plugin);
+extern GType dxr3spusink_get_type (void);
+extern gboolean dxr3spusink_factory_init (GstPlugin *plugin);
G_END_DECLS
diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c
index f100f5a1..a21d272b 100644
--- a/sys/dxr3/dxr3videosink.c
+++ b/sys/dxr3/dxr3videosink.c
@@ -120,7 +120,7 @@ static void dxr3videosink_chain (GstPad * pad, GstData * _data);
static GstStateChangeReturn dxr3videosink_change_state (GstElement * element,
GstStateChange transition);
-/* static void dxr3videosink_wait (Dxr3VideoSink *sink, */
+/* static void dxr3videosink_wait (Dxr3VideoSink *sink, */
/* GstClockTime time); */
static int dxr3videosink_mvcommand (Dxr3VideoSink * sink, int command);
diff --git a/sys/dxr3/dxr3videosink.h b/sys/dxr3/dxr3videosink.h
index 4af1de1b..e2daab1f 100644
--- a/sys/dxr3/dxr3videosink.h
+++ b/sys/dxr3/dxr3videosink.h
@@ -52,31 +52,31 @@ typedef enum {
struct _Dxr3VideoSink {
GstElement element;
- int card_number; /* The number of the card to open. */
+ int card_number; /* The number of the card to open. */
- gchar *video_filename; /* File name for the video device. */
- int video_fd; /* File descriptor for the video device. */
+ gchar *video_filename; /* File name for the video device. */
+ int video_fd; /* File descriptor for the video device. */
- gchar *control_filename; /* File name for the control device. */
- int control_fd; /* File descriptor for the control
+ gchar *control_filename; /* File name for the control device. */
+ int control_fd; /* File descriptor for the control
device. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
- GstClockTime last_ts; /* Last timestamp received. */
+ GstClockTime last_ts; /* Last timestamp received. */
- GstBuffer *cur_buf; /* The buffer we are currently
+ GstBuffer *cur_buf; /* The buffer we are currently
building. */
- GstClockTime cur_ts; /* Timestamp associated to the
+ GstClockTime cur_ts; /* Timestamp associated to the
current buffer. */
- guchar scan_state; /* The current state of the MPEG start
+ guchar scan_state; /* The current state of the MPEG start
code scanner. */
- guint scan_pos; /* The current position of the MPEG
+ guint scan_pos; /* The current position of the MPEG
start code scanner (with respect to
the start of the current buffer. */
- guchar parse_state; /* The current state of the MPEG
+ guchar parse_state; /* The current state of the MPEG
sequence parser. */
};
@@ -89,8 +89,8 @@ struct _Dxr3VideoSinkClass {
};
-extern GType dxr3videosink_get_type (void);
-extern gboolean dxr3videosink_factory_init (GstPlugin *plugin);
+extern GType dxr3videosink_get_type (void);
+extern gboolean dxr3videosink_factory_init (GstPlugin *plugin);
G_END_DECLS
diff --git a/sys/qcam/dark.c b/sys/qcam/dark.c
index ac462b36..cdfa2ab8 100644
--- a/sys/qcam/dark.c
+++ b/sys/qcam/dark.c
@@ -25,17 +25,17 @@ OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
/* Fixdark
- Routine to repair dark current artifacts in qcam output.
- Basic idea: the Qcam CCD suffers from "dark current";
- that is, some of the CCD pixels will leak current under
- long exposures, even if they're in the dark, and this
- shows up as ugly speckling on images taken in low light.
+ Routine to repair dark current artifacts in qcam output.
+ Basic idea: the Qcam CCD suffers from "dark current";
+ that is, some of the CCD pixels will leak current under
+ long exposures, even if they're in the dark, and this
+ shows up as ugly speckling on images taken in low light.
- Fortunately, the leaky pixels are the same from shot to
- shot. So, we can figure out which pixels are leaky by
- taking some establishing shots in the dark, and try to
- fix those pixels on subsequent shots. The dark
- establishing shots need only be done once per camera.
+ Fortunately, the leaky pixels are the same from shot to
+ shot. So, we can figure out which pixels are leaky by
+ taking some establishing shots in the dark, and try to
+ fix those pixels on subsequent shots. The dark
+ establishing shots need only be done once per camera.
*/
#ifdef HAVE_CONFIG_H
@@ -77,7 +77,7 @@ read_darkmask()
}
if (fread(master_darkmask1, sizeof(unsigned char), MAX_WIDTH*MAX_HEIGHT, fp) !=
- MAX_WIDTH*MAX_HEIGHT) {
+ MAX_WIDTH*MAX_HEIGHT) {
#ifdef DEBUG
fprintf(stderr, "Error reading darkfile\n");
#endif
@@ -88,14 +88,14 @@ read_darkmask()
for (x = 0; x < MAX_WIDTH; x += 2) {
min_bright = master_darkmask1[y][x];
if (y < MAX_HEIGHT-1 && master_darkmask1[y+1][x] < min_bright)
- min_bright = master_darkmask1[y+1][x];
+ min_bright = master_darkmask1[y+1][x];
if (x < MAX_WIDTH-1 && master_darkmask1[y][x+1] < min_bright)
- min_bright = master_darkmask1[y][x+1];
+ min_bright = master_darkmask1[y][x+1];
if (y < MAX_HEIGHT-1 && x < MAX_WIDTH-1 && master_darkmask1[y+1][x+1] < min_bright)
- min_bright = master_darkmask1[y+1][x+1];
+ min_bright = master_darkmask1[y+1][x+1];
master_darkmask2[y/2][x/2] = min_bright;
- assert(y/2 < MAX_HEIGHT/2+1);
- assert(x/2 < MAX_WIDTH/2+1);
+ assert(y/2 < MAX_HEIGHT/2+1);
+ assert(x/2 < MAX_WIDTH/2+1);
}
}
@@ -103,14 +103,14 @@ read_darkmask()
for (x = 0; x < MAX_WIDTH/2; x += 2) {
min_bright = master_darkmask2[y][x];
if (y < MAX_HEIGHT/2-1 && master_darkmask2[y+1][x] < min_bright)
- min_bright = master_darkmask2[y+1][x];
+ min_bright = master_darkmask2[y+1][x];
if (x < MAX_WIDTH/2-1 && master_darkmask2[y][x+1] < min_bright)
- min_bright = master_darkmask2[y][x+1];
+ min_bright = master_darkmask2[y][x+1];
if (y < MAX_HEIGHT/2-1 && x < MAX_WIDTH-1 && master_darkmask2[y+1][x+1] < min_bright)
- min_bright = master_darkmask2[y+1][x+1];
+ min_bright = master_darkmask2[y+1][x+1];
master_darkmask4[y/2][x/2] = min_bright;
- assert(y/2 < MAX_HEIGHT/4+1);
- assert(x/2 < MAX_WIDTH/4+1);
+ assert(y/2 < MAX_HEIGHT/4+1);
+ assert(x/2 < MAX_WIDTH/4+1);
}
}
@@ -121,15 +121,15 @@ read_darkmask()
/* fixdark
- We first record a list of bad leaky pixels, by making a
- number of exposures in the dark. master_darkmask holds
- this information. It's a map of the CCD.
- master_darkmask[y][x] == val means that the pixel is
- unreliable for brightnesses of "val" and above.
+ We first record a list of bad leaky pixels, by making a
+ number of exposures in the dark. master_darkmask holds
+ this information. It's a map of the CCD.
+ master_darkmask[y][x] == val means that the pixel is
+ unreliable for brightnesses of "val" and above.
- We go over the image. If a pixel is bad, look at the
- adjacent four pixels, average the ones that have good
- values, and use that instead.
+ We go over the image. If a pixel is bad, look at the
+ adjacent four pixels, average the ones that have good
+ values, and use that instead.
*/
int
diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c
index 901beca5..2bae6d85 100644
--- a/sys/qcam/gstqcamsrc.c
+++ b/sys/qcam/gstqcamsrc.c
@@ -40,19 +40,19 @@ GST_ELEMENT_DETAILS ("QCam Source",
"Read from a QuickCam device",
"Wim Taymans <wim.taymans@chello.be>");
-#define AE_NONE 3
-
-#define DEF_WIDTH 320
-#define DEF_HEIGHT 224
-#define DEF_BRIGHTNESS 226
-#define DEF_WHITEBAL 128
-#define DEF_CONTRAST 72
-#define DEF_TOP 1
-#define DEF_LEFT 14
-#define DEF_TRANSFER_SCALE 2
-#define DEF_DEPTH 6
-#define DEF_PORT 0x378
-#define DEF_AUTOEXP AE_NONE
+#define AE_NONE 3
+
+#define DEF_WIDTH 320
+#define DEF_HEIGHT 224
+#define DEF_BRIGHTNESS 226
+#define DEF_WHITEBAL 128
+#define DEF_CONTRAST 72
+#define DEF_TOP 1
+#define DEF_LEFT 14
+#define DEF_TRANSFER_SCALE 2
+#define DEF_DEPTH 6
+#define DEF_PORT 0x378
+#define DEF_AUTOEXP AE_NONE
static GstStaticPadTemplate gst_qcamsrc_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h
index 4003203b..b573cb2a 100644
--- a/sys/v4l2/gstv4l2colorbalance.h
+++ b/sys/v4l2/gstv4l2colorbalance.h
@@ -32,10 +32,10 @@ G_BEGIN_DECLS
(gst_v4l2_color_balance_channel_get_type ())
#define GST_V4L2_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
- GstV4l2ColorBalanceChannel))
+ GstV4l2ColorBalanceChannel))
#define GST_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
- GstV4l2ColorBalanceChannelClass))
+ GstV4l2ColorBalanceChannelClass))
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL))
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
@@ -51,8 +51,8 @@ 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 c9e5f347..62663a29 100644
--- a/sys/v4l2/gstv4l2element.h
+++ b/sys/v4l2/gstv4l2element.h
@@ -50,87 +50,87 @@
#ifdef GST_V4L2_MISSING_BUFDECL
struct v4l2_buffer
{
- __u32 index;
- enum v4l2_buf_type type;
- __u32 bytesused;
- __u32 flags;
- enum v4l2_field field;
- struct timeval timestamp;
- struct v4l2_timecode timecode;
- __u32 sequence;
-
- /* memory location */
- enum v4l2_memory memory;
- union {
- __u32 offset;
- unsigned long userptr;
- } m;
- __u32 length;
-
- __u32 reserved[2];
+ __u32 index;
+ enum v4l2_buf_type type;
+ __u32 bytesused;
+ __u32 flags;
+ enum v4l2_field field;
+ struct timeval timestamp;
+ struct v4l2_timecode timecode;
+ __u32 sequence;
+
+ /* memory location */
+ enum v4l2_memory memory;
+ union {
+ __u32 offset;
+ unsigned long userptr;
+ } m;
+ __u32 length;
+
+ __u32 reserved[2];
};
#endif /* GST_V4L2_MISSING_BUFDECL */
#define GST_TYPE_V4L2ELEMENT \
- (gst_v4l2element_get_type())
+ (gst_v4l2element_get_type())
#define GST_V4L2ELEMENT(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2ELEMENT, GstV4l2Element))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2ELEMENT, GstV4l2Element))
#define GST_V4L2ELEMENT_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
#define GST_IS_V4L2ELEMENT(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2ELEMENT))
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2ELEMENT))
#define GST_IS_V4L2ELEMENT_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2ELEMENT))
+ (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2ELEMENT))
#define GST_V4L2ELEMENT_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
-typedef struct _GstV4l2Element GstV4l2Element;
-typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
-typedef struct _GstV4l2Xv GstV4l2Xv;
+typedef struct _GstV4l2Element GstV4l2Element;
+typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
+typedef struct _GstV4l2Xv GstV4l2Xv;
struct _GstV4l2Element {
- GstElement element;
+ 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 */
- GstV4l2Xv *xv;
- XID xwindow_id;
+ /* X-overlay */
+ GstV4l2Xv *xv;
+ XID xwindow_id;
- /* properties */
- gchar *norm;
- gchar *channel;
- gulong frequency;
+ /* properties */
+ gchar *norm;
+ gchar *channel;
+ gulong frequency;
};
struct _GstV4l2ElementClass {
- GstElementClass parent_class;
+ 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 cbcfc6ec..c5aac389 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -28,78 +28,78 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug);
#define GST_V4L2_MIN_BUFFERS 2
#define GST_TYPE_V4L2SRC \
- (gst_v4l2src_get_type())
+ (gst_v4l2src_get_type())
#define GST_V4L2SRC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
#define GST_V4L2SRC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
#define GST_IS_V4L2SRC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
#define GST_IS_V4L2SRC_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
+ (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;
+ 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 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;
+ 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, is_capturing;
+ /* True if we want to stop */
+ gboolean quit, is_capturing;
- /* 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;
-
- /* time to substract from clock time to get back to timestamp */
- GstClockTime substract_time;
+ /* clock */
+ GstClock *clock;
+
+ /* 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;
+ GstV4l2ElementClass parent_class;
- void (*frame_capture) (GObject *object);
- void (*frame_drop) (GObject *object);
- void (*frame_insert) (GObject *object);
- void (*frame_lost) (GObject *object,
+ void (*frame_capture) (GObject *object);
+ void (*frame_drop) (GObject *object);
+ void (*frame_insert) (GObject *object);
+ void (*frame_lost) (GObject *object,
gint num_lost);
};
diff --git a/sys/v4l2/gstv4l2tuner.h b/sys/v4l2/gstv4l2tuner.h
index a768ea2f..c51bf196 100644
--- a/sys/v4l2/gstv4l2tuner.h
+++ b/sys/v4l2/gstv4l2tuner.h
@@ -33,10 +33,10 @@ G_BEGIN_DECLS
(gst_v4l2_tuner_channel_get_type ())
#define GST_V4L2_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_CHANNEL, \
- GstV4l2TunerChannel))
+ GstV4l2TunerChannel))
#define GST_V4L2_TUNER_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_CHANNEL, \
- GstV4l2TunerChannelClass))
+ GstV4l2TunerChannelClass))
#define GST_IS_V4L2_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL))
#define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \
@@ -58,10 +58,10 @@ typedef struct _GstV4l2TunerChannelClass {
(gst_v4l2_tuner_norm_get_type ())
#define GST_V4L2_TUNER_NORM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_NORM, \
- GstV4l2TunerNorm))
+ GstV4l2TunerNorm))
#define GST_V4L2_TUNER_NORM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_NORM, \
- GstV4l2TunerNormClass))
+ GstV4l2TunerNormClass))
#define GST_IS_V4L2_TUNER_NORM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_NORM))
#define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \
@@ -77,9 +77,9 @@ 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 c59c4536..a1bf5d7d 100644
--- a/sys/v4l2/gstv4l2xoverlay.h
+++ b/sys/v4l2/gstv4l2xoverlay.h
@@ -29,9 +29,9 @@
G_BEGIN_DECLS
-void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
+void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
-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.c b/sys/v4l2/v4l2_calls.c
index fa9f3988..b4b16d97 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -37,9 +37,9 @@
#include "gstv4l2src.h"
#define DEBUG(format, args...) \
- GST_DEBUG_OBJECT (\
- GST_ELEMENT(v4l2element), \
- "V4L2: " format, ##args)
+ GST_DEBUG_OBJECT (\
+ GST_ELEMENT(v4l2element), \
+ "V4L2: " format, ##args)
/******************************************************
diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h
index 537ca72c..5325eadf 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -36,86 +36,86 @@
(element->vcap.capabilities & V4L2_CAP_VIDEO_OVERLAY)
/* checks whether the current v4lelement has already been open()'ed or not */
-#define GST_V4L2_CHECK_OPEN(element) \
- if (!GST_V4L2_IS_OPEN(element)) \
- { \
- GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
+#define GST_V4L2_CHECK_OPEN(element) \
+ if (!GST_V4L2_IS_OPEN(element)) \
+ { \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is not open.")), (NULL)); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether the current v4lelement is close()'ed or whether it is still open */
-#define GST_V4L2_CHECK_NOT_OPEN(element) \
- if (GST_V4L2_IS_OPEN(element)) \
- { \
- GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
+#define GST_V4L2_CHECK_NOT_OPEN(element) \
+ if (GST_V4L2_IS_OPEN(element)) \
+ { \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is open.")), (NULL)); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether the current v4lelement does video overlay */
-#define GST_V4L2_CHECK_OVERLAY(element) \
- if (!GST_V4L2_IS_OVERLAY(element)) \
- { \
+#define GST_V4L2_CHECK_OVERLAY(element) \
+ if (!GST_V4L2_IS_OVERLAY(element)) \
+ { \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(NULL), ("Device cannot handle overlay")); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether we're in capture mode or not */
-#define GST_V4L2_CHECK_ACTIVE(element) \
- if (!GST_V4L2_IS_ACTIVE(element)) \
- { \
+#define GST_V4L2_CHECK_ACTIVE(element) \
+ if (!GST_V4L2_IS_ACTIVE(element)) \
+ { \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
(NULL), ("Device is not in streaming mode")); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether we're out of capture mode or not */
-#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
- if (GST_V4L2_IS_ACTIVE(element)) \
- { \
+#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
+ if (GST_V4L2_IS_ACTIVE(element)) \
+ { \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
(NULL), ("Device is in streaming mode")); \
- return FALSE; \
+ return FALSE; \
}
/* 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);
#endif /* __V4L2_CALLS_H__ */
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c
index 5e8d916f..69717330 100644
--- a/sys/v4l2/v4l2src_calls.c
+++ b/sys/v4l2/v4l2src_calls.c
@@ -40,9 +40,9 @@
#define GST_V4L2_SET_INACTIVE(element) (element)->buffer = NULL
#define DEBUG(format, args...) \
- GST_CAT_DEBUG_OBJECT (\
- v4l2src_debug, v4l2src, \
- "V4L2SRC: " format, ##args)
+ GST_CAT_DEBUG_OBJECT (\
+ v4l2src_debug, v4l2src, \
+ "V4L2SRC: " format, ##args)
/* On some systems MAP_FAILED seems to be missing */
#ifndef MAP_FAILED
diff --git a/sys/v4l2/v4l2src_calls.h b/sys/v4l2/v4l2src_calls.h
index dc5fca0c..d4f271b0 100644
--- a/sys/v4l2/v4l2src_calls.h
+++ b/sys/v4l2/v4l2src_calls.h
@@ -24,30 +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_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_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);
+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);
+void gst_v4l2src_free_buffer (GstBuffer *buffer);
#endif /* __V4L2SRC_CALLS_H__ */
diff --git a/sys/vcd/vcdsrc.h b/sys/vcd/vcdsrc.h
index 0c349846..21189641 100644
--- a/sys/vcd/vcdsrc.h
+++ b/sys/vcd/vcdsrc.h
@@ -41,9 +41,9 @@ G_BEGIN_DECLS
/* NOTE: per-element flags start with 16 for now */
typedef enum {
- VCDSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
+ VCDSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- VCDSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ VCDSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstVCDSrcFlags;
typedef struct _GstVCDSrc GstVCDSrc;
@@ -73,10 +73,10 @@ struct _GstVCDSrc {
gulong tempoffset;
gboolean discont, flush;
- gulong curoffset; /* current offset in file */
- gulong bytes_per_read; /* bytes per read */
+ gulong curoffset; /* current offset in file */
+ gulong bytes_per_read; /* bytes per read */
- gulong seq; /* buffer sequence number */
+ gulong seq; /* buffer sequence number */
int max_errors;
};