summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
commit6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch)
tree82b5546809a42a56a7bc18bacf8ed6e209ad006e /gst
parentd07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff)
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'gst')
-rw-r--r--gst/audiofx/audiowsincband.c44
-rw-r--r--gst/audiofx/audiowsinclimit.c26
-rw-r--r--gst/auparse/gstauparse.c65
-rw-r--r--gst/avi/gstavi.c4
-rw-r--r--gst/avi/gstavidecoder.c67
-rw-r--r--gst/avi/gstavidemux.c545
-rw-r--r--gst/avi/gstavimux.c225
-rw-r--r--gst/cutter/gstcutter.c49
-rw-r--r--gst/debug/efence.c9
-rw-r--r--gst/debug/gstnavigationtest.c13
-rw-r--r--gst/effectv/gstaging.c46
-rw-r--r--gst/effectv/gstdice.c99
-rw-r--r--gst/effectv/gstedge.c24
-rw-r--r--gst/effectv/gsteffectv.c2
-rw-r--r--gst/effectv/gstquark.c44
-rw-r--r--gst/effectv/gstrev.c12
-rw-r--r--gst/effectv/gstshagadelic.c20
-rw-r--r--gst/effectv/gstvertigo.c22
-rw-r--r--gst/effectv/gstwarp.c17
-rw-r--r--gst/flx/gstflxdec.c185
-rw-r--r--gst/goom/filters.c246
-rw-r--r--gst/goom/goom_core.c306
-rw-r--r--gst/goom/gstgoom.c33
-rw-r--r--gst/goom/lines.c48
-rw-r--r--gst/law/alaw-decode.c5
-rw-r--r--gst/law/alaw-encode.c5
-rw-r--r--gst/law/alaw.c4
-rw-r--r--gst/law/mulaw-conversion.c12
-rw-r--r--gst/law/mulaw-decode.c5
-rw-r--r--gst/law/mulaw-encode.c5
-rw-r--r--gst/law/mulaw.c4
-rw-r--r--gst/level/gstlevel.c89
-rw-r--r--gst/level/plot.c10
-rw-r--r--gst/matroska/ebml-read.c154
-rw-r--r--gst/matroska/ebml-write.c14
-rw-r--r--gst/matroska/matroska-demux.c2351
-rw-r--r--gst/matroska/matroska-mux.c210
-rw-r--r--gst/median/gstmedian.c31
-rw-r--r--gst/monoscope/convolve.c43
-rw-r--r--gst/monoscope/gstmonoscope.c9
-rw-r--r--gst/monoscope/monoscope.c20
-rw-r--r--gst/qtdemux/qtdemux.c739
-rw-r--r--gst/rtp/gstrtpL16depay.c20
-rw-r--r--gst/rtp/gstrtpL16enc.c26
-rw-r--r--gst/rtp/gstrtpL16parse.c20
-rw-r--r--gst/rtp/gstrtpL16pay.c26
-rw-r--r--gst/rtp/gstrtpgsmdepay.c6
-rw-r--r--gst/rtp/gstrtpgsmenc.c16
-rw-r--r--gst/rtp/gstrtpgsmparse.c6
-rw-r--r--gst/rtp/gstrtpgsmpay.c16
-rw-r--r--gst/smoothwave/gstsmoothwave.c23
-rw-r--r--gst/smpte/barboxwipes.c702
-rw-r--r--gst/smpte/gstsmpte.c53
-rw-r--r--gst/smpte/paint.c36
-rw-r--r--gst/spectrum/gstspectrum.c7
-rw-r--r--gst/udp/gstudp.c2
-rw-r--r--gst/udp/gstudpsink.c64
-rw-r--r--gst/udp/gstudpsrc.c146
-rw-r--r--gst/videocrop/gstvideocrop.c17
-rw-r--r--gst/videofilter/gstgamma.c25
-rw-r--r--gst/videofilter/gstvideobalance.c32
-rw-r--r--gst/videofilter/gstvideofilter.c39
-rw-r--r--gst/videofilter/gstvideoflip.c58
-rw-r--r--gst/videofilter/gstvideotemplate.c9
-rw-r--r--gst/videoflip/gstvideoflip.c18
-rw-r--r--gst/videoflip/videoflip.c60
-rw-r--r--gst/wavenc/gstwavenc.c106
-rw-r--r--gst/wavparse/gstwavparse.c612
68 files changed, 4034 insertions, 3972 deletions
diff --git a/gst/audiofx/audiowsincband.c b/gst/audiofx/audiowsincband.c
index a848cc26..ba0f2d67 100644
--- a/gst/audiofx/audiowsincband.c
+++ b/gst/audiofx/audiowsincband.c
@@ -35,8 +35,8 @@
#endif
#include <gst/gst.h>
#include "gstfilter.h"
-#include <math.h> /* M_PI */
-#include <string.h> /* memmove */
+#include <math.h> /* M_PI */
+#include <string.h> /* memmove */
/* elementfactory information */
static GstElementDetails gst_bpwsinc_details = GST_ELEMENT_DETAILS ("BPWSinc",
@@ -80,10 +80,10 @@ struct _GstBPWSinc
double frequency;
double lower_frequency, upper_frequency;
- int wing_size; /* length of a "wing" of the filter;
- actual length is 2 * wing_size + 1 */
+ int wing_size; /* length of a "wing" of the filter;
+ actual length is 2 * wing_size + 1 */
- gfloat *residue; /* buffer for left-over samples from previous buffer */
+ gfloat *residue; /* buffer for left-over samples from previous buffer */
double *kernel;
};
@@ -125,7 +125,7 @@ gst_bpwsinc_get_type (void)
};
bpwsinc_type = g_type_register_static (GST_TYPE_ELEMENT, "GstBPWSinc",
- &bpwsinc_info, 0);
+ &bpwsinc_info, 0);
}
return bpwsinc_type;
}
@@ -157,16 +157,16 @@ gst_bpwsinc_class_init (GstBPWSincClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOWER_FREQUENCY,
g_param_spec_double ("lower-frequency", "Lower Frequency",
- "Cut-off lower frequency (relative to sample rate)",
- 0.0, 0.5, 0, G_PARAM_READWRITE));
+ "Cut-off lower frequency (relative to sample rate)",
+ 0.0, 0.5, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_UPPER_FREQUENCY,
g_param_spec_double ("upper-frequency", "Upper Frequency",
- "Cut-off upper frequency (relative to sample rate)",
- 0.0, 0.5, 0, G_PARAM_READWRITE));
+ "Cut-off upper frequency (relative to sample rate)",
+ 0.0, 0.5, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LENGTH,
g_param_spec_int ("length", "Length",
- "N such that the filter length = 2N + 1",
- 1, G_MAXINT, 1, G_PARAM_READWRITE));
+ "N such that the filter length = 2N + 1",
+ 1, G_MAXINT, 1, G_PARAM_READWRITE));
gobject_class->set_property = gst_bpwsinc_set_property;
gobject_class->get_property = gst_bpwsinc_get_property;
@@ -213,17 +213,17 @@ gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps)
len = filter->wing_size;
/* fill the lp kernel */
GST_DEBUG ("bpwsinc: initializing LP kernel of length %d with cut-off %f",
- len * 2 + 1, filter->lower_frequency);
+ len * 2 + 1, filter->lower_frequency);
kernel_lp = (double *) g_malloc (sizeof (double) * (2 * len + 1));
for (i = 0; i <= len * 2; ++i) {
if (i == len)
- kernel_lp[i] = 2 * M_PI * filter->lower_frequency;
+ kernel_lp[i] = 2 * M_PI * filter->lower_frequency;
else
- kernel_lp[i] = sin (2 * M_PI * filter->lower_frequency * (i - len))
- / (i - len);
+ kernel_lp[i] = sin (2 * M_PI * filter->lower_frequency * (i - len))
+ / (i - len);
/* Blackman windowing */
kernel_lp[i] *= (0.42 - 0.5 * cos (M_PI * i / len)
- + 0.08 * cos (2 * M_PI * i / len));
+ + 0.08 * cos (2 * M_PI * i / len));
}
/* normalize for unity gain at DC
@@ -236,17 +236,17 @@ gst_bpwsinc_sink_connect (GstPad * pad, const GstCaps * caps)
/* fill the hp kernel */
GST_DEBUG ("bpwsinc: initializing HP kernel of length %d with cut-off %f",
- len * 2 + 1, filter->upper_frequency);
+ len * 2 + 1, filter->upper_frequency);
kernel_hp = (double *) g_malloc (sizeof (double) * (2 * len + 1));
for (i = 0; i <= len * 2; ++i) {
if (i == len)
- kernel_hp[i] = 2 * M_PI * filter->upper_frequency;
+ kernel_hp[i] = 2 * M_PI * filter->upper_frequency;
else
- kernel_hp[i] = sin (2 * M_PI * filter->upper_frequency * (i - len))
- / (i - len);
+ kernel_hp[i] = sin (2 * M_PI * filter->upper_frequency * (i - len))
+ / (i - len);
/* Blackman windowing */
kernel_hp[i] *= (0.42 - 0.5 * cos (M_PI * i / len)
- + 0.08 * cos (2 * M_PI * i / len));
+ + 0.08 * cos (2 * M_PI * i / len));
}
/* normalize for unity gain at DC
diff --git a/gst/audiofx/audiowsinclimit.c b/gst/audiofx/audiowsinclimit.c
index 0ce33b32..285c2edb 100644
--- a/gst/audiofx/audiowsinclimit.c
+++ b/gst/audiofx/audiowsinclimit.c
@@ -35,8 +35,8 @@
#endif
#include <gst/gst.h>
#include "gstfilter.h"
-#include <math.h> /* M_PI */
-#include <string.h> /* memmove */
+#include <math.h> /* M_PI */
+#include <string.h> /* memmove */
static GstElementDetails gst_lpwsinc_details = GST_ELEMENT_DETAILS ("LPWSinc",
"Filter/Effect/Audio",
@@ -77,10 +77,10 @@ struct _GstLPWSinc
GstPad *sinkpad, *srcpad;
double frequency;
- int wing_size; /* length of a "wing" of the filter;
- actual length is 2 * wing_size + 1 */
+ int wing_size; /* length of a "wing" of the filter;
+ actual length is 2 * wing_size + 1 */
- gfloat *residue; /* buffer for left-over samples from previous buffer */
+ gfloat *residue; /* buffer for left-over samples from previous buffer */
double *kernel;
};
@@ -122,7 +122,7 @@ gst_lpwsinc_get_type (void)
};
lpwsinc_type = g_type_register_static (GST_TYPE_ELEMENT, "GstLPWSinc",
- &lpwsinc_info, 0);
+ &lpwsinc_info, 0);
}
return lpwsinc_type;
}
@@ -154,12 +154,12 @@ gst_lpwsinc_class_init (GstLPWSincClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FREQUENCY,
g_param_spec_double ("frequency", "Frequency",
- "Cut-off Frequency relative to sample rate)",
- 0.0, 0.5, 0, G_PARAM_READWRITE));
+ "Cut-off Frequency relative to sample rate)",
+ 0.0, 0.5, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LENGTH,
g_param_spec_int ("length", "Length",
- "N such that the filter length = 2N + 1",
- 1, G_MAXINT, 1, G_PARAM_READWRITE));
+ "N such that the filter length = 2N + 1",
+ 1, G_MAXINT, 1, G_PARAM_READWRITE));
gobject_class->set_property = gst_lpwsinc_set_property;
gobject_class->get_property = gst_lpwsinc_get_property;
@@ -210,10 +210,10 @@ gst_lpwsinc_sink_connect (GstPad * pad, const GstCaps * caps)
for (i = 0; i <= len * 2; ++i) {
if (i == len)
- filter->kernel[i] = 2 * M_PI * filter->frequency;
+ filter->kernel[i] = 2 * M_PI * filter->frequency;
else
- filter->kernel[i] = sin (2 * M_PI * filter->frequency * (i - len))
- / (i - len);
+ filter->kernel[i] = sin (2 * M_PI * filter->frequency * (i - len))
+ / (i - len);
/* windowing */
filter->kernel[i] *= (0.54 - 0.46 * cos (M_PI * i / len));
}
diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c
index d7ffe68f..c11bb4b3 100644
--- a/gst/auparse/gstauparse.c
+++ b/gst/auparse/gstauparse.c
@@ -50,8 +50,8 @@ static GstStaticPadTemplate gst_auparse_src_template =
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_AUDIO_INT_PAD_TEMPLATE_CAPS "; "
- "audio/x-alaw, "
- "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
+ "audio/x-alaw, "
+ "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
/* AuParse signals and args */
@@ -94,9 +94,10 @@ gst_auparse_get_type (void)
0,
(GInstanceInitFunc) gst_auparse_init,
};
+
auparse_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstAuParse", &auparse_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstAuParse", &auparse_info,
+ 0);
}
return auparse_type;
}
@@ -213,46 +214,46 @@ gst_auparse_chain (GstPad * pad, GstData * _data)
}
g_print
- ("offset %ld, size %ld, encoding %ld, frequency %ld, channels %ld\n",
- auparse->offset, auparse->size, auparse->encoding, auparse->frequency,
- auparse->channels);
+ ("offset %ld, size %ld, encoding %ld, frequency %ld, channels %ld\n",
+ auparse->offset, auparse->size, auparse->encoding, auparse->frequency,
+ auparse->channels);
GST_DEBUG
- ("offset %ld, size %ld, encoding %ld, frequency %ld, channels %ld",
- auparse->offset, auparse->size, auparse->encoding, auparse->frequency,
- auparse->channels);
+ ("offset %ld, size %ld, encoding %ld, frequency %ld, channels %ld",
+ auparse->offset, auparse->size, auparse->encoding, auparse->frequency,
+ auparse->channels);
switch (auparse->encoding) {
case 1:
- law = 1;
- depth = 8;
- sign = FALSE;
- break;
+ law = 1;
+ depth = 8;
+ sign = FALSE;
+ break;
case 2:
- law = 0;
- depth = 8;
- sign = FALSE;
- break;
+ law = 0;
+ depth = 8;
+ sign = FALSE;
+ break;
case 3:
- law = 0;
- depth = 16;
- sign = TRUE;
- break;
+ law = 0;
+ depth = 16;
+ sign = TRUE;
+ break;
default:
- g_warning ("help!, dont know how to deal with this format yet\n");
- return;
+ g_warning ("help!, dont know how to deal with this format yet\n");
+ return;
}
if (law) {
tempcaps = gst_caps_new_simple ("audio/x-alaw",
- "rate", G_TYPE_INT, auparse->frequency,
- "channels", G_TYPE_INT, auparse->channels, NULL);
+ "rate", G_TYPE_INT, auparse->frequency,
+ "channels", G_TYPE_INT, auparse->channels, NULL);
} else {
tempcaps = gst_caps_new_simple ("audio/x-raw-int",
- "endianness", G_TYPE_INT, G_BIG_ENDIAN,
- "rate", G_TYPE_INT, auparse->frequency,
- "channels", G_TYPE_INT, auparse->channels,
- "depth", G_TYPE_INT, depth,
- "width", G_TYPE_INT, depth, "signed", G_TYPE_BOOLEAN, sign, NULL);
+ "endianness", G_TYPE_INT, G_BIG_ENDIAN,
+ "rate", G_TYPE_INT, auparse->frequency,
+ "channels", G_TYPE_INT, auparse->channels,
+ "depth", G_TYPE_INT, depth,
+ "width", G_TYPE_INT, depth, "signed", G_TYPE_BOOLEAN, sign, NULL);
}
if (!gst_pad_set_explicit_caps (auparse->srcpad, tempcaps)) {
@@ -279,7 +280,7 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "auparse", GST_RANK_SECONDARY,
- GST_TYPE_AUPARSE)) {
+ GST_TYPE_AUPARSE)) {
return FALSE;
}
diff --git a/gst/avi/gstavi.c b/gst/avi/gstavi.c
index dbdc7859..4ab32d7b 100644
--- a/gst/avi/gstavi.c
+++ b/gst/avi/gstavi.c
@@ -40,8 +40,8 @@ plugin_init (GstPlugin * plugin)
#endif /* ENABLE_NLS */
return (gst_element_register (plugin, "avidemux",
- GST_RANK_PRIMARY,
- GST_TYPE_AVI_DEMUX) &&
+ GST_RANK_PRIMARY,
+ GST_TYPE_AVI_DEMUX) &&
gst_element_register (plugin, "avimux", GST_RANK_NONE, GST_TYPE_AVIMUX));
}
diff --git a/gst/avi/gstavidecoder.c b/gst/avi/gstavidecoder.c
index d4cb493f..dc5afd9d 100644
--- a/gst/avi/gstavidecoder.c
+++ b/gst/avi/gstavidecoder.c
@@ -66,7 +66,7 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_CAPS_NEW ("avidecoder_sink",
- "video/avi", "RIFF", GST_PROPS_STRING ("AVI")
+ "video/avi", "RIFF", GST_PROPS_STRING ("AVI")
)
)
@@ -75,12 +75,12 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_CAPS_NEW ("wincodec_src",
- "video/raw",
- "format", GST_PROPS_LIST (GST_PROPS_FOURCC (GST_MAKE_FOURCC ('Y', 'U', 'Y',
- '2')), GST_PROPS_FOURCC (GST_MAKE_FOURCC ('I', '4', '2', '0')),
- GST_PROPS_FOURCC (GST_MAKE_FOURCC ('R', 'G', 'B', ' '))
- ), "width", GST_PROPS_INT_RANGE (16, 4096), "height",
- GST_PROPS_INT_RANGE (16, 4096)
+ "video/raw",
+ "format", GST_PROPS_LIST (GST_PROPS_FOURCC (GST_MAKE_FOURCC ('Y', 'U', 'Y',
+ '2')), GST_PROPS_FOURCC (GST_MAKE_FOURCC ('I', '4', '2', '0')),
+ GST_PROPS_FOURCC (GST_MAKE_FOURCC ('R', 'G', 'B', ' '))
+ ), "width", GST_PROPS_INT_RANGE (16, 4096), "height",
+ GST_PROPS_INT_RANGE (16, 4096)
)
)
@@ -89,17 +89,17 @@ GST_PADTEMPLATE_FACTORY (sink_templ,
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_CAPS_NEW ("src_audio",
- "audio/raw",
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0),
- "endianness", GST_PROPS_INT (G_BYTE_ORDER),
- "signed", GST_PROPS_LIST (GST_PROPS_BOOLEAN (TRUE),
- GST_PROPS_BOOLEAN (FALSE)
- ), "width", GST_PROPS_LIST (GST_PROPS_INT (8), GST_PROPS_INT (16)
- ), "depth", GST_PROPS_LIST (GST_PROPS_INT (8), GST_PROPS_INT (16)
- ),
- "rate", GST_PROPS_INT_RANGE (11025, 48000),
- "channels", GST_PROPS_INT_RANGE (1, 2)
+ "audio/raw",
+ "format", GST_PROPS_STRING ("int"),
+ "law", GST_PROPS_INT (0),
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER),
+ "signed", GST_PROPS_LIST (GST_PROPS_BOOLEAN (TRUE),
+ GST_PROPS_BOOLEAN (FALSE)
+ ), "width", GST_PROPS_LIST (GST_PROPS_INT (8), GST_PROPS_INT (16)
+ ), "depth", GST_PROPS_LIST (GST_PROPS_INT (8), GST_PROPS_INT (16)
+ ),
+ "rate", GST_PROPS_INT_RANGE (11025, 48000),
+ "channels", GST_PROPS_INT_RANGE (1, 2)
)
)
@@ -132,9 +132,10 @@ gst_avi_decoder_get_type (void)
0,
(GInstanceInitFunc) gst_avi_decoder_init,
};
+
avi_decoder_type =
- g_type_register_static (GST_TYPE_BIN, "GstAviDecoder",
- &avi_decoder_info, 0);
+ g_type_register_static (GST_TYPE_BIN, "GstAviDecoder",
+ &avi_decoder_info, 0);
}
return avi_decoder_type;
}
@@ -148,9 +149,9 @@ gst_avi_decoder_class_init (GstAviDecoderClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BITRATE, g_param_spec_long ("bitrate", "bitrate", "bitrate", G_MINLONG, G_MAXLONG, 0, G_PARAM_READABLE)); /* CHECKME */
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MEDIA_TIME, g_param_spec_long ("media_time", "media_time", "media_time", G_MINLONG, G_MAXLONG, 0, G_PARAM_READABLE)); /* CHECKME */
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CURRENT_TIME, g_param_spec_long ("current_time", "current_time", "current_time", G_MINLONG, G_MAXLONG, 0, G_PARAM_READABLE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BITRATE, g_param_spec_long ("bitrate", "bitrate", "bitrate", G_MINLONG, G_MAXLONG, 0, G_PARAM_READABLE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_MEDIA_TIME, g_param_spec_long ("media_time", "media_time", "media_time", G_MINLONG, G_MAXLONG, 0, G_PARAM_READABLE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_CURRENT_TIME, g_param_spec_long ("current_time", "current_time", "current_time", G_MINLONG, G_MAXLONG, 0, G_PARAM_READABLE)); /* CHECKME */
parent_class = g_type_class_ref (GST_TYPE_BIN);
@@ -182,17 +183,17 @@ gst_avi_decoder_new_pad (GstElement * element, GstPad * pad,
if (!strcmp (format, "strf_vids")) {
targetcaps =
- gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_video_templ));
+ gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_video_templ));
media_type = AVI_TYPE_VIDEO;
gpadname = g_strdup_printf ("video_%02d", avi_decoder->video_count++);
} else if (!strcmp (format, "strf_auds")) {
targetcaps =
- gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_audio_templ));
+ gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_audio_templ));
media_type = AVI_TYPE_AUDIO;
gpadname = g_strdup_printf ("audio_%02d", avi_decoder->audio_count++);
} else if (!strcmp (format, "strf_iavs")) {
targetcaps =
- gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_video_templ));
+ gst_padtemplate_get_caps (GST_PADTEMPLATE_GET (src_video_templ));
media_type = AVI_TYPE_VIDEO;
gpadname = g_strdup_printf ("video_%02d", avi_decoder->video_count++);
} else {
@@ -219,7 +220,7 @@ gst_avi_decoder_new_pad (GstElement * element, GstPad * pad,
if (gst_caps_is_always_compatible (caps, targetcaps)) {
gst_element_add_ghost_pad (GST_ELEMENT (avi_decoder),
- gst_element_get_pad (type, "src"), gpadname);
+ gst_element_get_pad (type, "src"), gpadname);
avi_decoder->count++;
goto done;
@@ -247,11 +248,11 @@ gst_avi_decoder_new_pad (GstElement * element, GstPad * pad,
if (new_element) {
gst_pad_connect (pad, gst_element_get_pad (new_element, "sink"));
gst_element_set_name (new_element, g_strdup_printf ("element%d",
- avi_decoder->count));
+ avi_decoder->count));
gst_bin_add (GST_BIN (avi_decoder), new_element);
gst_element_add_ghost_pad (GST_ELEMENT (avi_decoder),
- gst_element_get_pad (new_element, padname), gpadname);
+ gst_element_get_pad (new_element, padname), gpadname);
avi_decoder->count++;
} else {
@@ -271,10 +272,10 @@ gst_avi_decoder_init (GstAviDecoder * avi_decoder)
gst_bin_add (GST_BIN (avi_decoder), avi_decoder->demuxer);
gst_element_add_ghost_pad (GST_ELEMENT (avi_decoder),
- gst_element_get_pad (avi_decoder->demuxer, "sink"), "sink");
+ gst_element_get_pad (avi_decoder->demuxer, "sink"), "sink");
g_signal_connect (G_OBJECT (avi_decoder->demuxer), "new_pad",
- G_CALLBACK (gst_avi_decoder_new_pad), avi_decoder);
+ G_CALLBACK (gst_avi_decoder_new_pad), avi_decoder);
} else {
g_warning ("wow!, no avi demuxer found. help me\n");
}
@@ -317,11 +318,11 @@ gst_avi_decoder_get_property (GObject * object, guint prop_id, GValue * value,
break;
case ARG_MEDIA_TIME:
g_value_set_long (value, gst_util_get_long_arg (G_OBJECT (src->demuxer),
- "media_time"));
+ "media_time"));
break;
case ARG_CURRENT_TIME:
g_value_set_long (value, gst_util_get_long_arg (G_OBJECT (src->demuxer),
- "current_time"));
+ "current_time"));
break;
default:
break;
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 03403488..1c03ef2c 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -99,8 +99,8 @@ gst_avi_demux_get_type (void)
};
avi_demux_type =
- g_type_register_static (GST_TYPE_RIFF_READ,
- "GstAviDemux", &avi_demux_info, 0);
+ g_type_register_static (GST_TYPE_RIFF_READ,
+ "GstAviDemux", &avi_demux_info, 0);
}
return avi_demux_type;
@@ -147,7 +147,7 @@ gst_avi_demux_class_init (GstAviDemuxClass * klass)
g_object_class_install_property (gobject_class, ARG_STREAMINFO,
g_param_spec_boxed ("streaminfo", "Streaminfo", "Streaminfo",
- GST_TYPE_CAPS, G_PARAM_READABLE));
+ GST_TYPE_CAPS, G_PARAM_READABLE));
GST_DEBUG_CATEGORY_INIT (avidemux_debug, "avidemux",
0, "Demuxer for AVI streams");
@@ -347,38 +347,38 @@ gst_avi_demux_src_convert (GstPad * pad,
switch (src_format) {
case GST_FORMAT_TIME:
switch (*dest_format) {
- case GST_FORMAT_BYTES:
- *dest_value = src_value * stream->strh->rate /
- (stream->strh->scale * GST_SECOND);
- break;
- case GST_FORMAT_DEFAULT:
- *dest_value = src_value * stream->strh->rate /
- (stream->strh->scale * GST_SECOND);
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_BYTES:
+ *dest_value = src_value * stream->strh->rate /
+ (stream->strh->scale * GST_SECOND);
+ break;
+ case GST_FORMAT_DEFAULT:
+ *dest_value = src_value * stream->strh->rate /
+ (stream->strh->scale * GST_SECOND);
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_FORMAT_BYTES:
switch (*dest_format) {
- case GST_FORMAT_TIME:
- *dest_value = ((gfloat) src_value) * GST_SECOND / stream->strh->rate;
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *dest_value = ((gfloat) src_value) * GST_SECOND / stream->strh->rate;
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_FORMAT_DEFAULT:
switch (*dest_format) {
- case GST_FORMAT_TIME:
- *dest_value = ((((gfloat) src_value) * stream->strh->scale) /
- stream->strh->rate) * GST_SECOND;
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *dest_value = ((((gfloat) src_value) * stream->strh->scale) /
+ stream->strh->rate) * GST_SECOND;
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
default:
@@ -412,54 +412,54 @@ gst_avi_demux_handle_src_query (GstPad * pad,
switch (type) {
case GST_QUERY_TOTAL:
switch (*format) {
- case GST_FORMAT_TIME:
- *value = (((gfloat) stream->strh->scale) * stream->strh->length /
- stream->strh->rate) * GST_SECOND;
- break;
- case GST_FORMAT_BYTES:
- if (stream->strh->type == GST_RIFF_FCC_auds) {
- *value = stream->total_bytes;
- } else
- res = FALSE;
- break;
- case GST_FORMAT_DEFAULT:
- if (stream->strh->type == GST_RIFF_FCC_auds)
- *value = stream->strh->length * stream->strh->samplesize;
- else if (stream->strh->type == GST_RIFF_FCC_vids)
- *value = stream->strh->length;
- else
- res = FALSE;
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *value = (((gfloat) stream->strh->scale) * stream->strh->length /
+ stream->strh->rate) * GST_SECOND;
+ break;
+ case GST_FORMAT_BYTES:
+ if (stream->strh->type == GST_RIFF_FCC_auds) {
+ *value = stream->total_bytes;
+ } else
+ res = FALSE;
+ break;
+ case GST_FORMAT_DEFAULT:
+ if (stream->strh->type == GST_RIFF_FCC_auds)
+ *value = stream->strh->length * stream->strh->samplesize;
+ else if (stream->strh->type == GST_RIFF_FCC_vids)
+ *value = stream->strh->length;
+ else
+ res = FALSE;
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_QUERY_POSITION:
switch (*format) {
- case GST_FORMAT_TIME:
- if (stream->strh->samplesize &&
- stream->strh->type == GST_RIFF_FCC_auds) {
- *value = ((gfloat) stream->current_byte) * GST_SECOND /
- stream->strh->rate;
- } else {
- *value = (((gfloat) stream->current_frame) * stream->strh->scale /
- stream->strh->rate) * GST_SECOND;
- }
- break;
- case GST_FORMAT_BYTES:
- *value = stream->current_byte;
- break;
- case GST_FORMAT_DEFAULT:
- if (stream->strh->samplesize &&
- stream->strh->type == GST_RIFF_FCC_auds)
- *value = stream->current_byte * stream->strh->samplesize;
- else
- *value = stream->current_frame;
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ if (stream->strh->samplesize &&
+ stream->strh->type == GST_RIFF_FCC_auds) {
+ *value = ((gfloat) stream->current_byte) * GST_SECOND /
+ stream->strh->rate;
+ } else {
+ *value = (((gfloat) stream->current_frame) * stream->strh->scale /
+ stream->strh->rate) * GST_SECOND;
+ }
+ break;
+ case GST_FORMAT_BYTES:
+ *value = stream->current_byte;
+ break;
+ case GST_FORMAT_DEFAULT:
+ if (stream->strh->samplesize &&
+ stream->strh->type == GST_RIFF_FCC_auds)
+ *value = stream->current_byte * stream->strh->samplesize;
+ else
+ *value = stream->current_frame;
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
default:
@@ -492,7 +492,7 @@ gst_avi_demux_sync_streams (GstAviDemux * avi, guint64 time)
GST_DEBUG ("finding %d for time %" G_GINT64_FORMAT, i, time);
entry = gst_avi_demux_index_entry_for_time (avi, stream->num, time,
- GST_RIFF_IF_KEYFRAME);
+ GST_RIFF_IF_KEYFRAME);
if (entry) {
min_index = MIN (entry->index_nr, min_index);
}
@@ -510,7 +510,7 @@ gst_avi_demux_sync_streams (GstAviDemux * avi, guint64 time)
next_entry = gst_avi_demux_index_next (avi, stream->num, min_index, 0);
/* next entry with keyframe */
entry = gst_avi_demux_index_next (avi, stream->num, min_index,
- GST_RIFF_IF_KEYFRAME);
+ GST_RIFF_IF_KEYFRAME);
stream->current_byte = next_entry->bytes_before;
stream->current_frame = next_entry->frames_before;
@@ -539,9 +539,9 @@ gst_avi_demux_send_event (GstElement * element, GstEvent * event)
* failed on this pad */
gst_event_ref (event);
if (gst_avi_demux_handle_src_event (pad, event)) {
- gst_event_unref (event);
+ gst_event_unref (event);
- return TRUE;
+ return TRUE;
}
}
@@ -576,56 +576,56 @@ gst_avi_demux_handle_src_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
GST_DEBUG ("seek format %d, %08x", GST_EVENT_SEEK_FORMAT (event),
- stream->strh->type);
+ stream->strh->type);
switch (GST_EVENT_SEEK_FORMAT (event)) {
- case GST_FORMAT_BYTES:
- case GST_FORMAT_DEFAULT:
- case GST_FORMAT_TIME:{
- gst_avi_index_entry *seek_entry, *entry = NULL;
- gint64 desired_offset = GST_EVENT_SEEK_OFFSET (event);
- guint32 flags;
- guint64 min_index;
-
- /* no seek on audio yet */
- if (stream->strh->type == GST_RIFF_FCC_auds) {
- res = FALSE;
- goto done;
- }
- GST_DEBUG ("seeking to %" G_GINT64_FORMAT, desired_offset);
-
- flags = GST_RIFF_IF_KEYFRAME;
- switch (GST_EVENT_SEEK_FORMAT (event)) {
- case GST_FORMAT_BYTES:
- entry = gst_avi_demux_index_entry_for_byte (avi, stream->num,
- desired_offset, flags);
- break;
- case GST_FORMAT_DEFAULT:
- entry = gst_avi_demux_index_entry_for_frame (avi, stream->num,
- desired_offset, flags);
- break;
- case GST_FORMAT_TIME:
- entry = gst_avi_demux_index_entry_for_time (avi, stream->num,
- desired_offset, flags);
- break;
- }
-
- if (entry) {
- min_index = gst_avi_demux_sync_streams (avi, entry->ts);
- seek_entry = &avi->index_entries[min_index];
-
- avi->seek_offset = seek_entry->offset + avi->index_offset;
- avi->last_seek = entry->ts;
- } else {
- GST_DEBUG ("no index entry found for format=%d value=%"
- G_GINT64_FORMAT, GST_EVENT_SEEK_FORMAT (event), desired_offset);
- res = FALSE;
- }
- break;
- }
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_BYTES:
+ case GST_FORMAT_DEFAULT:
+ case GST_FORMAT_TIME:{
+ gst_avi_index_entry *seek_entry, *entry = NULL;
+ gint64 desired_offset = GST_EVENT_SEEK_OFFSET (event);
+ guint32 flags;
+ guint64 min_index;
+
+ /* no seek on audio yet */
+ if (stream->strh->type == GST_RIFF_FCC_auds) {
+ res = FALSE;
+ goto done;
+ }
+ GST_DEBUG ("seeking to %" G_GINT64_FORMAT, desired_offset);
+
+ flags = GST_RIFF_IF_KEYFRAME;
+ switch (GST_EVENT_SEEK_FORMAT (event)) {
+ case GST_FORMAT_BYTES:
+ entry = gst_avi_demux_index_entry_for_byte (avi, stream->num,
+ desired_offset, flags);
+ break;
+ case GST_FORMAT_DEFAULT:
+ entry = gst_avi_demux_index_entry_for_frame (avi, stream->num,
+ desired_offset, flags);
+ break;
+ case GST_FORMAT_TIME:
+ entry = gst_avi_demux_index_entry_for_time (avi, stream->num,
+ desired_offset, flags);
+ break;
+ }
+
+ if (entry) {
+ min_index = gst_avi_demux_sync_streams (avi, entry->ts);
+ seek_entry = &avi->index_entries[min_index];
+
+ avi->seek_offset = seek_entry->offset + avi->index_offset;
+ avi->last_seek = entry->ts;
+ } else {
+ GST_DEBUG ("no index entry found for format=%d value=%"
+ G_GINT64_FORMAT, GST_EVENT_SEEK_FORMAT (event), desired_offset);
+ res = FALSE;
+ }
+ break;
+ }
+ default:
+ res = FALSE;
+ break;
}
break;
default:
@@ -682,7 +682,7 @@ gst_avi_demux_stream_avih (GstAviDemux * avi,
}
if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_avih)) {
g_warning ("Too small avih (%d available, %d needed)",
- GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_avih));
+ GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_avih));
gst_buffer_unref (buf);
return FALSE;
}
@@ -751,7 +751,8 @@ gst_avi_demux_add_stream (GstAviDemux * avi)
gst_riff_strf_vids *vids;
gst_riff_strf_auds *auds;
gst_riff_strf_iavs *iavs;
- } strf;
+ }
+ strf;
/* the stream starts with a 'strh' header */
if (!(tag = gst_riff_peek_tag (riff, NULL)))
@@ -768,25 +769,25 @@ gst_avi_demux_add_stream (GstAviDemux * avi)
return FALSE;
if (tag != GST_RIFF_TAG_strf) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
- ("Invalid AVI header (no strf as second tag)"));
+ ("Invalid AVI header (no strf as second tag)"));
goto skip_stream;
}
switch (strh->type) {
case GST_RIFF_FCC_vids:
if (!gst_riff_read_strf_vids (riff, &strf.vids))
- return FALSE;
+ return FALSE;
break;
case GST_RIFF_FCC_auds:
if (!gst_riff_read_strf_auds (riff, &strf.auds))
- return FALSE;
+ return FALSE;
break;
case GST_RIFF_FCC_iavs:
if (!gst_riff_read_strf_iavs (riff, &strf.iavs))
- return FALSE;
+ return FALSE;
break;
default:
g_warning ("Unknown stream type " GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (strh->type));
+ GST_FOURCC_ARGS (strh->type));
goto skip_stream;
}
@@ -801,22 +802,22 @@ gst_avi_demux_add_stream (GstAviDemux * avi)
switch (tag) {
case GST_RIFF_TAG_strn:
- if (name)
- g_free (name);
- if (!gst_riff_read_ascii (riff, &tag, &name))
- return FALSE;
- break;
+ if (name)
+ g_free (name);
+ if (!gst_riff_read_ascii (riff, &tag, &name))
+ return FALSE;
+ break;
default:
- GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " in AVI header",
- GST_FOURCC_ARGS (tag));
- /* fall-through */
+ GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " in AVI header",
+ GST_FOURCC_ARGS (tag));
+ /* fall-through */
- case GST_RIFF_TAG_strd: /* what is this? */
+ case GST_RIFF_TAG_strd: /* what is this? */
case GST_RIFF_TAG_JUNK:
- if (!gst_riff_read_skip (riff))
- return FALSE;
- break;
+ if (!gst_riff_read_skip (riff))
+ return FALSE;
+ break;
}
if (avi->level_up) {
@@ -835,13 +836,13 @@ gst_avi_demux_add_stream (GstAviDemux * avi)
padname = g_strdup_printf ("video_%02d", avi->num_v_streams);
templ = gst_element_class_get_pad_template (klass, "video_%02d");
caps = gst_riff_create_video_caps (strf.vids->compression, strh,
- strf.vids, &codec_name);
+ strf.vids, &codec_name);
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, GST_TAG_VIDEO_CODEC,
- codec_name, NULL);
+ codec_name, NULL);
gst_element_found_tags (GST_ELEMENT (avi), list);
gst_tag_list_free (list);
if (codec_name)
- g_free (codec_name);
+ g_free (codec_name);
g_free (strf.vids);
avi->num_v_streams++;
break;
@@ -854,13 +855,13 @@ gst_avi_demux_add_stream (GstAviDemux * avi)
padname = g_strdup_printf ("audio_%02d", avi->num_a_streams);
templ = gst_element_class_get_pad_template (klass, "audio_%02d");
caps = gst_riff_create_audio_caps (strf.auds->format, strh, strf.auds,
- &codec_name);
+ &codec_name);
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, GST_TAG_AUDIO_CODEC,
- codec_name, NULL);
+ codec_name, NULL);
gst_element_found_tags (GST_ELEMENT (avi), list);
gst_tag_list_free (list);
if (codec_name)
- g_free (codec_name);
+ g_free (codec_name);
g_free (strf.auds);
avi->num_a_streams++;
break;
@@ -873,13 +874,13 @@ gst_avi_demux_add_stream (GstAviDemux * avi)
padname = g_strdup_printf ("video_%02d", avi->num_v_streams);
templ = gst_element_class_get_pad_template (klass, "video_%02d");
caps = gst_riff_create_iavs_caps (strh->fcc_handler, strh, strf.iavs,
- &codec_name);
+ &codec_name);
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, GST_TAG_VIDEO_CODEC,
- codec_name, NULL);
+ codec_name, NULL);
gst_element_found_tags (GST_ELEMENT (avi), list);
gst_tag_list_free (list);
if (codec_name)
- g_free (codec_name);
+ g_free (codec_name);
g_free (strf.iavs);
avi->num_v_streams++;
break;
@@ -935,7 +936,7 @@ skip_stream:
/* add a "NULL" stream */
avi->num_streams++;
- return TRUE; /* recoverable */
+ return TRUE; /* recoverable */
}
/*
@@ -959,37 +960,37 @@ gst_avi_demux_stream_odml (GstAviDemux * avi)
switch (tag) {
case GST_RIFF_TAG_dmlh:{
- gst_riff_dmlh dmlh, *_dmlh;
- GstBuffer *buf;
-
- if (!gst_riff_read_data (riff, &tag, &buf))
- return FALSE;
- if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_dmlh)) {
- g_warning ("DMLH entry is too small (%d bytes, %d needed)",
- GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_dmlh));
- gst_buffer_unref (buf);
- break;
- }
- _dmlh = (gst_riff_dmlh *) GST_BUFFER_DATA (buf);
- dmlh.totalframes = GUINT32_FROM_LE (_dmlh->totalframes);
-
- GST_INFO ("dmlh tag found:");
- GST_INFO (" totalframes: %u", dmlh.totalframes);
-
- avi->num_frames = dmlh.totalframes;
- gst_buffer_unref (buf);
- break;
+ gst_riff_dmlh dmlh, *_dmlh;
+ GstBuffer *buf;
+
+ if (!gst_riff_read_data (riff, &tag, &buf))
+ return FALSE;
+ if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_dmlh)) {
+ g_warning ("DMLH entry is too small (%d bytes, %d needed)",
+ GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_dmlh));
+ gst_buffer_unref (buf);
+ break;
+ }
+ _dmlh = (gst_riff_dmlh *) GST_BUFFER_DATA (buf);
+ dmlh.totalframes = GUINT32_FROM_LE (_dmlh->totalframes);
+
+ GST_INFO ("dmlh tag found:");
+ GST_INFO (" totalframes: %u", dmlh.totalframes);
+
+ avi->num_frames = dmlh.totalframes;
+ gst_buffer_unref (buf);
+ break;
}
default:
- GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " in AVI header",
- GST_FOURCC_ARGS (tag));
- /* fall-through */
+ GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " in AVI header",
+ GST_FOURCC_ARGS (tag));
+ /* fall-through */
case GST_RIFF_TAG_JUNK:
- if (!gst_riff_read_skip (riff))
- return FALSE;
- break;
+ if (!gst_riff_read_skip (riff))
+ return FALSE;
+ break;
}
if (avi->level_up) {
@@ -1036,7 +1037,7 @@ gst_avi_demux_stream_index (GstAviDemux * avi)
return FALSE;
if (tag != GST_RIFF_TAG_idx1) {
g_warning ("No index after data, but " GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (tag));
+ GST_FOURCC_ARGS (tag));
goto end;
}
@@ -1081,9 +1082,9 @@ gst_avi_demux_stream_index (GstAviDemux * avi)
/* figure out if the index is 0 based or relative to the MOVI start */
if (i == 0) {
if (target->offset < pos_before)
- avi->index_offset = pos_before + 8;
+ avi->index_offset = pos_before + 8;
else
- avi->index_offset = 0;
+ avi->index_offset = 0;
}
target->bytes_before = stream->total_bytes;
@@ -1098,11 +1099,11 @@ gst_avi_demux_stream_index (GstAviDemux * avi)
if (stream->strh->samplesize && stream->strh->type == GST_RIFF_FCC_auds) {
/* constant rate stream */
gst_pad_convert (stream->pad, GST_FORMAT_BYTES,
- stream->total_bytes, &format, &target->ts);
+ stream->total_bytes, &format, &target->ts);
} else {
/* VBR stream */
gst_pad_convert (stream->pad, GST_FORMAT_DEFAULT,
- stream->total_frames, &format, &target->ts);
+ stream->total_frames, &format, &target->ts);
}
stream->total_bytes += target->size;
@@ -1115,7 +1116,7 @@ gst_avi_demux_stream_index (GstAviDemux * avi)
stream = &avi->stream[i];
GST_DEBUG ("stream %u: %u frames, %" G_GINT64_FORMAT " bytes",
- i, stream->total_frames, stream->total_bytes);
+ i, stream->total_frames, stream->total_bytes);
}
end:
@@ -1159,16 +1160,16 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
return FALSE;
if (tag != GST_RIFF_TAG_LIST) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
- ("Invalid AVI header (no LIST at start): "
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
+ ("Invalid AVI header (no LIST at start): "
+ GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
return FALSE;
}
if (!gst_riff_read_list (riff, &tag))
return FALSE;
if (tag != GST_RIFF_LIST_hdrl) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
- ("Invalid AVI header (no hdrl at start): "
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
+ ("Invalid AVI header (no hdrl at start): "
+ GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
return FALSE;
}
@@ -1177,8 +1178,8 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
return FALSE;
if (tag != GST_RIFF_TAG_avih) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
- ("Invalid AVI header (no avih at start): "
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
+ ("Invalid AVI header (no avih at start): "
+ GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
return FALSE;
}
if (!gst_avi_demux_stream_avih (avi, &flags, &streams))
@@ -1195,44 +1196,44 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
switch (tag) {
case GST_RIFF_TAG_LIST:
- if (!(tag = gst_riff_peek_list (riff)))
- return FALSE;
-
- switch (tag) {
- case GST_RIFF_LIST_strl:
- if (!gst_riff_read_list (riff, &tag) ||
- !gst_avi_demux_add_stream (avi))
- return FALSE;
- break;
-
- case GST_RIFF_LIST_odml:
- if (!gst_riff_read_list (riff, &tag) ||
- !gst_avi_demux_stream_odml (avi))
- return FALSE;
- break;
-
- default:
- GST_WARNING ("Unknown list " GST_FOURCC_FORMAT " in AVI header",
- GST_FOURCC_ARGS (tag));
- /* fall-through */
-
- case GST_RIFF_TAG_JUNK:
- if (!gst_riff_read_skip (riff))
- return FALSE;
- break;
- }
-
- break;
+ if (!(tag = gst_riff_peek_list (riff)))
+ return FALSE;
+
+ switch (tag) {
+ case GST_RIFF_LIST_strl:
+ if (!gst_riff_read_list (riff, &tag) ||
+ !gst_avi_demux_add_stream (avi))
+ return FALSE;
+ break;
+
+ case GST_RIFF_LIST_odml:
+ if (!gst_riff_read_list (riff, &tag) ||
+ !gst_avi_demux_stream_odml (avi))
+ return FALSE;
+ break;
+
+ default:
+ GST_WARNING ("Unknown list " GST_FOURCC_FORMAT " in AVI header",
+ GST_FOURCC_ARGS (tag));
+ /* fall-through */
+
+ case GST_RIFF_TAG_JUNK:
+ if (!gst_riff_read_skip (riff))
+ return FALSE;
+ break;
+ }
+
+ break;
default:
- GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " in AVI header",
- GST_FOURCC_ARGS (tag));
- /* fall-through */
+ GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " in AVI header",
+ GST_FOURCC_ARGS (tag));
+ /* fall-through */
case GST_RIFF_TAG_JUNK:
- if (!gst_riff_read_skip (riff))
- return FALSE;
- break;
+ if (!gst_riff_read_skip (riff))
+ return FALSE;
+ break;
}
if (avi->level_up) {
@@ -1243,7 +1244,7 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
if (avi->num_streams != streams) {
g_warning ("Stream header mentioned %d streams, but %d available",
- streams, avi->num_streams);
+ streams, avi->num_streams);
}
/* we've got streaminfo now */
@@ -1255,17 +1256,17 @@ gst_avi_demux_stream_header (GstAviDemux * avi)
return FALSE;
if (tag != GST_RIFF_TAG_LIST) {
if (!gst_riff_read_skip (riff))
- return FALSE;
+ return FALSE;
continue;
}
if (!(tag = gst_riff_peek_list (riff)))
return FALSE;
if (tag != GST_RIFF_LIST_movi) {
if (tag == GST_RIFF_LIST_INFO) {
- if (!gst_riff_read_list (riff, &tag) || !gst_riff_read_info (riff))
- return FALSE;
+ if (!gst_riff_read_list (riff, &tag) || !gst_riff_read_info (riff))
+ return FALSE;
} else if (!gst_riff_read_skip (riff)) {
- return FALSE;
+ return FALSE;
}
continue;
}
@@ -1307,7 +1308,7 @@ gst_avi_demux_handle_seek (GstAviDemux * avi)
if (GST_PAD_IS_USABLE (stream->pad)) {
event = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
- avi->last_seek + stream->delay, NULL);
+ avi->last_seek + stream->delay, NULL);
gst_pad_push (stream->pad, GST_DATA (event));
}
}
@@ -1347,40 +1348,40 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
switch (tag) {
case GST_RIFF_TAG_LIST:
- if (!(tag = gst_riff_peek_list (riff)))
- return FALSE;
-
- switch (tag) {
- case GST_RIFF_LIST_AVIX:
- case GST_RIFF_LIST_movi:
- if (!gst_riff_read_list (riff, &tag))
- return FALSE;
- /* we're now going to read buffers! */
- break;
-
- default:
- GST_WARNING ("Unknown list " GST_FOURCC_FORMAT " before AVI data",
- GST_FOURCC_ARGS (tag));
- /* fall-through */
-
- case GST_RIFF_TAG_JUNK:
- if (!gst_riff_read_skip (riff))
- return FALSE;
- break;
- }
-
- break;
+ if (!(tag = gst_riff_peek_list (riff)))
+ return FALSE;
+
+ switch (tag) {
+ case GST_RIFF_LIST_AVIX:
+ case GST_RIFF_LIST_movi:
+ if (!gst_riff_read_list (riff, &tag))
+ return FALSE;
+ /* we're now going to read buffers! */
+ break;
+
+ default:
+ GST_WARNING ("Unknown list " GST_FOURCC_FORMAT " before AVI data",
+ GST_FOURCC_ARGS (tag));
+ /* fall-through */
+
+ case GST_RIFF_TAG_JUNK:
+ if (!gst_riff_read_skip (riff))
+ return FALSE;
+ break;
+ }
+
+ break;
default:
- GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " before AVI data",
- GST_FOURCC_ARGS (tag));
- /* fall-through */
+ GST_WARNING ("Unknown tag " GST_FOURCC_FORMAT " before AVI data",
+ GST_FOURCC_ARGS (tag));
+ /* fall-through */
case GST_RIFF_TAG_idx1:
case GST_RIFF_TAG_JUNK:
- if (!gst_riff_read_skip (riff))
- return FALSE;
- break;
+ if (!gst_riff_read_skip (riff))
+ return FALSE;
+ break;
}
}
@@ -1391,7 +1392,7 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
if (stream_nr < 0 || stream_nr >= avi->num_streams) {
/* recoverable */
g_warning ("Invalid stream ID %d (" GST_FOURCC_FORMAT ")",
- stream_nr, GST_FOURCC_ARGS (tag));
+ stream_nr, GST_FOURCC_ARGS (tag));
if (!gst_riff_read_skip (riff))
return FALSE;
} else {
@@ -1407,11 +1408,11 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
/* get time of this buffer */
stream = &avi->stream[stream_nr];
entry = gst_avi_demux_index_next (avi, stream_nr,
- stream->current_entry + 1, 0);
+ stream->current_entry + 1, 0);
if (entry) {
stream->current_entry = entry->index_nr;
if (entry->flags & GST_RIFF_IF_KEYFRAME) {
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_KEY_UNIT);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_KEY_UNIT);
}
}
format = GST_FORMAT_TIME;
@@ -1419,7 +1420,7 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
/* set delay (if any) */
if (stream->strh->init_frames == stream->current_frame &&
- stream->delay == 0)
+ stream->delay == 0)
stream->delay = next_ts;
stream->current_frame++;
@@ -1431,15 +1432,15 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
gst_buffer_unref (buf);
} else {
if (!stream->pad || !GST_PAD_IS_USABLE (stream->pad)) {
- gst_buffer_unref (buf);
+ gst_buffer_unref (buf);
} else {
- GstClockTime dur_ts;
+ GstClockTime dur_ts;
- GST_BUFFER_TIMESTAMP (buf) = next_ts;
- gst_pad_query (stream->pad, GST_QUERY_POSITION, &format, &dur_ts);
- GST_BUFFER_DURATION (buf) = dur_ts - next_ts;
+ GST_BUFFER_TIMESTAMP (buf) = next_ts;
+ gst_pad_query (stream->pad, GST_QUERY_POSITION, &format, &dur_ts);
+ GST_BUFFER_DURATION (buf) = dur_ts - next_ts;
- gst_pad_push (stream->pad, GST_DATA (buf));
+ gst_pad_push (stream->pad, GST_DATA (buf));
}
}
}
@@ -1455,19 +1456,19 @@ gst_avi_demux_loop (GstElement * element)
switch (avi->state) {
case GST_AVI_DEMUX_START:
if (!gst_avi_demux_stream_init (avi))
- return;
+ return;
avi->state = GST_AVI_DEMUX_HEADER;
/* fall-through */
case GST_AVI_DEMUX_HEADER:
if (!gst_avi_demux_stream_header (avi))
- return;
+ return;
avi->state = GST_AVI_DEMUX_MOVI;
/* fall-through */
case GST_AVI_DEMUX_MOVI:
if (!gst_avi_demux_stream_data (avi))
- return;
+ return;
break;
default:
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index f5287db0..d613d0cc 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -68,40 +68,40 @@ static GstStaticPadTemplate video_sink_factory =
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("video/x-raw-yuv, "
- "format = (fourcc) { YUY2, I420 }, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ]; "
- "video/x-jpeg, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ]; "
- "video/x-divx, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ], "
- "divxversion = (int) [ 3, 5 ]; "
- "video/x-xvid, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ]; "
- "video/x-3ivx, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ]; "
- "video/x-msmpeg, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ], "
- "msmpegversion = (int) [ 41, 43 ]; "
- "video/mpeg, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ], "
- "mpegversion = (int) 1, "
- "systemstream = (boolean) FALSE; "
- "video/x-h263, "
- "width = (int) [ 16, 4096 ], "
- "height = (int) [ 16, 4096 ]; "
- "video/x-dv, "
- "width = (int) 720, "
- "height = (int) { 576, 480 }, "
- "systemstream = (boolean) FALSE; "
- "video/x-huffyuv, "
- "width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ]")
+ "format = (fourcc) { YUY2, I420 }, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ]; "
+ "video/x-jpeg, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ]; "
+ "video/x-divx, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ], "
+ "divxversion = (int) [ 3, 5 ]; "
+ "video/x-xvid, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ]; "
+ "video/x-3ivx, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ]; "
+ "video/x-msmpeg, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ], "
+ "msmpegversion = (int) [ 41, 43 ]; "
+ "video/mpeg, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ], "
+ "mpegversion = (int) 1, "
+ "systemstream = (boolean) FALSE; "
+ "video/x-h263, "
+ "width = (int) [ 16, 4096 ], "
+ "height = (int) [ 16, 4096 ]; "
+ "video/x-dv, "
+ "width = (int) 720, "
+ "height = (int) { 576, 480 }, "
+ "systemstream = (boolean) FALSE; "
+ "video/x-huffyuv, "
+ "width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ]")
);
static GstStaticPadTemplate audio_sink_factory =
@@ -109,22 +109,22 @@ static GstStaticPadTemplate audio_sink_factory =
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) LITTLE_ENDIAN, "
- "signed = (boolean) { TRUE, FALSE }, "
- "width = (int) { 8, 16 }, "
- "depth = (int) { 8, 16 }, "
- "rate = (int) [ 1000, 96000 ], "
- "channels = (int) [ 1, 2 ]; "
- "audio/mpeg, "
- "mpegversion = (int) 1, "
- "layer = (int) [ 1, 3 ], "
- "rate = (int) [ 1000, 96000 ], "
- "channels = (int) [ 1, 2 ]; "
- "audio/x-vorbis, "
- "rate = (int) [ 1000, 96000 ], "
- "channels = (int) [ 1, 2 ]; "
- "audio/x-ac3, "
- "rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) LITTLE_ENDIAN, "
+ "signed = (boolean) { TRUE, FALSE }, "
+ "width = (int) { 8, 16 }, "
+ "depth = (int) { 8, 16 }, "
+ "rate = (int) [ 1000, 96000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/mpeg, "
+ "mpegversion = (int) 1, "
+ "layer = (int) [ 1, 3 ], "
+ "rate = (int) [ 1000, 96000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/x-vorbis, "
+ "rate = (int) [ 1000, 96000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/x-ac3, "
+ "rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]")
);
@@ -163,8 +163,9 @@ gst_avimux_get_type (void)
0,
(GInstanceInitFunc) gst_avimux_init,
};
+
avimux_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstAviMux", &avimux_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstAviMux", &avimux_info, 0);
}
return avimux_type;
}
@@ -202,7 +203,7 @@ gst_avimux_class_init (GstAviMuxClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BIGFILE,
g_param_spec_boolean ("bigfile", "Bigfile Support",
- "Support for openDML-2.0 (big) AVI files", 0, G_PARAM_READWRITE));
+ "Support for openDML-2.0 (big) AVI files", 0, G_PARAM_READWRITE));
gstelement_class->request_new_pad = gst_avimux_request_new_pad;
@@ -230,7 +231,7 @@ gst_avimux_init (GstAviMux * avimux)
avimux->srcpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
- "src"), "src");
+ "src"), "src");
gst_element_add_pad (GST_ELEMENT (avimux), avimux->srcpad);
GST_FLAG_SET (GST_ELEMENT (avimux), GST_ELEMENT_EVENT_AWARE);
@@ -303,11 +304,11 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps)
avimux->vids.compression = format;
switch (format) {
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
- avimux->vids.bit_cnt = 16;
- break;
+ avimux->vids.bit_cnt = 16;
+ break;
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
- avimux->vids.bit_cnt = 12;
- break;
+ avimux->vids.bit_cnt = 12;
+ break;
}
} else {
avimux->vids.bit_cnt = 24;
@@ -323,15 +324,15 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps)
gst_structure_get_int (structure, "divxversion", &divxversion);
switch (divxversion) {
- case 3:
- avimux->vids.compression = GST_MAKE_FOURCC ('D', 'I', 'V', '3');
- break;
- case 4:
- avimux->vids.compression = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
- break;
- case 5:
- avimux->vids.compression = GST_MAKE_FOURCC ('D', 'X', '5', '0');
- break;
+ case 3:
+ avimux->vids.compression = GST_MAKE_FOURCC ('D', 'I', 'V', '3');
+ break;
+ case 4:
+ avimux->vids.compression = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
+ break;
+ case 5:
+ avimux->vids.compression = GST_MAKE_FOURCC ('D', 'X', '5', '0');
+ break;
}
} else if (!strcmp (mimetype, "video/x-xvid")) {
avimux->vids.compression = GST_MAKE_FOURCC ('X', 'V', 'I', 'D');
@@ -342,15 +343,15 @@ gst_avimux_vidsinkconnect (GstPad * pad, const GstCaps * vscaps)
gst_structure_get_int (structure, "msmpegversion", &msmpegversion);
switch (msmpegversion) {
- case 41:
- avimux->vids.compression = GST_MAKE_FOURCC ('M', 'P', 'G', '4');
- break;
- case 42:
- avimux->vids.compression = GST_MAKE_FOURCC ('M', 'P', '4', '2');
- break;
- case 43:
- avimux->vids.compression = GST_MAKE_FOURCC ('M', 'P', '4', '3');
- break;
+ case 41:
+ avimux->vids.compression = GST_MAKE_FOURCC ('M', 'P', 'G', '4');
+ break;
+ case 42:
+ avimux->vids.compression = GST_MAKE_FOURCC ('M', 'P', '4', '2');
+ break;
+ case 43:
+ avimux->vids.compression = GST_MAKE_FOURCC ('M', 'P', '4', '3');
+ break;
}
} else if (!strcmp (mimetype, "video/x-dv")) {
avimux->vids.compression = GST_MAKE_FOURCC ('D', 'V', 'S', 'D');
@@ -417,13 +418,13 @@ gst_avimux_audsinkconnect (GstPad * pad, const GstCaps * vscaps)
gst_structure_get_int (structure, "layer", &layer);
switch (layer) {
- case 3:
- avimux->auds.format = GST_RIFF_WAVE_FORMAT_MPEGL3;
- break;
- case 1:
- case 2:
- avimux->auds.format = GST_RIFF_WAVE_FORMAT_MPEGL12;
- break;
+ case 3:
+ avimux->auds.format = GST_RIFF_WAVE_FORMAT_MPEGL3;
+ break;
+ case 1:
+ case 2:
+ avimux->auds.format = GST_RIFF_WAVE_FORMAT_MPEGL12;
+ break;
}
} else if (!strcmp (mimetype, "audio/x-vorbis")) {
avimux->auds.format = GST_RIFF_WAVE_FORMAT_VORBIS3;
@@ -544,17 +545,17 @@ gst_avimux_riff_get_avi_header (GstAviMux * avimux)
/* first, let's see what actually needs to be in the buffer */
GST_BUFFER_SIZE (buffer) = 0;
- GST_BUFFER_SIZE (buffer) += 32 + sizeof (gst_riff_avih); /* avi header */
- if (avimux->video_pad_connected) { /* we have video */
- GST_BUFFER_SIZE (buffer) += 28 + sizeof (gst_riff_strh) + sizeof (gst_riff_strf_vids); /* vid hdr */
- GST_BUFFER_SIZE (buffer) += 24; /* odml header */
+ GST_BUFFER_SIZE (buffer) += 32 + sizeof (gst_riff_avih); /* avi header */
+ if (avimux->video_pad_connected) { /* we have video */
+ GST_BUFFER_SIZE (buffer) += 28 + sizeof (gst_riff_strh) + sizeof (gst_riff_strf_vids); /* vid hdr */
+ GST_BUFFER_SIZE (buffer) += 24; /* odml header */
}
- if (avimux->audio_pad_connected) { /* we have audio */
- GST_BUFFER_SIZE (buffer) += 28 + sizeof (gst_riff_strh) + sizeof (gst_riff_strf_auds); /* aud hdr */
+ if (avimux->audio_pad_connected) { /* we have audio */
+ GST_BUFFER_SIZE (buffer) += 28 + sizeof (gst_riff_strh) + sizeof (gst_riff_strf_auds); /* aud hdr */
}
/* this is the "riff size" */
avimux->header_size = GST_BUFFER_SIZE (buffer);
- GST_BUFFER_SIZE (buffer) += 12; /* avi data header */
+ GST_BUFFER_SIZE (buffer) += 12; /* avi data header */
/* allocate the buffer */
buffdata = GST_BUFFER_DATA (buffer) = g_malloc (GST_BUFFER_SIZE (buffer));
@@ -630,8 +631,8 @@ gst_avimux_riff_get_avi_header (GstAviMux * avimux)
memcpy (buffdata, "LIST", 4);
buffdata += 4;
temp32 =
- LE_FROM_GUINT32 (sizeof (gst_riff_strh) + sizeof (gst_riff_strf_vids) +
- 4 * 5);
+ LE_FROM_GUINT32 (sizeof (gst_riff_strh) + sizeof (gst_riff_strf_vids) +
+ 4 * 5);
memcpy (buffdata, &temp32, 4);
buffdata += 4;
memcpy (buffdata, "strl", 4);
@@ -726,8 +727,8 @@ gst_avimux_riff_get_avi_header (GstAviMux * avimux)
memcpy (buffdata, "LIST", 4);
buffdata += 4;
temp32 =
- LE_FROM_GUINT32 (sizeof (gst_riff_strh) + sizeof (gst_riff_strf_auds) +
- 4 * 5);
+ LE_FROM_GUINT32 (sizeof (gst_riff_strh) + sizeof (gst_riff_strf_auds) +
+ 4 * 5);
memcpy (buffdata, &temp32, 4);
buffdata += 4;
memcpy (buffdata, "strl", 4);
@@ -901,8 +902,8 @@ gst_avimux_add_index (GstAviMux * avimux, guchar * code, guint32 flags,
if (avimux->idx_index == avimux->idx_count) {
avimux->idx_count += 256;
avimux->idx =
- realloc (avimux->idx,
- avimux->idx_count * sizeof (gst_riff_index_entry));
+ realloc (avimux->idx,
+ avimux->idx_count * sizeof (gst_riff_index_entry));
}
memcpy (&(avimux->idx[avimux->idx_index].id), code, 4);
avimux->idx[avimux->idx_index].flags = LE_FROM_GUINT32 (flags);
@@ -928,7 +929,7 @@ gst_avimux_write_index (GstAviMux * avimux)
buffer = gst_buffer_new ();
GST_BUFFER_SIZE (buffer) = avimux->idx_index * sizeof (gst_riff_index_entry);
GST_BUFFER_DATA (buffer) = (unsigned char *) avimux->idx;
- avimux->idx = NULL; /* will be free()'ed by gst_buffer_unref() */
+ avimux->idx = NULL; /* will be free()'ed by gst_buffer_unref() */
avimux->total_data += GST_BUFFER_SIZE (buffer);
gst_pad_push (avimux->srcpad, GST_DATA (buffer));
@@ -947,7 +948,7 @@ gst_avimux_bigfile (GstAviMux * avimux, gboolean last)
if (avimux->is_bigfile) {
/* sarch back */
event = gst_event_new_seek (GST_FORMAT_BYTES |
- GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, avimux->avix_start);
+ GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, avimux->avix_start);
/* if the event succeeds */
gst_pad_push (avimux->srcpad, GST_DATA (event));
@@ -957,7 +958,7 @@ gst_avimux_bigfile (GstAviMux * avimux, gboolean last)
/* go back to current location */
event = gst_event_new_seek (GST_FORMAT_BYTES |
- GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, avimux->total_data);
+ GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, avimux->total_data);
gst_pad_push (avimux->srcpad, GST_DATA (event));
}
avimux->avix_start = avimux->total_data;
@@ -983,7 +984,7 @@ gst_avimux_start_file (GstAviMux * avimux)
avimux->total_data = 0;
avimux->total_frames = 0;
- avimux->data_size = 4; /* ? */
+ avimux->data_size = 4; /* ? */
avimux->datax_size = 0;
avimux->num_frames = 0;
avimux->numx_frames = 0;
@@ -992,7 +993,7 @@ gst_avimux_start_file (GstAviMux * avimux)
avimux->avix_start = 0;
avimux->idx_index = 0;
- avimux->idx_offset = 0; /* see 10 lines below */
+ avimux->idx_offset = 0; /* see 10 lines below */
avimux->idx_size = 0;
avimux->idx_count = 0;
avimux->idx = NULL;
@@ -1035,7 +1036,7 @@ gst_avimux_stop_file (GstAviMux * avimux)
}
if (avimux->audio_pad_connected) {
avimux->auds_hdr.length =
- (avimux->audio_time * avimux->auds.rate) / GST_SECOND;
+ (avimux->audio_time * avimux->auds.rate) / GST_SECOND;
}
/* set rate and everything having to do with that */
@@ -1044,13 +1045,13 @@ gst_avimux_stop_file (GstAviMux * avimux)
/* calculate bps if needed */
if (!avimux->auds.av_bps) {
if (avimux->audio_time) {
- avimux->auds_hdr.rate =
- (GST_SECOND * avimux->audio_size) / avimux->audio_time;
+ avimux->auds_hdr.rate =
+ (GST_SECOND * avimux->audio_size) / avimux->audio_time;
} else {
- GST_ELEMENT_ERROR (avimux, STREAM, MUX,
- (_("No or invalid input audio, AVI stream will be corrupt.")),
- (NULL));
- avimux->auds_hdr.rate = 0;
+ GST_ELEMENT_ERROR (avimux, STREAM, MUX,
+ (_("No or invalid input audio, AVI stream will be corrupt.")),
+ (NULL));
+ avimux->auds_hdr.rate = 0;
}
avimux->auds.av_bps = avimux->auds_hdr.rate * avimux->auds_hdr.scale;
}
@@ -1058,7 +1059,7 @@ gst_avimux_stop_file (GstAviMux * avimux)
}
if (avimux->video_pad_connected) {
avimux->avi_hdr.max_bps += ((avimux->vids.bit_cnt + 7) / 8) *
- (1000000. / avimux->avi_hdr.us_frame) * avimux->vids.image_size;
+ (1000000. / avimux->avi_hdr.us_frame) * avimux->vids.image_size;
}
/* seek and rewrite the header */
@@ -1101,11 +1102,11 @@ gst_avimux_handle_event (GstPad * pad, GstEvent * event)
case GST_EVENT_EOS:
/* is this allright? */
if (pad == avimux->videosinkpad) {
- avimux->video_pad_eos = TRUE;
+ avimux->video_pad_eos = TRUE;
} else if (pad == avimux->audiosinkpad) {
- avimux->audio_pad_eos = TRUE;
+ avimux->audio_pad_eos = TRUE;
} else {
- g_warning ("Unknown pad for EOS!");
+ g_warning ("Unknown pad for EOS!");
}
break;
default:
@@ -1256,7 +1257,7 @@ gst_avimux_do_one_buffer (GstAviMux * avimux)
{
if (avimux->video_buffer_queue && avimux->audio_buffer_queue) {
if (GST_BUFFER_TIMESTAMP (avimux->video_buffer_queue) <=
- GST_BUFFER_TIMESTAMP (avimux->audio_buffer_queue))
+ GST_BUFFER_TIMESTAMP (avimux->audio_buffer_queue))
gst_avimux_do_video_buffer (avimux);
else
gst_avimux_do_audio_buffer (avimux);
diff --git a/gst/cutter/gstcutter.c b/gst/cutter/gstcutter.c
index 9b82b057..89a5723b 100644
--- a/gst/cutter/gstcutter.c
+++ b/gst/cutter/gstcutter.c
@@ -57,7 +57,7 @@ static GstStaticPadTemplate cutter_src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_AUDIO_INT_PAD_TEMPLATE_CAPS "; "
- GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS)
+ GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS)
);
static GstStaticPadTemplate cutter_sink_factory =
@@ -65,7 +65,7 @@ static GstStaticPadTemplate cutter_sink_factory =
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_AUDIO_INT_PAD_TEMPLATE_CAPS "; "
- GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS)
+ GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS)
);
static void gst_cutter_base_init (gpointer g_class);
@@ -101,8 +101,9 @@ gst_cutter_get_type (void)
sizeof (GstCutter), 0,
(GInstanceInitFunc) gst_cutter_init,
};
+
cutter_type = g_type_register_static (GST_TYPE_ELEMENT, "GstCutter",
- &cutter_info, 0);
+ &cutter_info, 0);
}
return cutter_type;
}
@@ -146,24 +147,24 @@ gst_cutter_class_init (GstCutterClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_THRESHOLD,
g_param_spec_double ("threshold", "Threshold",
- "Volume threshold before trigger",
- -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
+ "Volume threshold before trigger",
+ -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_THRESHOLD_DB,
g_param_spec_double ("threshold_dB", "Threshold (dB)",
- "Volume threshold before trigger (in dB)",
- -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
+ "Volume threshold before trigger (in dB)",
+ -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_RUN_LENGTH,
g_param_spec_double ("runlength", "Runlength",
- "Length of drop below threshold before cut_stop (seconds)",
- 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
+ "Length of drop below threshold before cut_stop (seconds)",
+ 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PRE_LENGTH,
g_param_spec_double ("prelength", "prelength",
- "Length of pre-recording buffer (seconds)",
- 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
+ "Length of pre-recording buffer (seconds)",
+ 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LEAKY,
g_param_spec_boolean ("leaky", "Leaky",
- "do we leak buffers when below threshold ?",
- FALSE, G_PARAM_READWRITE));
+ "do we leak buffers when below threshold ?",
+ FALSE, G_PARAM_READWRITE));
gst_cutter_signals[CUT_START] =
g_signal_new ("cut-start", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
@@ -214,10 +215,10 @@ gst_cutter_chain (GstPad * pad, GstData * _data)
GstBuffer *buf = GST_BUFFER (_data);
GstCutter *filter;
gint16 *in_data;
- double RMS = 0.0; /* RMS of signal in buffer */
- double ms = 0.0; /* mean square value of buffer */
- static gboolean silent_prev = FALSE; /* previous value of silent */
- GstBuffer *prebuf; /* pointer to a prebuffer element */
+ double RMS = 0.0; /* RMS of signal in buffer */
+ double ms = 0.0; /* mean square value of buffer */
+ static gboolean silent_prev = FALSE; /* previous value of silent */
+ GstBuffer *prebuf; /* pointer to a prebuffer element */
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
@@ -247,7 +248,7 @@ gst_cutter_chain (GstPad * pad, GstData * _data)
default:
/* this shouldn't happen */
g_print ("WARNING: no mean square function for width %d\n",
- filter->width);
+ filter->width);
break;
}
@@ -285,10 +286,10 @@ gst_cutter_chain (GstPad * pad, GstData * _data)
g_signal_emit (G_OBJECT (filter), gst_cutter_signals[CUT_START], 0);
GST_DEBUG ("flushing buffer of length %.3f", filter->pre_run_length);
while (filter->pre_buffer) {
- prebuf = (g_list_first (filter->pre_buffer))->data;
- filter->pre_buffer = g_list_remove (filter->pre_buffer, prebuf);
- gst_pad_push (filter->srcpad, GST_DATA (prebuf));
- ++count;
+ prebuf = (g_list_first (filter->pre_buffer))->data;
+ filter->pre_buffer = g_list_remove (filter->pre_buffer, prebuf);
+ gst_pad_push (filter->srcpad, GST_DATA (prebuf));
+ ++count;
}
GST_DEBUG ("flushed %d buffers", count);
filter->pre_run_length = 0.0;
@@ -313,7 +314,7 @@ gst_cutter_chain (GstPad * pad, GstData * _data)
filter->pre_run_length -= gst_audio_length (filter->srcpad, prebuf);
/* only pass buffers if we don't leak */
if (!filter->leaky)
- gst_pad_push (filter->srcpad, GST_DATA (prebuf));
+ gst_pad_push (filter->srcpad, GST_DATA (prebuf));
/* we unref it after getting it out of the pre_buffer */
gst_buffer_unref (prebuf);
}
@@ -327,7 +328,7 @@ gst_cutter_16bit_ms (gint16 * data, guint num_samples)
static double inline gst_cutter_8bit_ms (gint8 * data, guint num_samples)
#include "filter.func"
static void
- gst_cutter_set_property (GObject * object, guint prop_id,
+ gst_cutter_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstCutter *filter;
diff --git a/gst/debug/efence.c b/gst/debug/efence.c
index f6e576e3..e44e8dc6 100644
--- a/gst/debug/efence.c
+++ b/gst/debug/efence.c
@@ -122,8 +122,9 @@ gst_gst_efence_get_type (void)
0,
(GInstanceInitFunc) gst_efence_init,
};
+
plugin_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstEFence", &plugin_info, 0);
+ "GstEFence", &plugin_info, 0);
}
return plugin_type;
}
@@ -154,7 +155,7 @@ gst_efence_class_init (GstEFenceClass * klass)
g_object_class_install_property (gobject_class, ARG_FENCE_TOP,
g_param_spec_boolean ("fence_top", "Fence Top",
- "Align buffers with top of fenced region", TRUE, G_PARAM_READWRITE));
+ "Align buffers with top of fenced region", TRUE, G_PARAM_READWRITE));
gobject_class->set_property = gst_efence_set_property;
gobject_class->get_property = gst_efence_get_property;
@@ -350,11 +351,11 @@ gst_fenced_buffer_default_free (GstData * data)
if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE) &&
GST_BUFFER_DATA (buffer)) {
GST_DEBUG ("free region %p %d", fenced_buffer->region,
- fenced_buffer->length);
+ fenced_buffer->length);
munmap (fenced_buffer->region, fenced_buffer->length);
} else {
GST_DEBUG ("not freeing region %p %d %p", fenced_buffer->region,
- GST_BUFFER_FLAGS (buffer), GST_BUFFER_DATA (buffer));
+ GST_BUFFER_FLAGS (buffer), GST_BUFFER_DATA (buffer));
}
/* set to safe values */
diff --git a/gst/debug/gstnavigationtest.c b/gst/debug/gstnavigationtest.c
index e1b7486f..4bc934b3 100644
--- a/gst/debug/gstnavigationtest.c
+++ b/gst/debug/gstnavigationtest.c
@@ -79,8 +79,9 @@ gst_navigationtest_get_type (void)
0,
gst_navigationtest_init,
};
+
navigationtest_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstNavigationtest", &navigationtest_info, 0);
+ "GstNavigationtest", &navigationtest_info, 0);
}
return navigationtest_type;
}
@@ -106,7 +107,7 @@ gst_navigationtest_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_navigationtest_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_navigationtest_formats + i);
+ gst_navigationtest_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -124,8 +125,8 @@ gst_navigationtest_class_init (gpointer g_class, gpointer class_data)
#if 0
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_NAVIGATIONTEST_METHOD, GST_NAVIGATIONTEST_METHOD_1,
- G_PARAM_READWRITE));
+ GST_TYPE_NAVIGATIONTEST_METHOD, GST_NAVIGATIONTEST_METHOD_1,
+ G_PARAM_READWRITE));
#endif
gobject_class->set_property = gst_navigationtest_set_property;
@@ -161,9 +162,9 @@ gst_navigationtest_handle_src_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NAVIGATION:
gst_structure_get_double (event->event_data.structure.structure,
- "pointer_x", &navigationtest->x);
+ "pointer_x", &navigationtest->x);
gst_structure_get_double (event->event_data.structure.structure,
- "pointer_y", &navigationtest->y);
+ "pointer_y", &navigationtest->y);
break;
default:
break;
diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c
index 44683546..ee264119 100644
--- a/gst/effectv/gstaging.c
+++ b/gst/effectv/gstaging.c
@@ -60,7 +60,8 @@ typedef struct _scratch
gint x;
gint dx;
gint init;
-} scratch;
+}
+scratch;
static int dx[8] = { 1, 1, 0, -1, -1, -1, 0, 1 };
static int dy[8] = { 0, -1, -1, -1, 0, 1, 1, 1 };
@@ -129,8 +130,9 @@ gst_agingtv_get_type (void)
0,
gst_agingtv_init,
};
+
agingtv_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstAgingTV", &agingtv_info, 0);
+ "GstAgingTV", &agingtv_info, 0);
}
return agingtv_type;
}
@@ -155,7 +157,7 @@ gst_agingtv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_agingtv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_agingtv_formats + i);
+ gst_agingtv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -173,7 +175,7 @@ gst_agingtv_class_init (gpointer g_class, gpointer class_data)
#if 0
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_AGINGTV_METHOD, GST_AGINGTV_METHOD_1, G_PARAM_READWRITE));
+ GST_TYPE_AGINGTV_METHOD, GST_AGINGTV_METHOD_1, G_PARAM_READWRITE));
#endif
gobject_class->set_property = gst_agingtv_set_property;
@@ -249,35 +251,35 @@ scratching (scratch * scratches, gint scratch_lines, guint32 * dest, gint width,
scratch->x = scratch->x + scratch->dx;
if (scratch->x < 0 || scratch->x > width * 256) {
- scratch->life = 0;
- break;
+ scratch->life = 0;
+ break;
}
p = dest + (scratch->x >> 8);
if (scratch->init) {
- y1 = scratch->init;
- scratch->init = 0;
+ y1 = scratch->init;
+ scratch->init = 0;
} else {
- y1 = 0;
+ y1 = 0;
}
scratch->life--;
if (scratch->life) {
- y2 = height;
+ y2 = height;
} else {
- y2 = fastrand () % height;
+ y2 = fastrand () % height;
}
for (y = y1; y < y2; y++) {
- a = *p & 0xfefeff;
- a += 0x202020;
- b = a & 0x1010100;
- *p = a | (b - (b >> 8));
- p += width;
+ a = *p & 0xfefeff;
+ a += 0x202020;
+ b = a & 0x1010100;
+ *p = a | (b - (b >> 8));
+ p += width;
}
} else {
if ((fastrand () & 0xf0000000) == 0) {
- scratch->life = 2 + (fastrand () >> 27);
- scratch->x = fastrand () % (width * 256);
- scratch->dx = ((int) fastrand ()) >> 23;
- scratch->init = (fastrand () % (height - 1)) + 1;
+ scratch->life = 2 + (fastrand () >> 27);
+ scratch->x = fastrand () % (width * 256);
+ scratch->dx = ((int) fastrand ()) >> 23;
+ scratch->init = (fastrand () % (height - 1)) + 1;
}
}
}
@@ -311,7 +313,7 @@ dusts (guint32 * dest, gint width, gint height, gint dust_interval,
x += dx[d];
if (y >= height || x >= width)
- break;
+ break;
d = (d + fastrand () % 3 - 1) & 7;
}
@@ -350,7 +352,7 @@ pits (guint32 * dest, gint width, gint height, gint area_scale,
y = y + fastrand () % 3 - 1;
if (y >= height || x >= width)
- break;
+ break;
dest[y * width + x] = 0xc0c0c0;
}
diff --git a/gst/effectv/gstdice.c b/gst/effectv/gstdice.c
index a7cbbc36..f77a4539 100644
--- a/gst/effectv/gstdice.c
+++ b/gst/effectv/gstdice.c
@@ -41,7 +41,8 @@ typedef enum _dice_dir
DICE_RIGHT = 1,
DICE_DOWN = 2,
DICE_LEFT = 3
-} DiceDir;
+}
+DiceDir;
struct _GstDiceTV
{
@@ -112,8 +113,8 @@ gst_dicetv_get_type (void)
};
dicetv_type =
- g_type_register_static (GST_TYPE_VIDEOFILTER, "GstDiceTV", &dicetv_info,
- 0);
+ g_type_register_static (GST_TYPE_VIDEOFILTER, "GstDiceTV", &dicetv_info,
+ 0);
}
return dicetv_type;
}
@@ -146,7 +147,7 @@ gst_dicetv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_dicetv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_dicetv_formats + i);
+ gst_dicetv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -174,7 +175,7 @@ gst_dicetv_class_init (gpointer g_class, gpointer class_data)
g_object_class_install_property (gobject_class, ARG_CUBE_BITS,
g_param_spec_int ("square_bits", "Square Bits", "The size of the Squares",
- MIN_CUBE_BITS, MAX_CUBE_BITS, DEFAULT_CUBE_BITS, G_PARAM_READWRITE));
+ MIN_CUBE_BITS, MAX_CUBE_BITS, DEFAULT_CUBE_BITS, G_PARAM_READWRITE));
gobject_class->set_property = gst_dicetv_set_property;
gobject_class->get_property = gst_dicetv_get_property;
@@ -255,50 +256,50 @@ gst_dicetv_draw (GstVideofilter * videofilter, void *d, void *s)
base = (map_y << g_cube_bits) * video_width + (map_x << g_cube_bits);
switch (filter->dicemap[map_i]) {
- case DICE_UP:
- for (dy = 0; dy < g_cube_size; dy++) {
- i = base + dy * video_width;
- for (dx = 0; dx < g_cube_size; dx++) {
- dest[i] = src[i];
- i++;
- }
- }
- break;
- case DICE_LEFT:
- for (dy = 0; dy < g_cube_size; dy++) {
- i = base + dy * video_width;
-
- for (dx = 0; dx < g_cube_size; dx++) {
- di = base + (dx * video_width) + (g_cube_size - dy - 1);
- dest[di] = src[i];
- i++;
- }
- }
- break;
- case DICE_DOWN:
- for (dy = 0; dy < g_cube_size; dy++) {
- di = base + dy * video_width;
- i = base + (g_cube_size - dy - 1) * video_width + g_cube_size;
- for (dx = 0; dx < g_cube_size; dx++) {
- i--;
- dest[di] = src[i];
- di++;
- }
- }
- break;
- case DICE_RIGHT:
- for (dy = 0; dy < g_cube_size; dy++) {
- i = base + (dy * video_width);
- for (dx = 0; dx < g_cube_size; dx++) {
- di = base + dy + (g_cube_size - dx - 1) * video_width;
- dest[di] = src[i];
- i++;
- }
- }
- break;
- default:
- g_assert_not_reached ();
- break;
+ case DICE_UP:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ i = base + dy * video_width;
+ for (dx = 0; dx < g_cube_size; dx++) {
+ dest[i] = src[i];
+ i++;
+ }
+ }
+ break;
+ case DICE_LEFT:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ i = base + dy * video_width;
+
+ for (dx = 0; dx < g_cube_size; dx++) {
+ di = base + (dx * video_width) + (g_cube_size - dy - 1);
+ dest[di] = src[i];
+ i++;
+ }
+ }
+ break;
+ case DICE_DOWN:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ di = base + dy * video_width;
+ i = base + (g_cube_size - dy - 1) * video_width + g_cube_size;
+ for (dx = 0; dx < g_cube_size; dx++) {
+ i--;
+ dest[di] = src[i];
+ di++;
+ }
+ }
+ break;
+ case DICE_RIGHT:
+ for (dy = 0; dy < g_cube_size; dy++) {
+ i = base + (dy * video_width);
+ for (dx = 0; dx < g_cube_size; dx++) {
+ di = base + dy + (g_cube_size - dx - 1) * video_width;
+ dest[di] = src[i];
+ i++;
+ }
+ }
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
}
map_i++;
}
diff --git a/gst/effectv/gstedge.c b/gst/effectv/gstedge.c
index 1e9002bf..6f07153a 100644
--- a/gst/effectv/gstedge.c
+++ b/gst/effectv/gstedge.c
@@ -102,8 +102,8 @@ gst_edgetv_get_type (void)
};
edgetv_type =
- g_type_register_static (GST_TYPE_VIDEOFILTER, "GstEdgeTV", &edgetv_info,
- 0);
+ g_type_register_static (GST_TYPE_VIDEOFILTER, "GstEdgeTV", &edgetv_info,
+ 0);
}
return edgetv_type;
}
@@ -130,7 +130,7 @@ gst_edgetv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_edgetv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_edgetv_formats + i);
+ gst_edgetv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -214,15 +214,15 @@ gst_edgetv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
r *= r;
g *= g;
b *= b;
- r = r >> 5; /* To lack the lower bit for saturated addition, */
- g = g >> 5; /* devide the value with 32, instead of 16. It is */
- b = b >> 4; /* same as `v2 &= 0xfefeff' */
+ r = r >> 5; /* To lack the lower bit for saturated addition, */
+ g = g >> 5; /* devide the value with 32, instead of 16. It is */
+ b = b >> 4; /* same as `v2 &= 0xfefeff' */
if (r > 127)
- r = 127;
+ r = 127;
if (g > 127)
- g = 127;
+ g = 127;
if (b > 255)
- b = 255;
+ b = 255;
v2 = (r << 17) | (g << 9) | b;
/* difference between the current pixel and upper neighbor. */
@@ -237,11 +237,11 @@ gst_edgetv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
g = g >> 5;
b = b >> 4;
if (r > 127)
- r = 127;
+ r = 127;
if (g > 127)
- g = 127;
+ g = 127;
if (b > 255)
- b = 255;
+ b = 255;
v3 = (r << 17) | (g << 9) | b;
v0 = filter->map[(y - 1) * filter->map_width * 2 + x * 2];
diff --git a/gst/effectv/gsteffectv.c b/gst/effectv/gsteffectv.c
index 71f51c55..c05e151c 100644
--- a/gst/effectv/gsteffectv.c
+++ b/gst/effectv/gsteffectv.c
@@ -73,7 +73,7 @@ plugin_init (GstPlugin * plugin)
while (_elements[i].name) {
if (!gst_element_register (plugin, _elements[i].name,
- GST_RANK_NONE, (_elements[i].type) ()))
+ GST_RANK_NONE, (_elements[i].type) ()))
return FALSE;
i++;
}
diff --git a/gst/effectv/gstquark.c b/gst/effectv/gstquark.c
index 42683212..fc73aa3d 100644
--- a/gst/effectv/gstquark.c
+++ b/gst/effectv/gstquark.c
@@ -128,8 +128,8 @@ gst_quarktv_get_type (void)
};
quarktv_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstQuarkTV", &quarktv_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstQuarkTV", &quarktv_info,
+ 0);
}
return quarktv_type;
}
@@ -160,7 +160,7 @@ gst_quarktv_class_init (GstQuarkTVClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PLANES,
g_param_spec_int ("planes", "Planes", "Number of frames in the buffer",
- 1, 32, PLANES, G_PARAM_READWRITE));
+ 1, 32, PLANES, G_PARAM_READWRITE));
gobject_class->set_property = gst_quarktv_set_property;
gobject_class->get_property = gst_quarktv_get_property;
@@ -258,8 +258,8 @@ gst_quarktv_chain (GstPad * pad, GstData * _data)
/* pick a random buffer */
rand =
- filter->planetable[(filter->current_plane +
- (fastrand () >> 24)) & (filter->planes - 1)];
+ filter->planetable[(filter->current_plane +
+ (fastrand () >> 24)) & (filter->planes - 1)];
dest[area] = (rand ? ((guint32 *) GST_BUFFER_DATA (rand))[area] : 0);
}
@@ -283,9 +283,9 @@ gst_quarktv_change_state (GstElement * element)
gint i;
for (i = 0; i < filter->planes; i++) {
- if (filter->planetable[i])
- gst_buffer_unref (filter->planetable[i]);
- filter->planetable[i] = NULL;
+ if (filter->planetable[i])
+ gst_buffer_unref (filter->planetable[i]);
+ filter->planetable[i] = NULL;
}
g_free (filter->planetable);
filter->planetable = NULL;
@@ -319,20 +319,20 @@ gst_quarktv_set_property (GObject * object, guint prop_id, const GValue * value,
/* If the number of planes changed, copy across any existing planes */
if (new_n_planes != filter->planes) {
- new_planetable =
- (GstBuffer **) g_malloc (new_n_planes * sizeof (GstBuffer *));
-
- for (i = 0; (i < new_n_planes) && (i < filter->planes); i++) {
- new_planetable[i] = filter->planetable[i];
- }
- for (; i < filter->planes; i++) {
- if (filter->planetable[i])
- gst_buffer_unref (filter->planetable[i]);
- }
- g_free (filter->planetable);
- filter->planetable = new_planetable;
- filter->current_plane = filter->planes - 1;
- filter->planes = new_n_planes;
+ new_planetable =
+ (GstBuffer **) g_malloc (new_n_planes * sizeof (GstBuffer *));
+
+ for (i = 0; (i < new_n_planes) && (i < filter->planes); i++) {
+ new_planetable[i] = filter->planetable[i];
+ }
+ for (; i < filter->planes; i++) {
+ if (filter->planetable[i])
+ gst_buffer_unref (filter->planetable[i]);
+ }
+ g_free (filter->planetable);
+ filter->planetable = new_planetable;
+ filter->current_plane = filter->planes - 1;
+ filter->planes = new_n_planes;
}
}
break;
diff --git a/gst/effectv/gstrev.c b/gst/effectv/gstrev.c
index 32752107..fb953d34 100644
--- a/gst/effectv/gstrev.c
+++ b/gst/effectv/gstrev.c
@@ -129,8 +129,8 @@ gst_revtv_get_type (void)
};
revtv_type =
- g_type_register_static (GST_TYPE_VIDEOFILTER, "GstRevTV", &revtv_info,
- 0);
+ g_type_register_static (GST_TYPE_VIDEOFILTER, "GstRevTV", &revtv_info,
+ 0);
}
return revtv_type;
}
@@ -173,13 +173,13 @@ gst_revtv_class_init (gpointer klass, gpointer class_data)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DELAY,
g_param_spec_int ("delay", "Delay", "Delay in frames between updates",
- 1, 100, 1, G_PARAM_READWRITE));
+ 1, 100, 1, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LINESPACE,
g_param_spec_int ("linespace", "Linespace", "Control line spacing",
- 1, 100, 6, G_PARAM_READWRITE));
+ 1, 100, 6, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_GAIN,
g_param_spec_int ("gain", "Gain", "Control gain",
- 1, 200, 50, G_PARAM_READWRITE));
+ 1, 200, 50, G_PARAM_READWRITE));
gobject_class->set_property = gst_revtv_set_property;
gobject_class->get_property = gst_revtv_get_property;
@@ -243,7 +243,7 @@ gst_revtv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
yval = y - ((short) (R + G + B) / filter->vscale);
if (yval > 0) {
- dest[x + (yval * width)] = THE_COLOR;
+ dest[x + (yval * width)] = THE_COLOR;
}
}
}
diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c
index 345f2762..14de2572 100644
--- a/gst/effectv/gstshagadelic.c
+++ b/gst/effectv/gstshagadelic.c
@@ -111,8 +111,8 @@ gst_shagadelictv_get_type (void)
};
shagadelictv_type =
- g_type_register_static (GST_TYPE_VIDEOFILTER, "GstShagadelicTV",
- &shagadelictv_info, 0);
+ g_type_register_static (GST_TYPE_VIDEOFILTER, "GstShagadelicTV",
+ &shagadelictv_info, 0);
}
return shagadelictv_type;
}
@@ -140,7 +140,7 @@ gst_shagadelictv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_shagadelictv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_shagadelictv_formats + i);
+ gst_shagadelictv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -237,13 +237,13 @@ gst_shagadelic_initialize (GstShagadelicTV * filter)
xx = x - filter->width / 2;
#ifdef PS2
filter->spiral[i++] = ((unsigned int)
- ((atan2f (xx,
- yy) / ((float) M_PI) * 256 * 9) + (sqrtf (xx * xx +
- yy * yy) * 5))) & 255;
+ ((atan2f (xx,
+ yy) / ((float) M_PI) * 256 * 9) + (sqrtf (xx * xx +
+ yy * yy) * 5))) & 255;
#else
filter->spiral[i++] = ((unsigned int)
- ((atan2 (xx, yy) / M_PI * 256 * 9) + (sqrt (xx * xx +
- yy * yy) * 5))) & 255;
+ ((atan2 (xx, yy) / M_PI * 256 * 9) + (sqrt (xx * xx +
+ yy * yy) * 5))) & 255;
#endif
/* Here is another Swinger!
* ((atan2(xx, yy)/M_PI*256) + (sqrt(xx*xx+yy*yy)*10))&255;
@@ -289,10 +289,10 @@ gst_shagadelictv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
* *dest++ = v & ((r<<16)|(g<<8)|b);
*/
r = (gchar) (filter->ripple[(filter->ry + y) * width * 2 + filter->rx +
- x] + filter->phase * 2) >> 7;
+ x] + filter->phase * 2) >> 7;
g = (gchar) (filter->spiral[y * width + x] + filter->phase * 3) >> 7;
b = (gchar) (filter->ripple[(filter->by + y) * width * 2 + filter->bx +
- x] - filter->phase) >> 7;
+ x] - filter->phase) >> 7;
*dest++ = v & ((r << 16) | (g << 8) | b);
}
}
diff --git a/gst/effectv/gstvertigo.c b/gst/effectv/gstvertigo.c
index 6faa8cb2..eba0df88 100644
--- a/gst/effectv/gstvertigo.c
+++ b/gst/effectv/gstvertigo.c
@@ -116,8 +116,8 @@ gst_vertigotv_get_type (void)
};
vertigotv_type =
- g_type_register_static (GST_TYPE_VIDEOFILTER, "GstVertigoTV",
- &vertigotv_info, 0);
+ g_type_register_static (GST_TYPE_VIDEOFILTER, "GstVertigoTV",
+ &vertigotv_info, 0);
}
return vertigotv_type;
}
@@ -143,7 +143,7 @@ gst_vertigotv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_vertigotv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_vertigotv_formats + i);
+ gst_vertigotv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -171,10 +171,10 @@ gst_vertigotv_class_init (GstVertigoTVClass * klass, gpointer class_data)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SPEED,
g_param_spec_float ("speed", "Speed", "Control the speed of movement",
- 0.01, 100.0, 0.02, G_PARAM_READWRITE));
+ 0.01, 100.0, 0.02, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ZOOM_SPEED,
g_param_spec_float ("zoom_speed", "Zoom Speed",
- "Control the rate of zooming", 1.01, 1.1, 1.01, G_PARAM_READWRITE));
+ "Control the rate of zooming", 1.01, 1.1, 1.01, G_PARAM_READWRITE));
gobject_class->set_property = gst_vertigotv_set_property;
gobject_class->get_property = gst_vertigotv_get_property;
@@ -246,22 +246,22 @@ gst_vertigotv_set_parms (GstVertigoTV * filter)
if (filter->width > filter->height) {
if (dizz >= 0) {
if (dizz > x)
- dizz = x;
+ dizz = x;
vx = (x * (x - dizz) + y * y) / t;
} else {
if (dizz < -x)
- dizz = -x;
+ dizz = -x;
vx = (x * (x + dizz) + y * y) / t;
}
vy = (dizz * y) / t;
} else {
if (dizz >= 0) {
if (dizz > y)
- dizz = y;
+ dizz = y;
vx = (x * x + y * (y - dizz)) / t;
} else {
if (dizz < -y)
- dizz = -y;
+ dizz = -y;
vx = (x * x + y * (y + dizz)) / t;
}
vy = (dizz * x) / t;
@@ -307,9 +307,9 @@ gst_vertigotv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
for (x = width; x > 0; x--) {
i = (oy >> 16) * width + (ox >> 16);
if (i < 0)
- i = 0;
+ i = 0;
if (i >= area)
- i = area;
+ i = area;
v = filter->current_buffer[i] & 0xfcfcff;
v = (v * 3) + ((*src++) & 0xfcfcff);
diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c
index 4eb81a65..e056b893 100644
--- a/gst/effectv/gstwarp.c
+++ b/gst/effectv/gstwarp.c
@@ -125,8 +125,9 @@ gst_warptv_get_type (void)
0,
gst_warptv_init,
};
+
warptv_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstWarpTV", &warptv_info, 0);
+ "GstWarpTV", &warptv_info, 0);
}
return warptv_type;
}
@@ -157,7 +158,7 @@ gst_warptv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_warptv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_warptv_formats + i);
+ gst_warptv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -175,7 +176,7 @@ gst_warptv_class_init (gpointer g_class, gpointer class_data)
#if 0
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_WARPTV_METHOD, GST_WARPTV_METHOD_1, G_PARAM_READWRITE));
+ GST_TYPE_WARPTV_METHOD, GST_WARPTV_METHOD_1, G_PARAM_READWRITE));
#endif
gobject_class->set_property = gst_warptv_set_property;
@@ -351,7 +352,7 @@ gst_warptv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
sintable = warptv->sintable;
ctable = warptv->ctable;
- skip = 0; /* video_width*sizeof(RGB32)/4 - video_width;; */
+ skip = 0; /* video_width*sizeof(RGB32)/4 - video_width;; */
c = 0;
for (x = 0; x < 512; x++) {
@@ -370,14 +371,14 @@ gst_warptv_rgb32 (GstVideofilter * videofilter, void *d, void *s)
dy = ctable[i] + y;
if (dx < 0)
- dx = 0;
+ dx = 0;
else if (dx > maxx)
- dx = maxx;
+ dx = maxx;
if (dy < 0)
- dy = 0;
+ dy = 0;
else if (dy > maxy)
- dy = maxy;
+ dy = maxy;
*dest++ = src[warptv->offstable[dy] + dx];
}
dest += skip;
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index a84ce2d2..b2694962 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -103,8 +103,9 @@ gst_flxdec_get_type (void)
0,
(GInstanceInitFunc) gst_flxdec_init,
};
+
flxdec_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstFlxDec", &flxdec_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstFlxDec", &flxdec_info, 0);
}
return flxdec_type;
}
@@ -172,44 +173,44 @@ flx_decode_chunks (GstFlxDec * flxdec, gulong count, gchar * data, gchar * dest)
switch (hdr->id) {
case FLX_COLOR64:
- flx_decode_color (flxdec, data, dest, 2);
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ flx_decode_color (flxdec, data, dest, 2);
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
case FLX_COLOR256:
- flx_decode_color (flxdec, data, dest, 0);
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ flx_decode_color (flxdec, data, dest, 0);
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
case FLX_BRUN:
- flx_decode_brun (flxdec, data, dest);
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ flx_decode_brun (flxdec, data, dest);
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
case FLX_LC:
- flx_decode_delta_fli (flxdec, data, dest);
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ flx_decode_delta_fli (flxdec, data, dest);
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
case FLX_SS2:
- flx_decode_delta_flc (flxdec, data, dest);
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ flx_decode_delta_flc (flxdec, data, dest);
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
case FLX_BLACK:
- memset (dest, 0, flxdec->size);
- break;
+ memset (dest, 0, flxdec->size);
+ break;
case FLX_MINI:
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
default:
- g_print ("GstFlxDec: Unimplented chunk type: 0x%02x size: %d\n",
- hdr->id, hdr->size);
- g_print ("GstFlxDec: Skipping...\n");
- data += rndalign (hdr->size) - FlxFrameChunkSize;
- break;
+ g_print ("GstFlxDec: Unimplented chunk type: 0x%02x size: %d\n",
+ hdr->id, hdr->size);
+ g_print ("GstFlxDec: Skipping...\n");
+ data += rndalign (hdr->size) - FlxFrameChunkSize;
+ break;
}
}
}
@@ -266,20 +267,20 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
count = *data++;
if (count > 0x7f) {
- /* literal run */
- count = 0x100 - count;
- row -= count;
+ /* literal run */
+ count = 0x100 - count;
+ row -= count;
- while (count--)
- *dest++ = *data++;
+ while (count--)
+ *dest++ = *data++;
} else {
- /* replicate run */
- row -= count;
- x = *data++;
+ /* replicate run */
+ row -= count;
+ x = *data++;
- while (count--)
- *dest++ = x;
+ while (count--)
+ *dest++ = x;
}
}
}
@@ -320,17 +321,17 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
count = *data++;
if (count > 0x7f) {
- /* literal run */
- count = 0x100 - count;
- x = *data++;
+ /* literal run */
+ count = 0x100 - count;
+ x = *data++;
- while (count--)
- *dest++ = x;
+ while (count--)
+ *dest++ = x;
} else {
- /* replicate run */
- while (count--)
- *dest++ = *data++;
+ /* replicate run */
+ while (count--)
+ *dest++ = *data++;
}
}
start_p += flxdec->hdr.width;
@@ -365,13 +366,13 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
while ((opcode = (data[0] + (data[1] << 8))) & 0xc000) {
data += 2;
if ((opcode & 0xc000) == 0xc000) {
- /* skip count */
- start_l += (0x10000 - opcode);
- dest += flxdec->hdr.width * (0x10000 - opcode);
+ /* skip count */
+ start_l += (0x10000 - opcode);
+ dest += flxdec->hdr.width * (0x10000 - opcode);
} else {
- /* last pixel */
- dest += flxdec->hdr.width;
- *dest++ = (opcode & 0xff);
+ /* last pixel */
+ dest += flxdec->hdr.width;
+ *dest++ = (opcode & 0xff);
}
}
data += 2;
@@ -385,19 +386,19 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
count = *data++;
if (count > 0x7f) {
- /* replicate word run */
- count = 0x100 - count;
- while (count--) {
- *dest++ = data[0];
- *dest++ = data[1];
- }
- data += 2;
+ /* replicate word run */
+ count = 0x100 - count;
+ while (count--) {
+ *dest++ = data[0];
+ *dest++ = data[1];
+ }
+ data += 2;
} else {
- /* literal word run */
- while (count--) {
- *dest++ = *data++;
- *dest++ = *data++;
- }
+ /* literal word run */
+ while (count--) {
+ *dest++ = *data++;
+ *dest++ = *data++;
+ }
}
}
lines--;
@@ -462,9 +463,9 @@ gst_flxdec_loop (GstElement * element)
/* check header */
if (flxh->type != FLX_MAGICHDR_FLI &&
- flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLX) {
+ flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLX) {
GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL),
- ("not a flx file (type %d)\n", flxh->type));
+ ("not a flx file (type %d)\n", flxh->type));
return;
}
@@ -486,13 +487,13 @@ gst_flxdec_loop (GstElement * element)
caps = gst_caps_from_string (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN);
gst_caps_set_simple (caps,
- "width", G_TYPE_INT, flxh->width,
- "height", G_TYPE_INT, flxh->height,
- "framerate", G_TYPE_DOUBLE, GST_SECOND / flxdec->frame_time, NULL);
+ "width", G_TYPE_INT, flxh->width,
+ "height", G_TYPE_INT, flxh->height,
+ "framerate", G_TYPE_DOUBLE, GST_SECOND / flxdec->frame_time, NULL);
if (flxh->depth <= 8)
flxdec->converter =
- flx_colorspace_converter_new (flxh->width, flxh->height);
+ flx_colorspace_converter_new (flxh->width, flxh->height);
if (flxh->type == FLX_MAGICHDR_FLC || flxh->type == FLX_MAGICHDR_FLX) {
g_print ("GstFlxDec: (FLC) aspect_dx : %d\n", flxh->aspect_dx);
@@ -523,41 +524,41 @@ gst_flxdec_loop (GstElement * element)
switch (flxfh->id) {
case FLX_FRAME_TYPE:
- buf = flx_get_data (flxdec, flxfh->size - FlxFrameChunkSize);
+ buf = flx_get_data (flxdec, flxfh->size - FlxFrameChunkSize);
- chunk = GST_BUFFER_DATA (buf);
+ chunk = GST_BUFFER_DATA (buf);
- if (((FlxFrameType *) chunk)->chunks == 0)
- break;
+ if (((FlxFrameType *) chunk)->chunks == 0)
+ break;
- /* create 32 bits output frame */
- out = gst_buffer_new ();
- GST_BUFFER_DATA (out) = g_malloc (flxdec->size * 4);
- GST_BUFFER_SIZE (out) = flxdec->size * 4;
+ /* create 32 bits output frame */
+ out = gst_buffer_new ();
+ GST_BUFFER_DATA (out) = g_malloc (flxdec->size * 4);
+ GST_BUFFER_SIZE (out) = flxdec->size * 4;
- /* decode chunks */
- flx_decode_chunks (flxdec,
- ((FlxFrameType *) chunk)->chunks,
- GST_BUFFER_DATA (buf) + FlxFrameTypeSize,
- GST_BUFFER_DATA (flxdec->frame));
+ /* decode chunks */
+ flx_decode_chunks (flxdec,
+ ((FlxFrameType *) chunk)->chunks,
+ GST_BUFFER_DATA (buf) + FlxFrameTypeSize,
+ GST_BUFFER_DATA (flxdec->frame));
- /* destroy input buffer */
- gst_buffer_unref (buf);
+ /* destroy input buffer */
+ gst_buffer_unref (buf);
- /* save copy of the current frame for possible delta. */
- memcpy (GST_BUFFER_DATA (flxdec->delta),
- GST_BUFFER_DATA (flxdec->frame), GST_BUFFER_SIZE (flxdec->delta));
+ /* save copy of the current frame for possible delta. */
+ memcpy (GST_BUFFER_DATA (flxdec->delta),
+ GST_BUFFER_DATA (flxdec->frame), GST_BUFFER_SIZE (flxdec->delta));
- /* convert current frame. */
- flx_colorspace_convert (flxdec->converter,
- GST_BUFFER_DATA (flxdec->frame), GST_BUFFER_DATA (out));
+ /* convert current frame. */
+ flx_colorspace_convert (flxdec->converter,
+ GST_BUFFER_DATA (flxdec->frame), GST_BUFFER_DATA (out));
- GST_BUFFER_TIMESTAMP (out) = flxdec->next_time;
- flxdec->next_time += flxdec->frame_time;
+ GST_BUFFER_TIMESTAMP (out) = flxdec->next_time;
+ flxdec->next_time += flxdec->frame_time;
- gst_pad_push (flxdec->srcpad, GST_DATA (out));
+ gst_pad_push (flxdec->srcpad, GST_DATA (out));
- break;
+ break;
}
/* destroy header buffer */
diff --git a/gst/goom/filters.c b/gst/goom/filters.c
index 14bd7ec6..9fadf2f6 100644
--- a/gst/goom/filters.c
+++ b/gst/goom/filters.c
@@ -55,8 +55,8 @@ unsigned int ppcsize4;
#endif /* PowerPC */
unsigned int *coeffs = 0, *freecoeffs = 0;
-guint32 *expix1 = 0; /* pointeur exporte vers p1 */
-guint32 *expix2 = 0; /* pointeur exporte vers p2 */
+guint32 *expix1 = 0; /* pointeur exporte vers p1 */
+guint32 *expix2 = 0; /* pointeur exporte vers p2 */
guint32 zoom_width;
#endif /* ASM */
@@ -141,33 +141,33 @@ calculatePXandPY (int x, int y, int *px, int *py)
switch (theMode) {
case WAVE_MODE:
- dist =
- ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
- 9) * ShiftRight (vy, 9);
- fvitesse *=
- 1024 +
- ShiftRight (sintable[(unsigned short) (0xffff * dist *
- EFFECT_DISTORS)], 6);
- fvitesse /= 1024;
- break;
+ dist =
+ ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
+ 9) * ShiftRight (vy, 9);
+ fvitesse *=
+ 1024 +
+ ShiftRight (sintable[(unsigned short) (0xffff * dist *
+ EFFECT_DISTORS)], 6);
+ fvitesse /= 1024;
+ break;
case CRYSTAL_BALL_MODE:
- dist =
- ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
- 9) * ShiftRight (vy, 9);
- fvitesse += (dist * EFFECT_DISTORS >> 10);
- break;
+ dist =
+ ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
+ 9) * ShiftRight (vy, 9);
+ fvitesse += (dist * EFFECT_DISTORS >> 10);
+ break;
case AMULETTE_MODE:
- dist =
- ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
- 9) * ShiftRight (vy, 9);
- fvitesse -= (dist * EFFECT_DISTORS >> 4);
- break;
+ dist =
+ ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
+ 9) * ShiftRight (vy, 9);
+ fvitesse -= (dist * EFFECT_DISTORS >> 4);
+ break;
case SCRUNCH_MODE:
- dist =
- ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
- 9) * ShiftRight (vy, 9);
- fvitesse -= (dist * EFFECT_DISTORS >> 9);
- break;
+ dist =
+ ShiftRight (vx, 9) * ShiftRight (vx, 9) + ShiftRight (vy,
+ 9) * ShiftRight (vy, 9);
+ fvitesse -= (dist * EFFECT_DISTORS >> 9);
+ break;
}
if (vx < 0)
*px = (middleX << 4) - (-(vx * fvitesse) >> 16);
@@ -285,7 +285,7 @@ zoomFilterFastRGB (Uint * pix1,
{
static guint32 prevX = 0, prevY = 0;
- static char reverse = 0; /*vitesse inversé..(zoom out) */
+ static char reverse = 0; /*vitesse inversé..(zoom out) */
/* static int perte = 100; // 100 = normal */
static unsigned char pertedec = 8;
@@ -361,7 +361,7 @@ zoomFilterFastRGB (Uint * pix1,
firstTime = 0;
#ifdef USE_ASM
freecoeffs = (unsigned int *)
- malloc (resx * resy * 2 * sizeof (unsigned int) + 128);
+ malloc (resx * resy * 2 * sizeof (unsigned int) + 128);
coeffs = (guint32 *) ((1 + ((unsigned int) (freecoeffs)) / 128) * 128);
#else
@@ -372,49 +372,49 @@ zoomFilterFastRGB (Uint * pix1,
c4 = (unsigned int *) malloc (resx * resy * sizeof (unsigned int));
#endif
for (us = 0; us < 0xffff; us++) {
- sintable[us] = (int) (1024.0f * sin (us * 2 * 3.31415f / 0xffff));
+ sintable[us] = (int) (1024.0f * sin (us * 2 * 3.31415f / 0xffff));
}
{
- int loopv;
- firedec = (int *) malloc (prevY * sizeof (int));
- for (loopv = prevY; loopv != 0;) {
- static int decc = 0;
- static int spdc = 0;
- static int accel = 0;
-
- loopv--;
- firedec[loopv] = decc;
- decc += spdc / 10;
- spdc += RAND () % 3;
- spdc -= RAND () % 3;
-
- if (decc > 4)
- spdc -= 1;
- if (decc < -4)
- spdc += 1;
-
- if (spdc > 30)
- spdc = spdc - RAND () % 3 + accel / 10;
- if (spdc < -30)
- spdc = spdc + RAND () % 3 + accel / 10;
-
- if (decc > 8 && spdc > 1)
- spdc -= RAND () % 3 - 2;
-
- if (decc < -8 && spdc < -1)
- spdc += RAND () % 3 + 2;
-
- if (decc > 8 || decc < -8)
- decc = decc * 8 / 9;
-
- accel += RAND () % 2;
- accel -= RAND () % 2;
- if (accel > 20)
- accel -= 2;
- if (accel < -20)
- accel += 2;
- }
+ int loopv;
+ firedec = (int *) malloc (prevY * sizeof (int));
+ for (loopv = prevY; loopv != 0;) {
+ static int decc = 0;
+ static int spdc = 0;
+ static int accel = 0;
+
+ loopv--;
+ firedec[loopv] = decc;
+ decc += spdc / 10;
+ spdc += RAND () % 3;
+ spdc -= RAND () % 3;
+
+ if (decc > 4)
+ spdc -= 1;
+ if (decc < -4)
+ spdc += 1;
+
+ if (spdc > 30)
+ spdc = spdc - RAND () % 3 + accel / 10;
+ if (spdc < -30)
+ spdc = spdc + RAND () % 3 + accel / 10;
+
+ if (decc > 8 && spdc > 1)
+ spdc -= RAND () % 3 - 2;
+
+ if (decc < -8 && spdc < -1)
+ spdc += RAND () % 3 + 2;
+
+ if (decc > 8 || decc < -8)
+ decc = decc * 8 / 9;
+
+ accel += RAND () % 2;
+ accel -= RAND () % 2;
+ if (accel > 20)
+ accel -= 2;
+ if (accel < -20)
+ accel += 2;
+ }
}
}
@@ -422,67 +422,67 @@ zoomFilterFastRGB (Uint * pix1,
/* generation du buffer */
for (y = 0; y < prevY; y++)
for (x = 0; x < prevX; x++) {
- int px, py;
- unsigned char coefv, coefh;
-
- /* calculer px et py en fonction de */
- /* x,y,middleX,middleY et theMode */
- calculatePXandPY (x, y, &px, &py);
- if ((px == x << 4) && (py == y << 4))
- py += 8;
-
- if ((py < 0) || (px < 0) ||
- (py >= (prevY - 1) * sqrtperte) ||
- (px >= (prevX - 1) * sqrtperte)) {
+ int px, py;
+ unsigned char coefv, coefh;
+
+ /* calculer px et py en fonction de */
+ /* x,y,middleX,middleY et theMode */
+ calculatePXandPY (x, y, &px, &py);
+ if ((px == x << 4) && (py == y << 4))
+ py += 8;
+
+ if ((py < 0) || (px < 0) ||
+ (py >= (prevY - 1) * sqrtperte) ||
+ (px >= (prevX - 1) * sqrtperte)) {
#ifdef USE_ASM
- coeffs[(y * prevX + x) * 2] = 0;
- coeffs[(y * prevX + x) * 2 + 1] = 0;
+ coeffs[(y * prevX + x) * 2] = 0;
+ coeffs[(y * prevX + x) * 2 + 1] = 0;
#else
- pos10[y * prevX + x] = 0;
- c1[y * prevX + x] = 0;
- c2[y * prevX + x] = 0;
- c3[y * prevX + x] = 0;
- c4[y * prevX + x] = 0;
+ pos10[y * prevX + x] = 0;
+ c1[y * prevX + x] = 0;
+ c2[y * prevX + x] = 0;
+ c3[y * prevX + x] = 0;
+ c4[y * prevX + x] = 0;
#endif
- } else {
- int npx10;
- int npy10;
- int pos;
+ } else {
+ int npx10;
+ int npy10;
+ int pos;
- npx10 = (px / sqrtperte);
- npy10 = (py / sqrtperte);
+ npx10 = (px / sqrtperte);
+ npy10 = (py / sqrtperte);
/* if (npx10 >= prevX) fprintf(stderr,"error npx:%d",npx10);
if (npy10 >= prevY) fprintf(stderr,"error npy:%d",npy10);
*/
- coefh = px % sqrtperte;
- coefv = py % sqrtperte;
+ coefh = px % sqrtperte;
+ coefv = py % sqrtperte;
#ifdef USE_ASM
- pos = (y * prevX + x) * 2;
- coeffs[pos] = (npx10 + prevX * npy10) * 4;
+ pos = (y * prevX + x) * 2;
+ coeffs[pos] = (npx10 + prevX * npy10) * 4;
- if (!(coefh || coefv))
- coeffs[pos + 1] = (sqrtperte * sqrtperte - 1);
- else
- coeffs[pos + 1] = ((sqrtperte - coefh) * (sqrtperte - coefv));
+ if (!(coefh || coefv))
+ coeffs[pos + 1] = (sqrtperte * sqrtperte - 1);
+ else
+ coeffs[pos + 1] = ((sqrtperte - coefh) * (sqrtperte - coefv));
- coeffs[pos + 1] |= (coefh * (sqrtperte - coefv)) << 8;
- coeffs[pos + 1] |= ((sqrtperte - coefh) * coefv) << 16;
- coeffs[pos + 1] |= (coefh * coefv) << 24;
+ coeffs[pos + 1] |= (coefh * (sqrtperte - coefv)) << 8;
+ coeffs[pos + 1] |= ((sqrtperte - coefh) * coefv) << 16;
+ coeffs[pos + 1] |= (coefh * coefv) << 24;
#else
- pos = y * prevX + x;
- pos10[pos] = npx10 + prevX * npy10;
+ pos = y * prevX + x;
+ pos10[pos] = npx10 + prevX * npy10;
- if (!(coefh || coefv))
- c1[pos] = sqrtperte * sqrtperte - 1;
- else
- c1[pos] = (sqrtperte - coefh) * (sqrtperte - coefv);
+ if (!(coefh || coefv))
+ c1[pos] = sqrtperte * sqrtperte - 1;
+ else
+ c1[pos] = (sqrtperte - coefh) * (sqrtperte - coefv);
- c2[pos] = coefh * (sqrtperte - coefv);
- c3[pos] = (sqrtperte - coefh) * coefv;
- c4[pos] = coefh * coefv;
+ c2[pos] = coefh * (sqrtperte - coefv);
+ c3[pos] = (sqrtperte - coefh) * coefv;
+ c4[pos] = coefh * coefv;
#endif
- }
+ }
}
}
#ifdef USE_ASM
@@ -511,21 +511,21 @@ zoomFilterFastRGB (Uint * pix1,
getPixelRGB_ (pix1, pos10[position] + prevX + 1, &col4);
couleur.r = col1.r * c1[position]
- + col2.r * c2[position]
- + col3.r * c3[position]
- + col4.r * c4[position];
+ + col2.r * c2[position]
+ + col3.r * c3[position]
+ + col4.r * c4[position];
couleur.r >>= pertedec;
couleur.v = col1.v * c1[position]
- + col2.v * c2[position]
- + col3.v * c3[position]
- + col4.v * c4[position];
+ + col2.v * c2[position]
+ + col3.v * c3[position]
+ + col4.v * c4[position];
couleur.v >>= pertedec;
couleur.b = col1.b * c1[position]
- + col2.b * c2[position]
- + col3.b * c3[position]
- + col4.b * c4[position];
+ + col2.b * c2[position]
+ + col3.b * c3[position]
+ + col4.b * c4[position];
couleur.b >>= pertedec;
setPixelRGB_ (pix2, position, couleur);
diff --git a/gst/goom/goom_core.c b/gst/goom/goom_core.c
index 5c4a75a3..644ff0a6 100644
--- a/gst/goom/goom_core.c
+++ b/gst/goom/goom_core.c
@@ -67,21 +67,21 @@ goom_set_resolution (guint32 resx, guint32 resy)
guint32 *
goom_update (gint16 data[2][512])
{
- static int lockvar = 0; /* pour empecher de nouveaux changements */
- static int goomvar = 0; /* boucle des gooms */
- static int totalgoom = 0; /* nombre de gooms par seconds */
- static int agoom = 0; /* un goom a eu lieu.. */
- static int loopvar = 0; /* mouvement des points */
- static int speedvar = 0; /* vitesse des particules */
- static int lineMode = 0; /* l'effet lineaire a dessiner */
+ static int lockvar = 0; /* pour empecher de nouveaux changements */
+ static int goomvar = 0; /* boucle des gooms */
+ static int totalgoom = 0; /* nombre de gooms par seconds */
+ static int agoom = 0; /* un goom a eu lieu.. */
+ static int loopvar = 0; /* mouvement des points */
+ static int speedvar = 0; /* vitesse des particules */
+ static int lineMode = 0; /* l'effet lineaire a dessiner */
guint32 *return_val;
guint32 pointWidth;
guint32 pointHeight;
- int incvar; /* volume du son */
- int accelvar; /* acceleration des particules */
+ int incvar; /* volume du son */
+ int accelvar; /* acceleration des particules */
int i;
- float largfactor; /* elargissement de l'intervalle d'évolution des points */
- static char goomlimit = 2; /* sensibilité du goom */
+ float largfactor; /* elargissement de l'intervalle d'évolution des points */
+ static char goomlimit = 2; /* sensibilité du goom */
static ZoomFilterData zfd = {
128, 8, 16,
1, 1, 0, WAVE_MODE,
@@ -128,26 +128,26 @@ goom_update (gint16 data[2][512])
loopvar += speedvar + 1;
pointFilter (p1,
- YELLOW,
- ((pointWidth - 6.0f) * largfactor + 5.0f),
- ((pointHeight - 6.0f) * largfactor + 5.0f),
- i * 152.0f, 128.0f, loopvar + i * 2032);
+ YELLOW,
+ ((pointWidth - 6.0f) * largfactor + 5.0f),
+ ((pointHeight - 6.0f) * largfactor + 5.0f),
+ i * 152.0f, 128.0f, loopvar + i * 2032);
pointFilter (p1, ORANGE,
- ((pointWidth / 2) * largfactor) / i + 10.0f * i,
- ((pointHeight / 2) * largfactor) / i + 10.0f * i,
- 96.0f, i * 80.0f, loopvar / i);
+ ((pointWidth / 2) * largfactor) / i + 10.0f * i,
+ ((pointHeight / 2) * largfactor) / i + 10.0f * i,
+ 96.0f, i * 80.0f, loopvar / i);
pointFilter (p1, VIOLET,
- ((pointHeight / 3 + 5.0f) * largfactor) / i + 10.0f * i,
- ((pointHeight / 3 + 5.0f) * largfactor) / i + 10.0f * i,
- i + 122.0f, 134.0f, loopvar / i);
+ ((pointHeight / 3 + 5.0f) * largfactor) / i + 10.0f * i,
+ ((pointHeight / 3 + 5.0f) * largfactor) / i + 10.0f * i,
+ i + 122.0f, 134.0f, loopvar / i);
pointFilter (p1, BLACK,
- ((pointHeight / 3) * largfactor + 20.0f),
- ((pointHeight / 3) * largfactor + 20.0f),
- 58.0f, i * 66.0f, loopvar / i);
+ ((pointHeight / 3) * largfactor + 20.0f),
+ ((pointHeight / 3) * largfactor + 20.0f),
+ 58.0f, i * 66.0f, loopvar / i);
pointFilter (p1, WHITE,
- (pointHeight * largfactor + 10.0f * i) / i,
- (pointHeight * largfactor + 10.0f * i) / i,
- 66.0f, 74.0f, loopvar + i * 500);
+ (pointHeight * largfactor + 10.0f * i) / i,
+ (pointHeight * largfactor + 10.0f * i) / i,
+ 66.0f, 74.0f, loopvar + i * 500);
}
/* par défaut pas de changement de zoom */
@@ -167,33 +167,33 @@ goom_update (gint16 data[2][512])
if ((accelvar > goomlimit) || (accelvar < -goomlimit)) {
/* UN GOOM !!! YAHOO ! */
totalgoom++;
- agoom = 20; /* mais pdt 20 cycles, il n'y en aura plus. */
- lineMode = (lineMode + 1) % 20; /* Tous les 10 gooms on change de mode lineaire */
+ agoom = 20; /* mais pdt 20 cycles, il n'y en aura plus. */
+ lineMode = (lineMode + 1) % 20; /* Tous les 10 gooms on change de mode lineaire */
/* changement eventuel de mode */
switch (iRAND (10)) {
case 0:
case 1:
case 2:
- zfd.mode = WAVE_MODE;
- zfd.vitesse = STOP_SPEED - 1;
- zfd.reverse = 0;
- break;
+ zfd.mode = WAVE_MODE;
+ zfd.vitesse = STOP_SPEED - 1;
+ zfd.reverse = 0;
+ break;
case 3:
case 4:
- zfd.mode = CRYSTAL_BALL_MODE;
- break;
+ zfd.mode = CRYSTAL_BALL_MODE;
+ break;
case 5:
- zfd.mode = AMULETTE_MODE;
- break;
+ zfd.mode = AMULETTE_MODE;
+ break;
case 6:
- zfd.mode = WATER_MODE;
- break;
+ zfd.mode = WATER_MODE;
+ break;
case 7:
- zfd.mode = SCRUNCH_MODE;
- break;
+ zfd.mode = SCRUNCH_MODE;
+ break;
default:
- zfd.mode = NORMAL_MODE;
+ zfd.mode = NORMAL_MODE;
}
}
@@ -205,113 +205,113 @@ goom_update (gint16 data[2][512])
goomvar++;
/*if (goomvar % 1 == 0) */
{
- guint32 vtmp;
- guint32 newvit;
-
- newvit = STOP_SPEED - speedvar / 2;
- /* retablir le zoom avant.. */
- if ((zfd.reverse) && (!(cycle % 12)) && (rand () % 3 == 0)) {
- zfd.reverse = 0;
- zfd.vitesse = STOP_SPEED - 2;
- lockvar = 50;
- }
- if (iRAND (10) == 0) {
- zfd.reverse = 1;
- lockvar = 100;
- }
-
- /* changement de milieu.. */
- switch (iRAND (20)) {
- case 0:
- zfd.middleY = resoly - 1;
- zfd.middleX = resolx / 2;
- break;
- case 1:
- zfd.middleX = resolx - 1;
- break;
- case 2:
- zfd.middleX = 1;
- break;
- default:
- zfd.middleY = resoly / 2;
- zfd.middleX = resolx / 2;
- }
-
- if (zfd.mode == WATER_MODE) {
- zfd.middleX = resolx / 2;
- zfd.middleY = resoly / 2;
- }
-
- switch (vtmp = (iRAND (27))) {
- case 0:
- zfd.vPlaneEffect = iRAND (3);
- zfd.vPlaneEffect -= iRAND (3);
- zfd.hPlaneEffect = iRAND (3);
- zfd.hPlaneEffect -= iRAND (3);
- break;
- case 3:
- zfd.vPlaneEffect = 0;
- zfd.hPlaneEffect = iRAND (8);
- zfd.hPlaneEffect -= iRAND (8);
- break;
- case 4:
- case 5:
- case 6:
- case 7:
- zfd.vPlaneEffect = iRAND (5);
- zfd.vPlaneEffect -= iRAND (5);
- zfd.hPlaneEffect = -zfd.vPlaneEffect;
- break;
- case 8:
- zfd.hPlaneEffect = 5 + iRAND (8);
- zfd.vPlaneEffect = -zfd.hPlaneEffect;
- break;
- case 9:
- zfd.vPlaneEffect = 5 + iRAND (8);
- zfd.hPlaneEffect = -zfd.hPlaneEffect;
- break;
- case 13:
- zfd.hPlaneEffect = 0;
- zfd.vPlaneEffect = iRAND (10);
- zfd.vPlaneEffect -= iRAND (10);
- break;
- default:
- if (vtmp < 10) {
- zfd.vPlaneEffect = 0;
- zfd.hPlaneEffect = 0;
- }
- }
-
- if (iRAND (3) != 0)
- zfd.noisify = 0;
- else {
- zfd.noisify = iRAND (3) + 2;
- lockvar *= 3;
- }
-
- if (zfd.mode == AMULETTE_MODE) {
- zfd.vPlaneEffect = 0;
- zfd.hPlaneEffect = 0;
- zfd.noisify = 0;
- }
-
- if ((zfd.middleX == 1) || (zfd.middleX == resolx - 1)) {
- zfd.vPlaneEffect = 0;
- zfd.hPlaneEffect = iRAND (2) ? 0 : zfd.hPlaneEffect;
- }
-
- if (newvit < zfd.vitesse) { /* on accelere */
- pzfd = &zfd;
- if (((newvit < STOP_SPEED - 7) &&
- (zfd.vitesse < STOP_SPEED - 6) &&
- (cycle % 3 == 0)) || (iRAND (40) == 0)) {
- zfd.vitesse = STOP_SPEED - 1;
- zfd.reverse = !zfd.reverse;
- } else {
- zfd.vitesse = (newvit + zfd.vitesse * 4) / 5;
- }
- lockvar += 50;
- }
+ guint32 vtmp;
+ guint32 newvit;
+
+ newvit = STOP_SPEED - speedvar / 2;
+ /* retablir le zoom avant.. */
+ if ((zfd.reverse) && (!(cycle % 12)) && (rand () % 3 == 0)) {
+ zfd.reverse = 0;
+ zfd.vitesse = STOP_SPEED - 2;
+ lockvar = 50;
+ }
+ if (iRAND (10) == 0) {
+ zfd.reverse = 1;
+ lockvar = 100;
+ }
+
+ /* changement de milieu.. */
+ switch (iRAND (20)) {
+ case 0:
+ zfd.middleY = resoly - 1;
+ zfd.middleX = resolx / 2;
+ break;
+ case 1:
+ zfd.middleX = resolx - 1;
+ break;
+ case 2:
+ zfd.middleX = 1;
+ break;
+ default:
+ zfd.middleY = resoly / 2;
+ zfd.middleX = resolx / 2;
+ }
+
+ if (zfd.mode == WATER_MODE) {
+ zfd.middleX = resolx / 2;
+ zfd.middleY = resoly / 2;
+ }
+
+ switch (vtmp = (iRAND (27))) {
+ case 0:
+ zfd.vPlaneEffect = iRAND (3);
+ zfd.vPlaneEffect -= iRAND (3);
+ zfd.hPlaneEffect = iRAND (3);
+ zfd.hPlaneEffect -= iRAND (3);
+ break;
+ case 3:
+ zfd.vPlaneEffect = 0;
+ zfd.hPlaneEffect = iRAND (8);
+ zfd.hPlaneEffect -= iRAND (8);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ zfd.vPlaneEffect = iRAND (5);
+ zfd.vPlaneEffect -= iRAND (5);
+ zfd.hPlaneEffect = -zfd.vPlaneEffect;
+ break;
+ case 8:
+ zfd.hPlaneEffect = 5 + iRAND (8);
+ zfd.vPlaneEffect = -zfd.hPlaneEffect;
+ break;
+ case 9:
+ zfd.vPlaneEffect = 5 + iRAND (8);
+ zfd.hPlaneEffect = -zfd.hPlaneEffect;
+ break;
+ case 13:
+ zfd.hPlaneEffect = 0;
+ zfd.vPlaneEffect = iRAND (10);
+ zfd.vPlaneEffect -= iRAND (10);
+ break;
+ default:
+ if (vtmp < 10) {
+ zfd.vPlaneEffect = 0;
+ zfd.hPlaneEffect = 0;
+ }
+ }
+
+ if (iRAND (3) != 0)
+ zfd.noisify = 0;
+ else {
+ zfd.noisify = iRAND (3) + 2;
+ lockvar *= 3;
+ }
+
+ if (zfd.mode == AMULETTE_MODE) {
+ zfd.vPlaneEffect = 0;
+ zfd.hPlaneEffect = 0;
+ zfd.noisify = 0;
+ }
+
+ if ((zfd.middleX == 1) || (zfd.middleX == resolx - 1)) {
+ zfd.vPlaneEffect = 0;
+ zfd.hPlaneEffect = iRAND (2) ? 0 : zfd.hPlaneEffect;
+ }
+
+ if (newvit < zfd.vitesse) { /* on accelere */
+ pzfd = &zfd;
+ if (((newvit < STOP_SPEED - 7) &&
+ (zfd.vitesse < STOP_SPEED - 6) &&
+ (cycle % 3 == 0)) || (iRAND (40) == 0)) {
+ zfd.vitesse = STOP_SPEED - 1;
+ zfd.reverse = !zfd.reverse;
+ } else {
+ zfd.vitesse = (newvit + zfd.vitesse * 4) / 5;
+ }
+ lockvar += 50;
+ }
}
}
/* mode mega-lent */
@@ -370,9 +370,9 @@ goom_update (gint16 data[2][512])
/* si on est dans un goom : afficher les lignes... */
if (agoom > 15)
goom_lines
- (data, ((zfd.middleX == resolx / 2) && (zfd.middleY == resoly / 2)
- && (zfd.mode != WATER_MODE))
- ? (lineMode / 10) : 0, p2, agoom - 15);
+ (data, ((zfd.middleX == resolx / 2) && (zfd.middleY == resoly / 2)
+ && (zfd.mode != WATER_MODE))
+ ? (lineMode / 10) : 0, p2, agoom - 15);
return_val = p2;
tmp = p1;
@@ -390,7 +390,7 @@ goom_update (gint16 data[2][512])
goomlimit++;
} else {
if ((totalgoom == 0) && (goomlimit > 1))
- goomlimit--;
+ goomlimit--;
}
totalgoom = 0;
}
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index b5ad63a5..a4716c99 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -88,15 +88,15 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB_HOST_ENDIAN)
);
-static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", /* the name of the pads */
- GST_PAD_SINK, /* type of the pad */
- GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
+static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", /* the name of the pads */
+ GST_PAD_SINK, /* type of the pad */
+ GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) TRUE, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 8000, 96000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) TRUE, "
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "rate = (int) [ 8000, 96000 ], " "channels = (int) [ 1, 2 ]")
);
@@ -134,6 +134,7 @@ gst_goom_get_type (void)
0,
(GInstanceInitFunc) gst_goom_init,
};
+
type = g_type_register_static (GST_TYPE_ELEMENT, "GstGOOM", &info, 0);
}
return type;
@@ -190,7 +191,7 @@ gst_goom_init (GstGOOM * goom)
goom->width = 320;
goom->height = 200;
- goom->fps = 25.; /* desired frame rate */
+ goom->fps = 25.; /* desired frame rate */
goom->channels = 0;
/* set to something */
goom_init (50, 50);
@@ -258,7 +259,7 @@ gst_goom_src_fixate (GstPad * pad, const GstCaps * caps)
return newcaps;
}
if (gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
- 30.0)) {
+ 30.0)) {
return newcaps;
}
@@ -287,22 +288,22 @@ gst_goom_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
{
- gint64 value = 0;
+ gint64 value = 0;
- gst_event_discont_get_value (event, GST_FORMAT_TIME, &value);
+ gst_event_discont_get_value (event, GST_FORMAT_TIME, &value);
- goom->next_time = value;
+ goom->next_time = value;
}
default:
- gst_pad_event_default (pad, event);
- break;
+ gst_pad_event_default (pad, event);
+ break;
}
return;
}
if (goom->channels == 0) {
GST_ELEMENT_ERROR (goom, CORE, NEGOTIATION, (NULL),
- ("format wasn't negotiated before chain function"));
+ ("format wasn't negotiated before chain function"));
goto done;
}
diff --git a/gst/goom/lines.c b/gst/goom/lines.c
index 611f9a52..e497b5eb 100644
--- a/gst/goom/lines.c
+++ b/gst/goom/lines.c
@@ -35,14 +35,14 @@ goom_lines (gint16 data[2][512], unsigned int ID, unsigned int *p,
unsigned char *color = 1 + (unsigned char *) &color1;
switch (ID) {
- case 0: /* Horizontal stereo lines */
+ case 0: /* Horizontal stereo lines */
{
color1 = 0x0000AA00;
color2 = 0x00AA0000;
break;
}
- case 1: /* Stereo circles */
+ case 1: /* Stereo circles */
{
color1 = 0x00AA33DD;
color2 = 0x00AA33DD;
@@ -62,24 +62,24 @@ goom_lines (gint16 data[2][512], unsigned int ID, unsigned int *p,
*color = lighten (*color, power);
switch (ID) {
- case 0: /* Horizontal stereo lines */
+ case 0: /* Horizontal stereo lines */
{
unsigned int i;
for (i = 0; i < 512; i++) {
- guint32 plot;
+ guint32 plot;
- plot = i * resolx / 512 + (resoly / 4 + data[0][i] / 1600) * resolx;
- p[plot] = color1;
- p[plot + 1] = color1;
- plot = i * resolx / 512 + (resoly * 3 / 4 - data[1][i] / 1600) * resolx;
- p[plot] = color2;
- p[plot + 1] = color2;
+ plot = i * resolx / 512 + (resoly / 4 + data[0][i] / 1600) * resolx;
+ p[plot] = color1;
+ p[plot + 1] = color1;
+ plot = i * resolx / 512 + (resoly * 3 / 4 - data[1][i] / 1600) * resolx;
+ p[plot] = color2;
+ p[plot + 1] = color2;
}
break;
}
- case 1: /* Stereo circles */
+ case 1: /* Stereo circles */
{
float z;
unsigned int monX = resolx / 2;
@@ -87,19 +87,19 @@ goom_lines (gint16 data[2][512], unsigned int ID, unsigned int *p,
float monY2 = resoly / 2;
for (z = 0; z < 6.2832f; z += 1.0f / monY) {
- /* float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; */
- p[monX + (unsigned int) ((monY + ((float) resoly) * (128 +
- data[1][(unsigned int) (z * 81.33f)]) / 200000) *
- cos (z) + resolx * (unsigned int) (monY2 + (monY +
- ((float) resoly) * (128 +
- data[1][(unsigned int) (z * 81.33f)]) / 400000) *
- sin (z)))] = color1;
- p[monX + (unsigned int) ((monY - ((float) resoly) * (128 +
- data[0][(unsigned int) (z * 81.33f)]) / 200000) *
- cos (z) + resolx * (unsigned int) (monY2 + (monY -
- ((float) resoly) * (128 +
- data[0][(unsigned int) (z * 81.33f)]) / 400000) *
- sin (z)))] = color2;
+ /* float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; */
+ p[monX + (unsigned int) ((monY + ((float) resoly) * (128 +
+ data[1][(unsigned int) (z * 81.33f)]) / 200000) *
+ cos (z) + resolx * (unsigned int) (monY2 + (monY +
+ ((float) resoly) * (128 +
+ data[1][(unsigned int) (z * 81.33f)]) / 400000) *
+ sin (z)))] = color1;
+ p[monX + (unsigned int) ((monY - ((float) resoly) * (128 +
+ data[0][(unsigned int) (z * 81.33f)]) / 200000) *
+ cos (z) + resolx * (unsigned int) (monY2 + (monY -
+ ((float) resoly) * (128 +
+ data[0][(unsigned int) (z * 81.33f)]) / 400000) *
+ sin (z)))] = color2;
}
break;
}
diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c
index 4bae398e..2bf176c2 100644
--- a/gst/law/alaw-decode.c
+++ b/gst/law/alaw-decode.c
@@ -129,9 +129,10 @@ gst_alawdec_get_type (void)
0,
(GInstanceInitFunc) gst_alawdec_init,
};
+
alawdec_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstALawDec", &alawdec_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstALawDec", &alawdec_info,
+ 0);
}
return alawdec_type;
}
diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c
index 052f2e00..6a6708ab 100644
--- a/gst/law/alaw-encode.c
+++ b/gst/law/alaw-encode.c
@@ -171,9 +171,10 @@ gst_alawenc_get_type (void)
0,
(GInstanceInitFunc) gst_alawenc_init,
};
+
alawenc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstALawEnc", &alawenc_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstALawEnc", &alawenc_info,
+ 0);
}
return alawenc_type;
}
diff --git a/gst/law/alaw.c b/gst/law/alaw.c
index 05ac2d23..d85dd9aa 100644
--- a/gst/law/alaw.c
+++ b/gst/law/alaw.c
@@ -46,9 +46,9 @@ plugin_init (GstPlugin * plugin)
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, alaw_caps);
if (!gst_element_register (plugin, "alawenc",
- GST_RANK_NONE, GST_TYPE_ALAWENC) ||
+ GST_RANK_NONE, GST_TYPE_ALAWENC) ||
!gst_element_register (plugin, "alawdec",
- GST_RANK_PRIMARY, GST_TYPE_ALAWENC))
+ GST_RANK_PRIMARY, GST_TYPE_ALAWENC))
return FALSE;
return TRUE;
diff --git a/gst/law/mulaw-conversion.c b/gst/law/mulaw-conversion.c
index fa4db3cb..a05d7bdc 100644
--- a/gst/law/mulaw-conversion.c
+++ b/gst/law/mulaw-conversion.c
@@ -25,8 +25,8 @@
#include <glib.h>
-#define ZEROTRAP /* turn on the trap as per the MIL-STD */
-#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
+#define ZEROTRAP /* turn on the trap as per the MIL-STD */
+#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
#define CLIP 32635
void
@@ -56,11 +56,11 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples)
for (i = 0; i < numsamples; i++) {
sample = in[i];
/** get the sample into sign-magnitude **/
- sign = (sample >> 8) & 0x80; /* set aside the sign */
+ sign = (sample >> 8) & 0x80; /* set aside the sign */
if (sign != 0)
- sample = -sample; /* get magnitude */
+ sample = -sample; /* get magnitude */
if (sample > CLIP)
- sample = CLIP; /* clip the magnitude */
+ sample = CLIP; /* clip the magnitude */
/** convert from 16 bit linear to ulaw **/
sample = sample + BIAS;
exponent = exp_lut[(sample >> 7) & 0xFF];
@@ -68,7 +68,7 @@ mulaw_encode (gint16 * in, guint8 * out, gint numsamples)
ulawbyte = ~(sign | (exponent << 4) | mantissa);
#ifdef ZEROTRAP
if (ulawbyte == 0)
- ulawbyte = 0x02; /* optional CCITT trap */
+ ulawbyte = 0x02; /* optional CCITT trap */
#endif
out[i] = ulawbyte;
}
diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c
index 6a8f9e81..807dd280 100644
--- a/gst/law/mulaw-decode.c
+++ b/gst/law/mulaw-decode.c
@@ -106,9 +106,10 @@ gst_mulawdec_get_type (void)
0,
(GInstanceInitFunc) gst_mulawdec_init,
};
+
mulawdec_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstMuLawDec", &mulawdec_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstMuLawDec", &mulawdec_info,
+ 0);
}
return mulawdec_type;
}
diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c
index db65e169..0c002c5d 100644
--- a/gst/law/mulaw-encode.c
+++ b/gst/law/mulaw-encode.c
@@ -104,9 +104,10 @@ gst_mulawenc_get_type (void)
0,
(GInstanceInitFunc) gst_mulawenc_init,
};
+
mulawenc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstMuLawEnc", &mulawenc_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstMuLawEnc", &mulawenc_info,
+ 0);
}
return mulawenc_type;
}
diff --git a/gst/law/mulaw.c b/gst/law/mulaw.c
index 3702aaa6..7b7d222d 100644
--- a/gst/law/mulaw.c
+++ b/gst/law/mulaw.c
@@ -46,9 +46,9 @@ plugin_init (GstPlugin * plugin)
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, mulaw_caps);
if (!gst_element_register (plugin, "mulawenc",
- GST_RANK_NONE, GST_TYPE_MULAWENC) ||
+ GST_RANK_NONE, GST_TYPE_MULAWENC) ||
!gst_element_register (plugin, "mulawdec",
- GST_RANK_PRIMARY, GST_TYPE_MULAWDEC))
+ GST_RANK_PRIMARY, GST_TYPE_MULAWDEC))
return FALSE;
return TRUE;
diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c
index 9a822436..391863d0 100644
--- a/gst/level/gstlevel.c
+++ b/gst/level/gstlevel.c
@@ -98,8 +98,9 @@ gst_level_get_type (void)
sizeof (GstLevel), 0,
(GInstanceInitFunc) gst_level_init
};
+
level_type = g_type_register_static (GST_TYPE_ELEMENT, "GstLevel",
- &level_info, 0);
+ &level_info, 0);
}
return level_type;
}
@@ -160,8 +161,8 @@ gst_level_link (GstPad * pad, const GstCaps * caps)
for (i = 0; i < filter->channels; ++i) {
filter->CS[i] = filter->peak[i] = filter->last_peak[i] =
- filter->decay_peak[i] = filter->decay_peak_age[i] =
- filter->MS[i] = filter->RMS_dB[i] = 0.0;
+ filter->decay_peak[i] = filter->decay_peak_age[i] =
+ filter->MS[i] = filter->RMS_dB[i] = 0.0;
}
filter->inited = TRUE;
@@ -174,7 +175,7 @@ gst_level_fast_16bit_chain (gint16 * in, guint num, gint channels,
gint resolution, double *CS, double *peak)
#include "filter.func"
static void inline
- gst_level_fast_8bit_chain (gint8 * in, guint num, gint channels,
+ gst_level_fast_8bit_chain (gint8 * in, guint num, gint channels,
gint resolution, double *CS, double *peak)
#include "filter.func"
static void gst_level_chain (GstPad * pad, GstData * _data)
@@ -203,18 +204,18 @@ gst_level_fast_16bit_chain (gint16 * in, guint num, gint channels,
num_samples = GST_BUFFER_SIZE (buf) / (filter->width / 8);
if (num_samples % filter->channels != 0)
g_warning
- ("WARNING: level: programming error, data not properly interleaved");
+ ("WARNING: level: programming error, data not properly interleaved");
for (i = 0; i < filter->channels; ++i) {
switch (filter->width) {
case 16:
- gst_level_fast_16bit_chain (in_data + i, num_samples,
- filter->channels, filter->width - 1, &CS, &filter->peak[i]);
- break;
+ gst_level_fast_16bit_chain (in_data + i, num_samples,
+ filter->channels, filter->width - 1, &CS, &filter->peak[i]);
+ break;
case 8:
- gst_level_fast_8bit_chain (((gint8 *) in_data) + i, num_samples,
- filter->channels, filter->width - 1, &CS, &filter->peak[i]);
- break;
+ gst_level_fast_8bit_chain (((gint8 *) in_data) + i, num_samples,
+ filter->channels, filter->width - 1, &CS, &filter->peak[i]);
+ break;
}
/* g_print ("DEBUG: CS %f, peak %f\n", CS, filter->peak[i]); */
filter->CS[i] += CS;
@@ -240,20 +241,20 @@ gst_level_fast_16bit_chain (gint16 * in, guint num, gint channels,
} else {
/* make decay peak fall off if too old */
if (filter->decay_peak_age[i] > filter->rate * filter->decay_peak_ttl) {
- double falloff_dB;
- double falloff;
- double length; /* length of buffer in seconds */
+ double falloff_dB;
+ double falloff;
+ double length; /* length of buffer in seconds */
- length = (double) num_samples / (filter->channels * filter->rate);
- falloff_dB = filter->decay_peak_falloff * length;
- falloff = pow (10, falloff_dB / -20.0);
+ length = (double) num_samples / (filter->channels * filter->rate);
+ falloff_dB = filter->decay_peak_falloff * length;
+ falloff = pow (10, falloff_dB / -20.0);
- /* g_print ("falloff: length %f, dB falloff %f, falloff factor %e\n",
- length, falloff_dB, falloff); */
- filter->decay_peak[i] *= falloff;
- /* g_print ("peak is %f samples old, decayed with factor %e to %f\n",
- filter->decay_peak_age[i], falloff, filter->decay_peak[i]); */
+ /* g_print ("falloff: length %f, dB falloff %f, falloff factor %e\n",
+ length, falloff_dB, falloff); */
+ filter->decay_peak[i] *= falloff;
+ /* g_print ("peak is %f samples old, decayed with factor %e to %f\n",
+ filter->decay_peak_age[i], falloff, filter->decay_peak[i]); */
}
}
}
@@ -265,19 +266,19 @@ gst_level_fast_16bit_chain (gint16 * in, guint num, gint channels,
gdouble RMS, peak, endtime;
for (i = 0; i < filter->channels; ++i) {
- RMS = sqrt (filter->CS[i] / (filter->num_samples / filter->channels));
- peak = filter->last_peak[i];
- num_samples = GST_BUFFER_SIZE (buf) / (filter->width / 8);
- endtime = (double) GST_BUFFER_TIMESTAMP (buf) / GST_SECOND
- + (double) num_samples / (double) filter->rate;
-
- g_signal_emit (G_OBJECT (filter), gst_filter_signals[SIGNAL_LEVEL], 0,
- endtime, i,
- 20 * log10 (RMS), 20 * log10 (filter->last_peak[i]),
- 20 * log10 (filter->decay_peak[i]));
- /* we emitted, so reset cumulative and normal peak */
- filter->CS[i] = 0.0;
- filter->last_peak[i] = 0.0;
+ RMS = sqrt (filter->CS[i] / (filter->num_samples / filter->channels));
+ peak = filter->last_peak[i];
+ num_samples = GST_BUFFER_SIZE (buf) / (filter->width / 8);
+ endtime = (double) GST_BUFFER_TIMESTAMP (buf) / GST_SECOND
+ + (double) num_samples / (double) filter->rate;
+
+ g_signal_emit (G_OBJECT (filter), gst_filter_signals[SIGNAL_LEVEL], 0,
+ endtime, i,
+ 20 * log10 (RMS), 20 * log10 (filter->last_peak[i]),
+ 20 * log10 (filter->decay_peak[i]));
+ /* we emitted, so reset cumulative and normal peak */
+ filter->CS[i] = 0.0;
+ filter->last_peak[i] = 0.0;
}
}
filter->num_samples = 0;
@@ -292,7 +293,7 @@ gst_level_change_state (GstElement * element)
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_PAUSED_TO_PLAYING:
if (!filter->inited)
- return GST_STATE_FAILURE;
+ return GST_STATE_FAILURE;
break;
default:
break;
@@ -384,19 +385,19 @@ gst_level_class_init (GstLevelClass * klass)
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SIGNAL_LEVEL,
g_param_spec_boolean ("signal", "Signal",
- "Emit level signals for each interval", TRUE, G_PARAM_READWRITE));
+ "Emit level signals for each interval", TRUE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SIGNAL_INTERVAL,
g_param_spec_double ("interval", "Interval",
- "Interval between emissions (in seconds)",
- 0.01, 100.0, 0.1, G_PARAM_READWRITE));
+ "Interval between emissions (in seconds)",
+ 0.01, 100.0, 0.1, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PEAK_TTL,
g_param_spec_double ("peak_ttl", "Peak TTL",
- "Time To Live of decay peak before it falls back",
- 0, 100.0, 0.3, G_PARAM_READWRITE));
+ "Time To Live of decay peak before it falls back",
+ 0, 100.0, 0.3, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PEAK_FALLOFF,
g_param_spec_double ("peak_falloff", "Peak Falloff",
- "Decay rate of decay peak after TTL (in dB/sec)",
- 0.0, G_MAXDOUBLE, 10.0, G_PARAM_READWRITE));
+ "Decay rate of decay peak after TTL (in dB/sec)",
+ 0.0, G_MAXDOUBLE, 10.0, G_PARAM_READWRITE));
gobject_class->set_property = gst_level_set_property;
gobject_class->get_property = gst_level_get_property;
@@ -437,7 +438,7 @@ gst_level_init (GstLevel * filter)
filter->interval = 0.1;
filter->decay_peak_ttl = 0.4;
- filter->decay_peak_falloff = 10.0; /* dB falloff (/sec) */
+ filter->decay_peak_falloff = 10.0; /* dB falloff (/sec) */
}
static gboolean
diff --git a/gst/level/plot.c b/gst/level/plot.c
index ad6d70d7..187be8b1 100644
--- a/gst/level/plot.c
+++ b/gst/level/plot.c
@@ -28,10 +28,10 @@
#include <gst/gst.h>
#include <gtk/gtk.h>
-gboolean got_channel[2] = { FALSE, FALSE }; /* to see if we got the signal for this one yet */
-gint channels = 0; /* guess at how many channels there are */
-gdouble last_time = 0.0; /* time of last signal */
-gdouble values[2][3]; /* array of levels from which to print */
+gboolean got_channel[2] = { FALSE, FALSE }; /* to see if we got the signal for this one yet */
+gint channels = 0; /* guess at how many channels there are */
+gdouble last_time = 0.0; /* time of last signal */
+gdouble values[2][3]; /* array of levels from which to print */
static void
level_callback (GstElement * element, gdouble time, gint channel,
@@ -66,7 +66,7 @@ level_callback (GstElement * element, gdouble time, gint channel,
g_print ("%f ", time);
for (i = 0; i < channels; ++i)
for (j = 0; j < 3; ++j)
- g_print ("%f ", values[i][j]);
+ g_print ("%f ", values[i][j]);
g_print ("\n");
}
}
diff --git a/gst/matroska/ebml-read.c b/gst/matroska/ebml-read.c
index 6fa53565..064d5e1e 100644
--- a/gst/matroska/ebml-read.c
+++ b/gst/matroska/ebml-read.c
@@ -59,8 +59,8 @@ gst_ebml_read_get_type (void)
};
gst_ebml_read_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstEbmlRead",
- &gst_ebml_read_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstEbmlRead",
+ &gst_ebml_read_info, 0);
}
return gst_ebml_read_type;
@@ -92,16 +92,16 @@ gst_ebml_read_change_state (GstElement * element)
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_READY_TO_PAUSED:
if (!ebml->sinkpad)
- return GST_STATE_FAILURE;
+ return GST_STATE_FAILURE;
ebml->bs = gst_bytestream_new (ebml->sinkpad);
break;
case GST_STATE_PAUSED_TO_READY:
gst_bytestream_destroy (ebml->bs);
while (ebml->level) {
- GstEbmlLevel *level = ebml->level->data;
+ GstEbmlLevel *level = ebml->level->data;
- ebml->level = g_list_remove (ebml->level, level);
- g_free (level);
+ ebml->level = g_list_remove (ebml->level, level);
+ g_free (level);
}
break;
default:
@@ -167,7 +167,7 @@ gst_ebml_read_element_id (GstEbmlRead * ebml, guint32 * id, guint * level_up)
gst_event_unref (event);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
- ("Read error at position %llu (0x%llx)", pos, pos));
+ ("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
}
@@ -180,8 +180,8 @@ gst_ebml_read_element_id (GstEbmlRead * ebml, guint32 * id, guint * level_up)
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
- ("Invalid EBML ID size tag (0x%x) at position %llu (0x%llx)",
- data[0], pos, pos));
+ ("Invalid EBML ID size tag (0x%x) at position %llu (0x%llx)",
+ data[0], pos, pos));
return -1;
}
@@ -189,7 +189,7 @@ gst_ebml_read_element_id (GstEbmlRead * ebml, guint32 * id, guint * level_up)
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
- ("Read error at position %llu (0x%llx)", pos, pos));
+ ("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
while (n < read)
@@ -220,7 +220,7 @@ gst_ebml_read_element_length (GstEbmlRead * ebml, guint64 * length)
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
- ("Read error at position %llu (0x%llx)", pos, pos));
+ ("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
total = data[0];
@@ -232,8 +232,8 @@ gst_ebml_read_element_length (GstEbmlRead * ebml, guint64 * length)
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
- ("Invalid EBML length size tag (0x%x) at position %llu (0x%llx)",
- data[0], pos, pos));
+ ("Invalid EBML length size tag (0x%x) at position %llu (0x%llx)",
+ data[0], pos, pos));
return -1;
}
@@ -243,7 +243,7 @@ gst_ebml_read_element_length (GstEbmlRead * ebml, guint64 * length)
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
- ("Read error at position %llu (0x%llx)", pos, pos));
+ ("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
while (n < read) {
@@ -275,7 +275,7 @@ gst_ebml_read_element_data (GstEbmlRead * ebml, guint64 length)
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
- ("Read error at position %llu (0x%llx)", pos, pos));
+ ("Read error at position %llu (0x%llx)", pos, pos));
if (buf)
gst_buffer_unref (buf);
return NULL;
@@ -328,7 +328,7 @@ gst_ebml_read_seek (GstEbmlRead * ebml, guint64 offset)
/* now seek */
if (!gst_bytestream_seek (ebml->bs, offset, GST_SEEK_METHOD_SET)) {
GST_ELEMENT_ERROR (ebml, RESOURCE, SEEK, (NULL),
- ("Seek to position %llu (0x%llx) failed", offset, offset));
+ ("Seek to position %llu (0x%llx) failed", offset, offset));
return NULL;
}
@@ -385,7 +385,7 @@ gst_ebml_read_skip (GstEbmlRead * ebml)
return gst_bytestream_flush (ebml->bs, length);
if (!(event = gst_ebml_read_seek (ebml,
- gst_bytestream_tell (ebml->bs) + length)))
+ gst_bytestream_tell (ebml->bs) + length)))
return FALSE;
gst_event_unref (event);
@@ -432,8 +432,8 @@ gst_ebml_read_uint (GstEbmlRead * ebml, guint32 * id, guint64 * num)
size = GST_BUFFER_SIZE (buf);
if (size < 1 || size > 8) {
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
- ("Invalid integer element size %d at position %llu (0x%llu)",
- size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
+ ("Invalid integer element size %d at position %llu (0x%llu)",
+ size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
gst_buffer_unref (buf);
return FALSE;
}
@@ -466,8 +466,8 @@ gst_ebml_read_sint (GstEbmlRead * ebml, guint32 * id, gint64 * num)
size = GST_BUFFER_SIZE (buf);
if (size < 1 || size > 8) {
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
- ("Invalid integer element size %d at position %llu (0x%llx)",
- size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
+ ("Invalid integer element size %d at position %llu (0x%llx)",
+ size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
gst_buffer_unref (buf);
return FALSE;
}
@@ -509,15 +509,15 @@ gst_ebml_read_float (GstEbmlRead * ebml, guint32 * id, gdouble * num)
if (size != 4 && size != 8 && size != 10) {
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
- ("Invalid float element size %d at position %llu (0x%llx)",
- size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
+ ("Invalid float element size %d at position %llu (0x%llx)",
+ size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
gst_buffer_unref (buf);
return FALSE;
}
if (size == 10) {
GST_ELEMENT_ERROR (ebml, CORE, NOT_IMPLEMENTED, (NULL),
- ("FIXME! 10-byte floats unimplemented"));
+ ("FIXME! 10-byte floats unimplemented"));
gst_buffer_unref (buf);
return FALSE;
}
@@ -682,79 +682,79 @@ gst_ebml_read_header (GstEbmlRead * ebml, gchar ** doctype, guint * version)
break;
switch (id) {
- /* is our read version uptodate? */
+ /* is our read version uptodate? */
case GST_EBML_ID_EBMLREADVERSION:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num))
- return FALSE;
- g_assert (id == GST_EBML_ID_EBMLREADVERSION);
- if (num != GST_EBML_VERSION)
- return FALSE;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num))
+ return FALSE;
+ g_assert (id == GST_EBML_ID_EBMLREADVERSION);
+ if (num != GST_EBML_VERSION)
+ return FALSE;
+ break;
}
- /* we only handle 8 byte lengths at max */
+ /* we only handle 8 byte lengths at max */
case GST_EBML_ID_EBMLMAXSIZELENGTH:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num))
- return FALSE;
- g_assert (id == GST_EBML_ID_EBMLMAXSIZELENGTH);
- if (num != sizeof (guint64))
- return FALSE;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num))
+ return FALSE;
+ g_assert (id == GST_EBML_ID_EBMLMAXSIZELENGTH);
+ if (num != sizeof (guint64))
+ return FALSE;
+ break;
}
- /* we handle 4 byte IDs at max */
+ /* we handle 4 byte IDs at max */
case GST_EBML_ID_EBMLMAXIDLENGTH:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num))
- return FALSE;
- g_assert (id == GST_EBML_ID_EBMLMAXIDLENGTH);
- if (num != sizeof (guint32))
- return FALSE;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num))
+ return FALSE;
+ g_assert (id == GST_EBML_ID_EBMLMAXIDLENGTH);
+ if (num != sizeof (guint32))
+ return FALSE;
+ break;
}
case GST_EBML_ID_DOCTYPE:{
- gchar *text;
-
- if (!gst_ebml_read_ascii (ebml, &id, &text))
- return FALSE;
- g_assert (id == GST_EBML_ID_DOCTYPE);
- if (doctype) {
- if (doctype)
- g_free (*doctype);
- *doctype = text;
- } else
- g_free (text);
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_ascii (ebml, &id, &text))
+ return FALSE;
+ g_assert (id == GST_EBML_ID_DOCTYPE);
+ if (doctype) {
+ if (doctype)
+ g_free (*doctype);
+ *doctype = text;
+ } else
+ g_free (text);
+ break;
}
case GST_EBML_ID_DOCTYPEREADVERSION:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num))
- return FALSE;
- g_assert (id == GST_EBML_ID_DOCTYPEREADVERSION);
- if (version)
- *version = num;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num))
+ return FALSE;
+ g_assert (id == GST_EBML_ID_DOCTYPEREADVERSION);
+ if (version)
+ *version = num;
+ break;
}
default:
- GST_WARNING ("Unknown data type 0x%x in EBML header (ignored)", id);
- /* pass-through */
+ GST_WARNING ("Unknown data type 0x%x in EBML header (ignored)", id);
+ /* pass-through */
- /* we ignore these two, as they don't tell us anything we care about */
+ /* we ignore these two, as they don't tell us anything we care about */
case GST_EBML_ID_VOID:
case GST_EBML_ID_EBMLVERSION:
case GST_EBML_ID_DOCTYPEVERSION:
- if (!gst_ebml_read_skip (ebml))
- return FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ return FALSE;
+ break;
}
}
diff --git a/gst/matroska/ebml-write.c b/gst/matroska/ebml-write.c
index d136a8d4..302d4898 100644
--- a/gst/matroska/ebml-write.c
+++ b/gst/matroska/ebml-write.c
@@ -59,8 +59,8 @@ gst_ebml_write_get_type (void)
};
gst_ebml_write_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstEbmlWrite",
- &gst_ebml_write_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstEbmlWrite",
+ &gst_ebml_write_info, 0);
}
return gst_ebml_write_type;
@@ -292,13 +292,13 @@ gst_ebml_write_seek (GstEbmlWrite * ebml, guint64 pos)
if (ebml->cache) {
/* within bounds? */
if (pos >= GST_BUFFER_OFFSET (ebml->cache) &&
- pos <
- GST_BUFFER_OFFSET (ebml->cache) + GST_BUFFER_MAXSIZE (ebml->cache)) {
+ pos <
+ GST_BUFFER_OFFSET (ebml->cache) + GST_BUFFER_MAXSIZE (ebml->cache)) {
GST_BUFFER_SIZE (ebml->cache) = pos - GST_BUFFER_OFFSET (ebml->cache);
if (ebml->pos > pos)
- ebml->handled -= ebml->pos - pos;
+ ebml->handled -= ebml->pos - pos;
else
- ebml->handled += pos - ebml->pos;
+ ebml->handled += pos - ebml->pos;
ebml->pos = pos;
} else {
GST_LOG ("Seek outside cache range. Clearing...");
@@ -414,7 +414,7 @@ gst_ebml_write_float (GstEbmlWrite * ebml, guint32 id, gdouble num)
void
gst_ebml_write_ascii (GstEbmlWrite * ebml, guint32 id, const gchar * str)
{
- gint len = strlen (str) + 1; /* add trailing '\0' */
+ gint len = strlen (str) + 1; /* add trailing '\0' */
GstBuffer *buf = gst_ebml_write_element_new (ebml, len);
gst_ebml_write_element_id (buf, id);
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 383ec020..f0acf6f9 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -125,8 +125,8 @@ gst_matroska_demux_get_type (void)
};
gst_matroska_demux_type =
- g_type_register_static (GST_TYPE_EBML_READ,
- "GstMatroskaDemux", &gst_matroska_demux_info, 0);
+ g_type_register_static (GST_TYPE_EBML_READ,
+ "GstMatroskaDemux", &gst_matroska_demux_info, 0);
}
return gst_matroska_demux_type;
@@ -162,10 +162,10 @@ gst_matroska_demux_class_init (GstMatroskaDemuxClass * klass)
g_object_class_install_property (gobject_class, ARG_METADATA,
g_param_spec_boxed ("metadata", "Metadata", "Metadata",
- GST_TYPE_STRUCTURE, G_PARAM_READABLE));
+ GST_TYPE_STRUCTURE, G_PARAM_READABLE));
g_object_class_install_property (gobject_class, ARG_STREAMINFO,
g_param_spec_boxed ("streaminfo", "Streaminfo", "Streaminfo",
- GST_TYPE_STRUCTURE, G_PARAM_READABLE));
+ GST_TYPE_STRUCTURE, G_PARAM_READABLE));
parent_class = g_type_class_ref (GST_TYPE_EBML_READ);
@@ -186,7 +186,7 @@ gst_matroska_demux_init (GstMatroskaDemux * demux)
demux->sinkpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
- "sink"), "sink");
+ "sink"), "sink");
gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
GST_EBML_READ (demux)->sinkpad = demux->sinkpad;
@@ -217,7 +217,7 @@ gst_matroska_demux_reset (GstElement * element)
for (i = 0; i < GST_MATROSKA_DEMUX_MAX_STREAMS; i++) {
if (demux->src[i] != NULL) {
if (demux->src[i]->pad != NULL) {
- gst_element_remove_pad (GST_ELEMENT (demux), demux->src[i]->pad);
+ gst_element_remove_pad (GST_ELEMENT (demux), demux->src[i]->pad);
}
g_free (demux->src[i]->codec_id);
g_free (demux->src[i]->codec_name);
@@ -316,8 +316,8 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
if (demux->num_streams >= GST_MATROSKA_DEMUX_MAX_STREAMS) {
GST_WARNING ("Maximum number of streams (%d) exceeded, skipping",
- GST_MATROSKA_DEMUX_MAX_STREAMS);
- return gst_ebml_read_skip (ebml); /* skip-and-continue */
+ GST_MATROSKA_DEMUX_MAX_STREAMS);
+ return gst_ebml_read_skip (ebml); /* skip-and-continue */
}
/* allocate generic... if we know the type, we'll g_renew()
@@ -325,7 +325,7 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
context = g_new0 (GstMatroskaTrackContext, 1);
demux->src[demux->num_streams] = context;
context->index = demux->num_streams;
- context->type = 0; /* no type yet */
+ context->type = 0; /* no type yet */
demux->num_streams++;
/* start with the master */
@@ -343,474 +343,474 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
}
switch (id) {
- /* track number (unique stream ID) */
+ /* track number (unique stream ID) */
case GST_MATROSKA_ID_TRACKNUMBER:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- context->num = num;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ context->num = num;
+ break;
}
- /* track UID (unique identifier) */
+ /* track UID (unique identifier) */
case GST_MATROSKA_ID_TRACKUID:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- context->uid = num;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ context->uid = num;
+ break;
}
- /* track type (video, audio, combined, subtitle, etc.) */
+ /* track type (video, audio, combined, subtitle, etc.) */
case GST_MATROSKA_ID_TRACKTYPE:{
- guint64 num;
-
- if (context->type != 0) {
- GST_WARNING
- ("More than one tracktype defined in a trackentry - skipping");
- break;
- }
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- context->type = num;
-
- /* ok, so we're actually going to reallocate this thing */
- switch (context->type) {
- case GST_MATROSKA_TRACK_TYPE_VIDEO:
- context = (GstMatroskaTrackContext *)
- g_renew (GstMatroskaTrackVideoContext, context, 1);
- break;
- case GST_MATROSKA_TRACK_TYPE_AUDIO:
- context = (GstMatroskaTrackContext *)
- g_renew (GstMatroskaTrackAudioContext, context, 1);
- /* defaults */
- ((GstMatroskaTrackAudioContext *) context)->channels = 1;
- ((GstMatroskaTrackAudioContext *) context)->samplerate = 8000;
- break;
- case GST_MATROSKA_TRACK_TYPE_COMPLEX:
- context = (GstMatroskaTrackContext *)
- g_renew (GstMatroskaTrackComplexContext, context, 1);
- break;
- case GST_MATROSKA_TRACK_TYPE_SUBTITLE:
- context = (GstMatroskaTrackContext *)
- g_renew (GstMatroskaTrackSubtitleContext, context, 1);
- break;
- case GST_MATROSKA_TRACK_TYPE_LOGO:
- case GST_MATROSKA_TRACK_TYPE_CONTROL:
- default:
- GST_WARNING ("Unknown or unsupported track type 0x%x",
- context->type);
- context->type = 0;
- break;
- }
- demux->src[demux->num_streams - 1] = context;
- break;
+ guint64 num;
+
+ if (context->type != 0) {
+ GST_WARNING
+ ("More than one tracktype defined in a trackentry - skipping");
+ break;
+ }
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ context->type = num;
+
+ /* ok, so we're actually going to reallocate this thing */
+ switch (context->type) {
+ case GST_MATROSKA_TRACK_TYPE_VIDEO:
+ context = (GstMatroskaTrackContext *)
+ g_renew (GstMatroskaTrackVideoContext, context, 1);
+ break;
+ case GST_MATROSKA_TRACK_TYPE_AUDIO:
+ context = (GstMatroskaTrackContext *)
+ g_renew (GstMatroskaTrackAudioContext, context, 1);
+ /* defaults */
+ ((GstMatroskaTrackAudioContext *) context)->channels = 1;
+ ((GstMatroskaTrackAudioContext *) context)->samplerate = 8000;
+ break;
+ case GST_MATROSKA_TRACK_TYPE_COMPLEX:
+ context = (GstMatroskaTrackContext *)
+ g_renew (GstMatroskaTrackComplexContext, context, 1);
+ break;
+ case GST_MATROSKA_TRACK_TYPE_SUBTITLE:
+ context = (GstMatroskaTrackContext *)
+ g_renew (GstMatroskaTrackSubtitleContext, context, 1);
+ break;
+ case GST_MATROSKA_TRACK_TYPE_LOGO:
+ case GST_MATROSKA_TRACK_TYPE_CONTROL:
+ default:
+ GST_WARNING ("Unknown or unsupported track type 0x%x",
+ context->type);
+ context->type = 0;
+ break;
+ }
+ demux->src[demux->num_streams - 1] = context;
+ break;
}
- /* tracktype specific stuff for video */
+ /* tracktype specific stuff for video */
case GST_MATROSKA_ID_TRACKVIDEO:{
- GstMatroskaTrackVideoContext *videocontext;
-
- if (context->type != GST_MATROSKA_TRACK_TYPE_VIDEO) {
- GST_WARNING
- ("trackvideo EBML entry in non-video track - ignoring track");
- res = FALSE;
- break;
- } else if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- videocontext = (GstMatroskaTrackVideoContext *) context;
-
- while (res) {
- if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
- res = FALSE;
- break;
- } else if (demux->level_up > 0) {
- demux->level_up--;
- break;
- }
-
- switch (id) {
- /* fixme, this should be one-up, but I get it here (?) */
- case GST_MATROSKA_ID_TRACKDEFAULTDURATION:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- context->default_duration = num;
- break;
- }
-
- /* video framerate */
- case GST_MATROSKA_ID_VIDEOFRAMERATE:{
- gdouble num;
-
- if (!gst_ebml_read_float (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- context->default_duration = GST_SECOND * (1. / num);
- break;
- }
-
- /* width of the size to display the video at */
- case GST_MATROSKA_ID_VIDEODISPLAYWIDTH:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- videocontext->display_width = num;
- break;
- }
-
- /* height of the size to display the video at */
- case GST_MATROSKA_ID_VIDEODISPLAYHEIGHT:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- videocontext->display_height = num;
- break;
- }
-
- /* width of the video in the file */
- case GST_MATROSKA_ID_VIDEOPIXELWIDTH:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- videocontext->pixel_width = num;
- break;
- }
-
- /* height of the video in the file */
- case GST_MATROSKA_ID_VIDEOPIXELHEIGHT:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- videocontext->pixel_height = num;
- break;
- }
-
- /* whether the video is interlaced */
- case GST_MATROSKA_ID_VIDEOFLAGINTERLACED:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- if (num)
- context->flags |= GST_MATROSKA_VIDEOTRACK_INTERLACED;
- else
- context->flags &= ~GST_MATROSKA_VIDEOTRACK_INTERLACED;
- break;
- }
-
- /* stereo mode (whether the video has two streams, where
- * one is for the left eye and the other for the right eye,
- * which creates a 3D-like effect) */
- case GST_MATROSKA_ID_VIDEOSTEREOMODE:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- if (num != GST_MATROSKA_EYE_MODE_MONO &&
- num != GST_MATROSKA_EYE_MODE_LEFT &&
- num != GST_MATROSKA_EYE_MODE_RIGHT &&
- num != GST_MATROSKA_EYE_MODE_BOTH) {
- GST_WARNING ("Unknown eye mode 0x%x - ignoring", (guint) num);
- break;
- }
- videocontext->eye_mode = num;
- break;
- }
-
- /* aspect ratio behaviour */
- case GST_MATROSKA_ID_VIDEOASPECTRATIO:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- if (num != GST_MATROSKA_ASPECT_RATIO_MODE_FREE &&
- num != GST_MATROSKA_ASPECT_RATIO_MODE_KEEP &&
- num != GST_MATROSKA_ASPECT_RATIO_MODE_FIXED) {
- GST_WARNING ("Unknown aspect ratio mode 0x%x - ignoring",
- (guint) num);
- break;
- }
- videocontext->asr_mode = num;
- break;
- }
-
- /* colourspace (only matters for raw video) fourcc */
- case GST_MATROSKA_ID_VIDEOCOLOURSPACE:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- videocontext->fourcc = num;
- break;
- }
-
- default:
- GST_WARNING ("Unknown video track header entry 0x%x - ignoring",
- id);
- /* pass-through */
-
- case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
- }
-
- if (demux->level_up) {
- demux->level_up--;
- break;
- }
- }
- break;
+ GstMatroskaTrackVideoContext *videocontext;
+
+ if (context->type != GST_MATROSKA_TRACK_TYPE_VIDEO) {
+ GST_WARNING
+ ("trackvideo EBML entry in non-video track - ignoring track");
+ res = FALSE;
+ break;
+ } else if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ videocontext = (GstMatroskaTrackVideoContext *) context;
+
+ while (res) {
+ if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
+ res = FALSE;
+ break;
+ } else if (demux->level_up > 0) {
+ demux->level_up--;
+ break;
+ }
+
+ switch (id) {
+ /* fixme, this should be one-up, but I get it here (?) */
+ case GST_MATROSKA_ID_TRACKDEFAULTDURATION:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ context->default_duration = num;
+ break;
+ }
+
+ /* video framerate */
+ case GST_MATROSKA_ID_VIDEOFRAMERATE:{
+ gdouble num;
+
+ if (!gst_ebml_read_float (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ context->default_duration = GST_SECOND * (1. / num);
+ break;
+ }
+
+ /* width of the size to display the video at */
+ case GST_MATROSKA_ID_VIDEODISPLAYWIDTH:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ videocontext->display_width = num;
+ break;
+ }
+
+ /* height of the size to display the video at */
+ case GST_MATROSKA_ID_VIDEODISPLAYHEIGHT:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ videocontext->display_height = num;
+ break;
+ }
+
+ /* width of the video in the file */
+ case GST_MATROSKA_ID_VIDEOPIXELWIDTH:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ videocontext->pixel_width = num;
+ break;
+ }
+
+ /* height of the video in the file */
+ case GST_MATROSKA_ID_VIDEOPIXELHEIGHT:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ videocontext->pixel_height = num;
+ break;
+ }
+
+ /* whether the video is interlaced */
+ case GST_MATROSKA_ID_VIDEOFLAGINTERLACED:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ if (num)
+ context->flags |= GST_MATROSKA_VIDEOTRACK_INTERLACED;
+ else
+ context->flags &= ~GST_MATROSKA_VIDEOTRACK_INTERLACED;
+ break;
+ }
+
+ /* stereo mode (whether the video has two streams, where
+ * one is for the left eye and the other for the right eye,
+ * which creates a 3D-like effect) */
+ case GST_MATROSKA_ID_VIDEOSTEREOMODE:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ if (num != GST_MATROSKA_EYE_MODE_MONO &&
+ num != GST_MATROSKA_EYE_MODE_LEFT &&
+ num != GST_MATROSKA_EYE_MODE_RIGHT &&
+ num != GST_MATROSKA_EYE_MODE_BOTH) {
+ GST_WARNING ("Unknown eye mode 0x%x - ignoring", (guint) num);
+ break;
+ }
+ videocontext->eye_mode = num;
+ break;
+ }
+
+ /* aspect ratio behaviour */
+ case GST_MATROSKA_ID_VIDEOASPECTRATIO:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ if (num != GST_MATROSKA_ASPECT_RATIO_MODE_FREE &&
+ num != GST_MATROSKA_ASPECT_RATIO_MODE_KEEP &&
+ num != GST_MATROSKA_ASPECT_RATIO_MODE_FIXED) {
+ GST_WARNING ("Unknown aspect ratio mode 0x%x - ignoring",
+ (guint) num);
+ break;
+ }
+ videocontext->asr_mode = num;
+ break;
+ }
+
+ /* colourspace (only matters for raw video) fourcc */
+ case GST_MATROSKA_ID_VIDEOCOLOURSPACE:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ videocontext->fourcc = num;
+ break;
+ }
+
+ default:
+ GST_WARNING ("Unknown video track header entry 0x%x - ignoring",
+ id);
+ /* pass-through */
+
+ case GST_EBML_ID_VOID:
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
+ }
+
+ if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+ }
+ break;
}
- /* tracktype specific stuff for audio */
+ /* tracktype specific stuff for audio */
case GST_MATROSKA_ID_TRACKAUDIO:{
- GstMatroskaTrackAudioContext *audiocontext;
-
- if (context->type != GST_MATROSKA_TRACK_TYPE_AUDIO) {
- GST_WARNING
- ("trackaudio EBML entry in non-audio track - ignoring track");
- res = FALSE;
- break;
- } else if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- audiocontext = (GstMatroskaTrackAudioContext *) context;
-
- while (res) {
- if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
- res = FALSE;
- break;
- } else if (demux->level_up > 0) {
- demux->level_up--;
- break;
- }
-
- switch (id) {
- /* samplerate */
- case GST_MATROSKA_ID_AUDIOSAMPLINGFREQ:{
- gdouble num;
-
- if (!gst_ebml_read_float (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- audiocontext->samplerate = num;
- break;
- }
-
- /* bitdepth */
- case GST_MATROSKA_ID_AUDIOBITDEPTH:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- audiocontext->bitdepth = num;
- break;
- }
-
- /* channels */
- case GST_MATROSKA_ID_AUDIOCHANNELS:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- audiocontext->channels = num;
- break;
- }
-
- default:
- GST_WARNING ("Unknown audio track header entry 0x%x - ignoring",
- id);
- /* pass-through */
-
- case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
- }
-
- if (demux->level_up) {
- demux->level_up--;
- break;
- }
- }
- break;
+ GstMatroskaTrackAudioContext *audiocontext;
+
+ if (context->type != GST_MATROSKA_TRACK_TYPE_AUDIO) {
+ GST_WARNING
+ ("trackaudio EBML entry in non-audio track - ignoring track");
+ res = FALSE;
+ break;
+ } else if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ audiocontext = (GstMatroskaTrackAudioContext *) context;
+
+ while (res) {
+ if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
+ res = FALSE;
+ break;
+ } else if (demux->level_up > 0) {
+ demux->level_up--;
+ break;
+ }
+
+ switch (id) {
+ /* samplerate */
+ case GST_MATROSKA_ID_AUDIOSAMPLINGFREQ:{
+ gdouble num;
+
+ if (!gst_ebml_read_float (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ audiocontext->samplerate = num;
+ break;
+ }
+
+ /* bitdepth */
+ case GST_MATROSKA_ID_AUDIOBITDEPTH:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ audiocontext->bitdepth = num;
+ break;
+ }
+
+ /* channels */
+ case GST_MATROSKA_ID_AUDIOCHANNELS:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ audiocontext->channels = num;
+ break;
+ }
+
+ default:
+ GST_WARNING ("Unknown audio track header entry 0x%x - ignoring",
+ id);
+ /* pass-through */
+
+ case GST_EBML_ID_VOID:
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
+ }
+
+ if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+ }
+ break;
}
- /* codec identifier */
+ /* codec identifier */
case GST_MATROSKA_ID_CODECID:{
- gchar *text;
-
- if (!gst_ebml_read_ascii (ebml, &id, &text)) {
- res = FALSE;
- break;
- }
- context->codec_id = text;
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_ascii (ebml, &id, &text)) {
+ res = FALSE;
+ break;
+ }
+ context->codec_id = text;
+ break;
}
- /* codec private data */
+ /* codec private data */
case GST_MATROSKA_ID_CODECPRIVATE:{
- guint8 *data;
- guint64 size;
-
- if (!gst_ebml_read_binary (ebml, &id, &data, &size)) {
- res = FALSE;
- break;
- }
- context->codec_priv = data;
- context->codec_priv_size = size;
- break;
+ guint8 *data;
+ guint64 size;
+
+ if (!gst_ebml_read_binary (ebml, &id, &data, &size)) {
+ res = FALSE;
+ break;
+ }
+ context->codec_priv = data;
+ context->codec_priv_size = size;
+ break;
}
- /* name of the codec */
+ /* name of the codec */
case GST_MATROSKA_ID_CODECNAME:{
- gchar *text;
-
- if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
- res = FALSE;
- break;
- }
- context->codec_name = text;
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
+ res = FALSE;
+ break;
+ }
+ context->codec_name = text;
+ break;
}
- /* name of this track */
+ /* name of this track */
case GST_MATROSKA_ID_TRACKNAME:{
- gchar *text;
-
- if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
- res = FALSE;
- break;
- }
- context->name = text;
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
+ res = FALSE;
+ break;
+ }
+ context->name = text;
+ break;
}
- /* language (matters for audio/subtitles, mostly) */
+ /* language (matters for audio/subtitles, mostly) */
case GST_MATROSKA_ID_TRACKLANGUAGE:{
- gchar *text;
-
- if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
- res = FALSE;
- break;
- }
- context->language = text;
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
+ res = FALSE;
+ break;
+ }
+ context->language = text;
+ break;
}
- /* whether this is actually used */
+ /* whether this is actually used */
case GST_MATROSKA_ID_TRACKFLAGENABLED:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- if (num)
- context->flags |= GST_MATROSKA_TRACK_ENABLED;
- else
- context->flags &= ~GST_MATROSKA_TRACK_ENABLED;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ if (num)
+ context->flags |= GST_MATROSKA_TRACK_ENABLED;
+ else
+ context->flags &= ~GST_MATROSKA_TRACK_ENABLED;
+ break;
}
- /* whether it's the default for this track type */
+ /* whether it's the default for this track type */
case GST_MATROSKA_ID_TRACKFLAGDEFAULT:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- if (num)
- context->flags |= GST_MATROSKA_TRACK_DEFAULT;
- else
- context->flags &= ~GST_MATROSKA_TRACK_DEFAULT;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ if (num)
+ context->flags |= GST_MATROSKA_TRACK_DEFAULT;
+ else
+ context->flags &= ~GST_MATROSKA_TRACK_DEFAULT;
+ break;
}
- /* lacing (like MPEG, where blocks don't end/start on frame
- * boundaries) */
+ /* lacing (like MPEG, where blocks don't end/start on frame
+ * boundaries) */
case GST_MATROSKA_ID_TRACKFLAGLACING:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- if (num)
- context->flags |= GST_MATROSKA_TRACK_LACING;
- else
- context->flags &= ~GST_MATROSKA_TRACK_LACING;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ if (num)
+ context->flags |= GST_MATROSKA_TRACK_LACING;
+ else
+ context->flags &= ~GST_MATROSKA_TRACK_LACING;
+ break;
}
- /* default length (in time) of one data block in this track */
+ /* default length (in time) of one data block in this track */
case GST_MATROSKA_ID_TRACKDEFAULTDURATION:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- context->default_duration = num;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ context->default_duration = num;
+ break;
}
default:
- GST_WARNING ("Unknown track header entry 0x%x - ignoring", id);
- /* pass-through */
+ GST_WARNING ("Unknown track header entry 0x%x - ignoring", id);
+ /* pass-through */
- /* we ignore these because they're nothing useful (i.e. crap). */
+ /* we ignore these because they're nothing useful (i.e. crap). */
case GST_MATROSKA_ID_CODECINFOURL:
case GST_MATROSKA_ID_CODECDOWNLOADURL:
case GST_MATROSKA_ID_TRACKMINCACHE:
case GST_MATROSKA_ID_TRACKMAXCACHE:
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -841,43 +841,43 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
switch (context->type) {
case GST_MATROSKA_TRACK_TYPE_VIDEO:{
GstMatroskaTrackVideoContext *videocontext =
- (GstMatroskaTrackVideoContext *) context;
+ (GstMatroskaTrackVideoContext *) context;
padname = g_strdup_printf ("video_%02d", demux->num_v_streams++);
templ = gst_element_class_get_pad_template (klass, "video_%02d");
caps = gst_matroska_demux_video_caps (videocontext,
- context->codec_id,
- context->codec_priv, context->codec_priv_size, demux);
+ context->codec_id,
+ context->codec_priv, context->codec_priv_size, demux);
break;
}
case GST_MATROSKA_TRACK_TYPE_AUDIO:{
GstMatroskaTrackAudioContext *audiocontext =
- (GstMatroskaTrackAudioContext *) context;
+ (GstMatroskaTrackAudioContext *) context;
padname = g_strdup_printf ("audio_%02d", demux->num_a_streams++);
templ = gst_element_class_get_pad_template (klass, "audio_%02d");
caps = gst_matroska_demux_audio_caps (audiocontext,
- context->codec_id,
- context->codec_priv, context->codec_priv_size, demux);
+ context->codec_id,
+ context->codec_priv, context->codec_priv_size, demux);
break;
}
case GST_MATROSKA_TRACK_TYPE_COMPLEX:{
GstMatroskaTrackComplexContext *complexcontext =
- (GstMatroskaTrackComplexContext *) context;
+ (GstMatroskaTrackComplexContext *) context;
padname = g_strdup_printf ("video_%02d", demux->num_v_streams++);
templ = gst_element_class_get_pad_template (klass, "video_%02d");
caps = gst_matroska_demux_complex_caps (complexcontext,
- context->codec_id, context->codec_priv, context->codec_priv_size);
+ context->codec_id, context->codec_priv, context->codec_priv_size);
break;
}
case GST_MATROSKA_TRACK_TYPE_SUBTITLE:{
GstMatroskaTrackSubtitleContext *subtitlecontext =
- (GstMatroskaTrackSubtitleContext *) context;
+ (GstMatroskaTrackSubtitleContext *) context;
padname = g_strdup_printf ("subtitle_%02d", demux->num_t_streams++);
templ = gst_element_class_get_pad_template (klass, "subtitle_%02d");
caps = gst_matroska_demux_subtitle_caps (subtitlecontext,
- context->codec_id, context->codec_priv, context->codec_priv_size);
+ context->codec_id, context->codec_priv, context->codec_priv_size);
break;
}
@@ -953,29 +953,29 @@ gst_matroska_demux_handle_src_query (GstPad * pad,
switch (type) {
case GST_QUERY_TOTAL:
switch (*format) {
- case GST_FORMAT_DEFAULT:
- *format = GST_FORMAT_TIME;
- /* fall through */
- case GST_FORMAT_TIME:
- *value = demux->duration;
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_DEFAULT:
+ *format = GST_FORMAT_TIME;
+ /* fall through */
+ case GST_FORMAT_TIME:
+ *value = demux->duration;
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_QUERY_POSITION:
switch (*format) {
- case GST_FORMAT_DEFAULT:
- *format = GST_FORMAT_TIME;
- /* fall through */
- case GST_FORMAT_TIME:
- *value = demux->pos;
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_DEFAULT:
+ *format = GST_FORMAT_TIME;
+ /* fall through */
+ case GST_FORMAT_TIME:
+ *value = demux->pos;
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
@@ -1002,10 +1002,10 @@ gst_matroskademux_seek (GstMatroskaDemux * demux)
entry = n;
} else {
gfloat diff_old = fabs (1. * (demux->index[entry].time - offset)),
- diff_new = fabs (1. * (demux->index[n].time - offset));
+ diff_new = fabs (1. * (demux->index[n].time - offset));
if (diff_new < diff_old) {
- entry = n;
+ entry = n;
}
}
}
@@ -1026,14 +1026,14 @@ gst_matroska_demux_send_event (GstElement * element, GstEvent * event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
switch (GST_EVENT_SEEK_FORMAT (event)) {
- case GST_FORMAT_TIME:
- demux->seek_pending = GST_EVENT_SEEK_OFFSET (event);
- break;
-
- default:
- GST_WARNING ("Only time seek is supported");
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ demux->seek_pending = GST_EVENT_SEEK_OFFSET (event);
+ break;
+
+ default:
+ GST_WARNING ("Only time seek is supported");
+ res = FALSE;
+ break;
}
break;
@@ -1053,9 +1053,9 @@ gst_matroska_demux_get_event_mask (GstPad * pad)
{
static const GstEventMask masks[] = {
{GST_EVENT_SEEK, (GstEventFlag) ((gint) GST_SEEK_METHOD_SET |
- (gint) GST_SEEK_FLAG_KEY_UNIT)},
+ (gint) GST_SEEK_FLAG_KEY_UNIT)},
{GST_EVENT_SEEK_SEGMENT, (GstEventFlag) ((gint) GST_SEEK_METHOD_SET |
- (gint) GST_SEEK_FLAG_KEY_UNIT)},
+ (gint) GST_SEEK_FLAG_KEY_UNIT)},
{(GstEventType) 0, (GstEventFlag) 0}
};
@@ -1098,7 +1098,7 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux)
/* seek (relative to segment) */
if (!(event = gst_ebml_read_seek (ebml, entry->pos + demux->segment_start)))
return FALSE;
- gst_event_unref (event); /* byte - we want time */
+ gst_event_unref (event); /* byte - we want time */
event = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, entry->time);
/* forward to all src pads */
@@ -1127,15 +1127,15 @@ gst_matroska_demux_init_stream (GstMatroskaDemux * demux)
if (!doctype || strcmp (doctype, "matroska") != 0) {
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE, (NULL),
- ("Input is not a matroska stream (doctype=%s)",
- doctype ? doctype : "none"));
+ ("Input is not a matroska stream (doctype=%s)",
+ doctype ? doctype : "none"));
g_free (doctype);
return FALSE;
}
g_free (doctype);
if (version > 1) {
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
- ("Demuxer version (1) is too old to read stream version %d", version));
+ ("Demuxer version (1) is too old to read stream version %d", version));
return FALSE;
}
@@ -1151,7 +1151,7 @@ gst_matroska_demux_init_stream (GstMatroskaDemux * demux)
/* oi! */
GST_WARNING ("Expected a Segment ID (0x%x), but received 0x%x!",
- GST_MATROSKA_ID_SEGMENT, id);
+ GST_MATROSKA_ID_SEGMENT, id);
if (!gst_ebml_read_skip (ebml))
return FALSE;
}
@@ -1183,20 +1183,20 @@ gst_matroska_demux_parse_tracks (GstMatroskaDemux * demux)
}
switch (id) {
- /* one track within the "all-tracks" header */
+ /* one track within the "all-tracks" header */
case GST_MATROSKA_ID_TRACKENTRY:
- if (!gst_matroska_demux_add_stream (demux))
- res = FALSE;
- break;
+ if (!gst_matroska_demux_add_stream (demux))
+ res = FALSE;
+ break;
default:
- GST_WARNING ("Unknown entry 0x%x in track header", id);
- /* fall-through */
+ GST_WARNING ("Unknown entry 0x%x in track header", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -1237,147 +1237,147 @@ gst_matroska_demux_parse_index (GstMatroskaDemux * demux, gboolean prevent_eos)
}
switch (id) {
- /* one single index entry ('point') */
+ /* one single index entry ('point') */
case GST_MATROSKA_ID_POINTENTRY:
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
-
- /* in the end, we hope to fill one entry with a
- * timestamp, a file position and a tracknum */
- idx.pos = (guint64) - 1;
- idx.time = (guint64) - 1;
- idx.track = (guint16) - 1;
-
- while (res) {
- if (prevent_eos && length == gst_bytestream_tell (ebml->bs)) {
- res = FALSE;
- break;
- } else if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
- res = FALSE;
- break;
- } else if (demux->level_up) {
- demux->level_up--;
- break;
- }
-
- switch (id) {
- /* one single index entry ('point') */
- case GST_MATROSKA_ID_CUETIME:{
- gint64 time;
-
- if (!gst_ebml_read_uint (ebml, &id, &time)) {
- res = FALSE;
- break;
- }
- idx.time = time * demux->time_scale;
- break;
- }
-
- /* position in the file + track to which it belongs */
- case GST_MATROSKA_ID_CUETRACKPOSITION:
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
-
- while (res) {
- if (prevent_eos && length == gst_bytestream_tell (ebml->bs)) {
- res = FALSE;
- break;
- } else if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
- res = FALSE;
- break;
- } else if (demux->level_up) {
- demux->level_up--;
- break;
- }
-
- switch (id) {
- /* track number */
- case GST_MATROSKA_ID_CUETRACK:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- idx.track = num;
- break;
- }
-
- /* position in file */
- case GST_MATROSKA_ID_CUECLUSTERPOSITION:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- idx.pos = num;
- break;
- }
-
- default:
- GST_WARNING ("Unknown entry 0x%x in CuesTrackPositions",
- id);
- /* fall-through */
-
- case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
- }
-
- if (demux->level_up) {
- demux->level_up--;
- break;
- }
- }
-
- break;
-
- default:
- GST_WARNING ("Unknown entry 0x%x in cuespoint index", id);
- /* fall-through */
-
- case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
- }
-
- if (demux->level_up) {
- demux->level_up--;
- break;
- }
- }
-
- /* so let's see if we got what we wanted */
- if (idx.pos != (guint64) - 1 &&
- idx.time != (guint64) - 1 && idx.track != (guint16) - 1) {
- if (demux->num_indexes % 32 == 0) {
- /* re-allocate bigger index */
- demux->index = g_renew (GstMatroskaIndex, demux->index,
- demux->num_indexes + 32);
- }
- demux->index[demux->num_indexes].pos = idx.pos;
- demux->index[demux->num_indexes].time = idx.time;
- demux->index[demux->num_indexes].track = idx.track;
- demux->num_indexes++;
- }
-
- break;
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+
+ /* in the end, we hope to fill one entry with a
+ * timestamp, a file position and a tracknum */
+ idx.pos = (guint64) - 1;
+ idx.time = (guint64) - 1;
+ idx.track = (guint16) - 1;
+
+ while (res) {
+ if (prevent_eos && length == gst_bytestream_tell (ebml->bs)) {
+ res = FALSE;
+ break;
+ } else if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
+ res = FALSE;
+ break;
+ } else if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+
+ switch (id) {
+ /* one single index entry ('point') */
+ case GST_MATROSKA_ID_CUETIME:{
+ gint64 time;
+
+ if (!gst_ebml_read_uint (ebml, &id, &time)) {
+ res = FALSE;
+ break;
+ }
+ idx.time = time * demux->time_scale;
+ break;
+ }
+
+ /* position in the file + track to which it belongs */
+ case GST_MATROSKA_ID_CUETRACKPOSITION:
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+
+ while (res) {
+ if (prevent_eos && length == gst_bytestream_tell (ebml->bs)) {
+ res = FALSE;
+ break;
+ } else if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
+ res = FALSE;
+ break;
+ } else if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+
+ switch (id) {
+ /* track number */
+ case GST_MATROSKA_ID_CUETRACK:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ idx.track = num;
+ break;
+ }
+
+ /* position in file */
+ case GST_MATROSKA_ID_CUECLUSTERPOSITION:{
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ idx.pos = num;
+ break;
+ }
+
+ default:
+ GST_WARNING ("Unknown entry 0x%x in CuesTrackPositions",
+ id);
+ /* fall-through */
+
+ case GST_EBML_ID_VOID:
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
+ }
+
+ if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+ }
+
+ break;
+
+ default:
+ GST_WARNING ("Unknown entry 0x%x in cuespoint index", id);
+ /* fall-through */
+
+ case GST_EBML_ID_VOID:
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
+ }
+
+ if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+ }
+
+ /* so let's see if we got what we wanted */
+ if (idx.pos != (guint64) - 1 &&
+ idx.time != (guint64) - 1 && idx.track != (guint16) - 1) {
+ if (demux->num_indexes % 32 == 0) {
+ /* re-allocate bigger index */
+ demux->index = g_renew (GstMatroskaIndex, demux->index,
+ demux->num_indexes + 32);
+ }
+ demux->index[demux->num_indexes].pos = idx.pos;
+ demux->index[demux->num_indexes].time = idx.time;
+ demux->index[demux->num_indexes].track = idx.track;
+ demux->num_indexes++;
+ }
+
+ break;
default:
- GST_WARNING ("Unknown entry 0x%x in cues header", id);
- /* fall-through */
+ GST_WARNING ("Unknown entry 0x%x in cues header", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -1406,70 +1406,70 @@ gst_matroska_demux_parse_info (GstMatroskaDemux * demux)
}
switch (id) {
- /* cluster timecode */
+ /* cluster timecode */
case GST_MATROSKA_ID_TIMECODESCALE:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- demux->time_scale = num;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ demux->time_scale = num;
+ break;
}
case GST_MATROSKA_ID_DURATION:{
- gdouble num;
-
- if (!gst_ebml_read_float (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- demux->duration = num * demux->time_scale;
- break;
+ gdouble num;
+
+ if (!gst_ebml_read_float (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ demux->duration = num * demux->time_scale;
+ break;
}
case GST_MATROSKA_ID_WRITINGAPP:{
- gchar *text;
-
- if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
- res = FALSE;
- break;
- }
- demux->writing_app = text;
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
+ res = FALSE;
+ break;
+ }
+ demux->writing_app = text;
+ break;
}
case GST_MATROSKA_ID_MUXINGAPP:{
- gchar *text;
-
- if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
- res = FALSE;
- break;
- }
- demux->muxing_app = text;
- break;
+ gchar *text;
+
+ if (!gst_ebml_read_utf8 (ebml, &id, &text)) {
+ res = FALSE;
+ break;
+ }
+ demux->muxing_app = text;
+ break;
}
case GST_MATROSKA_ID_DATEUTC:{
- gint64 time;
-
- if (!gst_ebml_read_date (ebml, &id, &time)) {
- res = FALSE;
- break;
- }
- demux->created = time;
- break;
+ gint64 time;
+
+ if (!gst_ebml_read_date (ebml, &id, &time)) {
+ res = FALSE;
+ break;
+ }
+ demux->created = time;
+ break;
}
default:
- GST_WARNING ("Unknown entry 0x%x in info header", id);
- /* fall-through */
+ GST_WARNING ("Unknown entry 0x%x in info header", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -1511,13 +1511,13 @@ gst_matroska_demux_parse_metadata (GstMatroskaDemux * demux,
switch (id) {
default:
- GST_WARNING ("metadata unimplemented");
- /* fall-through */
+ GST_WARNING ("metadata unimplemented");
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -1611,178 +1611,178 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux * demux,
}
switch (id) {
- /* one block inside the group. Note, block parsing is one
- * of the harder things, so this code is a bit complicated.
- * See http://www.matroska.org/ for documentation. */
+ /* one block inside the group. Note, block parsing is one
+ * of the harder things, so this code is a bit complicated.
+ * See http://www.matroska.org/ for documentation. */
case GST_MATROSKA_ID_BLOCK:{
- GstBuffer *buf;
- guint8 *data;
- gint64 time;
- guint size, *lace_size = NULL;
- gint n, stream, flags, laces = 0;
- guint64 num;
-
- if (!gst_ebml_read_buffer (ebml, &id, &buf)) {
- res = FALSE;
- break;
- }
- data = GST_BUFFER_DATA (buf);
- size = GST_BUFFER_SIZE (buf);
-
- /* first byte(s): blocknum */
- if ((n = gst_matroska_ebmlnum_uint (data, size, &num)) < 0) {
- GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL), ("Data error"));
- gst_buffer_unref (buf);
- res = FALSE;
- break;
- }
- data += n;
- size -= n;
-
- /* fetch stream from num */
- stream = gst_matroska_demux_stream_from_num (demux, num);
- if (size <= 3 || stream < 0 || stream >= demux->num_streams) {
- gst_buffer_unref (buf);
- GST_WARNING ("Invalid stream %d or size %u", stream, size);
- break;
- }
- if (!GST_PAD_IS_USABLE (demux->src[stream]->pad)) {
- gst_buffer_unref (buf);
- break;
- }
-
- /* time (relative to cluster time) */
- time = (GINT16_FROM_BE (*(gint16 *) data)) * demux->time_scale;
- data += 2;
- size -= 2;
- flags = *(guint8 *) data;
- data += 1;
- size -= 1;
- switch ((flags & 0x06) >> 1) {
- case 0x0: /* no lacing */
- laces = 1;
- lace_size = g_new (gint, 1);
- lace_size[0] = size;
- break;
-
- case 0x1: /* xiph lacing */
- case 0x2: /* fixed-size lacing */
- case 0x3: /* EBML lacing */
- if (size == 0) {
- res = FALSE;
- break;
- }
- laces = (*(guint8 *) data) + 1;
- data += 1;
- size -= 1;
- lace_size = g_new0 (gint, laces);
-
- switch ((flags & 0x06) >> 1) {
- case 0x1: /* xiph lacing */ {
- guint temp, total = 0;
-
- for (n = 0; res && n < laces - 1; n++) {
- while (1) {
- if (size == 0) {
- res = FALSE;
- break;
- }
- temp = *(guint8 *) data;
- lace_size[n] += temp;
- data += 1;
- size -= 1;
- if (temp != 0xff)
- break;
- }
- total += lace_size[n];
- }
- lace_size[n] = size - total;
- break;
- }
-
- case 0x2: /* fixed-size lacing */
- for (n = 0; n < laces; n++)
- lace_size[n] = size / laces;
- break;
-
- case 0x3: /* EBML lacing */ {
- guint total;
-
- if ((n = gst_matroska_ebmlnum_uint (data, size, &num)) < 0) {
- GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
- ("Data error"));
- res = FALSE;
- break;
- }
- data += n;
- size -= n;
- total = lace_size[0] = num;
- for (n = 1; res && n < laces - 1; n++) {
- gint64 snum;
- gint r;
-
- if ((r = gst_matroska_ebmlnum_sint (data, size, &snum)) < 0) {
- GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
- ("Data error"));
- res = FALSE;
- break;
- }
- data += r;
- size -= r;
- lace_size[n] = lace_size[n - 1] + snum;
- total += lace_size[n];
- }
- lace_size[n] = size - total;
- break;
- }
- }
- break;
- }
-
- if (res) {
- for (n = 0; n < laces; n++) {
- GstBuffer *sub = gst_buffer_create_sub (buf,
- GST_BUFFER_SIZE (buf) - size,
- lace_size[n]);
-
- if (cluster_time != GST_CLOCK_TIME_NONE) {
- if (time < 0 && (-time) > cluster_time)
- GST_BUFFER_TIMESTAMP (sub) = cluster_time;
- else
- GST_BUFFER_TIMESTAMP (sub) = cluster_time + time;
- }
- /* FIXME: duration */
-
- gst_pad_push (demux->src[stream]->pad, GST_DATA (sub));
-
- size -= lace_size[n];
- }
- }
-
- g_free (lace_size);
- gst_buffer_unref (buf);
- break;
+ GstBuffer *buf;
+ guint8 *data;
+ gint64 time;
+ guint size, *lace_size = NULL;
+ gint n, stream, flags, laces = 0;
+ guint64 num;
+
+ if (!gst_ebml_read_buffer (ebml, &id, &buf)) {
+ res = FALSE;
+ break;
+ }
+ data = GST_BUFFER_DATA (buf);
+ size = GST_BUFFER_SIZE (buf);
+
+ /* first byte(s): blocknum */
+ if ((n = gst_matroska_ebmlnum_uint (data, size, &num)) < 0) {
+ GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL), ("Data error"));
+ gst_buffer_unref (buf);
+ res = FALSE;
+ break;
+ }
+ data += n;
+ size -= n;
+
+ /* fetch stream from num */
+ stream = gst_matroska_demux_stream_from_num (demux, num);
+ if (size <= 3 || stream < 0 || stream >= demux->num_streams) {
+ gst_buffer_unref (buf);
+ GST_WARNING ("Invalid stream %d or size %u", stream, size);
+ break;
+ }
+ if (!GST_PAD_IS_USABLE (demux->src[stream]->pad)) {
+ gst_buffer_unref (buf);
+ break;
+ }
+
+ /* time (relative to cluster time) */
+ time = (GINT16_FROM_BE (*(gint16 *) data)) * demux->time_scale;
+ data += 2;
+ size -= 2;
+ flags = *(guint8 *) data;
+ data += 1;
+ size -= 1;
+ switch ((flags & 0x06) >> 1) {
+ case 0x0: /* no lacing */
+ laces = 1;
+ lace_size = g_new (gint, 1);
+ lace_size[0] = size;
+ break;
+
+ case 0x1: /* xiph lacing */
+ case 0x2: /* fixed-size lacing */
+ case 0x3: /* EBML lacing */
+ if (size == 0) {
+ res = FALSE;
+ break;
+ }
+ laces = (*(guint8 *) data) + 1;
+ data += 1;
+ size -= 1;
+ lace_size = g_new0 (gint, laces);
+
+ switch ((flags & 0x06) >> 1) {
+ case 0x1: /* xiph lacing */ {
+ guint temp, total = 0;
+
+ for (n = 0; res && n < laces - 1; n++) {
+ while (1) {
+ if (size == 0) {
+ res = FALSE;
+ break;
+ }
+ temp = *(guint8 *) data;
+ lace_size[n] += temp;
+ data += 1;
+ size -= 1;
+ if (temp != 0xff)
+ break;
+ }
+ total += lace_size[n];
+ }
+ lace_size[n] = size - total;
+ break;
+ }
+
+ case 0x2: /* fixed-size lacing */
+ for (n = 0; n < laces; n++)
+ lace_size[n] = size / laces;
+ break;
+
+ case 0x3: /* EBML lacing */ {
+ guint total;
+
+ if ((n = gst_matroska_ebmlnum_uint (data, size, &num)) < 0) {
+ GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
+ ("Data error"));
+ res = FALSE;
+ break;
+ }
+ data += n;
+ size -= n;
+ total = lace_size[0] = num;
+ for (n = 1; res && n < laces - 1; n++) {
+ gint64 snum;
+ gint r;
+
+ if ((r = gst_matroska_ebmlnum_sint (data, size, &snum)) < 0) {
+ GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
+ ("Data error"));
+ res = FALSE;
+ break;
+ }
+ data += r;
+ size -= r;
+ lace_size[n] = lace_size[n - 1] + snum;
+ total += lace_size[n];
+ }
+ lace_size[n] = size - total;
+ break;
+ }
+ }
+ break;
+ }
+
+ if (res) {
+ for (n = 0; n < laces; n++) {
+ GstBuffer *sub = gst_buffer_create_sub (buf,
+ GST_BUFFER_SIZE (buf) - size,
+ lace_size[n]);
+
+ if (cluster_time != GST_CLOCK_TIME_NONE) {
+ if (time < 0 && (-time) > cluster_time)
+ GST_BUFFER_TIMESTAMP (sub) = cluster_time;
+ else
+ GST_BUFFER_TIMESTAMP (sub) = cluster_time + time;
+ }
+ /* FIXME: duration */
+
+ gst_pad_push (demux->src[stream]->pad, GST_DATA (sub));
+
+ size -= lace_size[n];
+ }
+ }
+
+ g_free (lace_size);
+ gst_buffer_unref (buf);
+ break;
}
case GST_MATROSKA_ID_BLOCKDURATION:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- GST_WARNING ("FIXME: implement support for BlockDuration");
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ GST_WARNING ("FIXME: implement support for BlockDuration");
+ break;
}
default:
- GST_WARNING ("Unknown entry 0x%x in blockgroup data", id);
- /* fall-through */
+ GST_WARNING ("Unknown entry 0x%x in blockgroup data", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -1820,35 +1820,35 @@ gst_matroska_demux_parse_cluster (GstMatroskaDemux * demux)
}
switch (id) {
- /* cluster timecode */
+ /* cluster timecode */
case GST_MATROSKA_ID_CLUSTERTIMECODE:{
- guint64 num;
-
- if (!gst_ebml_read_uint (ebml, &id, &num)) {
- res = FALSE;
- break;
- }
- cluster_time = num * demux->time_scale;
- break;
+ guint64 num;
+
+ if (!gst_ebml_read_uint (ebml, &id, &num)) {
+ res = FALSE;
+ break;
+ }
+ cluster_time = num * demux->time_scale;
+ break;
}
- /* a group of blocks inside a cluster */
+ /* a group of blocks inside a cluster */
case GST_MATROSKA_ID_BLOCKGROUP:
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- res = gst_matroska_demux_parse_blockgroup (demux, cluster_time);
- break;
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ res = gst_matroska_demux_parse_blockgroup (demux, cluster_time);
+ break;
default:
- GST_WARNING ("Unknown entry 0x%x in cluster data", id);
- /* fall-through */
+ GST_WARNING ("Unknown entry 0x%x in cluster data", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -1878,162 +1878,162 @@ gst_matroska_demux_parse_contents (GstMatroskaDemux * demux)
switch (id) {
case GST_MATROSKA_ID_SEEKENTRY:{
- guint32 seek_id = 0;
- guint64 seek_pos = (guint64) - 1, t;
-
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
-
- while (res) {
- if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
- res = FALSE;
- break;
- } else if (demux->level_up) {
- demux->level_up--;
- break;
- }
-
- switch (id) {
- case GST_MATROSKA_ID_SEEKID:
- if (!gst_ebml_read_uint (ebml, &id, &t))
- res = FALSE;
- seek_id = t;
- break;
-
- case GST_MATROSKA_ID_SEEKPOSITION:
- if (!gst_ebml_read_uint (ebml, &id, &seek_pos))
- res = FALSE;
- break;
-
- default:
- GST_WARNING ("Unknown seekhead ID 0x%x", id);
- /* fall-through */
-
- case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
- }
-
- if (demux->level_up) {
- demux->level_up--;
- break;
- }
- }
-
- if (!seek_id || seek_pos == (guint64) - 1) {
- GST_WARNING ("Incomplete seekhead entry (0x%x/%"
- G_GUINT64_FORMAT ")", seek_id, seek_pos);
- break;
- }
-
- switch (seek_id) {
- case GST_MATROSKA_ID_CUES:
- case GST_MATROSKA_ID_TAGS:{
- guint level_up = demux->level_up;
- guint64 before_pos, length;
- GstEbmlLevel *level;
- GstEvent *event;
-
- /* remember */
- length = gst_bytestream_length (ebml->bs);
- before_pos = gst_bytestream_tell (ebml->bs);
-
- /* check for validity */
- if (seek_pos + demux->segment_start + 12 >= length) {
- g_warning ("Seekhead reference lies outside file!");
- break;
- }
-
- /* seek */
- if (!(event = gst_ebml_read_seek (ebml,
- seek_pos + demux->segment_start)))
- return FALSE;
- gst_event_unref (event);
-
- /* we don't want to lose our seekhead level, so we add
- * a dummy. This is a crude hack. */
- level = g_new (GstEbmlLevel, 1);
- level->start = 0;
- level->length = G_MAXUINT64;
- ebml->level = g_list_append (ebml->level, level);
-
- /* check ID */
- if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
- res = FALSE;
- break;
- }
- if (id != seek_id) {
- g_warning ("We looked for ID=0x%x but got ID=0x%x (pos=%llu)",
- seek_id, id, seek_pos + demux->segment_start);
- goto finish;
- }
-
- /* read master + parse */
- switch (id) {
- case GST_MATROSKA_ID_CUES:
- if (!gst_ebml_read_master (ebml, &id))
- res = FALSE;
- else if (!gst_matroska_demux_parse_index (demux, TRUE) &&
- gst_bytestream_length (ebml->bs) !=
- gst_bytestream_tell (ebml->bs))
- res = FALSE;
- else
- demux->index_parsed = TRUE;
- break;
- case GST_MATROSKA_ID_TAGS:
- if (!gst_ebml_read_master (ebml, &id))
- res = FALSE;
- else if (!gst_matroska_demux_parse_metadata (demux, TRUE) &&
- gst_bytestream_length (ebml->bs) !=
- gst_bytestream_tell (ebml->bs))
- res = FALSE;
- else
- demux->metadata_parsed = TRUE;
- break;
- }
- if (!res)
- break;
-
- finish:
- /* remove dummy level */
- while (ebml->level) {
- guint64 length;
-
- level = g_list_last (ebml->level)->data;
- ebml->level = g_list_remove (ebml->level, level);
- length = level->length;
- g_free (level);
- if (length == G_MAXUINT64)
- break;
- }
-
- /* seek back */
- if (!(event = gst_ebml_read_seek (ebml, before_pos)))
- return FALSE;
- gst_event_unref (event);
- demux->level_up = level_up;
- break;
- }
-
- default:
- GST_INFO ("Ignoring seekhead entry for ID=0x%x", seek_id);
- break;
- }
-
- break;
+ guint32 seek_id = 0;
+ guint64 seek_pos = (guint64) - 1, t;
+
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+
+ while (res) {
+ if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
+ res = FALSE;
+ break;
+ } else if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+
+ switch (id) {
+ case GST_MATROSKA_ID_SEEKID:
+ if (!gst_ebml_read_uint (ebml, &id, &t))
+ res = FALSE;
+ seek_id = t;
+ break;
+
+ case GST_MATROSKA_ID_SEEKPOSITION:
+ if (!gst_ebml_read_uint (ebml, &id, &seek_pos))
+ res = FALSE;
+ break;
+
+ default:
+ GST_WARNING ("Unknown seekhead ID 0x%x", id);
+ /* fall-through */
+
+ case GST_EBML_ID_VOID:
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
+ }
+
+ if (demux->level_up) {
+ demux->level_up--;
+ break;
+ }
+ }
+
+ if (!seek_id || seek_pos == (guint64) - 1) {
+ GST_WARNING ("Incomplete seekhead entry (0x%x/%"
+ G_GUINT64_FORMAT ")", seek_id, seek_pos);
+ break;
+ }
+
+ switch (seek_id) {
+ case GST_MATROSKA_ID_CUES:
+ case GST_MATROSKA_ID_TAGS:{
+ guint level_up = demux->level_up;
+ guint64 before_pos, length;
+ GstEbmlLevel *level;
+ GstEvent *event;
+
+ /* remember */
+ length = gst_bytestream_length (ebml->bs);
+ before_pos = gst_bytestream_tell (ebml->bs);
+
+ /* check for validity */
+ if (seek_pos + demux->segment_start + 12 >= length) {
+ g_warning ("Seekhead reference lies outside file!");
+ break;
+ }
+
+ /* seek */
+ if (!(event = gst_ebml_read_seek (ebml,
+ seek_pos + demux->segment_start)))
+ return FALSE;
+ gst_event_unref (event);
+
+ /* we don't want to lose our seekhead level, so we add
+ * a dummy. This is a crude hack. */
+ level = g_new (GstEbmlLevel, 1);
+ level->start = 0;
+ level->length = G_MAXUINT64;
+ ebml->level = g_list_append (ebml->level, level);
+
+ /* check ID */
+ if (!(id = gst_ebml_peek_id (ebml, &demux->level_up))) {
+ res = FALSE;
+ break;
+ }
+ if (id != seek_id) {
+ g_warning ("We looked for ID=0x%x but got ID=0x%x (pos=%llu)",
+ seek_id, id, seek_pos + demux->segment_start);
+ goto finish;
+ }
+
+ /* read master + parse */
+ switch (id) {
+ case GST_MATROSKA_ID_CUES:
+ if (!gst_ebml_read_master (ebml, &id))
+ res = FALSE;
+ else if (!gst_matroska_demux_parse_index (demux, TRUE) &&
+ gst_bytestream_length (ebml->bs) !=
+ gst_bytestream_tell (ebml->bs))
+ res = FALSE;
+ else
+ demux->index_parsed = TRUE;
+ break;
+ case GST_MATROSKA_ID_TAGS:
+ if (!gst_ebml_read_master (ebml, &id))
+ res = FALSE;
+ else if (!gst_matroska_demux_parse_metadata (demux, TRUE) &&
+ gst_bytestream_length (ebml->bs) !=
+ gst_bytestream_tell (ebml->bs))
+ res = FALSE;
+ else
+ demux->metadata_parsed = TRUE;
+ break;
+ }
+ if (!res)
+ break;
+
+ finish:
+ /* remove dummy level */
+ while (ebml->level) {
+ guint64 length;
+
+ level = g_list_last (ebml->level)->data;
+ ebml->level = g_list_remove (ebml->level, level);
+ length = level->length;
+ g_free (level);
+ if (length == G_MAXUINT64)
+ break;
+ }
+
+ /* seek back */
+ if (!(event = gst_ebml_read_seek (ebml, before_pos)))
+ return FALSE;
+ gst_event_unref (event);
+ demux->level_up = level_up;
+ break;
+ }
+
+ default:
+ GST_INFO ("Ignoring seekhead entry for ID=0x%x", seek_id);
+ break;
+ }
+
+ break;
}
default:
- GST_WARNING ("Unknown seekhead ID 0x%x", id);
- /* fall-through */
+ GST_WARNING ("Unknown seekhead ID 0x%x", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -2063,88 +2063,88 @@ gst_matroska_demux_loop_stream (GstMatroskaDemux * demux)
}
switch (id) {
- /* stream info */
+ /* stream info */
case GST_MATROSKA_ID_INFO:{
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- res = gst_matroska_demux_parse_info (demux);
- break;
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ res = gst_matroska_demux_parse_info (demux);
+ break;
}
- /* track info headers */
+ /* track info headers */
case GST_MATROSKA_ID_TRACKS:{
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- res = gst_matroska_demux_parse_tracks (demux);
- break;
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ res = gst_matroska_demux_parse_tracks (demux);
+ break;
}
- /* stream index */
+ /* stream index */
case GST_MATROSKA_ID_CUES:{
- if (!demux->index_parsed) {
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- res = gst_matroska_demux_parse_index (demux, FALSE);
- } else
- res = gst_ebml_read_skip (ebml);
- break;
+ if (!demux->index_parsed) {
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ res = gst_matroska_demux_parse_index (demux, FALSE);
+ } else
+ res = gst_ebml_read_skip (ebml);
+ break;
}
- /* metadata */
+ /* metadata */
case GST_MATROSKA_ID_TAGS:{
- if (!demux->index_parsed) {
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- res = gst_matroska_demux_parse_metadata (demux, FALSE);
- } else
- res = gst_ebml_read_skip (ebml);
- break;
+ if (!demux->index_parsed) {
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ res = gst_matroska_demux_parse_metadata (demux, FALSE);
+ } else
+ res = gst_ebml_read_skip (ebml);
+ break;
}
- /* file index (if seekable, seek to Cues/Tags to parse it) */
+ /* file index (if seekable, seek to Cues/Tags to parse it) */
case GST_MATROSKA_ID_SEEKHEAD:{
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- res = gst_matroska_demux_parse_contents (demux);
- break;
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ res = gst_matroska_demux_parse_contents (demux);
+ break;
}
case GST_MATROSKA_ID_CLUSTER:{
- if (!gst_ebml_read_master (ebml, &id)) {
- res = FALSE;
- break;
- }
- /* The idea is that we parse one cluster per loop and
- * then break out of the loop here. In the next call
- * of the loopfunc, we will get back here with the
- * next cluster. If an error occurs, we didn't
- * actually push a buffer, but we still want to break
- * out of the loop to handle a possible error. We'll
- * get back here if it's recoverable. */
- gst_matroska_demux_parse_cluster (demux);
- demux->state = GST_MATROSKA_DEMUX_STATE_DATA;
- res = FALSE;
- break;
+ if (!gst_ebml_read_master (ebml, &id)) {
+ res = FALSE;
+ break;
+ }
+ /* The idea is that we parse one cluster per loop and
+ * then break out of the loop here. In the next call
+ * of the loopfunc, we will get back here with the
+ * next cluster. If an error occurs, we didn't
+ * actually push a buffer, but we still want to break
+ * out of the loop to handle a possible error. We'll
+ * get back here if it's recoverable. */
+ gst_matroska_demux_parse_cluster (demux);
+ demux->state = GST_MATROSKA_DEMUX_STATE_DATA;
+ res = FALSE;
+ break;
}
default:
- GST_WARNING ("Unknown matroska file header ID 0x%x", id);
- /* fall-through */
+ GST_WARNING ("Unknown matroska file header ID 0x%x", id);
+ /* fall-through */
case GST_EBML_ID_VOID:
- if (!gst_ebml_read_skip (ebml))
- res = FALSE;
- break;
+ if (!gst_ebml_read_skip (ebml))
+ res = FALSE;
+ break;
}
if (demux->level_up) {
@@ -2190,13 +2190,13 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * videocontext,
/* assure size is big enough */
if (size < 24) {
- GST_WARNING ("Too small BITMAPINFOHEADER (%d bytes)", size);
- return NULL;
+ GST_WARNING ("Too small BITMAPINFOHEADER (%d bytes)", size);
+ return NULL;
}
if (size < sizeof (gst_riff_strf_vids)) {
- vids =
- (gst_riff_strf_vids *) g_realloc (vids,
- sizeof (gst_riff_strf_vids));
+ vids =
+ (gst_riff_strf_vids *) g_realloc (vids,
+ sizeof (gst_riff_strf_vids));
}
/* little-endian -> byte-order */
@@ -2213,14 +2213,14 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * videocontext,
vids->imp_colors = GUINT32_FROM_LE (vids->imp_colors);
caps = gst_riff_create_video_caps (vids->compression, NULL, vids,
- &codec_name);
+ &codec_name);
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, GST_TAG_VIDEO_CODEC,
- codec_name, NULL);
+ codec_name, NULL);
if (GST_IS_ELEMENT (demux))
- gst_element_found_tags (GST_ELEMENT (demux), list);
+ gst_element_found_tags (GST_ELEMENT (demux), list);
gst_tag_list_free (list);
if (codec_name)
- g_free (codec_name);
+ g_free (codec_name);
} else {
caps = gst_riff_create_video_template_caps ();
}
@@ -2230,39 +2230,39 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * videocontext,
guint32 fourcc = 0;
switch (videocontext->fourcc) {
- case GST_MAKE_FOURCC ('I', '4', '2', '0'):
- case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
- fourcc = videocontext->fourcc;
- break;
-
- default:
- GST_DEBUG ("Unknown fourcc " GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (videocontext->fourcc));
- return NULL;
+ case GST_MAKE_FOURCC ('I', '4', '2', '0'):
+ case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
+ fourcc = videocontext->fourcc;
+ break;
+
+ default:
+ GST_DEBUG ("Unknown fourcc " GST_FOURCC_FORMAT,
+ GST_FOURCC_ARGS (videocontext->fourcc));
+ return NULL;
}
caps = gst_caps_new_simple ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, fourcc, NULL);
+ "format", GST_TYPE_FOURCC, fourcc, NULL);
} else {
caps = gst_caps_from_string ("video/x-raw-yuv, "
- "format = (fourcc) { I420, YUY2, YV12 }");
+ "format = (fourcc) { I420, YUY2, YV12 }");
}
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_SP)) {
caps = gst_caps_new_simple ("video/x-divx",
- "divxversion", G_TYPE_INT, 4, NULL);
+ "divxversion", G_TYPE_INT, 4, NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_ASP) ||
!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_AP)) {
caps = gst_caps_new_full (gst_structure_new ("video/x-divx",
- "divxversion", G_TYPE_INT, 5, NULL),
- gst_structure_new ("video/x-xvid", NULL),
- gst_structure_new ("video/mpeg",
- "mpegversion", G_TYPE_INT, 4,
- "systemstream", G_TYPE_BOOLEAN, FALSE, NULL), NULL);
+ "divxversion", G_TYPE_INT, 5, NULL),
+ gst_structure_new ("video/x-xvid", NULL),
+ gst_structure_new ("video/mpeg",
+ "mpegversion", G_TYPE_INT, 4,
+ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL), NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MSMPEG4V3)) {
caps = gst_caps_new_full (gst_structure_new ("video/x-divx",
- "divxversion", G_TYPE_INT, 3, NULL),
- gst_structure_new ("video/x-msmpeg",
- "msmpegversion", G_TYPE_INT, 43, NULL), NULL);
+ "divxversion", G_TYPE_INT, 3, NULL),
+ gst_structure_new ("video/x-msmpeg",
+ "msmpegversion", G_TYPE_INT, 43, NULL), NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG1) ||
!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MPEG2)) {
gint mpegversion = -1;
@@ -2275,8 +2275,8 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * videocontext,
g_assert (0);
caps = gst_caps_new_simple ("video/mpeg",
- "systemstream", G_TYPE_BOOLEAN, FALSE,
- "mpegversion", G_TYPE_INT, mpegversion, NULL);
+ "systemstream", G_TYPE_BOOLEAN, FALSE,
+ "mpegversion", G_TYPE_INT, mpegversion, NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_MJPEG)) {
caps = gst_caps_new_simple ("video/x-jpeg", NULL);
} else {
@@ -2291,46 +2291,46 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * videocontext,
for (i = 0; i < gst_caps_get_size (caps); i++) {
structure = gst_caps_get_structure (caps, i);
if (videocontext != NULL) {
- if (videocontext->pixel_width > 0 && videocontext->pixel_height > 0) {
- gint w = videocontext->pixel_width;
- gint h = videocontext->pixel_height;
-
- gst_structure_set (structure,
- "width", G_TYPE_INT, w, "height", G_TYPE_INT, h, NULL);
- } else {
- gst_structure_set (structure,
- "width", GST_TYPE_INT_RANGE, 16, 4096,
- "height", GST_TYPE_INT_RANGE, 16, 4096, NULL);
- }
+ if (videocontext->pixel_width > 0 && videocontext->pixel_height > 0) {
+ gint w = videocontext->pixel_width;
+ gint h = videocontext->pixel_height;
+
+ gst_structure_set (structure,
+ "width", G_TYPE_INT, w, "height", G_TYPE_INT, h, NULL);
+ } else {
+ gst_structure_set (structure,
+ "width", GST_TYPE_INT_RANGE, 16, 4096,
+ "height", GST_TYPE_INT_RANGE, 16, 4096, NULL);
+ }
#if 0
- if (videocontext->display_width > 0 && videocontext->display_height > 0) {
- gint w =
- 100 * videocontext->display_width / videocontext->pixel_width;
- gint h =
- 100 * videocontext->display_height / videocontext->pixel_height;
-
- gst_structure_set (structure,
- "pixel_width", G_TYPE_INT, w,
- "pixel_height", G_TYPE_INT, h, NULL);
- }
+ if (videocontext->display_width > 0 && videocontext->display_height > 0) {
+ gint w =
+ 100 * videocontext->display_width / videocontext->pixel_width;
+ gint h =
+ 100 * videocontext->display_height / videocontext->pixel_height;
+
+ gst_structure_set (structure,
+ "pixel_width", G_TYPE_INT, w,
+ "pixel_height", G_TYPE_INT, h, NULL);
+ }
#endif
- if (context->default_duration > 0) {
- gfloat framerate = 1. * GST_SECOND / context->default_duration;
-
- gst_structure_set (structure,
- "framerate", G_TYPE_DOUBLE, framerate, NULL);
- } else {
- /* sort of a hack to get most codecs to support,
- * even if the default_duration is missing */
- gst_structure_set (structure, "framerate", G_TYPE_DOUBLE, 25.0, NULL);
- }
+ if (context->default_duration > 0) {
+ gfloat framerate = 1. * GST_SECOND / context->default_duration;
+
+ gst_structure_set (structure,
+ "framerate", G_TYPE_DOUBLE, framerate, NULL);
+ } else {
+ /* sort of a hack to get most codecs to support,
+ * even if the default_duration is missing */
+ gst_structure_set (structure, "framerate", G_TYPE_DOUBLE, 25.0, NULL);
+ }
} else {
- gst_structure_set (structure,
- "width", GST_TYPE_INT_RANGE, 16, 4096,
- "height", GST_TYPE_INT_RANGE, 16, 4096,
- "pixel_width", GST_TYPE_INT_RANGE, 0, 255,
- "pixel_height", GST_TYPE_INT_RANGE, 0, 255,
- "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
+ gst_structure_set (structure,
+ "width", GST_TYPE_INT_RANGE, 16, 4096,
+ "height", GST_TYPE_INT_RANGE, 16, 4096,
+ "pixel_width", GST_TYPE_INT_RANGE, 0, 255,
+ "pixel_height", GST_TYPE_INT_RANGE, 0, 255,
+ "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL);
}
}
}
@@ -2360,7 +2360,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * audiocontext,
g_assert (0);
caps = gst_caps_new_simple ("audio/mpeg",
- "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, layer, NULL);
+ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, layer, NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_BE) ||
!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_LE)) {
gint endianness = -1;
@@ -2374,22 +2374,22 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * audiocontext,
if (context != NULL) {
caps = gst_caps_new_simple ("audio/x-raw-int",
- "width", G_TYPE_INT, audiocontext->bitdepth,
- "depth", G_TYPE_INT, audiocontext->bitdepth,
- "signed", G_TYPE_BOOLEAN, audiocontext->bitdepth == 8, NULL);
+ "width", G_TYPE_INT, audiocontext->bitdepth,
+ "depth", G_TYPE_INT, audiocontext->bitdepth,
+ "signed", G_TYPE_BOOLEAN, audiocontext->bitdepth == 8, NULL);
} else {
caps = gst_caps_from_string ("audio/x-raw-int, "
- "signed = (boolean) { TRUE, FALSE }, "
- "depth = (int) { 8, 16 }, " "width = (int) { 8, 16 }");
+ "signed = (boolean) { TRUE, FALSE }, "
+ "depth = (int) { 8, 16 }, " "width = (int) { 8, 16 }");
}
gst_caps_set_simple (caps, "endianness", G_TYPE_INT, endianness, NULL);
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_PCM_FLOAT)) {
caps = gst_caps_new_simple ("audio/x-raw-float",
- "endianness", G_TYPE_INT, G_BYTE_ORDER,
- "buffer-frames", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+ "endianness", G_TYPE_INT, G_BYTE_ORDER,
+ "buffer-frames", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
if (audiocontext != NULL) {
gst_caps_set_simple (caps,
- "width", G_TYPE_INT, audiocontext->bitdepth, NULL);
+ "width", G_TYPE_INT, audiocontext->bitdepth, NULL);
} else {
gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 32, 64, NULL);
}
@@ -2417,32 +2417,32 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * audiocontext,
caps = gst_riff_create_audio_caps (auds->format, NULL, auds, &codec_name);
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, GST_TAG_AUDIO_CODEC,
- codec_name, NULL);
+ codec_name, NULL);
if (GST_IS_ELEMENT (demux))
- gst_element_found_tags (GST_ELEMENT (demux), list);
+ gst_element_found_tags (GST_ELEMENT (demux), list);
gst_tag_list_free (list);
if (codec_name)
- g_free (codec_name);
+ g_free (codec_name);
} else {
caps = gst_riff_create_audio_template_caps ();
}
} else if (!strncmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_MPEG2,
- strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG2)) ||
+ strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG2)) ||
!strncmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_MPEG4,
- strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG4))) {
+ strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG4))) {
gint mpegversion = -1;
if (!strncmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_MPEG2,
- strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG2)))
+ strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG2)))
mpegversion = 2;
else if (!strncmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_MPEG4,
- strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG4)))
+ strlen (GST_MATROSKA_CODEC_ID_AUDIO_MPEG4)))
mpegversion = 4;
else
g_assert (0);
caps = gst_caps_new_simple ("audio/mpeg",
- "mpegversion", G_TYPE_INT, mpegversion, NULL);
+ "mpegversion", G_TYPE_INT, mpegversion, NULL);
} else {
GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id);
return NULL;
@@ -2455,15 +2455,15 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * audiocontext,
for (i = 0; i < gst_caps_get_size (caps); i++) {
structure = gst_caps_get_structure (caps, i);
if (audiocontext != NULL) {
- if (audiocontext->samplerate > 0 && audiocontext->channels > 0) {
- gst_structure_set (structure,
- "channels", G_TYPE_INT, audiocontext->channels,
- "rate", G_TYPE_INT, audiocontext->samplerate, NULL);
- }
+ if (audiocontext->samplerate > 0 && audiocontext->channels > 0) {
+ gst_structure_set (structure,
+ "channels", G_TYPE_INT, audiocontext->channels,
+ "rate", G_TYPE_INT, audiocontext->samplerate, NULL);
+ }
} else {
- gst_structure_set (structure,
- "channels", GST_TYPE_INT_RANGE, 1, 6,
- "rate", GST_TYPE_INT_RANGE, 4000, 96000, NULL);
+ gst_structure_set (structure,
+ "channels", GST_TYPE_INT_RANGE, 1, 6,
+ "rate", GST_TYPE_INT_RANGE, 4000, 96000, NULL);
}
}
}
@@ -2551,27 +2551,30 @@ gst_matroska_demux_plugin_init (GstPlugin * plugin)
/* TODO: Real/Quicktime */
/* FILLME */
NULL,
- }, *audio_id[] = {
+ }, *audio_id[] =
+ {
GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1,
- GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2,
- GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L3,
- GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_BE,
- GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_LE,
- GST_MATROSKA_CODEC_ID_AUDIO_PCM_FLOAT,
- GST_MATROSKA_CODEC_ID_AUDIO_AC3,
- GST_MATROSKA_CODEC_ID_AUDIO_ACM,
- GST_MATROSKA_CODEC_ID_AUDIO_VORBIS,
- GST_MATROSKA_CODEC_ID_AUDIO_MPEG2, GST_MATROSKA_CODEC_ID_AUDIO_MPEG4,
- /* TODO: AC3-9/10, Real, Musepack, Quicktime */
- /* FILLME */
- NULL,}, *complex_id[] = {
+ GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2,
+ GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L3,
+ GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_BE,
+ GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_LE,
+ GST_MATROSKA_CODEC_ID_AUDIO_PCM_FLOAT,
+ GST_MATROSKA_CODEC_ID_AUDIO_AC3,
+ GST_MATROSKA_CODEC_ID_AUDIO_ACM,
+ GST_MATROSKA_CODEC_ID_AUDIO_VORBIS,
+ GST_MATROSKA_CODEC_ID_AUDIO_MPEG2, GST_MATROSKA_CODEC_ID_AUDIO_MPEG4,
+ /* TODO: AC3-9/10, Real, Musepack, Quicktime */
+ /* FILLME */
+ NULL,}
+ , *complex_id[] = {
/* FILLME */
- NULL,}, *subtitle_id[] = {
+ NULL,}
+ , *subtitle_id[] = {
/* FILLME */
NULL,};
/* this filter needs the riff parser */
- if (!gst_library_load ("gstbytestream") || !gst_library_load ("riff")) /* for fourcc stuff */
+ if (!gst_library_load ("gstbytestream") || !gst_library_load ("riff")) /* for fourcc stuff */
return FALSE;
/* video src template */
@@ -2607,7 +2610,7 @@ gst_matroska_demux_plugin_init (GstPlugin * plugin)
/* create an elementfactory for the matroska_demux element */
if (!gst_element_register (plugin, "matroskademux",
- GST_RANK_PRIMARY, GST_TYPE_MATROSKA_DEMUX))
+ GST_RANK_PRIMARY, GST_TYPE_MATROSKA_DEMUX))
return FALSE;
return TRUE;
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index ebaff887..67eae139 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -58,19 +58,19 @@ static GstStaticPadTemplate videosink_templ =
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("video/mpeg, "
- "mpegversion = (int) { 1, 2, 4 }, "
- "systemstream = (boolean) false, "
- COMMON_VIDEO_CAPS "; "
- "video/x-divx, "
- COMMON_VIDEO_CAPS "; "
- "video/x-xvid, "
- COMMON_VIDEO_CAPS "; "
- "video/x-msmpeg, "
- COMMON_VIDEO_CAPS "; "
- "video/x-jpeg, "
- COMMON_VIDEO_CAPS "; "
- "video/x-raw-yuv, "
- "format = (fourcc) { YUY2, I420 }, " COMMON_VIDEO_CAPS)
+ "mpegversion = (int) { 1, 2, 4 }, "
+ "systemstream = (boolean) false, "
+ COMMON_VIDEO_CAPS "; "
+ "video/x-divx, "
+ COMMON_VIDEO_CAPS "; "
+ "video/x-xvid, "
+ COMMON_VIDEO_CAPS "; "
+ "video/x-msmpeg, "
+ COMMON_VIDEO_CAPS "; "
+ "video/x-jpeg, "
+ COMMON_VIDEO_CAPS "; "
+ "video/x-raw-yuv, "
+ "format = (fourcc) { YUY2, I420 }, " COMMON_VIDEO_CAPS)
);
#define COMMON_AUDIO_CAPS \
@@ -86,19 +86,19 @@ static GstStaticPadTemplate audiosink_templ =
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("audio/mpeg, "
- "mpegversion = (int) 1, "
- "layer = (int) [ 1, 3 ], "
- COMMON_AUDIO_CAPS "; "
- "audio/mpeg, "
- "mpegversion = (int) { 2, 4 }, "
- COMMON_AUDIO_CAPS "; "
- "audio/x-ac3, "
- COMMON_AUDIO_CAPS "; "
- "audio/x-raw-int, "
- "width = (int) { 8, 16, 24 }, "
- "depth = (int) { 8, 16, 24 }, "
- "endianness = (int) { BIG_ENDIAN, LITTLE_ENDIAN }, "
- "signed = (boolean) { true, false }, " COMMON_AUDIO_CAPS)
+ "mpegversion = (int) 1, "
+ "layer = (int) [ 1, 3 ], "
+ COMMON_AUDIO_CAPS "; "
+ "audio/mpeg, "
+ "mpegversion = (int) { 2, 4 }, "
+ COMMON_AUDIO_CAPS "; "
+ "audio/x-ac3, "
+ COMMON_AUDIO_CAPS "; "
+ "audio/x-raw-int, "
+ "width = (int) { 8, 16, 24 }, "
+ "depth = (int) { 8, 16, 24 }, "
+ "endianness = (int) { BIG_ENDIAN, LITTLE_ENDIAN }, "
+ "signed = (boolean) { true, false }, " COMMON_AUDIO_CAPS)
);
static GstStaticPadTemplate subtitlesink_templ =
@@ -155,8 +155,8 @@ gst_matroska_mux_get_type (void)
};
gst_matroska_mux_type =
- g_type_register_static (GST_TYPE_EBML_WRITE,
- "GstMatroskaMmux", &gst_matroska_mux_info, 0);
+ g_type_register_static (GST_TYPE_EBML_WRITE,
+ "GstMatroskaMmux", &gst_matroska_mux_info, 0);
}
return gst_matroska_mux_type;
@@ -195,7 +195,7 @@ gst_matroska_mux_class_init (GstMatroskaMuxClass * klass)
g_object_class_install_property (gobject_class, ARG_METADATA,
g_param_spec_boxed ("metadata", "Metadata", "Metadata",
- GST_TYPE_CAPS, G_PARAM_READWRITE));
+ GST_TYPE_CAPS, G_PARAM_READWRITE));
parent_class = g_type_class_ref (GST_TYPE_EBML_WRITE);
@@ -214,7 +214,7 @@ gst_matroska_mux_init (GstMatroskaMux * mux)
mux->srcpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
- "src"), "src");
+ "src"), "src");
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
GST_EBML_WRITE (mux)->srcpad = mux->srcpad;
@@ -244,7 +244,7 @@ gst_matroska_mux_reset (GstElement * element)
for (i = 0; i < GST_MATROSKA_MUX_MAX_STREAMS; i++) {
if (mux->sink[i].track != NULL) {
if (mux->sink[i].track->pad != NULL) {
- gst_element_remove_pad (GST_ELEMENT (mux), mux->sink[i].track->pad);
+ gst_element_remove_pad (GST_ELEMENT (mux), mux->sink[i].track->pad);
}
g_free (mux->sink[i].track->codec_id);
g_free (mux->sink[i].track->codec_name);
@@ -268,7 +268,7 @@ gst_matroska_mux_reset (GstElement * element)
/* reset media info (to default) */
gst_caps_replace (&mux->metadata,
gst_caps_new_simple ("application/x-gst-metadata",
- "application", G_TYPE_STRING, "", "date", G_TYPE_STRING, "", NULL));
+ "application", G_TYPE_STRING, "", "date", G_TYPE_STRING, "", NULL));
/* reset indexes */
mux->num_indexes = 0;
@@ -295,7 +295,7 @@ gst_matroska_mux_video_pad_link (GstPad * pad, const GstCaps * caps)
/* find context */
for (i = 0; i < mux->num_streams; i++) {
if (mux->sink[i].track && mux->sink[i].track->pad &&
- mux->sink[i].track->pad == pad) {
+ mux->sink[i].track->pad == pad) {
context = mux->sink[i].track;
break;
}
@@ -356,14 +356,14 @@ gst_matroska_mux_video_pad_link (GstPad * pad, const GstCaps * caps)
gst_structure_get_int (structure, "divxversion", &divxversion);
switch (divxversion) {
case 3:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MSMPEG4V3);
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MSMPEG4V3);
+ break;
case 4:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_SP);
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_SP);
+ break;
case 5:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_ASP);
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_ASP);
+ break;
}
return GST_PAD_LINK_OK;
@@ -377,14 +377,14 @@ gst_matroska_mux_video_pad_link (GstPad * pad, const GstCaps * caps)
gst_structure_get_int (structure, "mpegversion", &mpegversion);
switch (mpegversion) {
case 1:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG1);
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG1);
+ break;
case 2:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG2);
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG2);
+ break;
case 3:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_ASP);
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MPEG4_ASP);
+ break;
}
return GST_PAD_LINK_OK;
@@ -410,7 +410,7 @@ gst_matroska_mux_audio_pad_link (GstPad * pad, const GstCaps * caps)
/* find context */
for (i = 0; i < mux->num_streams; i++) {
if (mux->sink[i].track && mux->sink[i].track->pad &&
- mux->sink[i].track->pad == pad) {
+ mux->sink[i].track->pad == pad) {
context = mux->sink[i].track;
break;
}
@@ -436,28 +436,28 @@ gst_matroska_mux_audio_pad_link (GstPad * pad, const GstCaps * caps)
gst_structure_get_int (structure, "mpegversion", &mpegversion);
switch (mpegversion) {
case 1:{
- gint layer;
-
- gst_structure_get_int (structure, "layer", &layer);
- switch (layer) {
- case 1:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1);
- break;
- case 2:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2);
- break;
- case 3:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L3);
- break;
- }
- break;
+ gint layer;
+
+ gst_structure_get_int (structure, "layer", &layer);
+ switch (layer) {
+ case 1:
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1);
+ break;
+ case 2:
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2);
+ break;
+ case 3:
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L3);
+ break;
+ }
+ break;
}
case 2:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG2 "MAIN");
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG2 "MAIN");
+ break;
case 4:
- context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG4 "MAIN");
- break;
+ context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_AUDIO_MPEG4 "MAIN");
+ break;
}
return GST_PAD_LINK_OK;
@@ -470,7 +470,7 @@ gst_matroska_mux_audio_pad_link (GstPad * pad, const GstCaps * caps)
gst_structure_get_int (structure, "depth", &depth);
gst_structure_get_int (structure, "signed", &signedness);
if (width != depth ||
- (width == 8 && signedness) || (width == 16 && !signedness))
+ (width == 8 && signedness) || (width == 16 && !signedness))
return GST_PAD_LINK_REFUSED;
audiocontext->bitdepth = depth;
@@ -518,21 +518,21 @@ gst_matroska_mux_request_new_pad (GstElement * element,
name = g_strdup_printf ("audio_%d", mux->num_a_streams++);
linkfunc = gst_matroska_mux_audio_pad_link;
context = (GstMatroskaTrackContext *)
- g_new0 (GstMatroskaTrackAudioContext, 1);
+ g_new0 (GstMatroskaTrackAudioContext, 1);
context->type = GST_MATROSKA_TRACK_TYPE_AUDIO;
context->name = g_strdup ("Audio");
} else if (templ == gst_element_class_get_pad_template (klass, "video_%d")) {
name = g_strdup_printf ("video_%d", mux->num_v_streams++);
linkfunc = gst_matroska_mux_video_pad_link;
context = (GstMatroskaTrackContext *)
- g_new0 (GstMatroskaTrackVideoContext, 1);
+ g_new0 (GstMatroskaTrackVideoContext, 1);
context->type = GST_MATROSKA_TRACK_TYPE_VIDEO;
context->name = g_strdup ("Video");
} else if (templ == gst_element_class_get_pad_template (klass, "subtitle_%d")) {
name = g_strdup_printf ("subtitle_%d", mux->num_t_streams++);
linkfunc = gst_matroska_mux_subtitle_pad_link;
context = (GstMatroskaTrackContext *)
- g_new0 (GstMatroskaTrackSubtitleContext, 1);
+ g_new0 (GstMatroskaTrackSubtitleContext, 1);
context->type = GST_MATROSKA_TRACK_TYPE_SUBTITLE;
context->name = g_strdup ("Subtitle");
} else {
@@ -567,30 +567,30 @@ gst_matroska_mux_track_header (GstMatroskaMux * mux,
switch (context->type) {
case GST_MATROSKA_TRACK_TYPE_VIDEO:{
GstMatroskaTrackVideoContext *videocontext =
- (GstMatroskaTrackVideoContext *) context;
+ (GstMatroskaTrackVideoContext *) context;
/* framerate, but not in the video part */
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TRACKDEFAULTDURATION,
- context->default_duration);
+ context->default_duration);
master = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TRACKVIDEO);
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEOPIXELWIDTH,
- videocontext->pixel_width);
+ videocontext->pixel_width);
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEOPIXELHEIGHT,
- videocontext->pixel_height);
+ videocontext->pixel_height);
if (videocontext->display_width && videocontext->display_height) {
- gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEODISPLAYWIDTH,
- videocontext->display_width);
- gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEODISPLAYHEIGHT,
- videocontext->display_height);
+ gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEODISPLAYWIDTH,
+ videocontext->display_width);
+ gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEODISPLAYHEIGHT,
+ videocontext->display_height);
}
if (context->flags & GST_MATROSKA_VIDEOTRACK_INTERLACED)
- gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEOFLAGINTERLACED, 1);
+ gst_ebml_write_uint (ebml, GST_MATROSKA_ID_VIDEOFLAGINTERLACED, 1);
if (videocontext->fourcc) {
- guint32 fcc_le = GUINT32_TO_LE (videocontext->fourcc);
+ guint32 fcc_le = GUINT32_TO_LE (videocontext->fourcc);
- gst_ebml_write_binary (ebml, GST_MATROSKA_ID_VIDEOCOLOURSPACE,
- (gpointer) & fcc_le, 4);
+ gst_ebml_write_binary (ebml, GST_MATROSKA_ID_VIDEOCOLOURSPACE,
+ (gpointer) & fcc_le, 4);
}
gst_ebml_write_master_finish (ebml, master);
@@ -599,18 +599,18 @@ gst_matroska_mux_track_header (GstMatroskaMux * mux,
case GST_MATROSKA_TRACK_TYPE_AUDIO:{
GstMatroskaTrackAudioContext *audiocontext =
- (GstMatroskaTrackAudioContext *) context;
+ (GstMatroskaTrackAudioContext *) context;
master = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_TRACKAUDIO);
if (audiocontext->samplerate != 8000)
- gst_ebml_write_float (ebml, GST_MATROSKA_ID_AUDIOSAMPLINGFREQ,
- audiocontext->samplerate);
+ gst_ebml_write_float (ebml, GST_MATROSKA_ID_AUDIOSAMPLINGFREQ,
+ audiocontext->samplerate);
if (audiocontext->channels != 1)
- gst_ebml_write_uint (ebml, GST_MATROSKA_ID_AUDIOCHANNELS,
- audiocontext->channels);
+ gst_ebml_write_uint (ebml, GST_MATROSKA_ID_AUDIOCHANNELS,
+ audiocontext->channels);
if (audiocontext->bitdepth) {
- gst_ebml_write_uint (ebml, GST_MATROSKA_ID_AUDIOBITDEPTH,
- audiocontext->bitdepth);
+ gst_ebml_write_uint (ebml, GST_MATROSKA_ID_AUDIOBITDEPTH,
+ audiocontext->bitdepth);
}
gst_ebml_write_master_finish (ebml, master);
@@ -625,7 +625,7 @@ gst_matroska_mux_track_header (GstMatroskaMux * mux,
gst_ebml_write_ascii (ebml, GST_MATROSKA_ID_CODECID, context->codec_id);
if (context->codec_priv)
gst_ebml_write_binary (ebml, GST_MATROSKA_ID_CODECPRIVATE,
- context->codec_priv, context->codec_priv_size);
+ context->codec_priv, context->codec_priv_size);
/* FIXME: until we have a nice way of getting the codecname
* out of the caps, I'm not going to enable this. Too much
* (useless, double, boring) work... */
@@ -681,11 +681,11 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_MUXINGAPP, "GStreamer");
if (mux->metadata &&
gst_structure_has_field (gst_caps_get_structure (mux->metadata, 0),
- "application")) {
+ "application")) {
const gchar *app;
app = gst_structure_get_string (gst_caps_get_structure (mux->metadata, 0),
- "application");
+ "application");
if (app && app[0]) {
gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_WRITINGAPP, app);
}
@@ -730,14 +730,14 @@ gst_matroska_mux_finish (GstMatroskaMux * mux)
GstMatroskaIndex *idx = &mux->index[n];
pointentry_master = gst_ebml_write_master_start (ebml,
- GST_MATROSKA_ID_POINTENTRY);
+ GST_MATROSKA_ID_POINTENTRY);
gst_ebml_write_date (ebml, GST_MATROSKA_ID_CUETIME,
- idx->time / mux->time_scale);
+ idx->time / mux->time_scale);
trackpos_master = gst_ebml_write_master_start (ebml,
- GST_MATROSKA_ID_CUETRACKPOSITION);
+ GST_MATROSKA_ID_CUETRACKPOSITION);
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_CUETRACK, idx->track);
gst_ebml_write_uint (ebml, GST_MATROSKA_ID_CUECLUSTERPOSITION,
- idx->pos - mux->segment_master);
+ idx->pos - mux->segment_master);
gst_ebml_write_master_finish (ebml, trackpos_master);
gst_ebml_write_master_finish (ebml, pointentry_master);
}
@@ -764,7 +764,7 @@ gst_matroska_mux_finish (GstMatroskaMux * mux)
mux->tracks_pos - mux->segment_master);
if (mux->index != NULL) {
gst_ebml_replace_uint (ebml, mux->seekhead_pos + 88,
- mux->cues_pos - mux->segment_master);
+ mux->cues_pos - mux->segment_master);
} else {
/* void'ify */
guint64 my_pos = ebml->pos;
@@ -796,24 +796,24 @@ gst_matroska_mux_prepare_data (GstMatroskaMux * mux)
for (i = 0; i < mux->num_streams; i++) {
while (!mux->sink[i].eos && !mux->sink[i].buffer &&
- mux->sink[i].track->num > 0 &&
- GST_PAD_IS_USABLE (mux->sink[i].track->pad)) {
+ mux->sink[i].track->num > 0 &&
+ GST_PAD_IS_USABLE (mux->sink[i].track->pad)) {
GstData *data;
data = gst_pad_pull (mux->sink[i].track->pad);
if (GST_IS_EVENT (data)) {
- if (GST_EVENT_TYPE (GST_EVENT (data)) == GST_EVENT_EOS)
- mux->sink[i].eos = TRUE;
- gst_event_unref (GST_EVENT (data));
+ if (GST_EVENT_TYPE (GST_EVENT (data)) == GST_EVENT_EOS)
+ mux->sink[i].eos = TRUE;
+ gst_event_unref (GST_EVENT (data));
} else {
- mux->sink[i].buffer = GST_BUFFER (data);
+ mux->sink[i].buffer = GST_BUFFER (data);
}
}
if (mux->sink[i].buffer) {
if (first < 0 || GST_BUFFER_TIMESTAMP (mux->sink[i].buffer) <
- GST_BUFFER_TIMESTAMP (mux->sink[first].buffer))
- first = i;
+ GST_BUFFER_TIMESTAMP (mux->sink[first].buffer))
+ first = i;
}
}
@@ -854,7 +854,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux)
if (mux->num_indexes % 32 == 0) {
mux->index = g_renew (GstMatroskaIndex, mux->index,
- mux->num_indexes + 32);
+ mux->num_indexes + 32);
}
idx = &mux->index[mux->num_indexes++];
diff --git a/gst/median/gstmedian.c b/gst/median/gstmedian.c
index 9ce8430a..db8fa455 100644
--- a/gst/median/gstmedian.c
+++ b/gst/median/gstmedian.c
@@ -98,8 +98,9 @@ gst_median_get_type (void)
0,
(GInstanceInitFunc) gst_median_init,
};
+
median_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstMedian", &median_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstMedian", &median_info, 0);
}
return median_type;
}
@@ -127,9 +128,9 @@ gst_median_class_init (GstMedianClass * klass)
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ACTIVE, g_param_spec_boolean ("active", "active", "active", TRUE, G_PARAM_READWRITE)); /* CHECKME */
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FILTERSIZE, g_param_spec_int ("filtersize", "filtersize", "filtersize", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LUM_ONLY, g_param_spec_boolean ("lum_only", "lum_only", "lum_only", TRUE, G_PARAM_READWRITE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ACTIVE, g_param_spec_boolean ("active", "active", "active", TRUE, G_PARAM_READWRITE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FILTERSIZE, g_param_spec_int ("filtersize", "filtersize", "filtersize", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LUM_ONLY, g_param_spec_boolean ("lum_only", "lum_only", "lum_only", TRUE, G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_median_set_property;
gobject_class->get_property = gst_median_get_property;
@@ -333,25 +334,25 @@ gst_median_chain (GstPad * pad, GstData * _data)
median_5 (data, GST_BUFFER_DATA (outbuf), median->width, median->height);
if (!median->lum_only) {
median_5 (data + lumsize, GST_BUFFER_DATA (outbuf) + lumsize,
- median->width / 2, median->height / 2);
+ median->width / 2, median->height / 2);
median_5 (data + lumsize + chromsize,
- GST_BUFFER_DATA (outbuf) + lumsize + chromsize, median->width / 2,
- median->height / 2);
+ GST_BUFFER_DATA (outbuf) + lumsize + chromsize, median->width / 2,
+ median->height / 2);
} else {
memcpy (GST_BUFFER_DATA (outbuf) + lumsize, data + lumsize,
- chromsize * 2);
+ chromsize * 2);
}
} else {
median_9 (data, GST_BUFFER_DATA (outbuf), median->width, median->height);
if (!median->lum_only) {
median_9 (data + lumsize, GST_BUFFER_DATA (outbuf) + lumsize,
- median->width / 2, median->height / 2);
+ median->width / 2, median->height / 2);
median_9 (data + lumsize + chromsize,
- GST_BUFFER_DATA (outbuf) + lumsize + chromsize, median->width / 2,
- median->height / 2);
+ GST_BUFFER_DATA (outbuf) + lumsize + chromsize, median->width / 2,
+ median->height / 2);
} else {
memcpy (GST_BUFFER_DATA (outbuf) + lumsize, data + lumsize,
- chromsize * 2);
+ chromsize * 2);
}
}
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
@@ -376,10 +377,10 @@ gst_median_set_property (GObject * object, guint prop_id, const GValue * value,
case ARG_FILTERSIZE:
argvalue = g_value_get_int (value);
if (argvalue != 5 && argvalue != 9) {
- g_warning ("median: invalid filtersize (%d), must be 5 or 9\n",
- argvalue);
+ g_warning ("median: invalid filtersize (%d), must be 5 or 9\n",
+ argvalue);
} else {
- median->filtersize = argvalue;
+ median->filtersize = argvalue;
}
break;
case ARG_ACTIVE:
diff --git a/gst/monoscope/convolve.c b/gst/monoscope/convolve.c
index 6b8cdd50..fc4f90b6 100644
--- a/gst/monoscope/convolve.c
+++ b/gst/monoscope/convolve.c
@@ -68,13 +68,16 @@ typedef union stack_entry_s
{
const double *left, *right;
double *out;
- } v;
+ }
+ v;
struct
{
double *main, *null;
- } b;
+ }
+ b;
-} stack_entry;
+}
+stack_entry;
#define STACK_SIZE (CONVOLVE_DEPTH * 3)
@@ -175,11 +178,11 @@ convolve_run (stack_entry * top, unsigned size, double *scratch)
/* Create the intermediate factors. */
for (i = 0; i < size; i++) {
- double l = left[i] + left[i + size];
- double r = right[i] + right[i + size];
+ double l = left[i] + left[i + size];
+ double r = right[i] + right[i + size];
- s_left[i + size] = r;
- s_left[i] = l;
+ s_left[i + size] = r;
+ s_left[i] = l;
}
/* Push the combine entry onto the stack. */
@@ -227,15 +230,15 @@ convolve_run (stack_entry * top, unsigned size, double *scratch)
top++;
out[size * 2 - 1] = 0;
for (i = 0; i < size - 1; i++) {
- double lo;
- double hi;
-
- lo = mid[0] - (out[0] + out[2 * size]) + out[size];
- hi = mid[size] - (out[size] + out[3 * size]) + out[2 * size];
- out[size] = lo;
- out[2 * size] = hi;
- out++;
- mid++;
+ double lo;
+ double hi;
+
+ lo = mid[0] - (out[0] + out[2 * size]) + out[size];
+ hi = mid[size] - (out[size] + out[3 * size]) + out[2 * size];
+ out[size] = lo;
+ out[2 * size] = hi;
+ out++;
+ mid++;
}
size <<= 1;
} while (top->b.null == NULL);
@@ -281,7 +284,7 @@ convolve_match (const int *lastchoice,
for (i = 0; i < 256; i++)
right[i] -= avg;
/* End-of-stack marker. */
-#if 0 /* The following line produces a CRASH, need to figure out why?!! */
+#if 0 /* The following line produces a CRASH, need to figure out why?!! */
top[1].b.null = scratch;
#endif
top[1].b.main = NULL;
@@ -327,11 +330,11 @@ convolve_match (const int *lastchoice,
unsigned int j;
for (j = 0; j < 256; j++)
- tot += ((double) input[i + j]) * ((double) lastchoice[j] - avg);
+ tot += ((double) input[i + j]) * ((double) lastchoice[j] - avg);
if (tot > best)
- printf ("(%i)", i);
+ printf ("(%i)", i);
if (tot != left[i + 255])
- printf ("!");
+ printf ("!");
}
printf ("%i\n", p);
diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c
index f8e82b2f..4582e5bc 100644
--- a/gst/monoscope/gstmonoscope.c
+++ b/gst/monoscope/gstmonoscope.c
@@ -126,6 +126,7 @@ gst_monoscope_get_type (void)
0,
(GInstanceInitFunc) gst_monoscope_init,
};
+
type = g_type_register_static (GST_TYPE_ELEMENT, "GstMonoscope", &info, 0);
}
return type;
@@ -177,7 +178,7 @@ gst_monoscope_init (GstMonoscope * monoscope)
monoscope->first_buffer = TRUE;
monoscope->width = 256;
monoscope->height = 128;
- monoscope->fps = 25.; /* desired frame rate */
+ monoscope->fps = 25.; /* desired frame rate */
}
static GstPadLinkReturn
@@ -216,7 +217,7 @@ gst_monoscope_chain (GstPad * pad, GstData * _data)
/* FIXME: should really select the first 1024 samples after the timestamp. */
if (GST_BUFFER_TIMESTAMP (bufin) < monoscope->next_time || samples_in < 1024) {
GST_DEBUG ("timestamp is %" G_GUINT64_FORMAT ": want >= %" G_GUINT64_FORMAT,
- GST_BUFFER_TIMESTAMP (bufin), monoscope->next_time);
+ GST_BUFFER_TIMESTAMP (bufin), monoscope->next_time);
gst_buffer_unref (bufin);
return;
}
@@ -233,8 +234,8 @@ gst_monoscope_chain (GstPad * pad, GstData * _data)
GST_DEBUG ("making new pad");
if (!gst_pad_is_negotiated (monoscope->srcpad)) {
if (gst_pad_renegotiate (monoscope->srcpad) <= 0) {
- GST_ELEMENT_ERROR (monoscope, CORE, NEGOTIATION, (NULL), (NULL));
- return;
+ GST_ELEMENT_ERROR (monoscope, CORE, NEGOTIATION, (NULL), (NULL));
+ return;
}
}
monoscope->first_buffer = FALSE;
diff --git a/gst/monoscope/monoscope.c b/gst/monoscope/monoscope.c
index 20a68099..356237e9 100644
--- a/gst/monoscope/monoscope.c
+++ b/gst/monoscope/monoscope.c
@@ -87,7 +87,7 @@ monoscope_update (struct monoscope_state * stateptr, gint16 data[512])
}
stateptr->avgMax += max - (stateptr->avgMax >> 8);
if (stateptr->avgMax < max)
- stateptr->avgMax = max; /* Avoid overflow */
+ stateptr->avgMax = max; /* Avoid overflow */
factor = 0x7fffffff / stateptr->avgMax;
/* Keep the scaling sensible. */
if (factor > (1 << 18))
@@ -106,15 +106,15 @@ monoscope_update (struct monoscope_state * stateptr, gint16 data[512])
if ((bar > 0) && (bar < (256 * 128))) {
loc = stateptr->display + bar;
if (foo < 0) {
- for (h = 0; h <= (-foo); h++) {
- *loc = stateptr->colors[h];
- loc += 256;
- }
+ for (h = 0; h <= (-foo); h++) {
+ *loc = stateptr->colors[h];
+ loc += 256;
+ }
} else {
- for (h = 0; h <= foo; h++) {
- *loc = stateptr->colors[h];
- loc -= 256;
- }
+ for (h = 0; h <= foo; h++) {
+ *loc = stateptr->colors[h];
+ loc -= 256;
+ }
}
}
}
@@ -124,7 +124,7 @@ monoscope_update (struct monoscope_state * stateptr, gint16 data[512])
for (h = 0; h < 256; h += 2) {
stateptr->display[(i << 8) + h] = stateptr->colors[63];
if (i == 64)
- stateptr->display[(i << 8) + h + 1] = stateptr->colors[63];
+ stateptr->display[(i << 8) + h + 1] = stateptr->colors[63];
}
}
for (i = 16; i < 256; i += 16) {
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index f7914e24..ad1e3232 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -173,9 +173,10 @@ gst_qtdemux_get_type (void)
NULL, NULL, sizeof (GstQTDemux), 0,
(GInstanceInitFunc) gst_qtdemux_init,
};
+
qtdemux_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstQTDemux", &qtdemux_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstQTDemux", &qtdemux_info,
+ 0);
}
return qtdemux_type;
}
@@ -254,35 +255,35 @@ gst_qtdemux_src_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
switch (src_format) {
case GST_FORMAT_TIME:
switch (*dest_format) {
- case GST_FORMAT_BYTES:
- *dest_value = src_value * 1; /* FIXME */
- break;
- case GST_FORMAT_DEFAULT:
- *dest_value = src_value * 1; /* FIXME */
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_BYTES:
+ *dest_value = src_value * 1; /* FIXME */
+ break;
+ case GST_FORMAT_DEFAULT:
+ *dest_value = src_value * 1; /* FIXME */
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_FORMAT_BYTES:
switch (*dest_format) {
- case GST_FORMAT_TIME:
- *dest_value = src_value * 1; /* FIXME */
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *dest_value = src_value * 1; /* FIXME */
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_FORMAT_DEFAULT:
switch (*dest_format) {
- case GST_FORMAT_TIME:
- *dest_value = src_value * 1; /* FIXME */
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *dest_value = src_value * 1; /* FIXME */
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
default:
@@ -326,34 +327,34 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstQueryType type,
switch (type) {
case GST_QUERY_TOTAL:
switch (*format) {
- case GST_FORMAT_TIME:
- *value = 0; /* FIXME */
- break;
- case GST_FORMAT_BYTES:
- *value = 0; /* FIXME */
- break;
- case GST_FORMAT_DEFAULT:
- *value = 0; /* FIXME */
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *value = 0; /* FIXME */
+ break;
+ case GST_FORMAT_BYTES:
+ *value = 0; /* FIXME */
+ break;
+ case GST_FORMAT_DEFAULT:
+ *value = 0; /* FIXME */
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
case GST_QUERY_POSITION:
switch (*format) {
- case GST_FORMAT_TIME:
- *value = 0; /* FIXME */
- break;
- case GST_FORMAT_BYTES:
- *value = 0; /* FIXME */
- break;
- case GST_FORMAT_DEFAULT:
- *value = 0; /* FIXME */
- break;
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_TIME:
+ *value = 0; /* FIXME */
+ break;
+ case GST_FORMAT_BYTES:
+ *value = 0; /* FIXME */
+ break;
+ case GST_FORMAT_DEFAULT:
+ *value = 0; /* FIXME */
+ break;
+ default:
+ res = FALSE;
+ break;
}
break;
default:
@@ -376,19 +377,19 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstEvent * event)
GST_DEBUG ("seek format %d", GST_EVENT_SEEK_FORMAT (event));
switch (GST_EVENT_SEEK_FORMAT (event)) {
- case GST_FORMAT_BYTES:
- case GST_FORMAT_DEFAULT:
- case GST_FORMAT_TIME:
- {
- gint64 desired_offset = GST_EVENT_SEEK_OFFSET (event);
-
- GST_DEBUG ("seeking to %" G_GINT64_FORMAT, desired_offset);
-
- res = FALSE;
- }
- default:
- res = FALSE;
- break;
+ case GST_FORMAT_BYTES:
+ case GST_FORMAT_DEFAULT:
+ case GST_FORMAT_TIME:
+ {
+ gint64 desired_offset = GST_EVENT_SEEK_OFFSET (event);
+
+ GST_DEBUG ("seeking to %" G_GINT64_FORMAT, desired_offset);
+
+ res = FALSE;
+ }
+ default:
+ res = FALSE;
+ break;
}
default:
res = FALSE;
@@ -509,14 +510,14 @@ gst_qtdemux_loop_header (GstElement * element)
case QTDEMUX_STATE_HEADER:
{
do {
- ret = gst_bytestream_peek_bytes (qtdemux->bs, &data, 16);
- if (ret < 16) {
- if (!gst_qtdemux_handle_sink_event (qtdemux)) {
- return;
- }
- } else {
- break;
- }
+ ret = gst_bytestream_peek_bytes (qtdemux->bs, &data, 16);
+ if (ret < 16) {
+ if (!gst_qtdemux_handle_sink_event (qtdemux)) {
+ return;
+ }
+ } else {
+ break;
+ }
} while (1);
length = GUINT32_FROM_BE (*(guint32 *) data);
@@ -525,58 +526,58 @@ gst_qtdemux_loop_header (GstElement * element)
GST_DEBUG ("fourcc " GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
if (length == 0) {
- length = gst_bytestream_length (qtdemux->bs) - cur_offset;
+ length = gst_bytestream_length (qtdemux->bs) - cur_offset;
}
if (length == 1) {
- guint32 length1, length2;
+ guint32 length1, length2;
- length1 = GUINT32_FROM_BE (*(guint32 *) (data + 8));
- GST_DEBUG ("length1 %08x", length1);
- length2 = GUINT32_FROM_BE (*(guint32 *) (data + 12));
- GST_DEBUG ("length2 %08x", length2);
+ length1 = GUINT32_FROM_BE (*(guint32 *) (data + 8));
+ GST_DEBUG ("length1 %08x", length1);
+ length2 = GUINT32_FROM_BE (*(guint32 *) (data + 12));
+ GST_DEBUG ("length2 %08x", length2);
- length = length2;
+ length = length2;
}
switch (fourcc) {
- case GST_MAKE_FOURCC ('m', 'd', 'a', 't'):
- case GST_MAKE_FOURCC ('f', 'r', 'e', 'e'):
- case GST_MAKE_FOURCC ('w', 'i', 'd', 'e'):
- case GST_MAKE_FOURCC ('P', 'I', 'C', 'T'):
- case GST_MAKE_FOURCC ('p', 'n', 'o', 't'):
- break;
- case GST_MAKE_FOURCC ('m', 'o', 'o', 'v'):
- {
- GstBuffer *moov;
-
- do {
- ret = gst_bytestream_read (qtdemux->bs, &moov, length);
- if (ret < length) {
- GST_DEBUG ("read failed (%d < %d)", ret, length);
- if (!gst_qtdemux_handle_sink_event (qtdemux)) {
- return;
- }
- } else {
- break;
- }
- } while (1);
-
- qtdemux_parse_moov (qtdemux, GST_BUFFER_DATA (moov), length);
- if (1)
- qtdemux_node_dump (qtdemux, qtdemux->moov_node);
- qtdemux_parse_tree (qtdemux);
- qtdemux->state = QTDEMUX_STATE_MOVIE;
- break;
- }
- default:
- {
- GST_LOG ("unknown %08x '" GST_FOURCC_FORMAT "' at %d\n",
- fourcc, GST_FOURCC_ARGS (fourcc), cur_offset);
- break;
- }
+ case GST_MAKE_FOURCC ('m', 'd', 'a', 't'):
+ case GST_MAKE_FOURCC ('f', 'r', 'e', 'e'):
+ case GST_MAKE_FOURCC ('w', 'i', 'd', 'e'):
+ case GST_MAKE_FOURCC ('P', 'I', 'C', 'T'):
+ case GST_MAKE_FOURCC ('p', 'n', 'o', 't'):
+ break;
+ case GST_MAKE_FOURCC ('m', 'o', 'o', 'v'):
+ {
+ GstBuffer *moov;
+
+ do {
+ ret = gst_bytestream_read (qtdemux->bs, &moov, length);
+ if (ret < length) {
+ GST_DEBUG ("read failed (%d < %d)", ret, length);
+ if (!gst_qtdemux_handle_sink_event (qtdemux)) {
+ return;
+ }
+ } else {
+ break;
+ }
+ } while (1);
+
+ qtdemux_parse_moov (qtdemux, GST_BUFFER_DATA (moov), length);
+ if (1)
+ qtdemux_node_dump (qtdemux, qtdemux->moov_node);
+ qtdemux_parse_tree (qtdemux);
+ qtdemux->state = QTDEMUX_STATE_MOVIE;
+ break;
+ }
+ default:
+ {
+ GST_LOG ("unknown %08x '" GST_FOURCC_FORMAT "' at %d\n",
+ fourcc, GST_FOURCC_ARGS (fourcc), cur_offset);
+ break;
+ }
}
ret = gst_bytestream_seek (qtdemux->bs, cur_offset + length,
- GST_SEEK_METHOD_SET);
+ GST_SEEK_METHOD_SET);
qtdemux->offset = cur_offset + length;
GST_DEBUG ("seek returned %d\n", ret);
break;
@@ -586,14 +587,14 @@ gst_qtdemux_loop_header (GstElement * element)
guint8 *data;
do {
- ret = gst_bytestream_peek_bytes (qtdemux->bs, &data, 1);
- if (ret < 1) {
- if (!gst_qtdemux_handle_sink_event (qtdemux)) {
- return;
- }
- } else {
- break;
- }
+ ret = gst_bytestream_peek_bytes (qtdemux->bs, &data, 1);
+ if (ret < 1) {
+ if (!gst_qtdemux_handle_sink_event (qtdemux)) {
+ return;
+ }
+ } else {
+ break;
+ }
} while (TRUE);
gst_element_set_eos (element);
@@ -612,25 +613,25 @@ gst_qtdemux_loop_header (GstElement * element)
min_time = G_MAXUINT64;
for (i = 0; i < qtdemux->n_streams; i++) {
- stream = qtdemux->streams[i];
+ stream = qtdemux->streams[i];
- if (stream->sample_index < stream->n_samples &&
- stream->samples[stream->sample_index].timestamp < min_time) {
- min_time = stream->samples[stream->sample_index].timestamp;
- index = i;
- }
+ if (stream->sample_index < stream->n_samples &&
+ stream->samples[stream->sample_index].timestamp < min_time) {
+ min_time = stream->samples[stream->sample_index].timestamp;
+ index = i;
+ }
}
if (index == -1) {
- for (i = 0; i < qtdemux->n_streams; i++) {
- gst_pad_push (qtdemux->streams[i]->pad,
- GST_DATA (gst_event_new (GST_EVENT_EOS)));
- }
- ret = gst_bytestream_seek (qtdemux->bs, 0, GST_SEEK_METHOD_END);
- GST_DEBUG ("seek returned %d", ret);
-
- qtdemux->state = QTDEMUX_STATE_SEEKING_EOS;
- return;
+ for (i = 0; i < qtdemux->n_streams; i++) {
+ gst_pad_push (qtdemux->streams[i]->pad,
+ GST_DATA (gst_event_new (GST_EVENT_EOS)));
+ }
+ ret = gst_bytestream_seek (qtdemux->bs, 0, GST_SEEK_METHOD_END);
+ GST_DEBUG ("seek returned %d", ret);
+
+ qtdemux->state = QTDEMUX_STATE_SEEKING_EOS;
+ return;
}
stream = qtdemux->streams[index];
@@ -639,53 +640,53 @@ gst_qtdemux_loop_header (GstElement * element)
size = stream->samples[stream->sample_index].size;
GST_INFO
- ("pushing from stream %d, sample_index=%d offset=%d size=%d timestamp=%lld",
- index, stream->sample_index, offset, size,
- stream->samples[stream->sample_index].timestamp);
+ ("pushing from stream %d, sample_index=%d offset=%d size=%d timestamp=%lld",
+ index, stream->sample_index, offset, size,
+ stream->samples[stream->sample_index].timestamp);
cur_offset = gst_bytestream_tell (qtdemux->bs);
if (offset != cur_offset) {
- GST_DEBUG ("seeking to offset %d", offset);
- GST_LOG ("seeking to offset %d\n", offset);
- ret = gst_bytestream_seek (qtdemux->bs, offset, GST_SEEK_METHOD_SET);
- GST_DEBUG ("seek returned %d", ret);
- return;
+ GST_DEBUG ("seeking to offset %d", offset);
+ GST_LOG ("seeking to offset %d\n", offset);
+ ret = gst_bytestream_seek (qtdemux->bs, offset, GST_SEEK_METHOD_SET);
+ GST_DEBUG ("seek returned %d", ret);
+ return;
}
GST_DEBUG ("reading %d bytes\n", size);
buf = NULL;
do {
- ret = gst_bytestream_read (qtdemux->bs, &buf, size);
- if (ret < size) {
- GST_DEBUG ("read failed (%d < %d)", ret, size);
- if (!gst_qtdemux_handle_sink_event (qtdemux)) {
- return;
- }
- } else {
- break;
- }
+ ret = gst_bytestream_read (qtdemux->bs, &buf, size);
+ if (ret < size) {
+ GST_DEBUG ("read failed (%d < %d)", ret, size);
+ if (!gst_qtdemux_handle_sink_event (qtdemux)) {
+ return;
+ }
+ } else {
+ break;
+ }
} while (TRUE);
if (buf) {
- /* hum... */
- if (stream->subtype == GST_MAKE_FOURCC ('v', 'i', 'd', 'e')) {
- float fps =
- 1. * GST_SECOND / stream->samples[stream->sample_index].duration;
- if (fps != stream->fps) {
- gst_caps_set_simple (stream->caps, "framerate", G_TYPE_DOUBLE, fps,
- NULL);
- stream->fps = fps;
- gst_pad_set_explicit_caps (stream->pad, stream->caps);
- }
- }
-
- GST_BUFFER_TIMESTAMP (buf) =
- stream->samples[stream->sample_index].timestamp;
- GST_BUFFER_DURATION (buf) =
- stream->samples[stream->sample_index].duration;
- gst_pad_push (stream->pad, GST_DATA (buf));
-
- GST_DEBUG ("pushing buffer on %" GST_PTR_FORMAT, stream->pad);
+ /* hum... */
+ if (stream->subtype == GST_MAKE_FOURCC ('v', 'i', 'd', 'e')) {
+ float fps =
+ 1. * GST_SECOND / stream->samples[stream->sample_index].duration;
+ if (fps != stream->fps) {
+ gst_caps_set_simple (stream->caps, "framerate", G_TYPE_DOUBLE, fps,
+ NULL);
+ stream->fps = fps;
+ gst_pad_set_explicit_caps (stream->pad, stream->caps);
+ }
+ }
+
+ GST_BUFFER_TIMESTAMP (buf) =
+ stream->samples[stream->sample_index].timestamp;
+ GST_BUFFER_DURATION (buf) =
+ stream->samples[stream->sample_index].duration;
+ gst_pad_push (stream->pad, GST_DATA (buf));
+
+ GST_DEBUG ("pushing buffer on %" GST_PTR_FORMAT, stream->pad);
}
stream->sample_index++;
break;
@@ -704,28 +705,28 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
gchar *name = g_strdup_printf ("video_%02d", qtdemux->n_video_streams);
stream->pad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&gst_qtdemux_videosrc_template), name);
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&gst_qtdemux_videosrc_template), name);
g_free (name);
stream->fps = 1. * GST_SECOND / stream->samples[0].duration;
if (stream->caps) {
gst_caps_set_simple (stream->caps,
- "width", G_TYPE_INT, stream->width,
- "height", G_TYPE_INT, stream->height,
- "framerate", G_TYPE_DOUBLE, stream->fps, NULL);
+ "width", G_TYPE_INT, stream->width,
+ "height", G_TYPE_INT, stream->height,
+ "framerate", G_TYPE_DOUBLE, stream->fps, NULL);
}
qtdemux->n_video_streams++;
} else {
gchar *name = g_strdup_printf ("audio_%02d", qtdemux->n_audio_streams);
stream->pad =
- gst_pad_new_from_template (gst_static_pad_template_get
- (&gst_qtdemux_audiosrc_template), name);
+ gst_pad_new_from_template (gst_static_pad_template_get
+ (&gst_qtdemux_audiosrc_template), name);
g_free (name);
if (stream->caps) {
gst_caps_set_simple (stream->caps,
- "rate", G_TYPE_INT, (int) stream->rate,
- "channels", G_TYPE_INT, stream->n_channels, NULL);
+ "rate", G_TYPE_INT, (int) stream->rate,
+ "channels", G_TYPE_INT, stream->n_channels, NULL);
}
qtdemux->n_audio_streams++;
}
@@ -819,7 +820,7 @@ QtNodeType qt_node_types[] = {
qtdemux_dump_mvhd},
{FOURCC_clip, "clipping", QT_CONTAINER,},
{FOURCC_trak, "track", QT_CONTAINER,},
- {FOURCC_udta, "user data", 0,}, /* special container */
+ {FOURCC_udta, "user data", 0,}, /* special container */
{FOURCC_ctab, "color table", 0,},
{FOURCC_tkhd, "track header", 0,
qtdemux_dump_tkhd},
@@ -832,7 +833,7 @@ QtNodeType qt_node_types[] = {
{FOURCC_load, "track load settings", 0,},
{FOURCC_tref, "track reference", QT_CONTAINER,},
{FOURCC_imap, "track input map", QT_CONTAINER,},
- {FOURCC___in, "track input", 0,}, /* special container */
+ {FOURCC___in, "track input", 0,}, /* special container */
{FOURCC___ty, "input type", 0,},
{FOURCC_mdia, "media", QT_CONTAINER},
{FOURCC_mdhd, "media header", 0,
@@ -940,7 +941,7 @@ qtdemux_parse_moov (GstQTDemux * qtdemux, void *buffer, int length)
cmvd = qtdemux_tree_get_child_by_type (cmov, FOURCC_cmvd);
if (QTDEMUX_FOURCC_GET (dcom->data + 8) == GST_MAKE_FOURCC ('z', 'l', 'i',
- 'b')) {
+ 'b')) {
int uncompressed_length;
int compressed_length;
void *buf;
@@ -950,7 +951,7 @@ qtdemux_parse_moov (GstQTDemux * qtdemux, void *buffer, int length)
GST_LOG ("length = %d\n", uncompressed_length);
buf = qtdemux_inflate (cmvd->data + 12, compressed_length,
- uncompressed_length);
+ uncompressed_length);
qtdemux->moov_node_compressed = qtdemux->moov_node;
qtdemux->moov_node = g_node_new (buf);
@@ -990,8 +991,8 @@ qtdemux_parse (GstQTDemux * qtdemux, GNode * node, void *buffer, int length)
GNode *child;
if (buf + 8 >= end) {
- /* FIXME: get annoyed */
- GST_LOG ("buffer overrun\n");
+ /* FIXME: get annoyed */
+ GST_LOG ("buffer overrun\n");
}
len = QTDEMUX_GUINT32_GET (buf);
@@ -1011,24 +1012,24 @@ qtdemux_parse (GstQTDemux * qtdemux, GNode * node, void *buffer, int length)
GST_LOG ("length = %d\n", uncompressed_length);
buf =
- qtdemux_inflate (buffer + 12, node_length - 12, uncompressed_length);
+ qtdemux_inflate (buffer + 12, node_length - 12, uncompressed_length);
end = buf + uncompressed_length;
while (buf < end) {
- GNode *child;
- guint32 len;
+ GNode *child;
+ guint32 len;
- if (buf + 8 >= end) {
- /* FIXME: get annoyed */
- GST_LOG ("buffer overrun\n");
- }
- len = QTDEMUX_GUINT32_GET (buf);
+ if (buf + 8 >= end) {
+ /* FIXME: get annoyed */
+ GST_LOG ("buffer overrun\n");
+ }
+ len = QTDEMUX_GUINT32_GET (buf);
- child = g_node_new (buf);
- g_node_append (node, child);
- qtdemux_parse (qtdemux, child, buf, len);
+ child = g_node_new (buf);
+ g_node_append (node, child);
+ qtdemux_parse (qtdemux, child, buf, len);
- buf += len;
+ buf += len;
}
}
#endif
@@ -1150,11 +1151,11 @@ qtdemux_dump_elst (GstQTDemux * qtdemux, void *buffer, int depth)
n = QTDEMUX_GUINT32_GET (buffer + 12);
for (i = 0; i < n; i++) {
GST_LOG ("%*s track dur: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + 16 + i * 12));
+ QTDEMUX_GUINT32_GET (buffer + 16 + i * 12));
GST_LOG ("%*s media time: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + 20 + i * 12));
+ QTDEMUX_GUINT32_GET (buffer + 20 + i * 12));
GST_LOG ("%*s media rate: %g\n", depth, "",
- QTDEMUX_FP32_GET (buffer + 24 + i * 12));
+ QTDEMUX_FP32_GET (buffer + 24 + i * 12));
}
}
@@ -1222,9 +1223,9 @@ qtdemux_dump_dref (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s size: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
GST_LOG ("%*s type: " GST_FOURCC_FORMAT "\n", depth, "",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (buffer + offset + 4)));
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (buffer + offset + 4)));
offset += QTDEMUX_GUINT32_GET (buffer + offset);
}
}
@@ -1244,39 +1245,39 @@ qtdemux_dump_stsd (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s size: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
GST_LOG ("%*s type: " GST_FOURCC_FORMAT "\n", depth, "",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (buffer + offset + 4)));
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (buffer + offset + 4)));
GST_LOG ("%*s data reference:%d\n", depth, "",
- QTDEMUX_GUINT16_GET (buffer + offset + 14));
+ QTDEMUX_GUINT16_GET (buffer + offset + 14));
GST_LOG ("%*s version/rev.: %08x\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 16));
+ QTDEMUX_GUINT32_GET (buffer + offset + 16));
GST_LOG ("%*s vendor: " GST_FOURCC_FORMAT "\n", depth, "",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (buffer + offset + 20)));
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (buffer + offset + 20)));
GST_LOG ("%*s temporal qual: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 24));
+ QTDEMUX_GUINT32_GET (buffer + offset + 24));
GST_LOG ("%*s spatial qual: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 28));
+ QTDEMUX_GUINT32_GET (buffer + offset + 28));
GST_LOG ("%*s width: %u\n", depth, "",
- QTDEMUX_GUINT16_GET (buffer + offset + 32));
+ QTDEMUX_GUINT16_GET (buffer + offset + 32));
GST_LOG ("%*s height: %u\n", depth, "",
- QTDEMUX_GUINT16_GET (buffer + offset + 34));
+ QTDEMUX_GUINT16_GET (buffer + offset + 34));
GST_LOG ("%*s horiz. resol: %g\n", depth, "",
- QTDEMUX_FP32_GET (buffer + offset + 36));
+ QTDEMUX_FP32_GET (buffer + offset + 36));
GST_LOG ("%*s vert. resol.: %g\n", depth, "",
- QTDEMUX_FP32_GET (buffer + offset + 40));
+ QTDEMUX_FP32_GET (buffer + offset + 40));
GST_LOG ("%*s data size: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 44));
+ QTDEMUX_GUINT32_GET (buffer + offset + 44));
GST_LOG ("%*s frame count: %u\n", depth, "",
- QTDEMUX_GUINT16_GET (buffer + offset + 48));
+ QTDEMUX_GUINT16_GET (buffer + offset + 48));
GST_LOG ("%*s compressor: %*s\n", depth, "",
- QTDEMUX_GUINT8_GET (buffer + offset + 49),
- (char *) (buffer + offset + 51));
+ QTDEMUX_GUINT8_GET (buffer + offset + 49),
+ (char *) (buffer + offset + 51));
GST_LOG ("%*s depth: %u\n", depth, "",
- QTDEMUX_GUINT16_GET (buffer + offset + 82));
+ QTDEMUX_GUINT16_GET (buffer + offset + 82));
GST_LOG ("%*s color table ID:%u\n", depth, "",
- QTDEMUX_GUINT16_GET (buffer + offset + 84));
+ QTDEMUX_GUINT16_GET (buffer + offset + 84));
offset += QTDEMUX_GUINT32_GET (buffer + offset);
}
@@ -1297,9 +1298,9 @@ qtdemux_dump_stts (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s count: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
GST_LOG ("%*s duration: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 4));
+ QTDEMUX_GUINT32_GET (buffer + offset + 4));
offset += 8;
}
@@ -1320,7 +1321,7 @@ qtdemux_dump_stss (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s sample: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
offset += 4;
}
@@ -1341,11 +1342,11 @@ qtdemux_dump_stsc (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s first chunk: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
GST_LOG ("%*s sample per ch: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 4));
+ QTDEMUX_GUINT32_GET (buffer + offset + 4));
GST_LOG ("%*s sample desc id:%08x\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset + 8));
+ QTDEMUX_GUINT32_GET (buffer + offset + 8));
offset += 12;
}
@@ -1366,12 +1367,12 @@ qtdemux_dump_stsz (GstQTDemux * qtdemux, void *buffer, int depth)
sample_size = QTDEMUX_GUINT32_GET (buffer + 12);
if (sample_size == 0) {
GST_LOG ("%*s n entries: %d\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + 16));
+ QTDEMUX_GUINT32_GET (buffer + 16));
n = QTDEMUX_GUINT32_GET (buffer + 16);
offset = 20;
for (i = 0; i < n; i++) {
GST_LOG ("%*s sample size: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
offset += 4;
}
@@ -1393,7 +1394,7 @@ qtdemux_dump_stco (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s chunk offset: %u\n", depth, "",
- QTDEMUX_GUINT32_GET (buffer + offset));
+ QTDEMUX_GUINT32_GET (buffer + offset));
offset += 4;
}
@@ -1414,7 +1415,7 @@ qtdemux_dump_co64 (GstQTDemux * qtdemux, void *buffer, int depth)
offset = 16;
for (i = 0; i < n; i++) {
GST_LOG ("%*s chunk offset: %" G_GUINT64_FORMAT "\n", depth, "",
- QTDEMUX_GUINT64_GET (buffer + offset));
+ QTDEMUX_GUINT64_GET (buffer + offset));
offset += 8;
}
@@ -1569,58 +1570,58 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
if (stream->subtype == FOURCC_vide) {
offset = 16;
GST_LOG ("st type: " GST_FOURCC_FORMAT "\n",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + offset + 4)));
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + offset + 4)));
stream->width = QTDEMUX_GUINT16_GET (stsd->data + offset + 32);
stream->height = QTDEMUX_GUINT16_GET (stsd->data + offset + 34);
- stream->fps = 0.; /* this is filled in later */
+ stream->fps = 0.; /* this is filled in later */
GST_LOG ("frame count: %u\n",
- QTDEMUX_GUINT16_GET (stsd->data + offset + 48));
+ QTDEMUX_GUINT16_GET (stsd->data + offset + 48));
stream->caps = qtdemux_video_caps (qtdemux,
- QTDEMUX_FOURCC_GET (stsd->data + offset + 4), stsd->data);
+ QTDEMUX_FOURCC_GET (stsd->data + offset + 4), stsd->data);
GST_INFO ("type " GST_FOURCC_FORMAT " caps %" GST_PTR_FORMAT "\n",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + offset + 4)),
- stream->caps);
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + offset + 4)),
+ stream->caps);
} else if (stream->subtype == FOURCC_soun) {
int version, samplesize;
GST_LOG ("st type: " GST_FOURCC_FORMAT "\n",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4)));
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4)));
offset = 32;
GST_LOG ("version/rev: %08x\n",
- QTDEMUX_GUINT32_GET (stsd->data + offset));
+ QTDEMUX_GUINT32_GET (stsd->data + offset));
version = QTDEMUX_GUINT32_GET (stsd->data + offset);
GST_LOG ("vendor: %08x\n",
- QTDEMUX_GUINT32_GET (stsd->data + offset + 4));
+ QTDEMUX_GUINT32_GET (stsd->data + offset + 4));
GST_LOG ("n_channels: %d\n",
- QTDEMUX_GUINT16_GET (stsd->data + offset + 8));
+ QTDEMUX_GUINT16_GET (stsd->data + offset + 8));
stream->n_channels = QTDEMUX_GUINT16_GET (stsd->data + offset + 8);
GST_LOG ("sample_size: %d\n",
- QTDEMUX_GUINT16_GET (stsd->data + offset + 10));
+ QTDEMUX_GUINT16_GET (stsd->data + offset + 10));
samplesize = QTDEMUX_GUINT16_GET (stsd->data + offset + 10);
GST_LOG ("compression_id: %d\n",
- QTDEMUX_GUINT16_GET (stsd->data + offset + 12));
+ QTDEMUX_GUINT16_GET (stsd->data + offset + 12));
GST_LOG ("packet size: %d\n",
- QTDEMUX_GUINT16_GET (stsd->data + offset + 14));
+ QTDEMUX_GUINT16_GET (stsd->data + offset + 14));
GST_LOG ("sample rate: %g\n",
- QTDEMUX_FP32_GET (stsd->data + offset + 16));
+ QTDEMUX_FP32_GET (stsd->data + offset + 16));
stream->rate = QTDEMUX_FP32_GET (stsd->data + offset + 16);
offset = 52;
if (version == 0x00010000) {
GST_LOG ("samples/packet: %d\n",
- QTDEMUX_GUINT32_GET (stsd->data + offset));
+ QTDEMUX_GUINT32_GET (stsd->data + offset));
stream->samples_per_packet = QTDEMUX_GUINT32_GET (stsd->data + offset);
GST_LOG ("bytes/packet: %d\n",
- QTDEMUX_GUINT32_GET (stsd->data + offset + 4));
+ QTDEMUX_GUINT32_GET (stsd->data + offset + 4));
GST_LOG ("bytes/frame: %d\n",
- QTDEMUX_GUINT32_GET (stsd->data + offset + 8));
+ QTDEMUX_GUINT32_GET (stsd->data + offset + 8));
stream->bytes_per_frame = QTDEMUX_GUINT32_GET (stsd->data + offset + 8);
GST_LOG ("bytes/sample: %d\n",
- QTDEMUX_GUINT32_GET (stsd->data + offset + 12));
+ QTDEMUX_GUINT32_GET (stsd->data + offset + 12));
offset = 68;
} else {
stream->bytes_per_frame = stream->n_channels * samplesize / 8;
@@ -1628,12 +1629,12 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
}
stream->caps = qtdemux_audio_caps (qtdemux,
- QTDEMUX_FOURCC_GET (stsd->data + 16 + 4),
- (QTDEMUX_GUINT32_GET (stsd->data) >
- offset) ? stsd->data + offset : NULL);
+ QTDEMUX_FOURCC_GET (stsd->data + 16 + 4),
+ (QTDEMUX_GUINT32_GET (stsd->data) >
+ offset) ? stsd->data + offset : NULL);
GST_INFO ("type " GST_FOURCC_FORMAT " caps %" GST_PTR_FORMAT "\n",
- GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4)),
- stream->caps);
+ GST_FOURCC_ARGS (QTDEMUX_FOURCC_GET (stsd->data + 16 + 4)),
+ stream->caps);
} else {
GST_LOG ("unknown subtype\n");
return;
@@ -1672,28 +1673,28 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
first_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 0) - 1;
if (i == n_samples_per_chunk - 1) {
- last_chunk = INT_MAX;
+ last_chunk = INT_MAX;
} else {
- last_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 12) - 1;
+ last_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 12) - 1;
}
samples_per_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 4);
for (j = first_chunk; j < last_chunk; j++) {
- int chunk_offset;
-
- if (stco) {
- chunk_offset = QTDEMUX_GUINT32_GET (stco->data + 16 + j * 4);
- } else {
- chunk_offset = QTDEMUX_GUINT64_GET (co64->data + 16 + j * 8);
- }
- for (k = 0; k < samples_per_chunk; k++) {
- samples[index].chunk = j;
- samples[index].offset = chunk_offset;
- chunk_offset += samples[index].size;
- index++;
- if (index >= n_samples)
- goto done;
- }
+ int chunk_offset;
+
+ if (stco) {
+ chunk_offset = QTDEMUX_GUINT32_GET (stco->data + 16 + j * 4);
+ } else {
+ chunk_offset = QTDEMUX_GUINT64_GET (co64->data + 16 + j * 8);
+ }
+ for (k = 0; k < samples_per_chunk; k++) {
+ samples[index].chunk = j;
+ samples[index].offset = chunk_offset;
+ chunk_offset += samples[index].size;
+ index++;
+ if (index >= n_samples)
+ goto done;
+ }
}
}
done:
@@ -1710,11 +1711,11 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
duration = QTDEMUX_GUINT32_GET (stts->data + 16 + 8 * i + 4);
time = (GST_SECOND * duration) / stream->timescale;
for (j = 0; j < n; j++) {
- //GST_INFO("moo %lld", timestamp);
- samples[index].timestamp = timestamp;
- samples[index].duration = time;
- timestamp += time;
- index++;
+ //GST_INFO("moo %lld", timestamp);
+ samples[index].timestamp = timestamp;
+ samples[index].duration = time;
+ timestamp += time;
+ index++;
}
}
} else {
@@ -1744,40 +1745,40 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
first_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 0) - 1;
if (i == n_samples - 1) {
- last_chunk = INT_MAX;
+ last_chunk = INT_MAX;
} else {
- last_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 12) - 1;
+ last_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 12) - 1;
}
samples_per_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 4);
for (j = first_chunk; j < last_chunk; j++) {
- int chunk_offset;
-
- if (j >= n_samples)
- goto done2;
- if (stco) {
- chunk_offset = QTDEMUX_GUINT32_GET (stco->data + 16 + j * 4);
- } else {
- chunk_offset = QTDEMUX_GUINT64_GET (co64->data + 16 + j * 8);
- }
- samples[j].chunk = j;
- samples[j].offset = chunk_offset;
- samples[j].size =
- samples_per_chunk * stream->bytes_per_frame /
- stream->samples_per_packet;
- samples[j].duration =
- samples_per_chunk * GST_SECOND / (stream->rate / 2);
- samples[j].timestamp = timestamp;
- timestamp += (samples_per_chunk * GST_SECOND) / stream->rate;
+ int chunk_offset;
+
+ if (j >= n_samples)
+ goto done2;
+ if (stco) {
+ chunk_offset = QTDEMUX_GUINT32_GET (stco->data + 16 + j * 4);
+ } else {
+ chunk_offset = QTDEMUX_GUINT64_GET (co64->data + 16 + j * 8);
+ }
+ samples[j].chunk = j;
+ samples[j].offset = chunk_offset;
+ samples[j].size =
+ samples_per_chunk * stream->bytes_per_frame /
+ stream->samples_per_packet;
+ samples[j].duration =
+ samples_per_chunk * GST_SECOND / (stream->rate / 2);
+ samples[j].timestamp = timestamp;
+ timestamp += (samples_per_chunk * GST_SECOND) / stream->rate;
#if 0
- GST_INFO ("moo samples_per_chunk=%d rate=%d dur=%lld %lld",
- (int) samples_per_chunk,
- (int) stream->rate,
- (long long) ((samples_per_chunk * GST_SECOND) / stream->rate),
- (long long) timestamp);
+ GST_INFO ("moo samples_per_chunk=%d rate=%d dur=%lld %lld",
+ (int) samples_per_chunk,
+ (int) stream->rate,
+ (long long) ((samples_per_chunk * GST_SECOND) / stream->rate),
+ (long long) timestamp);
#endif
- samples[j].sample_index = sample_index;
- sample_index += samples_per_chunk;
+ samples[j].sample_index = sample_index;
+ sample_index += samples_per_chunk;
}
}
/*
@@ -1809,8 +1810,8 @@ done2:
#if 0
for (i = 0; i < n_samples; i++) {
GST_LOG ("%d: %d %d %d %d %" G_GUINT64_FORMAT "\n", i,
- samples[i].sample_index, samples[i].chunk,
- samples[i].offset, samples[i].size, samples[i].timestamp);
+ samples[i].sample_index, samples[i].chunk,
+ samples[i].offset, samples[i].size, samples[i].timestamp);
if (i > 10)
break;
}
@@ -1836,53 +1837,53 @@ qtdemux_video_caps (GstQTDemux * qtdemux, guint32 fourcc,
return gst_caps_from_string ("image/jpeg");
case GST_MAKE_FOURCC ('S', 'V', 'Q', '3'):
if (stsd_data != NULL) {
- gst_getbits_t gb;
- gint halfpel_flag;
- gint thirdpel_flag;
- gint unknown_svq3_flag;
- gint low_delay;
- gint size;
+ gst_getbits_t gb;
+ gint halfpel_flag;
+ gint thirdpel_flag;
+ gint unknown_svq3_flag;
+ gint low_delay;
+ gint size;
- size = QTDEMUX_GUINT32_GET (stsd_data + 16);
+ size = QTDEMUX_GUINT32_GET (stsd_data + 16);
- gst_getbits_init (&gb, NULL, NULL);
- gst_getbits_newbuf (&gb, (unsigned char *) stsd_data + 98 + 16 + 4,
- (size - 102 + 16));
+ gst_getbits_init (&gb, NULL, NULL);
+ gst_getbits_newbuf (&gb, (unsigned char *) stsd_data + 98 + 16 + 4,
+ (size - 102 + 16));
- /* Infos ripped from ffmpeg see libavcodec/svq3.c */
+ /* Infos ripped from ffmpeg see libavcodec/svq3.c */
- /* 'frame size code' and optional 'width, height' */
- if (gst_getbitsn (&gb, 3) == 7) {
- gst_getbitsn (&gb, 12);
- gst_getbitsn (&gb, 12);
- }
+ /* 'frame size code' and optional 'width, height' */
+ if (gst_getbitsn (&gb, 3) == 7) {
+ gst_getbitsn (&gb, 12);
+ gst_getbitsn (&gb, 12);
+ }
- halfpel_flag = gst_get1bit (&gb);
- thirdpel_flag = gst_get1bit (&gb);
+ halfpel_flag = gst_get1bit (&gb);
+ thirdpel_flag = gst_get1bit (&gb);
- /* unknown fields */
- gst_get1bit (&gb);
- gst_get1bit (&gb);
- gst_get1bit (&gb);
- gst_get1bit (&gb);
+ /* unknown fields */
+ gst_get1bit (&gb);
+ gst_get1bit (&gb);
+ gst_get1bit (&gb);
+ gst_get1bit (&gb);
- low_delay = gst_get1bit (&gb);
+ low_delay = gst_get1bit (&gb);
- /* unknown field */
- gst_get1bit (&gb);
+ /* unknown field */
+ gst_get1bit (&gb);
- while (gst_get1bit (&gb)) {
- gst_getbitsn (&gb, 8);
- }
+ while (gst_get1bit (&gb)) {
+ gst_getbitsn (&gb, 8);
+ }
- unknown_svq3_flag = gst_get1bit (&gb);
+ unknown_svq3_flag = gst_get1bit (&gb);
- return gst_caps_new_simple ("video/x-svq",
- "svqversion", G_TYPE_INT, 3,
- "halfpel_flag", G_TYPE_INT, halfpel_flag,
- "thirdpel_flag", G_TYPE_INT, thirdpel_flag,
- "low_delay", G_TYPE_INT, low_delay,
- "unknown_svq3_flag", G_TYPE_INT, unknown_svq3_flag, NULL);
+ return gst_caps_new_simple ("video/x-svq",
+ "svqversion", G_TYPE_INT, 3,
+ "halfpel_flag", G_TYPE_INT, halfpel_flag,
+ "thirdpel_flag", G_TYPE_INT, thirdpel_flag,
+ "low_delay", G_TYPE_INT, low_delay,
+ "unknown_svq3_flag", G_TYPE_INT, unknown_svq3_flag, NULL);
}
return gst_caps_from_string ("video/x-svq, " "svqversion = (int) 3");
case GST_MAKE_FOURCC ('s', 'v', 'q', 'i'):
@@ -1891,7 +1892,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, guint32 fourcc,
case GST_MAKE_FOURCC ('r', 'a', 'w', ' '):
/* uncompressed RGB */
return gst_caps_from_string ("video/x-raw-rgb, "
- "endianness = (int) BIG_ENDIAN");
+ "endianness = (int) BIG_ENDIAN");
/*"bpp", GST_PROPS_INT(x),
"depth", GST_PROPS_INT(x),
"red_mask", GST_PROPS_INT(x),
@@ -1900,11 +1901,11 @@ qtdemux_video_caps (GstQTDemux * qtdemux, guint32 fourcc,
case GST_MAKE_FOURCC ('Y', 'u', 'v', '2'):
/* uncompressed YUV2 */
return gst_caps_from_string ("video/x-raw-yuv, "
- "format = (fourcc) YUY2");
+ "format = (fourcc) YUY2");
case GST_MAKE_FOURCC ('m', 'p', 'e', 'g'):
/* MPEG */
return gst_caps_from_string ("video/mpeg, "
- "systemstream = (boolean) false, " "mpegversion = (int) 1");
+ "systemstream = (boolean) false, " "mpegversion = (int) 1");
case GST_MAKE_FOURCC ('g', 'i', 'f', ' '):
return gst_caps_from_string ("image/gif");
case GST_MAKE_FOURCC ('h', '2', '6', '3'):
@@ -1914,7 +1915,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, guint32 fourcc,
case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
/* MPEG-4 */
return gst_caps_from_string ("video/mpeg, "
- "mpegversion = (int) 4, " "systemstream = (boolean) false");
+ "mpegversion = (int) 4, " "systemstream = (boolean) false");
case GST_MAKE_FOURCC ('3', 'I', 'V', '1'):
return gst_caps_from_string ("video/x-3ivx");
case GST_MAKE_FOURCC ('c', 'v', 'i', 'd'):
@@ -1927,7 +1928,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, guint32 fourcc,
case GST_MAKE_FOURCC ('k', 'p', 'c', 'd'):
default:
g_critical ("Don't know how to convert fourcc '" GST_FOURCC_FORMAT
- "' to caps\n", GST_FOURCC_ARGS (fourcc));
+ "' to caps\n", GST_FOURCC_ARGS (fourcc));
return NULL;
}
}
@@ -1937,41 +1938,41 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, guint32 fourcc, const guint8 * data)
{
switch (fourcc) {
case GST_MAKE_FOURCC ('N', 'O', 'N', 'E'):
- return NULL; /*gst_caps_from_string ("audio/raw"); */
+ return NULL; /*gst_caps_from_string ("audio/raw"); */
case GST_MAKE_FOURCC ('r', 'a', 'w', ' '):
/* FIXME */
return gst_caps_from_string ("audio/x-raw-int, "
- "width = (int) 8, " "depth = (int) 8, " "signed = (boolean) true");
+ "width = (int) 8, " "depth = (int) 8, " "signed = (boolean) true");
case GST_MAKE_FOURCC ('t', 'w', 'o', 's'):
/* FIXME */
return gst_caps_from_string ("audio/x-raw-int, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true");
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true");
case GST_MAKE_FOURCC ('s', 'o', 'w', 't'):
/* FIXME */
return gst_caps_from_string ("audio/x-raw-int, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "endianness = (int) G_LITTLE_ENDIAN, " "signed = (boolean) true");
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "endianness = (int) G_LITTLE_ENDIAN, " "signed = (boolean) true");
case GST_MAKE_FOURCC ('f', 'l', '6', '4'):
return gst_caps_from_string ("audio/x-raw-float, "
- "width = (int) 64, " "endianness = (int) G_BIG_ENDIAN");
+ "width = (int) 64, " "endianness = (int) G_BIG_ENDIAN");
case GST_MAKE_FOURCC ('f', 'l', '3', '2'):
return gst_caps_from_string ("audio/x-raw-float, "
- "width = (int) 32, " "endianness = (int) G_BIG_ENDIAN");
+ "width = (int) 32, " "endianness = (int) G_BIG_ENDIAN");
case GST_MAKE_FOURCC ('i', 'n', '2', '4'):
/* FIXME */
return gst_caps_from_string ("audio/x-raw-int, "
- "width = (int) 24, "
- "depth = (int) 32, "
- "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true");
+ "width = (int) 24, "
+ "depth = (int) 32, "
+ "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true");
case GST_MAKE_FOURCC ('i', 'n', '3', '2'):
/* FIXME */
return gst_caps_from_string ("audio/x-raw-int, "
- "width = (int) 32, "
- "depth = (int) 32, "
- "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true");
+ "width = (int) 32, "
+ "depth = (int) 32, "
+ "endianness = (int) G_BIG_ENDIAN, " "signed = (boolean) true");
case GST_MAKE_FOURCC ('u', 'l', 'a', 'w'):
/* FIXME */
return gst_caps_from_string ("audio/x-mulaw");
@@ -1981,18 +1982,18 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, guint32 fourcc, const guint8 * data)
case 0x6d730002:
/* Microsoft ADPCM-ACM code 2 */
return gst_caps_from_string ("audio/x-adpcm, "
- "layout = (string) microsoft");
+ "layout = (string) microsoft");
case 0x6d730011:
/* FIXME DVI/Intel IMA ADPCM/ACM code 17 */
return gst_caps_from_string ("audio/x-adpcm, "
- "layout = (string) quicktime");
+ "layout = (string) quicktime");
case 0x6d730055:
/* MPEG layer 3, CBR only (pre QT4.1) */
case 0x5500736d:
case GST_MAKE_FOURCC ('.', 'm', 'p', '3'):
/* MPEG layer 3, CBR & VBR (QT4.1 and later) */
return gst_caps_from_string ("audio/mpeg, "
- "layer = (int) 3, " "mpegversion = (int) 1");
+ "layer = (int) 3, " "mpegversion = (int) 1");
case GST_MAKE_FOURCC ('M', 'A', 'C', '3'):
/* MACE 3:1 */
return gst_caps_from_string ("audio/x-mace, " "maceversion = (int) 3");
@@ -2011,11 +2012,11 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, guint32 fourcc, const guint8 * data)
case GST_MAKE_FOURCC ('Q', 'D', 'M', '2'):
/* FIXME: QDesign music version 2 (no constant) */
if (QTDEMUX_GUINT32_GET (data) <= 100) {
- gst_util_dump_mem ((guint8 *) data, 100);
- return gst_caps_new_simple ("audio/x-qdm2",
- "framesize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 52),
- "bitrate", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 40),
- "blocksize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 44), NULL);
+ gst_util_dump_mem ((guint8 *) data, 100);
+ return gst_caps_new_simple ("audio/x-qdm2",
+ "framesize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 52),
+ "bitrate", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 40),
+ "blocksize", G_TYPE_INT, QTDEMUX_GUINT32_GET (data + 44), NULL);
}
case GST_MAKE_FOURCC ('q', 't', 'v', 'r'):
/* ? */
@@ -2029,7 +2030,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, guint32 fourcc, const guint8 * data)
/* ? */
default:
g_critical ("Don't know how to convert fourcc '" GST_FOURCC_FORMAT
- "' to caps\n", GST_FOURCC_ARGS (fourcc));
+ "' to caps\n", GST_FOURCC_ARGS (fourcc));
return NULL;
}
}
diff --git a/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c
index 07bfb6a0..7d997084 100644
--- a/gst/rtp/gstrtpL16depay.c
+++ b/gst/rtp/gstrtpL16depay.c
@@ -46,11 +46,11 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) true, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) true, "
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
static GstStaticPadTemplate gst_rtpL16parse_sink_template =
@@ -94,8 +94,8 @@ gst_rtpL16parse_get_type (void)
};
rtpL16parse_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Parse",
- &rtpL16parse_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Parse",
+ &rtpL16parse_info, 0);
}
return rtpL16parse_type;
}
@@ -125,10 +125,10 @@ gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PAYLOAD_TYPE,
g_param_spec_int ("payload_type", "payload_type", "payload type",
- G_MININT, G_MAXINT, PAYLOAD_L16_STEREO, G_PARAM_READABLE));
+ G_MININT, G_MAXINT, PAYLOAD_L16_STEREO, G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FREQUENCY,
g_param_spec_int ("frequency", "frequency", "frequency",
- G_MININT, G_MAXINT, 44100, G_PARAM_READWRITE));
+ G_MININT, G_MAXINT, 44100, G_PARAM_READWRITE));
gobject_class->set_property = gst_rtpL16parse_set_property;
gobject_class->get_property = gst_rtpL16parse_get_property;
@@ -176,7 +176,7 @@ gst_rtpL16_caps_nego (GstRtpL16Parse * rtpL16parse)
caps =
gst_caps_copy (gst_static_caps_get (&gst_rtpL16parse_src_template.
- static_caps));
+ static_caps));
gst_caps_set_simple (caps,
"rate", G_TYPE_INT, rtpL16parse->frequency,
diff --git a/gst/rtp/gstrtpL16enc.c b/gst/rtp/gstrtpL16enc.c
index 0914d2fb..12602200 100644
--- a/gst/rtp/gstrtpL16enc.c
+++ b/gst/rtp/gstrtpL16enc.c
@@ -49,11 +49,11 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) true, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) true, "
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
static GstStaticPadTemplate gst_rtpL16enc_src_template =
@@ -96,8 +96,8 @@ gst_rtpL16enc_get_type (void)
};
rtpL16enc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Enc",
- &rtpL16enc_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Enc",
+ &rtpL16enc_info, 0);
}
return rtpL16enc_type;
}
@@ -216,13 +216,13 @@ gst_rtpL16enc_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
- GST_DEBUG ("discont");
- rtpL16enc->next_time = 0;
- gst_pad_event_default (pad, event);
- return;
+ GST_DEBUG ("discont");
+ rtpL16enc->next_time = 0;
+ gst_pad_event_default (pad, event);
+ return;
default:
- gst_pad_event_default (pad, event);
- return;
+ gst_pad_event_default (pad, event);
+ return;
}
}
diff --git a/gst/rtp/gstrtpL16parse.c b/gst/rtp/gstrtpL16parse.c
index 07bfb6a0..7d997084 100644
--- a/gst/rtp/gstrtpL16parse.c
+++ b/gst/rtp/gstrtpL16parse.c
@@ -46,11 +46,11 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) true, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) true, "
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
static GstStaticPadTemplate gst_rtpL16parse_sink_template =
@@ -94,8 +94,8 @@ gst_rtpL16parse_get_type (void)
};
rtpL16parse_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Parse",
- &rtpL16parse_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Parse",
+ &rtpL16parse_info, 0);
}
return rtpL16parse_type;
}
@@ -125,10 +125,10 @@ gst_rtpL16parse_class_init (GstRtpL16ParseClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PAYLOAD_TYPE,
g_param_spec_int ("payload_type", "payload_type", "payload type",
- G_MININT, G_MAXINT, PAYLOAD_L16_STEREO, G_PARAM_READABLE));
+ G_MININT, G_MAXINT, PAYLOAD_L16_STEREO, G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FREQUENCY,
g_param_spec_int ("frequency", "frequency", "frequency",
- G_MININT, G_MAXINT, 44100, G_PARAM_READWRITE));
+ G_MININT, G_MAXINT, 44100, G_PARAM_READWRITE));
gobject_class->set_property = gst_rtpL16parse_set_property;
gobject_class->get_property = gst_rtpL16parse_get_property;
@@ -176,7 +176,7 @@ gst_rtpL16_caps_nego (GstRtpL16Parse * rtpL16parse)
caps =
gst_caps_copy (gst_static_caps_get (&gst_rtpL16parse_src_template.
- static_caps));
+ static_caps));
gst_caps_set_simple (caps,
"rate", G_TYPE_INT, rtpL16parse->frequency,
diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c
index 0914d2fb..12602200 100644
--- a/gst/rtp/gstrtpL16pay.c
+++ b/gst/rtp/gstrtpL16pay.c
@@ -49,11 +49,11 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) true, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) true, "
+ "width = (int) 16, "
+ "depth = (int) 16, "
+ "rate = (int) [ 1000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
static GstStaticPadTemplate gst_rtpL16enc_src_template =
@@ -96,8 +96,8 @@ gst_rtpL16enc_get_type (void)
};
rtpL16enc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Enc",
- &rtpL16enc_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpL16Enc",
+ &rtpL16enc_info, 0);
}
return rtpL16enc_type;
}
@@ -216,13 +216,13 @@ gst_rtpL16enc_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
- GST_DEBUG ("discont");
- rtpL16enc->next_time = 0;
- gst_pad_event_default (pad, event);
- return;
+ GST_DEBUG ("discont");
+ rtpL16enc->next_time = 0;
+ gst_pad_event_default (pad, event);
+ return;
default:
- gst_pad_event_default (pad, event);
- return;
+ gst_pad_event_default (pad, event);
+ return;
}
}
diff --git a/gst/rtp/gstrtpgsmdepay.c b/gst/rtp/gstrtpgsmdepay.c
index 55b96945..e6ea8406 100644
--- a/gst/rtp/gstrtpgsmdepay.c
+++ b/gst/rtp/gstrtpgsmdepay.c
@@ -90,8 +90,8 @@ gst_rtpgsmparse_get_type (void)
};
rtpgsmparse_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMParse",
- &rtpgsmparse_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMParse",
+ &rtpgsmparse_info, 0);
}
return rtpgsmparse_type;
}
@@ -121,7 +121,7 @@ gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FREQUENCY,
g_param_spec_int ("frequency", "frequency", "frequency",
- G_MININT, G_MAXINT, 8000, G_PARAM_READWRITE));
+ G_MININT, G_MAXINT, 8000, G_PARAM_READWRITE));
gobject_class->set_property = gst_rtpgsmparse_set_property;
gobject_class->get_property = gst_rtpgsmparse_get_property;
diff --git a/gst/rtp/gstrtpgsmenc.c b/gst/rtp/gstrtpgsmenc.c
index 6301dd8c..2310d0e3 100644
--- a/gst/rtp/gstrtpgsmenc.c
+++ b/gst/rtp/gstrtpgsmenc.c
@@ -93,8 +93,8 @@ gst_rtpgsmenc_get_type (void)
};
rtpgsmenc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMEnc",
- &rtpgsmenc_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMEnc",
+ &rtpgsmenc_info, 0);
}
return rtpgsmenc_type;
}
@@ -209,13 +209,13 @@ gst_rtpgsmenc_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
- GST_DEBUG ("discont");
- rtpgsmenc->next_time = 0;
- gst_pad_event_default (pad, event);
- return;
+ GST_DEBUG ("discont");
+ rtpgsmenc->next_time = 0;
+ gst_pad_event_default (pad, event);
+ return;
default:
- gst_pad_event_default (pad, event);
- return;
+ gst_pad_event_default (pad, event);
+ return;
}
}
diff --git a/gst/rtp/gstrtpgsmparse.c b/gst/rtp/gstrtpgsmparse.c
index 55b96945..e6ea8406 100644
--- a/gst/rtp/gstrtpgsmparse.c
+++ b/gst/rtp/gstrtpgsmparse.c
@@ -90,8 +90,8 @@ gst_rtpgsmparse_get_type (void)
};
rtpgsmparse_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMParse",
- &rtpgsmparse_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMParse",
+ &rtpgsmparse_info, 0);
}
return rtpgsmparse_type;
}
@@ -121,7 +121,7 @@ gst_rtpgsmparse_class_init (GstRtpGSMParseClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FREQUENCY,
g_param_spec_int ("frequency", "frequency", "frequency",
- G_MININT, G_MAXINT, 8000, G_PARAM_READWRITE));
+ G_MININT, G_MAXINT, 8000, G_PARAM_READWRITE));
gobject_class->set_property = gst_rtpgsmparse_set_property;
gobject_class->get_property = gst_rtpgsmparse_get_property;
diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c
index 6301dd8c..2310d0e3 100644
--- a/gst/rtp/gstrtpgsmpay.c
+++ b/gst/rtp/gstrtpgsmpay.c
@@ -93,8 +93,8 @@ gst_rtpgsmenc_get_type (void)
};
rtpgsmenc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMEnc",
- &rtpgsmenc_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRtpGSMEnc",
+ &rtpgsmenc_info, 0);
}
return rtpgsmenc_type;
}
@@ -209,13 +209,13 @@ gst_rtpgsmenc_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_DISCONTINUOUS:
- GST_DEBUG ("discont");
- rtpgsmenc->next_time = 0;
- gst_pad_event_default (pad, event);
- return;
+ GST_DEBUG ("discont");
+ rtpgsmenc->next_time = 0;
+ gst_pad_event_default (pad, event);
+ return;
default:
- gst_pad_event_default (pad, event);
- return;
+ gst_pad_event_default (pad, event);
+ return;
}
}
diff --git a/gst/smoothwave/gstsmoothwave.c b/gst/smoothwave/gstsmoothwave.c
index 2abbdec2..9775e3d0 100644
--- a/gst/smoothwave/gstsmoothwave.c
+++ b/gst/smoothwave/gstsmoothwave.c
@@ -80,9 +80,10 @@ gst_smoothwave_get_type (void)
0,
(GInstanceInitFunc) gst_smoothwave_init,
};
+
smoothwave_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstSmoothWave",
- &smoothwave_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstSmoothWave",
+ &smoothwave_info, 0);
}
return smoothwave_type;
}
@@ -106,9 +107,9 @@ gst_smoothwave_class_init (GstSmoothWaveClass * klass)
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WIDTH, g_param_spec_int ("width", "width", "width", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HEIGHT, g_param_spec_int ("height", "height", "height", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WIDGET, g_param_spec_object ("widget", "widget", "widget", GTK_TYPE_WIDGET, G_PARAM_READABLE)); /* CHECKME! */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WIDTH, g_param_spec_int ("width", "width", "width", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HEIGHT, g_param_spec_int ("height", "height", "height", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WIDGET, g_param_spec_object ("widget", "widget", "widget", GTK_TYPE_WIDGET, G_PARAM_READABLE)); /* CHECKME! */
gobject_class->set_property = gst_smoothwave_set_property;
gobject_class->get_property = gst_smoothwave_get_property;
@@ -192,7 +193,7 @@ gst_smoothwave_chain (GstPad * pad, GstData * _data)
for (i = 0; i < MAX (smoothwave->width, samplecount); i++) {
gint16 y1 = (gint32) (samples[i * 2] * qheight) / 32768 + qheight;
gint16 y2 = (gint32) (samples[(i * 2) + 1] * qheight) / 32768 +
- (qheight * 3);
+ (qheight * 3);
smoothwave->imagebuffer[y1 * smoothwave->width + i] = 0xff;
smoothwave->imagebuffer[y2 * smoothwave->width + i] = 0xff;
/* smoothwave->imagebuffer[i+(smoothwave->width*5)] = i; */
@@ -246,16 +247,16 @@ gst_smoothwave_set_property (GObject * object, guint prop_id,
case ARG_WIDTH:
smoothwave->width = g_value_get_int (value);
gtk_drawing_area_size (GTK_DRAWING_AREA (smoothwave->image),
- smoothwave->width, smoothwave->height);
+ smoothwave->width, smoothwave->height);
gtk_widget_set_usize (GTK_WIDGET (smoothwave->image),
- smoothwave->width, smoothwave->height);
+ smoothwave->width, smoothwave->height);
break;
case ARG_HEIGHT:
smoothwave->height = g_value_get_int (value);
gtk_drawing_area_size (GTK_DRAWING_AREA (smoothwave->image),
- smoothwave->width, smoothwave->height);
+ smoothwave->width, smoothwave->height);
gtk_widget_set_usize (GTK_WIDGET (smoothwave->image),
- smoothwave->width, smoothwave->height);
+ smoothwave->width, smoothwave->height);
break;
default:
break;
@@ -297,7 +298,7 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "smoothwave", GST_RANK_NONE,
- GST_TYPE_SMOOTHWAVE))
+ GST_TYPE_SMOOTHWAVE))
return FALSE;
return TRUE;
diff --git a/gst/smpte/barboxwipes.c b/gst/smpte/barboxwipes.c
index 2508adf4..b843c97b 100644
--- a/gst/smpte/barboxwipes.c
+++ b/gst/smpte/barboxwipes.c
@@ -108,117 +108,117 @@ static gint box_clock_2b[][2 * 10] = {
static gint box_clock_4b[][4 * 10] = {
#define WIPE_B4_201 0
{BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1,
- BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2,
- BOX_CLOCK, 1, 1, 0, 1, 2, 2, 0, 1, 3,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 2, 0, 1, 3,
BOX_CLOCK, 1, 1, 0, 0, 1, 3, 1, 0, 4},
#define WIPE_B4_202 1
{BOX_CLOCK, 1, 1, 0, 1, 0, 3, 2, 1, 4,
- BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
- BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2,
BOX_CLOCK, 1, 1, 0, 0, 1, 2, 1, 0, 3},
#define WIPE_B4_203 2
{BOX_CLOCK, 1, 1, 0, 1, 0, 2, 2, 1, 3,
- BOX_CLOCK, 1, 1, 0, 2, 1, 3, 1, 2, 4,
- BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 3, 1, 2, 4,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 0, 2},
#define WIPE_B4_204 3
{BOX_CLOCK, 1, 1, 0, 1, 0, 1, 2, 1, 2,
- BOX_CLOCK, 1, 1, 0, 2, 1, 2, 1, 2, 3,
- BOX_CLOCK, 1, 1, 0, 1, 2, 3, 0, 1, 4,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 2, 1, 2, 3,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 3, 0, 1, 4,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1},
#define WIPE_B4_205 4
{BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1,
- BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2,
- BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 0, 2},
#define WIPE_B4_206 5
{BOX_CLOCK, 1, 1, 0, 1, 0, 1, 2, 1, 2,
- BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
- BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1},
#define WIPE_B4_207 6
{BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1,
- BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
- BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1},
#define WIPE_B4_211 7
{BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1,
- BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2,
- BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 1, 1,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2,
+ BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 2, 2},
#define WIPE_B4_212 8
{BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 0, 1,
- BOX_CLOCK, 1, 1, 0, 1, 0, 1, 0, 1, 2,
- BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
+ BOX_CLOCK, 1, 1, 0, 1, 0, 1, 0, 1, 2,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2},
#define WIPE_B4_213 9
{BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1,
- BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 1, 1,
- BOX_CLOCK, 1, 1, 0, 1, 2, 0, 2, 1, 1,
+ BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 1, 1,
+ BOX_CLOCK, 1, 1, 0, 1, 2, 0, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1},
#define WIPE_B4_214 10
{BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 0, 1,
- BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
- BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1,
+ BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1,
+ BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 2, 1},
#define WIPE_B4_227 11
{BOX_CLOCK, 1, 0, 0, 2, 0, 0, 1, 1, 1,
- BOX_CLOCK, 1, 0, 0, 1, 1, 1, 0, 0, 2,
- BOX_CLOCK, 1, 2, 0, 2, 2, 0, 1, 1, 1,
+ BOX_CLOCK, 1, 0, 0, 1, 1, 1, 0, 0, 2,
+ BOX_CLOCK, 1, 2, 0, 2, 2, 0, 1, 1, 1,
BOX_CLOCK, 1, 2, 0, 1, 1, 1, 0, 2, 2},
#define WIPE_B4_228 12
{BOX_CLOCK, 0, 1, 0, 0, 0, 0, 1, 1, 1,
- BOX_CLOCK, 0, 1, 0, 1, 1, 1, 0, 2, 2,
- BOX_CLOCK, 2, 1, 0, 2, 0, 0, 1, 1, 1,
+ BOX_CLOCK, 0, 1, 0, 1, 1, 1, 0, 2, 2,
+ BOX_CLOCK, 2, 1, 0, 2, 0, 0, 1, 1, 1,
BOX_CLOCK, 2, 1, 0, 1, 1, 1, 2, 2, 2},
#define WIPE_B4_235 13
{BOX_CLOCK, 1, 0, 0, 1, 1, 0, 0, 0, 1,
- BOX_CLOCK, 1, 0, 0, 1, 1, 0, 2, 0, 1,
- BOX_CLOCK, 1, 2, 0, 1, 1, 0, 2, 2, 1,
+ BOX_CLOCK, 1, 0, 0, 1, 1, 0, 2, 0, 1,
+ BOX_CLOCK, 1, 2, 0, 1, 1, 0, 2, 2, 1,
BOX_CLOCK, 1, 2, 0, 1, 1, 0, 0, 2, 1},
#define WIPE_B4_236 14
{BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 0, 1,
- BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 2, 1,
- BOX_CLOCK, 2, 1, 0, 1, 1, 0, 2, 0, 1,
+ BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 2, 1,
+ BOX_CLOCK, 2, 1, 0, 1, 1, 0, 2, 0, 1,
BOX_CLOCK, 2, 1, 0, 1, 1, 0, 2, 2, 1},
};
static gint box_clock_8b[][8 * 10] = {
#define WIPE_B8_261 0
{BOX_CLOCK, 2, 1, 0, 2, 2, 0, 4, 1, 1,
- BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 0, 2,
- BOX_CLOCK, 2, 1, 0, 2, 0, 2, 0, 1, 3,
- BOX_CLOCK, 2, 1, 0, 0, 1, 3, 2, 2, 4,
- BOX_CLOCK, 2, 3, 0, 2, 2, 0, 4, 3, 1,
- BOX_CLOCK, 2, 3, 0, 4, 3, 1, 2, 4, 2,
- BOX_CLOCK, 2, 3, 0, 2, 4, 2, 0, 3, 3,
+ BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 0, 2,
+ BOX_CLOCK, 2, 1, 0, 2, 0, 2, 0, 1, 3,
+ BOX_CLOCK, 2, 1, 0, 0, 1, 3, 2, 2, 4,
+ BOX_CLOCK, 2, 3, 0, 2, 2, 0, 4, 3, 1,
+ BOX_CLOCK, 2, 3, 0, 4, 3, 1, 2, 4, 2,
+ BOX_CLOCK, 2, 3, 0, 2, 4, 2, 0, 3, 3,
BOX_CLOCK, 2, 3, 0, 0, 3, 3, 2, 2, 4},
#define WIPE_B8_262 1
{BOX_CLOCK, 1, 2, 0, 2, 2, 0, 1, 0, 1,
- BOX_CLOCK, 1, 2, 0, 1, 0, 1, 0, 2, 2,
- BOX_CLOCK, 1, 2, 0, 0, 2, 2, 1, 4, 3,
- BOX_CLOCK, 1, 2, 0, 1, 4, 3, 2, 2, 4,
- BOX_CLOCK, 3, 2, 0, 2, 2, 0, 3, 0, 1,
- BOX_CLOCK, 3, 2, 0, 3, 0, 1, 4, 2, 2,
- BOX_CLOCK, 3, 2, 0, 4, 2, 2, 3, 4, 3,
+ BOX_CLOCK, 1, 2, 0, 1, 0, 1, 0, 2, 2,
+ BOX_CLOCK, 1, 2, 0, 0, 2, 2, 1, 4, 3,
+ BOX_CLOCK, 1, 2, 0, 1, 4, 3, 2, 2, 4,
+ BOX_CLOCK, 3, 2, 0, 2, 2, 0, 3, 0, 1,
+ BOX_CLOCK, 3, 2, 0, 3, 0, 1, 4, 2, 2,
+ BOX_CLOCK, 3, 2, 0, 4, 2, 2, 3, 4, 3,
BOX_CLOCK, 3, 2, 0, 3, 4, 3, 2, 2, 4},
#define WIPE_B8_263 2
{BOX_CLOCK, 2, 1, 0, 2, 0, 0, 4, 1, 1,
- BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 2, 2,
- BOX_CLOCK, 2, 1, 0, 2, 0, 0, 0, 1, 1,
- BOX_CLOCK, 2, 1, 0, 0, 1, 1, 2, 2, 2,
- BOX_CLOCK, 2, 3, 0, 2, 4, 0, 4, 3, 1,
- BOX_CLOCK, 2, 3, 0, 4, 3, 1, 2, 2, 2,
- BOX_CLOCK, 2, 3, 0, 2, 4, 0, 0, 3, 1,
+ BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 2, 2,
+ BOX_CLOCK, 2, 1, 0, 2, 0, 0, 0, 1, 1,
+ BOX_CLOCK, 2, 1, 0, 0, 1, 1, 2, 2, 2,
+ BOX_CLOCK, 2, 3, 0, 2, 4, 0, 4, 3, 1,
+ BOX_CLOCK, 2, 3, 0, 4, 3, 1, 2, 2, 2,
+ BOX_CLOCK, 2, 3, 0, 2, 4, 0, 0, 3, 1,
BOX_CLOCK, 2, 3, 0, 0, 3, 1, 2, 2, 2},
#define WIPE_B8_264 3
{BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 0, 1,
- BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2,
- BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 4, 1,
- BOX_CLOCK, 1, 2, 0, 1, 4, 1, 2, 2, 2,
- BOX_CLOCK, 3, 2, 0, 4, 2, 0, 3, 0, 1,
- BOX_CLOCK, 3, 2, 0, 3, 0, 1, 2, 2, 2,
- BOX_CLOCK, 3, 2, 0, 4, 2, 0, 3, 4, 1,
+ BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2,
+ BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 4, 1,
+ BOX_CLOCK, 1, 2, 0, 1, 4, 1, 2, 2, 2,
+ BOX_CLOCK, 3, 2, 0, 4, 2, 0, 3, 0, 1,
+ BOX_CLOCK, 3, 2, 0, 3, 0, 1, 2, 2, 2,
+ BOX_CLOCK, 3, 2, 0, 4, 2, 0, 3, 4, 1,
BOX_CLOCK, 3, 2, 0, 3, 4, 1, 2, 2, 2},
};
@@ -260,67 +260,67 @@ static gint triangles_3t[][3 * 9] = {
/* 23 -> 26 */
#define WIPE_T3_23 0
{0, 0, 1, 1, 0, 0, 0, 2, 1,
- 1, 0, 0, 0, 2, 1, 2, 2, 1,
+ 1, 0, 0, 0, 2, 1, 2, 2, 1,
1, 0, 0, 2, 0, 1, 2, 2, 1},
#define WIPE_T3_24 1
{0, 0, 1, 2, 0, 1, 2, 1, 0,
- 0, 0, 1, 2, 1, 0, 0, 2, 1,
+ 0, 0, 1, 2, 1, 0, 0, 2, 1,
2, 1, 0, 0, 2, 1, 2, 2, 1},
#define WIPE_T3_25 2
{0, 0, 1, 0, 2, 1, 1, 2, 0,
- 0, 0, 1, 2, 0, 1, 1, 2, 0,
+ 0, 0, 1, 2, 0, 1, 1, 2, 0,
2, 0, 1, 1, 2, 0, 2, 2, 1},
#define WIPE_T3_26 3
{0, 0, 1, 2, 0, 1, 0, 1, 0,
- 2, 0, 1, 0, 1, 0, 2, 2, 1,
+ 2, 0, 1, 0, 1, 0, 2, 2, 1,
0, 1, 0, 0, 2, 1, 2, 2, 1},
};
static gint triangles_4t[][4 * 9] = {
#define WIPE_T4_61 0
{0, 0, 1, 1, 0, 0, 1, 2, 1,
- 0, 0, 1, 0, 2, 2, 1, 2, 1,
- 1, 0, 0, 2, 0, 1, 1, 2, 1,
+ 0, 0, 1, 0, 2, 2, 1, 2, 1,
+ 1, 0, 0, 2, 0, 1, 1, 2, 1,
2, 0, 1, 1, 2, 1, 2, 2, 2},
#define WIPE_T4_62 1
{0, 0, 2, 2, 0, 1, 0, 1, 1,
- 2, 0, 1, 0, 1, 1, 2, 1, 0,
- 0, 1, 1, 2, 1, 0, 2, 2, 1,
+ 2, 0, 1, 0, 1, 1, 2, 1, 0,
+ 0, 1, 1, 2, 1, 0, 2, 2, 1,
0, 1, 1, 0, 2, 2, 2, 2, 1},
#define WIPE_T4_63 2
{0, 0, 2, 1, 0, 1, 0, 2, 1,
- 1, 0, 1, 0, 2, 1, 1, 2, 0,
- 1, 0, 1, 1, 2, 0, 2, 2, 1,
+ 1, 0, 1, 0, 2, 1, 1, 2, 0,
+ 1, 0, 1, 1, 2, 0, 2, 2, 1,
1, 0, 1, 2, 0, 2, 2, 2, 1},
#define WIPE_T4_64 3
{0, 0, 1, 2, 0, 2, 2, 1, 1,
- 0, 0, 1, 0, 1, 0, 2, 1, 1,
- 0, 1, 0, 2, 1, 1, 0, 2, 1,
+ 0, 0, 1, 0, 1, 0, 2, 1, 1,
+ 0, 1, 0, 2, 1, 1, 0, 2, 1,
2, 1, 1, 0, 2, 1, 2, 2, 2},
#define WIPE_T4_65 4
{0, 0, 0, 1, 0, 1, 1, 2, 0,
- 0, 0, 0, 0, 2, 1, 1, 2, 0,
- 1, 0, 1, 2, 0, 0, 1, 2, 0,
+ 0, 0, 0, 0, 2, 1, 1, 2, 0,
+ 1, 0, 1, 2, 0, 0, 1, 2, 0,
2, 0, 0, 1, 2, 0, 2, 2, 1},
#define WIPE_T4_66 5
{0, 0, 1, 2, 0, 0, 0, 1, 0,
- 2, 0, 0, 0, 1, 0, 2, 1, 1,
- 0, 1, 0, 2, 1, 1, 2, 2, 0,
+ 2, 0, 0, 0, 1, 0, 2, 1, 1,
+ 0, 1, 0, 2, 1, 1, 2, 2, 0,
0, 1, 0, 0, 2, 1, 2, 2, 0},
#define WIPE_T4_67 6
{0, 0, 1, 1, 0, 0, 0, 2, 0,
- 1, 0, 0, 0, 2, 0, 1, 2, 1,
- 1, 0, 0, 1, 2, 1, 2, 2, 0,
+ 1, 0, 0, 0, 2, 0, 1, 2, 1,
+ 1, 0, 0, 1, 2, 1, 2, 2, 0,
1, 0, 0, 2, 0, 1, 2, 2, 0},
#define WIPE_T4_68 7
{0, 0, 0, 2, 0, 1, 2, 1, 0,
- 0, 0, 0, 0, 1, 1, 2, 1, 0,
- 0, 1, 1, 2, 1, 0, 0, 2, 0,
+ 0, 0, 0, 0, 1, 1, 2, 1, 0,
+ 0, 1, 1, 2, 1, 0, 0, 2, 0,
2, 1, 0, 0, 2, 0, 2, 2, 1},
#define WIPE_T4_101 8
{0, 0, 1, 2, 0, 1, 1, 1, 0,
- 0, 0, 1, 1, 1, 0, 0, 2, 1,
- 1, 1, 0, 0, 2, 1, 2, 2, 1,
+ 0, 0, 1, 1, 1, 0, 0, 2, 1,
+ 1, 1, 0, 0, 2, 1, 2, 2, 1,
2, 0, 1, 1, 1, 0, 2, 2, 1},
};
@@ -328,48 +328,48 @@ static gint triangles_8t[][8 * 9] = {
/* 7 */
#define WIPE_T8_7 0
{0, 0, 0, 1, 0, 1, 1, 1, 1,
- 1, 0, 1, 2, 0, 0, 1, 1, 1,
- 2, 0, 0, 1, 1, 1, 2, 1, 1,
- 1, 1, 1, 2, 1, 1, 2, 2, 0,
- 1, 1, 1, 1, 2, 1, 2, 2, 0,
- 1, 1, 1, 0, 2, 0, 1, 2, 1,
- 0, 1, 1, 1, 1, 1, 0, 2, 0,
+ 1, 0, 1, 2, 0, 0, 1, 1, 1,
+ 2, 0, 0, 1, 1, 1, 2, 1, 1,
+ 1, 1, 1, 2, 1, 1, 2, 2, 0,
+ 1, 1, 1, 1, 2, 1, 2, 2, 0,
+ 1, 1, 1, 0, 2, 0, 1, 2, 1,
+ 0, 1, 1, 1, 1, 1, 0, 2, 0,
0, 0, 0, 0, 1, 1, 1, 1, 1},
#define WIPE_T8_43 1
{0, 0, 1, 1, 0, 0, 1, 1, 1,
- 1, 0, 0, 2, 0, 1, 1, 1, 1,
- 2, 0, 1, 1, 1, 1, 2, 1, 2,
- 1, 1, 1, 2, 1, 2, 2, 2, 1,
- 1, 1, 1, 1, 2, 0, 2, 2, 1,
- 1, 1, 1, 0, 2, 1, 1, 2, 0,
- 0, 1, 2, 1, 1, 1, 0, 2, 1,
+ 1, 0, 0, 2, 0, 1, 1, 1, 1,
+ 2, 0, 1, 1, 1, 1, 2, 1, 2,
+ 1, 1, 1, 2, 1, 2, 2, 2, 1,
+ 1, 1, 1, 1, 2, 0, 2, 2, 1,
+ 1, 1, 1, 0, 2, 1, 1, 2, 0,
+ 0, 1, 2, 1, 1, 1, 0, 2, 1,
0, 0, 1, 0, 1, 2, 1, 1, 1},
#define WIPE_T8_44 2
{0, 0, 1, 1, 0, 2, 1, 1, 1,
- 1, 0, 2, 2, 0, 1, 1, 1, 1,
- 2, 0, 1, 1, 1, 1, 2, 1, 0,
- 1, 1, 1, 2, 1, 0, 2, 2, 1,
- 1, 1, 1, 1, 2, 2, 2, 2, 1,
- 1, 1, 1, 0, 2, 1, 1, 2, 2,
- 0, 1, 0, 1, 1, 1, 0, 2, 1,
+ 1, 0, 2, 2, 0, 1, 1, 1, 1,
+ 2, 0, 1, 1, 1, 1, 2, 1, 0,
+ 1, 1, 1, 2, 1, 0, 2, 2, 1,
+ 1, 1, 1, 1, 2, 2, 2, 2, 1,
+ 1, 1, 1, 0, 2, 1, 1, 2, 2,
+ 0, 1, 0, 1, 1, 1, 0, 2, 1,
0, 0, 1, 0, 1, 0, 1, 1, 1},
#define WIPE_T8_47 3
{0, 0, 0, 1, 0, 1, 1, 1, 0,
- 1, 0, 1, 2, 0, 0, 1, 1, 0,
- 2, 0, 0, 1, 1, 0, 2, 1, 1,
- 1, 1, 0, 2, 1, 1, 2, 2, 0,
- 1, 1, 0, 1, 2, 1, 2, 2, 0,
- 1, 1, 0, 0, 2, 0, 1, 2, 1,
- 0, 1, 1, 1, 1, 0, 0, 2, 0,
+ 1, 0, 1, 2, 0, 0, 1, 1, 0,
+ 2, 0, 0, 1, 1, 0, 2, 1, 1,
+ 1, 1, 0, 2, 1, 1, 2, 2, 0,
+ 1, 1, 0, 1, 2, 1, 2, 2, 0,
+ 1, 1, 0, 0, 2, 0, 1, 2, 1,
+ 0, 1, 1, 1, 1, 0, 0, 2, 0,
0, 0, 0, 0, 1, 1, 1, 1, 0},
#define WIPE_T8_48 4
{0, 0, 1, 1, 0, 0, 0, 1, 0,
- 1, 0, 0, 0, 1, 0, 1, 1, 1,
- 1, 0, 0, 2, 0, 1, 2, 1, 0,
- 1, 0, 0, 1, 1, 1, 2, 1, 0,
- 0, 1, 0, 1, 1, 1, 1, 2, 0,
- 0, 1, 0, 0, 2, 1, 1, 2, 0,
- 1, 1, 1, 2, 1, 0, 1, 2, 0,
+ 1, 0, 0, 0, 1, 0, 1, 1, 1,
+ 1, 0, 0, 2, 0, 1, 2, 1, 0,
+ 1, 0, 0, 1, 1, 1, 2, 1, 0,
+ 0, 1, 0, 1, 1, 1, 1, 2, 0,
+ 0, 1, 0, 0, 2, 1, 1, 2, 0,
+ 1, 1, 1, 2, 1, 0, 1, 2, 0,
2, 1, 0, 1, 2, 0, 2, 2, 1},
};
@@ -377,20 +377,20 @@ static gint triangles_16t[][16 * 9] = {
/* 8 */
#define WIPE_T16_8 0
{0, 0, 1, 2, 0, 1, 1, 1, 0,
- 2, 0, 1, 1, 1, 0, 2, 2, 1,
- 1, 1, 0, 0, 2, 1, 2, 2, 1,
- 0, 0, 1, 1, 1, 0, 0, 2, 1,
- 2, 0, 1, 4, 0, 1, 3, 1, 0,
- 4, 0, 1, 3, 1, 0, 4, 2, 1,
- 3, 1, 0, 2, 2, 1, 4, 2, 1,
- 2, 0, 1, 3, 1, 0, 2, 2, 1,
- 0, 2, 1, 2, 2, 1, 1, 3, 0,
- 2, 2, 1, 1, 3, 0, 2, 4, 1,
- 1, 3, 0, 0, 4, 1, 2, 4, 1,
- 0, 2, 1, 1, 3, 0, 0, 4, 1,
- 2, 2, 1, 4, 2, 1, 3, 3, 0,
- 4, 2, 1, 3, 3, 0, 4, 4, 1,
- 3, 3, 0, 2, 4, 1, 4, 4, 1,
+ 2, 0, 1, 1, 1, 0, 2, 2, 1,
+ 1, 1, 0, 0, 2, 1, 2, 2, 1,
+ 0, 0, 1, 1, 1, 0, 0, 2, 1,
+ 2, 0, 1, 4, 0, 1, 3, 1, 0,
+ 4, 0, 1, 3, 1, 0, 4, 2, 1,
+ 3, 1, 0, 2, 2, 1, 4, 2, 1,
+ 2, 0, 1, 3, 1, 0, 2, 2, 1,
+ 0, 2, 1, 2, 2, 1, 1, 3, 0,
+ 2, 2, 1, 1, 3, 0, 2, 4, 1,
+ 1, 3, 0, 0, 4, 1, 2, 4, 1,
+ 0, 2, 1, 1, 3, 0, 0, 4, 1,
+ 2, 2, 1, 4, 2, 1, 3, 3, 0,
+ 4, 2, 1, 3, 3, 0, 4, 4, 1,
+ 3, 3, 0, 2, 4, 1, 4, 4, 1,
2, 2, 1, 3, 3, 0, 2, 4, 1}
};
@@ -407,148 +407,148 @@ struct _GstWipeConfig
static GstWipeConfig wipe_config[] = {
#define WIPE_CONFIG_1 0
- {boxes_1b[WIPE_B1_1], 1, 0, 0, 0}, /* 1 */
+ {boxes_1b[WIPE_B1_1], 1, 0, 0, 0}, /* 1 */
#define WIPE_CONFIG_2 WIPE_CONFIG_1+1
- {boxes_1b[WIPE_B1_2], 1, 0, 0, 0}, /* 2 */
+ {boxes_1b[WIPE_B1_2], 1, 0, 0, 0}, /* 2 */
#define WIPE_CONFIG_3 WIPE_CONFIG_2+1
- {triangles_2t[WIPE_T2_3], 2, 0, 0, 0}, /* 3 */
+ {triangles_2t[WIPE_T2_3], 2, 0, 0, 0}, /* 3 */
#define WIPE_CONFIG_4 WIPE_CONFIG_3+1
- {triangles_2t[WIPE_T2_4], 2, 0, 0, 0}, /* 4 */
+ {triangles_2t[WIPE_T2_4], 2, 0, 0, 0}, /* 4 */
#define WIPE_CONFIG_5 WIPE_CONFIG_4+1
- {triangles_2t[WIPE_T2_5], 2, 0, 0, 0}, /* 5 */
+ {triangles_2t[WIPE_T2_5], 2, 0, 0, 0}, /* 5 */
#define WIPE_CONFIG_6 WIPE_CONFIG_5+1
- {triangles_2t[WIPE_T2_6], 2, 0, 0, 0}, /* 6 */
+ {triangles_2t[WIPE_T2_6], 2, 0, 0, 0}, /* 6 */
#define WIPE_CONFIG_7 WIPE_CONFIG_6+1
- {triangles_8t[WIPE_T8_7], 8, 1, 1, 0}, /* 7 */
+ {triangles_8t[WIPE_T8_7], 8, 1, 1, 0}, /* 7 */
#define WIPE_CONFIG_8 WIPE_CONFIG_7+1
- {triangles_16t[WIPE_T16_8], 16, 2, 2, 0}, /* 8 */
+ {triangles_16t[WIPE_T16_8], 16, 2, 2, 0}, /* 8 */
#define WIPE_CONFIG_21 WIPE_CONFIG_8+1
- {boxes_2b[WIPE_B2_21], 2, 1, 1, 0}, /* 21 */
+ {boxes_2b[WIPE_B2_21], 2, 1, 1, 0}, /* 21 */
#define WIPE_CONFIG_22 WIPE_CONFIG_21+1
- {boxes_2b[WIPE_B2_22], 2, 1, 1, 0}, /* 22 */
+ {boxes_2b[WIPE_B2_22], 2, 1, 1, 0}, /* 22 */
#define WIPE_CONFIG_23 WIPE_CONFIG_22+1
- {triangles_3t[WIPE_T3_23], 3, 1, 1, 0}, /* 23 */
+ {triangles_3t[WIPE_T3_23], 3, 1, 1, 0}, /* 23 */
#define WIPE_CONFIG_24 WIPE_CONFIG_23+1
- {triangles_3t[WIPE_T3_24], 3, 1, 1, 0}, /* 24 */
+ {triangles_3t[WIPE_T3_24], 3, 1, 1, 0}, /* 24 */
#define WIPE_CONFIG_25 WIPE_CONFIG_24+1
- {triangles_3t[WIPE_T3_23], 3, 1, 1, 0}, /* 25 */
+ {triangles_3t[WIPE_T3_23], 3, 1, 1, 0}, /* 25 */
#define WIPE_CONFIG_26 WIPE_CONFIG_25+1
- {triangles_3t[WIPE_T3_26], 3, 1, 1, 0}, /* 26 */
+ {triangles_3t[WIPE_T3_26], 3, 1, 1, 0}, /* 26 */
#define WIPE_CONFIG_41 WIPE_CONFIG_26+1
- {triangles_2t[WIPE_T2_41], 2, 0, 0, 1}, /* 41 */
+ {triangles_2t[WIPE_T2_41], 2, 0, 0, 1}, /* 41 */
#define WIPE_CONFIG_42 WIPE_CONFIG_41+1
- {triangles_2t[WIPE_T2_42], 2, 0, 0, 1}, /* 42 */
+ {triangles_2t[WIPE_T2_42], 2, 0, 0, 1}, /* 42 */
#define WIPE_CONFIG_43 WIPE_CONFIG_42+1
- {triangles_8t[WIPE_T8_43], 8, 1, 1, 1}, /* 43 */
+ {triangles_8t[WIPE_T8_43], 8, 1, 1, 1}, /* 43 */
#define WIPE_CONFIG_44 WIPE_CONFIG_43+1
- {triangles_8t[WIPE_T8_44], 8, 1, 1, 1}, /* 44 */
+ {triangles_8t[WIPE_T8_44], 8, 1, 1, 1}, /* 44 */
#define WIPE_CONFIG_45 WIPE_CONFIG_44+1
- {triangles_2t[WIPE_T2_45], 2, 0, 0, 0}, /* 45 */
+ {triangles_2t[WIPE_T2_45], 2, 0, 0, 0}, /* 45 */
#define WIPE_CONFIG_46 WIPE_CONFIG_45+1
- {triangles_2t[WIPE_T2_46], 2, 0, 0, 0}, /* 46 */
+ {triangles_2t[WIPE_T2_46], 2, 0, 0, 0}, /* 46 */
#define WIPE_CONFIG_47 WIPE_CONFIG_46+1
- {triangles_8t[WIPE_T8_47], 8, 1, 1, 0}, /* 47 */
+ {triangles_8t[WIPE_T8_47], 8, 1, 1, 0}, /* 47 */
#define WIPE_CONFIG_48 WIPE_CONFIG_47+1
- {triangles_8t[WIPE_T8_48], 8, 1, 1, 0}, /* 48 */
+ {triangles_8t[WIPE_T8_48], 8, 1, 1, 0}, /* 48 */
#define WIPE_CONFIG_61 WIPE_CONFIG_48+1
- {triangles_4t[WIPE_T4_61], 4, 1, 1, 1}, /* 61 */
+ {triangles_4t[WIPE_T4_61], 4, 1, 1, 1}, /* 61 */
#define WIPE_CONFIG_62 WIPE_CONFIG_61+1
- {triangles_4t[WIPE_T4_62], 4, 1, 1, 1}, /* 62 */
+ {triangles_4t[WIPE_T4_62], 4, 1, 1, 1}, /* 62 */
#define WIPE_CONFIG_63 WIPE_CONFIG_62+1
- {triangles_4t[WIPE_T4_63], 4, 1, 1, 1}, /* 63 */
+ {triangles_4t[WIPE_T4_63], 4, 1, 1, 1}, /* 63 */
#define WIPE_CONFIG_64 WIPE_CONFIG_63+1
- {triangles_4t[WIPE_T4_64], 4, 1, 1, 1}, /* 64 */
+ {triangles_4t[WIPE_T4_64], 4, 1, 1, 1}, /* 64 */
#define WIPE_CONFIG_65 WIPE_CONFIG_64+1
- {triangles_4t[WIPE_T4_65], 4, 1, 1, 0}, /* 65 */
+ {triangles_4t[WIPE_T4_65], 4, 1, 1, 0}, /* 65 */
#define WIPE_CONFIG_66 WIPE_CONFIG_65+1
- {triangles_4t[WIPE_T4_66], 4, 1, 1, 0}, /* 66 */
+ {triangles_4t[WIPE_T4_66], 4, 1, 1, 0}, /* 66 */
#define WIPE_CONFIG_67 WIPE_CONFIG_66+1
- {triangles_4t[WIPE_T4_67], 4, 1, 1, 0}, /* 67 */
+ {triangles_4t[WIPE_T4_67], 4, 1, 1, 0}, /* 67 */
#define WIPE_CONFIG_68 WIPE_CONFIG_67+1
- {triangles_4t[WIPE_T4_68], 4, 1, 1, 0}, /* 68 */
+ {triangles_4t[WIPE_T4_68], 4, 1, 1, 0}, /* 68 */
#define WIPE_CONFIG_101 WIPE_CONFIG_68+1
- {triangles_4t[WIPE_T4_101], 4, 1, 1, 0}, /* 101 */
+ {triangles_4t[WIPE_T4_101], 4, 1, 1, 0}, /* 101 */
#define WIPE_CONFIG_201 WIPE_CONFIG_101+1
- {box_clock_4b[WIPE_B4_201], 4, 1, 1, 2}, /* 201 */
+ {box_clock_4b[WIPE_B4_201], 4, 1, 1, 2}, /* 201 */
#define WIPE_CONFIG_202 WIPE_CONFIG_201+1
- {box_clock_4b[WIPE_B4_202], 4, 1, 1, 2}, /* 202 */
+ {box_clock_4b[WIPE_B4_202], 4, 1, 1, 2}, /* 202 */
#define WIPE_CONFIG_203 WIPE_CONFIG_202+1
- {box_clock_4b[WIPE_B4_203], 4, 1, 1, 2}, /* 203 */
+ {box_clock_4b[WIPE_B4_203], 4, 1, 1, 2}, /* 203 */
#define WIPE_CONFIG_204 WIPE_CONFIG_203+1
- {box_clock_4b[WIPE_B4_204], 4, 1, 1, 2}, /* 204 */
+ {box_clock_4b[WIPE_B4_204], 4, 1, 1, 2}, /* 204 */
#define WIPE_CONFIG_205 WIPE_CONFIG_204+1
- {box_clock_4b[WIPE_B4_205], 4, 1, 1, 1}, /* 205 */
+ {box_clock_4b[WIPE_B4_205], 4, 1, 1, 1}, /* 205 */
#define WIPE_CONFIG_206 WIPE_CONFIG_205+1
- {box_clock_4b[WIPE_B4_206], 4, 1, 1, 1}, /* 206 */
+ {box_clock_4b[WIPE_B4_206], 4, 1, 1, 1}, /* 206 */
#define WIPE_CONFIG_207 WIPE_CONFIG_206+1
- {box_clock_4b[WIPE_B4_207], 4, 1, 1, 0}, /* 207 */
+ {box_clock_4b[WIPE_B4_207], 4, 1, 1, 0}, /* 207 */
#define WIPE_CONFIG_211 WIPE_CONFIG_207+1
- {box_clock_4b[WIPE_B4_211], 4, 1, 1, 1}, /* 211 */
+ {box_clock_4b[WIPE_B4_211], 4, 1, 1, 1}, /* 211 */
#define WIPE_CONFIG_212 WIPE_CONFIG_211+1
- {box_clock_4b[WIPE_B4_212], 4, 1, 1, 1}, /* 212 */
+ {box_clock_4b[WIPE_B4_212], 4, 1, 1, 1}, /* 212 */
#define WIPE_CONFIG_213 WIPE_CONFIG_212+1
- {box_clock_4b[WIPE_B4_213], 4, 1, 1, 0}, /* 213 */
+ {box_clock_4b[WIPE_B4_213], 4, 1, 1, 0}, /* 213 */
#define WIPE_CONFIG_214 WIPE_CONFIG_213+1
- {box_clock_4b[WIPE_B4_214], 4, 1, 1, 0}, /* 214 */
+ {box_clock_4b[WIPE_B4_214], 4, 1, 1, 0}, /* 214 */
#define WIPE_CONFIG_221 WIPE_CONFIG_214+1
- {box_clock_2b[WIPE_B2_221], 2, 1, 1, 1}, /* 221 */
+ {box_clock_2b[WIPE_B2_221], 2, 1, 1, 1}, /* 221 */
#define WIPE_CONFIG_222 WIPE_CONFIG_221+1
- {box_clock_2b[WIPE_B2_222], 2, 1, 1, 1}, /* 222 */
+ {box_clock_2b[WIPE_B2_222], 2, 1, 1, 1}, /* 222 */
#define WIPE_CONFIG_223 WIPE_CONFIG_222+1
- {box_clock_2b[WIPE_B2_223], 2, 1, 1, 1}, /* 223 */
+ {box_clock_2b[WIPE_B2_223], 2, 1, 1, 1}, /* 223 */
#define WIPE_CONFIG_224 WIPE_CONFIG_223+1
- {box_clock_2b[WIPE_B2_224], 2, 1, 1, 1}, /* 224 */
+ {box_clock_2b[WIPE_B2_224], 2, 1, 1, 1}, /* 224 */
#define WIPE_CONFIG_225 WIPE_CONFIG_224+1
- {box_clock_2b[WIPE_B2_225], 2, 1, 1, 0}, /* 225 */
+ {box_clock_2b[WIPE_B2_225], 2, 1, 1, 0}, /* 225 */
#define WIPE_CONFIG_226 WIPE_CONFIG_225+1
- {box_clock_2b[WIPE_B2_226], 2, 1, 1, 0}, /* 226 */
+ {box_clock_2b[WIPE_B2_226], 2, 1, 1, 0}, /* 226 */
#define WIPE_CONFIG_227 WIPE_CONFIG_226+1
- {box_clock_4b[WIPE_B4_227], 4, 1, 1, 1}, /* 227 */
+ {box_clock_4b[WIPE_B4_227], 4, 1, 1, 1}, /* 227 */
#define WIPE_CONFIG_228 WIPE_CONFIG_227+1
- {box_clock_4b[WIPE_B4_228], 4, 1, 1, 1}, /* 228 */
+ {box_clock_4b[WIPE_B4_228], 4, 1, 1, 1}, /* 228 */
#define WIPE_CONFIG_231 WIPE_CONFIG_228+1
- {box_clock_2b[WIPE_B2_231], 2, 1, 1, 0}, /* 231 */
+ {box_clock_2b[WIPE_B2_231], 2, 1, 1, 0}, /* 231 */
#define WIPE_CONFIG_232 WIPE_CONFIG_231+1
- {box_clock_2b[WIPE_B2_232], 2, 1, 1, 0}, /* 232 */
+ {box_clock_2b[WIPE_B2_232], 2, 1, 1, 0}, /* 232 */
#define WIPE_CONFIG_233 WIPE_CONFIG_232+1
- {box_clock_2b[WIPE_B2_233], 2, 1, 1, 0}, /* 233 */
+ {box_clock_2b[WIPE_B2_233], 2, 1, 1, 0}, /* 233 */
#define WIPE_CONFIG_234 WIPE_CONFIG_233+1
- {box_clock_2b[WIPE_B2_234], 2, 1, 1, 0}, /* 234 */
+ {box_clock_2b[WIPE_B2_234], 2, 1, 1, 0}, /* 234 */
#define WIPE_CONFIG_235 WIPE_CONFIG_234+1
- {box_clock_4b[WIPE_B4_235], 4, 1, 1, 0}, /* 235 */
+ {box_clock_4b[WIPE_B4_235], 4, 1, 1, 0}, /* 235 */
#define WIPE_CONFIG_236 WIPE_CONFIG_235+1
- {box_clock_4b[WIPE_B4_236], 4, 1, 1, 0}, /* 236 */
+ {box_clock_4b[WIPE_B4_236], 4, 1, 1, 0}, /* 236 */
#define WIPE_CONFIG_241 WIPE_CONFIG_236+1
- {box_clock_1b[WIPE_B1_241], 1, 0, 0, 0}, /* 241 */
+ {box_clock_1b[WIPE_B1_241], 1, 0, 0, 0}, /* 241 */
#define WIPE_CONFIG_242 WIPE_CONFIG_241+1
- {box_clock_1b[WIPE_B1_242], 1, 0, 0, 0}, /* 242 */
+ {box_clock_1b[WIPE_B1_242], 1, 0, 0, 0}, /* 242 */
#define WIPE_CONFIG_243 WIPE_CONFIG_242+1
- {box_clock_1b[WIPE_B1_243], 1, 0, 0, 0}, /* 243 */
+ {box_clock_1b[WIPE_B1_243], 1, 0, 0, 0}, /* 243 */
#define WIPE_CONFIG_244 WIPE_CONFIG_243+1
- {box_clock_1b[WIPE_B1_244], 1, 0, 0, 0}, /* 244 */
+ {box_clock_1b[WIPE_B1_244], 1, 0, 0, 0}, /* 244 */
#define WIPE_CONFIG_245 WIPE_CONFIG_244+1
- {triangles_2t[WIPE_T2_245], 2, 1, 1, 0}, /* 245 */
+ {triangles_2t[WIPE_T2_245], 2, 1, 1, 0}, /* 245 */
#define WIPE_CONFIG_246 WIPE_CONFIG_245+1
- {triangles_2t[WIPE_T2_246], 2, 1, 1, 0}, /* 246 */
+ {triangles_2t[WIPE_T2_246], 2, 1, 1, 0}, /* 246 */
#define WIPE_CONFIG_251 WIPE_CONFIG_246+1
- {box_clock_2b[WIPE_B2_251], 2, 1, 1, 0}, /* 251 */
+ {box_clock_2b[WIPE_B2_251], 2, 1, 1, 0}, /* 251 */
#define WIPE_CONFIG_252 WIPE_CONFIG_251+1
- {box_clock_2b[WIPE_B2_252], 2, 1, 1, 0}, /* 252 */
+ {box_clock_2b[WIPE_B2_252], 2, 1, 1, 0}, /* 252 */
#define WIPE_CONFIG_253 WIPE_CONFIG_252+1
- {box_clock_2b[WIPE_B2_253], 2, 1, 1, 0}, /* 253 */
+ {box_clock_2b[WIPE_B2_253], 2, 1, 1, 0}, /* 253 */
#define WIPE_CONFIG_254 WIPE_CONFIG_253+1
- {box_clock_2b[WIPE_B2_254], 2, 1, 1, 0}, /* 254 */
+ {box_clock_2b[WIPE_B2_254], 2, 1, 1, 0}, /* 254 */
#define WIPE_CONFIG_261 WIPE_CONFIG_254+1
- {box_clock_8b[WIPE_B8_261], 8, 2, 2, 2}, /* 261 */
+ {box_clock_8b[WIPE_B8_261], 8, 2, 2, 2}, /* 261 */
#define WIPE_CONFIG_262 WIPE_CONFIG_261+1
- {box_clock_8b[WIPE_B8_262], 8, 2, 2, 2}, /* 262 */
+ {box_clock_8b[WIPE_B8_262], 8, 2, 2, 2}, /* 262 */
#define WIPE_CONFIG_263 WIPE_CONFIG_262+1
- {box_clock_8b[WIPE_B8_263], 8, 2, 2, 1}, /* 263 */
+ {box_clock_8b[WIPE_B8_263], 8, 2, 2, 1}, /* 263 */
#define WIPE_CONFIG_264 WIPE_CONFIG_263+1
- {box_clock_8b[WIPE_B8_264], 8, 2, 2, 1}, /* 264 */
+ {box_clock_8b[WIPE_B8_264], 8, 2, 2, 1}, /* 264 */
};
static void
@@ -565,24 +565,24 @@ gst_wipe_boxes_draw (GstMask * mask)
for (i = 0; i < config->nobjects; i++) {
switch (impacts[0]) {
case BOX_VERTICAL:
- gst_smpte_paint_vbox (mask->data, mask->width,
- impacts[1] * width, impacts[2] * height, impacts[3] * depth,
- impacts[4] * width, impacts[5] * height, impacts[6] * depth);
- impacts += 7;
- break;
+ gst_smpte_paint_vbox (mask->data, mask->width,
+ impacts[1] * width, impacts[2] * height, impacts[3] * depth,
+ impacts[4] * width, impacts[5] * height, impacts[6] * depth);
+ impacts += 7;
+ break;
case BOX_HORIZONTAL:
- gst_smpte_paint_hbox (mask->data, mask->width,
- impacts[1] * width, impacts[2] * height, impacts[3] * depth,
- impacts[4] * width, impacts[5] * height, impacts[6] * depth);
- impacts += 7;
+ gst_smpte_paint_hbox (mask->data, mask->width,
+ impacts[1] * width, impacts[2] * height, impacts[3] * depth,
+ impacts[4] * width, impacts[5] * height, impacts[6] * depth);
+ impacts += 7;
case BOX_CLOCK:
- gst_smpte_paint_box_clock (mask->data, mask->width,
- impacts[1] * width, impacts[2] * height, impacts[3] * depth,
- impacts[4] * width, impacts[5] * height, impacts[6] * depth,
- impacts[7] * width, impacts[8] * height, impacts[9] * depth);
- impacts += 10;
+ gst_smpte_paint_box_clock (mask->data, mask->width,
+ impacts[1] * width, impacts[2] * height, impacts[3] * depth,
+ impacts[4] * width, impacts[5] * height, impacts[6] * depth,
+ impacts[7] * width, impacts[8] * height, impacts[9] * depth);
+ impacts += 10;
default:
- break;
+ break;
}
}
}
@@ -599,9 +599,9 @@ gst_wipe_triangles_clock_draw (GstMask * mask)
for (i = 0; i < config->nobjects; i++) {
gst_smpte_paint_triangle_clock (mask->data, mask->width,
- impacts[0] * width, impacts[1] * height, impacts[2] * depth,
- impacts[3] * width, impacts[4] * height, impacts[5] * depth,
- impacts[6] * width, impacts[7] * height, impacts[8] * depth);
+ impacts[0] * width, impacts[1] * height, impacts[2] * depth,
+ impacts[3] * width, impacts[4] * height, impacts[5] * depth,
+ impacts[6] * width, impacts[7] * height, impacts[8] * depth);
impacts += 9;
}
}
@@ -619,293 +619,293 @@ gst_wipe_triangles_draw (GstMask * mask)
for (i = 0; i < config->nobjects; i++) {
gst_smpte_paint_triangle_linear (mask->data, mask->width,
- impacts[0] * width, impacts[1] * height, impacts[2] * depth,
- impacts[3] * width, impacts[4] * height, impacts[5] * depth,
- impacts[6] * width, impacts[7] * height, impacts[8] * depth);
+ impacts[0] * width, impacts[1] * height, impacts[2] * depth,
+ impacts[3] * width, impacts[4] * height, impacts[5] * depth,
+ impacts[6] * width, impacts[7] * height, impacts[8] * depth);
impacts += 9;
}
}
static GstMaskDefinition definitions[] = {
{1, "bar_wipe_lr",
- "A bar moves from left to right",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A bar moves from left to right",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_1]},
{2, "bar_wipe_tb",
- "A bar moves from top to bottom",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A bar moves from top to bottom",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_2]},
{3, "box_wipe_tl",
- "A box expands from the upper-left corner to the lower-right corner",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the upper-left corner to the lower-right corner",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_3]},
{4, "box_wipe_tr",
- "A box expands from the upper-right corner to the lower-left corner",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the upper-right corner to the lower-left corner",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_4]},
{5, "box_wipe_br",
- "A box expands from the lower-right corner to the upper-left corner",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the lower-right corner to the upper-left corner",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_5]},
{6, "box_wipe_bl",
- "A box expands from the lower-left corner to the upper-right corner",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the lower-left corner to the upper-right corner",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_6]},
{7, "four_box_wipe_ci",
- "A box shape expands from each of the four corners toward the center",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box shape expands from each of the four corners toward the center",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_7]},
{8, "four_box_wipe_co",
- "A box shape expands from the center of each quadrant toward the corners of each quadrant",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box shape expands from the center of each quadrant toward the corners of each quadrant",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_8]},
{21, "barndoor_v",
- "A central, vertical line splits and expands toward the left and right edges",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A central, vertical line splits and expands toward the left and right edges",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_21]},
{22, "barndoor_h",
- "A central, horizontal line splits and expands toward the top and bottom edges",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A central, horizontal line splits and expands toward the top and bottom edges",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_22]},
{23, "box_wipe_tc",
- "A box expands from the top edge's midpoint to the bottom corners",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the top edge's midpoint to the bottom corners",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_23]},
{24, "box_wipe_rc",
- "A box expands from the right edge's midpoint to the left corners",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the right edge's midpoint to the left corners",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_24]},
{25, "box_wipe_bc",
- "A box expands from the bottom edge's midpoint to the top corners",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the bottom edge's midpoint to the top corners",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_25]},
{26, "box_wipe_lc",
- "A box expands from the left edge's midpoint to the right corners",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A box expands from the left edge's midpoint to the right corners",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_26]},
{41, "diagonal_tl",
- "A diagonal line moves from the upper-left corner to the lower-right corner",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A diagonal line moves from the upper-left corner to the lower-right corner",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_41]},
{42, "diagonal_tr",
- "A diagonal line moves from the upper right corner to the lower-left corner",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A diagonal line moves from the upper right corner to the lower-left corner",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_42]},
{43, "bowtie_v",
- "Two wedge shapes slide in from the top and bottom edges toward the center",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "Two wedge shapes slide in from the top and bottom edges toward the center",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_43]},
{44, "bowtie_h",
- "Two wedge shapes slide in from the left and right edges toward the center",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "Two wedge shapes slide in from the left and right edges toward the center",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_44]},
{45, "barndoor_dbl",
- "A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_45]},
{46, "barndoor_dtl",
- "A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_46]},
{47, "misc_diagonal_dbd",
- "Four wedge shapes split from the center and retract toward the four edges",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "Four wedge shapes split from the center and retract toward the four edges",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_47]},
{48, "misc_diagonal_dd",
- "A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_48]},
{61, "vee_d",
- "A wedge shape moves from top to bottom",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A wedge shape moves from top to bottom",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_61]},
{62, "vee_l",
- "A wedge shape moves from right to left",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A wedge shape moves from right to left",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_62]},
{63, "vee_u",
- "A wedge shape moves from bottom to top",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A wedge shape moves from bottom to top",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_63]},
{64, "vee_r",
- "A wedge shape moves from left to right",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A wedge shape moves from left to right",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_64]},
{65, "barnvee_d",
- "A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_65]},
{66, "barnvee_l",
- "A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_66]},
{67, "barnvee_u",
- "A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_67]},
{68, "barnvee_r",
- "A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_68]},
{101, "iris_rect",
- "A rectangle expands from the center.",
- gst_wipe_triangles_draw, _gst_mask_default_destroy,
+ "A rectangle expands from the center.",
+ gst_wipe_triangles_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_101]},
{201, "clock_cw12",
- "A radial hand sweeps clockwise from the twelve o'clock position",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the twelve o'clock position",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_201]},
{202, "clock_cw3",
- "A radial hand sweeps clockwise from the three o'clock position",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the three o'clock position",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_202]},
{203, "clock_cw6",
- "A radial hand sweeps clockwise from the six o'clock position",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the six o'clock position",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_203]},
{204, "clock_cw9",
- "A radial hand sweeps clockwise from the nine o'clock position",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the nine o'clock position",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_204]},
{205, "pinwheel_tbv",
- "Two radial hands sweep clockwise from the twelve and six o'clock positions",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands sweep clockwise from the twelve and six o'clock positions",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_205]},
{206, "pinwheel_tbh",
- "Two radial hands sweep clockwise from the nine and three o'clock positions",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands sweep clockwise from the nine and three o'clock positions",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_206]},
{207, "pinwheel_fb",
- "Four radial hands sweep clockwise",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Four radial hands sweep clockwise",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_207]},
{211, "fan_ct",
- "A fan unfolds from the top edge, the fan axis at the center",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A fan unfolds from the top edge, the fan axis at the center",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_211]},
{212, "fan_cr",
- "A fan unfolds from the right edge, the fan axis at the center",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A fan unfolds from the right edge, the fan axis at the center",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_212]},
{213, "doublefan_fov",
- "Two fans, their axes at the center, unfold from the top and bottom",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two fans, their axes at the center, unfold from the top and bottom",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_213]},
{214, "doublefan_foh",
- "Two fans, their axes at the center, unfold from the left and right",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two fans, their axes at the center, unfold from the left and right",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_214]},
{221, "singlesweep_cwt",
- "A radial hand sweeps clockwise from the top edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the top edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_221]},
{222, "singlesweep_cwr",
- "A radial hand sweeps clockwise from the right edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the right edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_222]},
{223, "singlesweep_cwb",
- "A radial hand sweeps clockwise from the bottom edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the bottom edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_223]},
{224, "singlesweep_cwl",
- "A radial hand sweeps clockwise from the left edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the left edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_224]},
{225, "doublesweep_pv",
- "Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_225]},
{226, "doublesweep_pd",
- "Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_226]},
{227, "doublesweep_ov",
- "Two radial hands attached at the top and bottom edges' midpoints sweep from right to left",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the top and bottom edges' midpoints sweep from right to left",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_227]},
{228, "doublesweep_oh",
- "Two radial hands attached at the left and right edges' midpoints sweep from top to bottom",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the left and right edges' midpoints sweep from top to bottom",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_228]},
{231, "fan_t",
- "A fan unfolds from the bottom, the fan axis at the top edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A fan unfolds from the bottom, the fan axis at the top edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_231]},
{232, "fan_r",
- "A fan unfolds from the left, the fan axis at the right edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A fan unfolds from the left, the fan axis at the right edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_232]},
{233, "fan_b",
- "A fan unfolds from the top, the fan axis at the bottom edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A fan unfolds from the top, the fan axis at the bottom edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_233]},
{234, "fan_l",
- "A fan unfolds from the right, the fan axis at the left edge's midpoint",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A fan unfolds from the right, the fan axis at the left edge's midpoint",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_234]},
{235, "doublefan_fiv",
- "Two fans, their axes at the top and bottom, unfold from the center",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two fans, their axes at the top and bottom, unfold from the center",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_235]},
{236, "doublefan_fih",
- "Two fans, their axes at the left and right, unfold from the center",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two fans, their axes at the left and right, unfold from the center",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_236]},
{241, "singlesweep_cwtl",
- "A radial hand sweeps clockwise from the upper-left corner",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the upper-left corner",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_241]},
{242, "singlesweep_cwbl",
- "A radial hand sweeps counter-clockwise from the lower-left corner.",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps counter-clockwise from the lower-left corner.",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_242]},
{243, "singlesweep_cwbr",
- "A radial hand sweeps clockwise from the lower-right corner",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps clockwise from the lower-right corner",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_243]},
{244, "singlesweep_cwtr",
- "A radial hand sweeps counter-clockwise from the upper-right corner",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "A radial hand sweeps counter-clockwise from the upper-right corner",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_244]},
{245, "doublesweep_pdtl",
- "Two radial hands attached at the upper-left and lower-right corners sweep down and up",
- gst_wipe_triangles_clock_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the upper-left and lower-right corners sweep down and up",
+ gst_wipe_triangles_clock_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_245]},
{246, "doublesweep_pdbl",
- "Two radial hands attached at the lower-left and upper-right corners sweep down and up",
- gst_wipe_triangles_clock_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the lower-left and upper-right corners sweep down and up",
+ gst_wipe_triangles_clock_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_246]},
{251, "saloondoor_t",
- "Two radial hands attached at the upper-left and upper-right corners sweep down",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the upper-left and upper-right corners sweep down",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_251]},
{252, "saloondoor_l",
- "Two radial hands attached at the upper-left and lower-left corners sweep to the right",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the upper-left and lower-left corners sweep to the right",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_252]},
{253, "saloondoor_b",
- "Two radial hands attached at the lower-left and lower-right corners sweep up",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the lower-left and lower-right corners sweep up",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_253]},
{254, "saloondoor_r",
- "Two radial hands attached at the upper-right and lower-right corners sweep to the left",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the upper-right and lower-right corners sweep to the left",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_254]},
{261, "windshield_r",
- "Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_261]},
{262, "windshield_u",
- "Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_262]},
{263, "windshield_v",
- "Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_263]},
{264, "windshield_h",
- "Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left",
- gst_wipe_boxes_draw, _gst_mask_default_destroy,
+ "Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left",
+ gst_wipe_boxes_draw, _gst_mask_default_destroy,
&wipe_config[WIPE_CONFIG_264]},
{0, NULL, NULL, NULL}
};
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index 91b91d9d..c948ad17 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -87,7 +87,7 @@ gst_smpte_transition_type_get_type (void)
definitions = gst_mask_get_definitions ();
smpte_transitions =
- g_new0 (GEnumValue, g_list_length ((GList *) definitions) + 1);
+ g_new0 (GEnumValue, g_list_length ((GList *) definitions) + 1);
while (definitions) {
GstMaskDefinition *definition = (GstMaskDefinition *) definitions->data;
@@ -102,7 +102,7 @@ gst_smpte_transition_type_get_type (void)
}
smpte_transition_type =
- g_enum_register_static ("GstSMPTETransitionType", smpte_transitions);
+ g_enum_register_static ("GstSMPTETransitionType", smpte_transitions);
}
return smpte_transition_type;
}
@@ -140,8 +140,9 @@ gst_smpte_get_type (void)
0,
(GInstanceInitFunc) gst_smpte_init,
};
+
smpte_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstSMPTE", &smpte_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstSMPTE", &smpte_info, 0);
}
return smpte_type;
}
@@ -178,18 +179,18 @@ gst_smpte_class_init (GstSMPTEClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TYPE,
g_param_spec_enum ("type", "Type", "The type of transition to use",
- GST_TYPE_SMPTE_TRANSITION_TYPE, 1, G_PARAM_READWRITE));
+ GST_TYPE_SMPTE_TRANSITION_TYPE, 1, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FPS,
g_param_spec_float ("fps", "FPS",
- "Frames per second if no input files are given", 0., G_MAXFLOAT, 25.,
- G_PARAM_READWRITE));
+ "Frames per second if no input files are given", 0., G_MAXFLOAT, 25.,
+ G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BORDER,
g_param_spec_int ("border", "Border",
- "The border width of the transition", 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
+ "The border width of the transition", 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DEPTH,
g_param_spec_int ("depth", "Depth", "Depth of the mask in bits", 1, 24,
- 16, G_PARAM_READWRITE));
+ 16, G_PARAM_READWRITE));
}
/* wht yel cya grn mag red blu blk -I Q */
@@ -324,8 +325,8 @@ gst_smpte_blend_i420 (guint8 * in1, guint8 * in2, guint8 * out, GstMask * mask,
*out++ = ((*in1++ * value) + (*in2++ * (256 - value))) >> 8;
if (!(i & 1) && !(j & 1)) {
- *outu++ = ((*in1u++ * value) + (*in2u++ * (256 - value))) >> 8;
- *outv++ = ((*in1v++ * value) + (*in2v++ * (256 - value))) >> 8;
+ *outu++ = ((*in1u++ * value) + (*in2u++ * (256 - value))) >> 8;
+ *outv++ = ((*in1v++ * value) + (*in2v++ * (256 - value))) >> 8;
}
}
}
@@ -376,25 +377,25 @@ gst_smpte_loop (GstElement * element)
GstCaps *caps;
caps =
- gst_caps_copy (gst_static_caps_get (&gst_smpte_src_template.
- static_caps));
+ gst_caps_copy (gst_static_caps_get (&gst_smpte_src_template.
+ static_caps));
gst_caps_set_simple (caps, "width", G_TYPE_INT, smpte->width, "height",
- G_TYPE_INT, smpte->height, "framerate", G_TYPE_DOUBLE, smpte->fps,
- NULL);
+ G_TYPE_INT, smpte->height, "framerate", G_TYPE_DOUBLE, smpte->fps,
+ NULL);
if (!gst_pad_try_set_caps (smpte->srcpad, caps)) {
- GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, (NULL), (NULL));
- return;
+ GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, (NULL), (NULL));
+ return;
}
}
gst_smpte_blend_i420 (GST_BUFFER_DATA (in1),
- GST_BUFFER_DATA (in2),
- GST_BUFFER_DATA (outbuf),
- smpte->mask, smpte->width, smpte->height,
- smpte->border,
- ((1 << smpte->depth) + smpte->border) *
- smpte->position / smpte->duration);
+ GST_BUFFER_DATA (in2),
+ GST_BUFFER_DATA (outbuf),
+ smpte->mask, smpte->width, smpte->height,
+ smpte->border,
+ ((1 << smpte->depth) + smpte->border) *
+ smpte->position / smpte->duration);
} else {
outbuf = in2;
gst_buffer_ref (in2);
@@ -425,7 +426,7 @@ gst_smpte_set_property (GObject * object, guint prop_id,
gint type = g_value_get_enum (value);
gst_smpte_update_mask (smpte, type, smpte->depth,
- smpte->width, smpte->height);
+ smpte->width, smpte->height);
break;
}
case ARG_BORDER:
@@ -439,7 +440,7 @@ gst_smpte_set_property (GObject * object, guint prop_id,
gint depth = g_value_get_int (value);
gst_smpte_update_mask (smpte, smpte->type, depth,
- smpte->width, smpte->height);
+ smpte->width, smpte->height);
break;
}
default:
@@ -459,7 +460,7 @@ gst_smpte_get_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_TYPE:
if (smpte->mask) {
- g_value_set_enum (value, smpte->mask->type);
+ g_value_set_enum (value, smpte->mask->type);
}
break;
case ARG_FPS:
diff --git a/gst/smpte/paint.c b/gst/smpte/paint.c
index fdff77e5..f4f64829 100644
--- a/gst/smpte/paint.c
+++ b/gst/smpte/paint.c
@@ -189,22 +189,22 @@ gst_smpte_paint_triangle_linear (guint32 * dest, gint stride,
e += sign;
for (j = s; j != e; j += sign) {
- dest[j] = (ec * (j - s) + sc * (e - j)) / (e - s);
+ dest[j] = (ec * (j - s) + sc * (e - j)) / (e - s);
}
while (pyr == i) {
- STEP_3D_LINE (dxrabs, dyrabs, dcrabs, sdxr, sdyr, sdcr,
- xrr, yrr, crr, pxr, pyr, pcr);
+ STEP_3D_LINE (dxrabs, dyrabs, dcrabs, sdxr, sdyr, sdcr,
+ xrr, yrr, crr, pxr, pyr, pcr);
}
while (pyl == i) {
- STEP_3D_LINE (dxlabs, dylabs, dclabs, sdxl, sdyl, sdcl,
- xrl, yrl, crl, pxl, pyl, pcl);
+ STEP_3D_LINE (dxlabs, dylabs, dclabs, sdxl, sdyl, sdcl,
+ xrl, yrl, crl, pxl, pyl, pcl);
}
dest += stride;
}
PREPARE_3D_LINE (x1, y1, c1, x2, y2, c2,
- dxrabs, dyrabs, dcrabs, sdxr, sdyr, sdcr, xrr, yrr, crr, pxr, pyr, pcr);
+ dxrabs, dyrabs, dcrabs, sdxr, sdyr, sdcr, xrr, yrr, crr, pxr, pyr, pcr);
seg_start = y1;
seg_end = y2;
@@ -265,7 +265,7 @@ gst_smpte_paint_triangle_clock (guint32 * dest, gint stride,
angle_s = 0.0;
angle_e = acos (((x1 - x0) * (x2 - x0) + (y1 - y0) * (y2 - y0)) /
(sqrt ((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) *
- sqrt ((x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0))));
+ sqrt ((x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0))));
len1 = sqrt ((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));
@@ -274,28 +274,28 @@ gst_smpte_paint_triangle_clock (guint32 * dest, gint stride,
for (i = y1; i != (y2 + sign); i += sign) {
if (y1 == i)
- angle = 0;
+ angle = 0;
else
- angle = acos (((x1 - x0) * (x2 - x0) + (y1 - y0) * (i - y0)) /
- (len1 * sqrt ((x1 - x0) * (x1 - x0) + (i - y0) * (i -
- y0)))) / angle_e;
+ angle = acos (((x1 - x0) * (x2 - x0) + (y1 - y0) * (i - y0)) /
+ (len1 * sqrt ((x1 - x0) * (x1 - x0) + (i - y0) * (i -
+ y0)))) / angle_e;
draw_bresenham_line (dest, stride,
- x0, y0, x1, i, (c2 * angle + c1 * (1.0 - angle)));
+ x0, y0, x1, i, (c2 * angle + c1 * (1.0 - angle)));
}
} else if (y1 == y2) {
sign = SIGN (x2 - x1);
for (i = x1; i != (x2 + sign); i += sign) {
if (x1 == i)
- angle = 0;
+ angle = 0;
else
- angle = acos (((x1 - x0) * (i - x0) + (y1 - y0) * (y2 - y0)) /
- (len1 * sqrt ((i - x0) * (i - x0) + (y2 - y0) * (y2 -
- y0)))) / angle_e;
+ angle = acos (((x1 - x0) * (i - x0) + (y1 - y0) * (y2 - y0)) /
+ (len1 * sqrt ((i - x0) * (i - x0) + (y2 - y0) * (y2 -
+ y0)))) / angle_e;
draw_bresenham_line (dest, stride,
- x0, y0, i, y1, (c2 * angle + c1 * (1.0 - angle)));
+ x0, y0, i, y1, (c2 * angle + c1 * (1.0 - angle)));
}
}
}
@@ -321,7 +321,7 @@ gst_smpte_paint_box_clock (guint32 * dest, gint stride,
angle_m = 2 * acos (((x1 - x0) * (xv - x0) + (y1 - y0) * (yv - y0)) /
(sqrt ((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) *
- sqrt ((xv - x0) * (xv - x0) + (yv - y0) * (yv - y0)))) / M_PI;
+ sqrt ((xv - x0) * (xv - x0) + (yv - y0) * (yv - y0)))) / M_PI;
col_m = c2 * angle_m + c1 * (1.0 - angle_m);
diff --git a/gst/spectrum/gstspectrum.c b/gst/spectrum/gstspectrum.c
index aa309f1c..b87763cb 100644
--- a/gst/spectrum/gstspectrum.c
+++ b/gst/spectrum/gstspectrum.c
@@ -82,9 +82,10 @@ gst_spectrum_get_type (void)
0,
(GInstanceInitFunc) gst_spectrum_init,
};
+
spectrum_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstSpectrum", &spectrum_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstSpectrum", &spectrum_info,
+ 0);
}
return spectrum_type;
}
@@ -105,7 +106,7 @@ gst_spectrum_class_init (GstSpectrumClass * klass)
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WIDTH, g_param_spec_int ("width", "width", "width", G_MININT, G_MAXINT, 0, G_PARAM_WRITABLE)); /* CHECKME */
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WIDTH, g_param_spec_int ("width", "width", "width", G_MININT, G_MAXINT, 0, G_PARAM_WRITABLE)); /* CHECKME */
gobject_class->set_property = gst_spectrum_set_property;
}
diff --git a/gst/udp/gstudp.c b/gst/udp/gstudp.c
index 1192f6d7..5d67e436 100644
--- a/gst/udp/gstudp.c
+++ b/gst/udp/gstudp.c
@@ -28,7 +28,7 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "udpsink", GST_RANK_NONE,
- GST_TYPE_UDPSINK))
+ GST_TYPE_UDPSINK))
return FALSE;
if (!gst_element_register (plugin, "udpsrc", GST_RANK_NONE, GST_TYPE_UDPSRC))
diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c
index af365613..de2a652b 100644
--- a/gst/udp/gstudpsink.c
+++ b/gst/udp/gstudpsink.c
@@ -63,9 +63,10 @@ gst_udpsink_control_get_type (void)
{CONTROL_TCP, "3", "tcp"},
{CONTROL_ZERO, NULL, NULL},
};
+
if (!udpsink_control_type) {
udpsink_control_type =
- g_enum_register_static ("GstUDPSinkControl", udpsink_control);
+ g_enum_register_static ("GstUDPSinkControl", udpsink_control);
}
return udpsink_control_type;
}
@@ -107,9 +108,10 @@ gst_udpsink_get_type (void)
(GInstanceInitFunc) gst_udpsink_init,
NULL
};
+
udpsink_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstUDPSink", &udpsink_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstUDPSink", &udpsink_info,
+ 0);
}
return udpsink_type;
}
@@ -135,15 +137,15 @@ gst_udpsink_class_init (GstUDPSink * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HOST,
g_param_spec_string ("host", "host",
- "The host/IP/Multicast group to send the packets to",
- UDP_DEFAULT_HOST, G_PARAM_READWRITE));
+ "The host/IP/Multicast group to send the packets to",
+ UDP_DEFAULT_HOST, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PORT,
g_param_spec_int ("port", "port", "The port to send the packets to",
- 0, 32768, UDP_DEFAULT_PORT, G_PARAM_READWRITE));
+ 0, 32768, UDP_DEFAULT_PORT, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_CONTROL,
g_param_spec_enum ("control", "control", "The type of control",
- GST_TYPE_UDPSINK_CONTROL, CONTROL_UDP, G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, ARG_MTU, g_param_spec_int ("mtu", "mtu", "maximun transmit unit", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
+ GST_TYPE_UDPSINK_CONTROL, CONTROL_UDP, G_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class, ARG_MTU, g_param_spec_int ("mtu", "mtu", "maximun transmit unit", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_udpsink_set_property;
gobject_class->get_property = gst_udpsink_get_property;
@@ -192,8 +194,8 @@ gst_udpsink_sink_link (GstPad * pad, const GstCaps * caps)
switch (udpsink->control) {
case CONTROL_UDP:
if ((fd = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
- perror ("socket");
- return GST_PAD_LINK_REFUSED;
+ perror ("socket");
+ return GST_PAD_LINK_REFUSED;
}
/* We can only do broadcast in udp */
@@ -203,22 +205,22 @@ gst_udpsink_sink_link (GstPad * pad, const GstCaps * caps)
xmlDocDumpMemory (doc, &buf, &buf_size);
if (sendto (fd, buf, buf_size, 0, (struct sockaddr *) &serv_addr,
- sizeof (serv_addr)) == -1) {
- perror ("sending");
- return GST_PAD_LINK_REFUSED;
+ sizeof (serv_addr)) == -1) {
+ perror ("sending");
+ return GST_PAD_LINK_REFUSED;
}
close (fd);
break;
case CONTROL_TCP:
if ((fd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
- perror ("socket");
- return GST_PAD_LINK_REFUSED;
+ perror ("socket");
+ return GST_PAD_LINK_REFUSED;
}
if (connect (fd, (struct sockaddr *) &serv_addr, sizeof (serv_addr)) != 0) {
- g_printerr ("udpsink: connect to %s port %d failed: %s\n",
- udpsink->host, udpsink->port, g_strerror (errno));
- return GST_PAD_LINK_REFUSED;
+ g_printerr ("udpsink: connect to %s port %d failed: %s\n",
+ udpsink->host, udpsink->port, g_strerror (errno));
+ return GST_PAD_LINK_REFUSED;
}
f = fdopen (dup (fd), "wb");
@@ -296,15 +298,15 @@ gst_udpsink_chain (GstPad * pad, GstData * _data)
for (i = 0; i < GST_BUFFER_SIZE (buf); i += udpsink->mtu) {
if (GST_BUFFER_SIZE (buf) - i > udpsink->mtu) {
if (sendto (udpsink->sock, GST_BUFFER_DATA (buf) + i,
- udpsink->mtu, 0, (struct sockaddr *) &udpsink->theiraddr,
- tolen) == -1) {
- perror ("sending");
+ udpsink->mtu, 0, (struct sockaddr *) &udpsink->theiraddr,
+ tolen) == -1) {
+ perror ("sending");
}
} else {
if (sendto (udpsink->sock, GST_BUFFER_DATA (buf) + i,
- GST_BUFFER_SIZE (buf) - i, 0,
- (struct sockaddr *) &udpsink->theiraddr, tolen) == -1) {
- perror ("sending");
+ GST_BUFFER_SIZE (buf) - i, 0,
+ (struct sockaddr *) &udpsink->theiraddr, tolen) == -1) {
+ perror ("sending");
}
}
}
@@ -325,11 +327,11 @@ gst_udpsink_set_property (GObject * object, guint prop_id, const GValue * value,
switch (prop_id) {
case ARG_HOST:
if (udpsink->host != NULL)
- g_free (udpsink->host);
+ g_free (udpsink->host);
if (g_value_get_string (value) == NULL)
- udpsink->host = NULL;
+ udpsink->host = NULL;
else
- udpsink->host = g_strdup (g_value_get_string (value));
+ udpsink->host = g_strdup (g_value_get_string (value));
break;
case ARG_PORT:
udpsink->port = g_value_get_int (value);
@@ -384,8 +386,8 @@ gst_udpsink_init_send (GstUDPSink * sink)
guint bc_val;
memset (&sink->theiraddr, 0, sizeof (sink->theiraddr));
- sink->theiraddr.sin_family = AF_INET; /* host byte order */
- sink->theiraddr.sin_port = htons (sink->port); /* short, network byte order */
+ sink->theiraddr.sin_family = AF_INET; /* host byte order */
+ sink->theiraddr.sin_port = htons (sink->port); /* short, network byte order */
/* if its an IP address */
if (inet_aton (sink->host, &addr)) {
@@ -398,7 +400,7 @@ gst_udpsink_init_send (GstUDPSink * sink)
/* Joining the multicast group */
setsockopt (sink->sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &sink->multi_addr,
- sizeof (sink->multi_addr));
+ sizeof (sink->multi_addr));
}
else {
@@ -454,7 +456,7 @@ gst_udpsink_change_state (GstElement * element)
} else {
if (!GST_FLAG_IS_SET (element, GST_UDPSINK_OPEN)) {
if (!gst_udpsink_init_send (GST_UDPSINK (element)))
- return GST_STATE_FAILURE;
+ return GST_STATE_FAILURE;
}
}
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index 48e00862..a4a8dd7d 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -62,9 +62,10 @@ gst_udpsrc_control_get_type (void)
{CONTROL_TCP, "3", "tcp"},
{CONTROL_ZERO, NULL, NULL},
};
+
if (!udpsrc_control_type) {
udpsrc_control_type =
- g_enum_register_static ("GstUDPSrcControl", udpsrc_control);
+ g_enum_register_static ("GstUDPSrcControl", udpsrc_control);
}
return udpsrc_control_type;
}
@@ -104,8 +105,9 @@ gst_udpsrc_get_type (void)
(GInstanceInitFunc) gst_udpsrc_init,
NULL
};
+
udpsrc_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstUDPSrc", &udpsrc_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstUDPSrc", &udpsrc_info, 0);
}
return udpsrc_type;
}
@@ -131,14 +133,14 @@ gst_udpsrc_class_init (GstUDPSrc * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PORT,
g_param_spec_int ("port", "port", "The port to receive the packets from",
- 0, 32768, UDP_DEFAULT_PORT, G_PARAM_READWRITE));
+ 0, 32768, UDP_DEFAULT_PORT, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_CONTROL,
g_param_spec_enum ("control", "control", "The type of control",
- GST_TYPE_UDPSRC_CONTROL, CONTROL_UDP, G_PARAM_READWRITE));
+ GST_TYPE_UDPSRC_CONTROL, CONTROL_UDP, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_MULTICAST_GROUP,
g_param_spec_string ("multicast_group", "multicast_group",
- "The Address of multicast group to join",
- UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE));
+ "The Address of multicast group to join",
+ UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE));
gobject_class->set_property = gst_udpsrc_set_property;
gobject_class->get_property = gst_udpsrc_get_property;
@@ -200,7 +202,7 @@ gst_udpsrc_get (GstPad * pad)
if (select (max_sock + 1, &read_fds, NULL, NULL, NULL) > 0) {
if ((udpsrc->control_sock != -1) &&
- FD_ISSET (udpsrc->control_sock, &read_fds)) {
+ FD_ISSET (udpsrc->control_sock, &read_fds)) {
#ifndef GST_DISABLE_LOADSAVE
guchar *buf;
int ret;
@@ -212,45 +214,45 @@ gst_udpsrc_get (GstPad * pad)
buf = g_malloc (1024 * 10);
switch (udpsrc->control) {
- case CONTROL_TCP:
- len = sizeof (struct sockaddr);
- fdread = accept (udpsrc->control_sock, &addr, &len);
- if (fdread < 0) {
- perror ("accept");
- }
-
- ret = read (fdread, buf, 1024 * 10);
- break;
- case CONTROL_UDP:
- len = sizeof (struct sockaddr);
- ret =
- recvfrom (udpsrc->control_sock, buf, 1024 * 10, 0,
- (struct sockaddr *) &tmpaddr, &len);
- if (ret < 0) {
- perror ("recvfrom");
- }
- break;
- case CONTROL_NONE:
- default:
- g_free (buf);
- return NULL;
- break;
+ case CONTROL_TCP:
+ len = sizeof (struct sockaddr);
+ fdread = accept (udpsrc->control_sock, &addr, &len);
+ if (fdread < 0) {
+ perror ("accept");
+ }
+
+ ret = read (fdread, buf, 1024 * 10);
+ break;
+ case CONTROL_UDP:
+ len = sizeof (struct sockaddr);
+ ret =
+ recvfrom (udpsrc->control_sock, buf, 1024 * 10, 0,
+ (struct sockaddr *) &tmpaddr, &len);
+ if (ret < 0) {
+ perror ("recvfrom");
+ }
+ break;
+ case CONTROL_NONE:
+ default:
+ g_free (buf);
+ return NULL;
+ break;
}
buf[ret] = '\0';
doc = xmlParseMemory (buf, ret);
caps = gst_caps_load_thyself (doc->xmlRootNode);
if (caps == NULL) {
- return NULL;
+ return NULL;
}
/* foward the connect, we don't signal back the result here... */
if (gst_caps_is_fixed (caps)) {
- gst_pad_try_set_caps (udpsrc->srcpad, caps);
+ gst_pad_try_set_caps (udpsrc->srcpad, caps);
} else {
- GST_ERROR ("caps %" GST_PTR_FORMAT, caps);
- GST_ELEMENT_ERROR (udpsrc, CORE, NEGOTIATION, (NULL),
- ("Got unfixed caps from peer"));
+ GST_ERROR ("caps %" GST_PTR_FORMAT, caps);
+ GST_ELEMENT_ERROR (udpsrc, CORE, NEGOTIATION, (NULL),
+ ("Got unfixed caps from peer"));
}
#endif
@@ -262,37 +264,37 @@ gst_udpsrc_get (GstPad * pad)
GST_BUFFER_SIZE (outbuf) = 24000;
if (udpsrc->first_buf) {
- if (udpsrc->clock) {
- GstClockTime current_time;
- GstEvent *discont;
+ if (udpsrc->clock) {
+ GstClockTime current_time;
+ GstEvent *discont;
- current_time = gst_clock_get_time (udpsrc->clock);
+ current_time = gst_clock_get_time (udpsrc->clock);
- GST_BUFFER_TIMESTAMP (outbuf) = current_time;
+ GST_BUFFER_TIMESTAMP (outbuf) = current_time;
- discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
- current_time, NULL);
+ discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
+ current_time, NULL);
- gst_pad_push (udpsrc->srcpad, GST_DATA (discont));
- }
+ gst_pad_push (udpsrc->srcpad, GST_DATA (discont));
+ }
- udpsrc->first_buf = FALSE;
+ udpsrc->first_buf = FALSE;
}
else {
- GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
+ GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
}
len = sizeof (struct sockaddr);
numbytes = recvfrom (udpsrc->sock, GST_BUFFER_DATA (outbuf),
- GST_BUFFER_SIZE (outbuf), 0, (struct sockaddr *) &tmpaddr, &len);
+ GST_BUFFER_SIZE (outbuf), 0, (struct sockaddr *) &tmpaddr, &len);
if (numbytes != -1) {
- GST_BUFFER_SIZE (outbuf) = numbytes;
+ GST_BUFFER_SIZE (outbuf) = numbytes;
} else {
- perror ("recvfrom");
- gst_buffer_unref (outbuf);
- outbuf = NULL;
+ perror ("recvfrom");
+ gst_buffer_unref (outbuf);
+ outbuf = NULL;
}
}
@@ -322,9 +324,9 @@ gst_udpsrc_set_property (GObject * object, guint prop_id, const GValue * value,
g_free (udpsrc->multi_group);
if (g_value_get_string (value) == NULL)
- udpsrc->multi_group = g_strdup (UDP_DEFAULT_MULTICAST_GROUP);
+ udpsrc->multi_group = g_strdup (UDP_DEFAULT_MULTICAST_GROUP);
else
- udpsrc->multi_group = g_strdup (g_value_get_string (value));
+ udpsrc->multi_group = g_strdup (g_value_get_string (value));
break;
case ARG_CONTROL:
@@ -369,8 +371,8 @@ gst_udpsrc_init_receive (GstUDPSrc * src)
gint reuse = 1;
memset (&src->myaddr, 0, sizeof (src->myaddr));
- src->myaddr.sin_family = AF_INET; /* host byte order */
- src->myaddr.sin_port = htons (src->port); /* short, network byte order */
+ src->myaddr.sin_family = AF_INET; /* host byte order */
+ src->myaddr.sin_port = htons (src->port); /* short, network byte order */
src->myaddr.sin_addr.s_addr = INADDR_ANY;
if ((src->sock = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {
@@ -379,13 +381,13 @@ gst_udpsrc_init_receive (GstUDPSrc * src)
}
if (setsockopt (src->sock, SOL_SOCKET, SO_REUSEADDR, &reuse,
- sizeof (reuse)) == -1) {
+ sizeof (reuse)) == -1) {
perror ("setsockopt");
return FALSE;
}
if (bind (src->sock, (struct sockaddr *) &src->myaddr,
- sizeof (src->myaddr)) == -1) {
+ sizeof (src->myaddr)) == -1) {
perror ("bind");
return FALSE;
}
@@ -394,7 +396,7 @@ gst_udpsrc_init_receive (GstUDPSrc * src)
if (src->multi_addr.imr_multiaddr.s_addr) {
src->multi_addr.imr_interface.s_addr = INADDR_ANY;
setsockopt (src->sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &src->multi_addr,
- sizeof (src->multi_addr));
+ sizeof (src->multi_addr));
}
}
@@ -405,19 +407,19 @@ gst_udpsrc_init_receive (GstUDPSrc * src)
switch (src->control) {
case CONTROL_TCP:
if ((src->control_sock = socket (AF_INET, SOCK_STREAM, 0)) == -1) {
- perror ("control_socket");
- return FALSE;
+ perror ("control_socket");
+ return FALSE;
}
if (bind (src->control_sock, (struct sockaddr *) &src->myaddr,
- sizeof (src->myaddr)) == -1) {
- perror ("control_bind");
- return FALSE;
+ sizeof (src->myaddr)) == -1) {
+ perror ("control_bind");
+ return FALSE;
}
if (listen (src->control_sock, 5) == -1) {
- perror ("listen");
- return FALSE;
+ perror ("listen");
+ return FALSE;
}
fcntl (src->control_sock, F_SETFL, O_NONBLOCK);
@@ -425,19 +427,19 @@ gst_udpsrc_init_receive (GstUDPSrc * src)
break;
case CONTROL_UDP:
if ((src->control_sock = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {
- perror ("socket");
- return FALSE;
+ perror ("socket");
+ return FALSE;
}
if (bind (src->control_sock, (struct sockaddr *) &src->myaddr,
- sizeof (src->myaddr)) == -1) {
- perror ("control_bind");
- return FALSE;
+ sizeof (src->myaddr)) == -1) {
+ perror ("control_bind");
+ return FALSE;
}
/* We can only do broadcast in udp */
bc_val = 1;
setsockopt (src->control_sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
- sizeof (bc_val));
+ sizeof (bc_val));
break;
case CONTROL_NONE:
GST_FLAG_SET (src, GST_UDPSRC_OPEN);
@@ -479,7 +481,7 @@ gst_udpsrc_change_state (GstElement * element)
} else {
if (!GST_FLAG_IS_SET (element, GST_UDPSRC_OPEN)) {
if (!gst_udpsrc_init_receive (GST_UDPSRC (element)))
- return GST_STATE_FAILURE;
+ return GST_STATE_FAILURE;
}
}
diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c
index f13610bc..5e4c0b38 100644
--- a/gst/videocrop/gstvideocrop.c
+++ b/gst/videocrop/gstvideocrop.c
@@ -135,9 +135,10 @@ gst_video_crop_get_type (void)
0,
(GInstanceInitFunc) gst_video_crop_init,
};
+
video_crop_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstVideoCrop",
- &video_crop_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstVideoCrop",
+ &video_crop_info, 0);
}
return video_crop_type;
}
@@ -167,16 +168,16 @@ gst_video_crop_class_init (GstVideoCropClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LEFT,
g_param_spec_int ("left", "Left", "Pixels to crop at left",
- 0, G_MAXINT, 0, G_PARAM_READWRITE));
+ 0, G_MAXINT, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_RIGHT,
g_param_spec_int ("right", "Right", "Pixels to crop at right",
- 0, G_MAXINT, 0, G_PARAM_READWRITE));
+ 0, G_MAXINT, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TOP,
g_param_spec_int ("top", "Top", "Pixels to crop at top",
- 0, G_MAXINT, 0, G_PARAM_READWRITE));
+ 0, G_MAXINT, 0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BOTTOM,
g_param_spec_int ("bottom", "Bottom", "Pixels to crop at bottom",
- 0, G_MAXINT, 0, G_PARAM_READWRITE));
+ 0, G_MAXINT, 0, G_PARAM_READWRITE));
gobject_class->set_property = gst_video_crop_set_property;
gobject_class->get_property = gst_video_crop_get_property;
@@ -369,8 +370,8 @@ gst_video_crop_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (event)) {
default:
- gst_pad_event_default (pad, event);
- break;
+ gst_pad_event_default (pad, event);
+ break;
}
return;
}
diff --git a/gst/videofilter/gstgamma.c b/gst/videofilter/gstgamma.c
index 7cc2b0fd..118c99f4 100644
--- a/gst/videofilter/gstgamma.c
+++ b/gst/videofilter/gstgamma.c
@@ -119,8 +119,9 @@ gst_gamma_get_type (void)
0,
gst_gamma_init,
};
+
gamma_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstGamma", &gamma_info, 0);
+ "GstGamma", &gamma_info, 0);
}
return gamma_type;
}
@@ -165,16 +166,16 @@ gst_gamma_class_init (gpointer g_class, gpointer class_data)
g_object_class_install_property (gobject_class, ARG_GAMMA,
g_param_spec_double ("gamma", "Gamma", "gamma",
- 0.01, 10, 1, G_PARAM_READWRITE));
+ 0.01, 10, 1, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_GAMMA_R,
g_param_spec_double ("redgamma", "Gamma_r",
- "gamma value for the red channel", 0.01, 10, 1, G_PARAM_READWRITE));
+ "gamma value for the red channel", 0.01, 10, 1, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_GAMMA_G,
g_param_spec_double ("greengamma", "Gamma_g",
- "gamma value for the green channel", 0.01, 10, 1, G_PARAM_READWRITE));
+ "gamma value for the green channel", 0.01, 10, 1, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_GAMMA_B,
g_param_spec_double ("bluegamma", "Gamma_b",
- "gamma value for the blue channel", 0.01, 10, 1, G_PARAM_READWRITE));
+ "gamma value for the blue channel", 0.01, 10, 1, G_PARAM_READWRITE));
gobject_class->set_property = gst_gamma_set_property;
gobject_class->get_property = gst_gamma_get_property;
@@ -353,10 +354,10 @@ gst_gamma_planar411 (GstVideofilter * videofilter, void *dest, void *src)
int x, y;
for (y = 0; y < height; y++) {
- for (x = 0; x < width; x++) {
- cdest[y * width + x] =
- gamma->gamma_table[(unsigned char) csrc[y * width + x]];
- }
+ for (x = 0; x < width; x++) {
+ cdest[y * width + x] =
+ gamma->gamma_table[(unsigned char) csrc[y * width + x]];
+ }
}
}
}
@@ -421,10 +422,10 @@ gst_gamma_rgb32 (GstVideofilter * videofilter, void *dest, void *src)
i = 0;
while (i < width * height * 4) {
if ((i % 4) != 3)
- *cdest++ = gamma->gamma_table[*csrc++];
+ *cdest++ = gamma->gamma_table[*csrc++];
else {
- cdest++;
- csrc++;
+ cdest++;
+ csrc++;
}
i++;
}
diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c
index 2acad7c3..083e5e8a 100644
--- a/gst/videofilter/gstvideobalance.c
+++ b/gst/videofilter/gstvideobalance.c
@@ -107,12 +107,12 @@ gst_videobalance_get_type (void)
};
videobalance_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstVideobalance", &videobalance_info, 0);
+ "GstVideobalance", &videobalance_info, 0);
g_type_add_interface_static (videobalance_type,
- GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info);
+ GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info);
g_type_add_interface_static (videobalance_type, GST_TYPE_COLOR_BALANCE,
- &colorbalance_info);
+ &colorbalance_info);
}
return videobalance_type;
}
@@ -138,7 +138,7 @@ gst_videobalance_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_videobalance_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_videobalance_formats + i);
+ gst_videobalance_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -189,15 +189,15 @@ gst_videobalance_class_init (gpointer g_class, gpointer class_data)
g_object_class_install_property (gobject_class, ARG_CONTRAST,
g_param_spec_double ("contrast", "Contrast", "contrast",
- 0, 2, 1, G_PARAM_READWRITE));
+ 0, 2, 1, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_BRIGHTNESS,
g_param_spec_double ("brightness", "Brightness", "brightness",
- -1, 1, 0, G_PARAM_READWRITE));
+ -1, 1, 0, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_HUE,
g_param_spec_double ("hue", "Hue", "hue", -1, 1, 0, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_SATURATION,
g_param_spec_double ("saturation", "Saturation", "saturation",
- 0, 2, 1, G_PARAM_READWRITE));
+ 0, 2, 1, G_PARAM_READWRITE));
gobject_class->set_property = gst_videobalance_set_property;
gobject_class->get_property = gst_videobalance_get_property;
@@ -473,13 +473,13 @@ gst_videobalance_update_tables_planar411 (GstVideobalance * vb)
u = 128 + ((i * hue_cos + j * hue_sin) * vb->saturation);
v = 128 + ((-i * hue_sin + j * hue_cos) * vb->saturation);
if (u < 0)
- u = 0;
+ u = 0;
else if (u > 255)
- u = 255;
+ u = 255;
if (v < 0)
- v = 0;
+ v = 0;
else if (v > 255)
- v = 255;
+ v = 255;
vb->tableu[i + 128][j + 128] = rint (u);
vb->tablev[i + 128][j + 128] = rint (v);
}
@@ -526,7 +526,7 @@ gst_videobalance_planar411 (GstVideofilter * videofilter, void *dest, void *src)
for (y = 0; y < height; y++) {
tablelookup_u8 (cdest + y * width, 1, csrc + y * width, 1,
- videobalance->tabley, 1, width);
+ videobalance->tabley, 1, width);
}
}
@@ -542,10 +542,10 @@ gst_videobalance_planar411 (GstVideofilter * videofilter, void *dest, void *src)
for (y = 0; y < height / 2; y++) {
for (x = 0; x < width / 2; x++) {
- u1 = usrc[y * (width / 2) + x];
- v1 = vsrc[y * (width / 2) + x];
- udest[y * (width / 2) + x] = videobalance->tableu[u1][v1];
- vdest[y * (width / 2) + x] = videobalance->tablev[u1][v1];
+ u1 = usrc[y * (width / 2) + x];
+ v1 = vsrc[y * (width / 2) + x];
+ udest[y * (width / 2) + x] = videobalance->tableu[u1][v1];
+ vdest[y * (width / 2) + x] = videobalance->tablev[u1][v1];
}
}
}
diff --git a/gst/videofilter/gstvideofilter.c b/gst/videofilter/gstvideofilter.c
index 590616bc..f46d69e7 100644
--- a/gst/videofilter/gstvideofilter.c
+++ b/gst/videofilter/gstvideofilter.c
@@ -74,8 +74,9 @@ gst_videofilter_get_type (void)
0,
gst_videofilter_init,
};
+
videofilter_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstVideofilter", &videofilter_info, G_TYPE_FLAG_ABSTRACT);
+ "GstVideofilter", &videofilter_info, G_TYPE_FLAG_ABSTRACT);
}
return videofilter_type;
}
@@ -129,15 +130,15 @@ gst_videofilter_format_get_structure (GstVideofilterFormat * format)
if (format->depth) {
structure = gst_structure_new ("video/x-raw-rgb",
- "depth", G_TYPE_INT, format->depth,
- "bpp", G_TYPE_INT, format->bpp,
- "endianness", G_TYPE_INT, format->endianness,
- "red_mask", G_TYPE_INT, format->red_mask,
- "green_mask", G_TYPE_INT, format->green_mask,
- "blue_mask", G_TYPE_INT, format->blue_mask, NULL);
+ "depth", G_TYPE_INT, format->depth,
+ "bpp", G_TYPE_INT, format->bpp,
+ "endianness", G_TYPE_INT, format->endianness,
+ "red_mask", G_TYPE_INT, format->red_mask,
+ "green_mask", G_TYPE_INT, format->green_mask,
+ "blue_mask", G_TYPE_INT, format->blue_mask, NULL);
} else {
structure = gst_structure_new ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, fourcc, NULL);
+ "format", GST_TYPE_FOURCC, fourcc, NULL);
}
gst_structure_set (structure,
@@ -158,8 +159,8 @@ gst_videofilter_class_get_capslist (GstVideofilterClass * klass)
caps = gst_caps_new_empty ();
for (i = 0; i < klass->formats->len; i++) {
structure =
- gst_videofilter_format_get_structure (g_ptr_array_index (klass->formats,
- i));
+ gst_videofilter_format_get_structure (g_ptr_array_index (klass->formats,
+ i));
gst_caps_append_structure (caps, structure);
}
@@ -201,8 +202,8 @@ gst_videofilter_getcaps (GstPad * pad)
GstCaps *fromcaps;
fromcaps =
- gst_caps_new_full (gst_videofilter_format_get_structure
- (g_ptr_array_index (klass->formats, i)), NULL);
+ gst_caps_new_full (gst_videofilter_format_get_structure
+ (g_ptr_array_index (klass->formats, i)), NULL);
icaps = gst_caps_intersect (fromcaps, peercaps);
if (icaps != NULL) {
@@ -342,7 +343,7 @@ gst_videofilter_chain (GstPad * pad, GstData * _data)
if (size > videofilter->from_buf_size) {
GST_INFO ("buffer size %ld larger than expected (%d)",
- size, videofilter->from_buf_size);
+ size, videofilter->from_buf_size);
}
outbuf = gst_pad_alloc_buffer (videofilter->srcpad, GST_BUFFER_OFFSET_NONE,
@@ -505,7 +506,7 @@ gst_videofilter_find_format_by_structure (GstVideofilter * videofilter,
format = g_ptr_array_index (klass->formats, i);
format_fourcc = GST_STR_FOURCC (format->fourcc);
if (format->depth == 0 && format_fourcc == fourcc) {
- return format;
+ return format;
}
}
} else if (strcmp (gst_structure_get_name (structure), "video/x-raw-rgb")
@@ -528,9 +529,9 @@ gst_videofilter_find_format_by_structure (GstVideofilter * videofilter,
for (i = 0; i < klass->formats->len; i++) {
format = g_ptr_array_index (klass->formats, i);
if (format->bpp == bpp && format->depth == depth &&
- format->endianness == endianness && format->red_mask == red_mask &&
- format->green_mask == green_mask && format->blue_mask == blue_mask) {
- return format;
+ format->endianness == endianness && format->red_mask == red_mask &&
+ format->green_mask == green_mask && format->blue_mask == blue_mask) {
+ return format;
}
}
}
@@ -553,11 +554,11 @@ gst_videofilter_class_add_pad_templates (GstVideofilterClass *
gst_element_class_add_pad_template (element_class,
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
- gst_videofilter_class_get_capslist (videofilter_class)));
+ gst_videofilter_class_get_capslist (videofilter_class)));
gst_element_class_add_pad_template (element_class,
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
- gst_videofilter_class_get_capslist (videofilter_class)));
+ gst_videofilter_class_get_capslist (videofilter_class)));
}
static gboolean
diff --git a/gst/videofilter/gstvideoflip.c b/gst/videofilter/gstvideoflip.c
index 32157b61..a434107a 100644
--- a/gst/videofilter/gstvideoflip.c
+++ b/gst/videofilter/gstvideoflip.c
@@ -72,14 +72,15 @@ gst_videoflip_method_get_type (void)
{GST_VIDEOFLIP_METHOD_HORIZ, "4", "Flip horizontally"},
{GST_VIDEOFLIP_METHOD_VERT, "5", "Flip vertically"},
{GST_VIDEOFLIP_METHOD_TRANS, "6",
- "Flip across upper left/lower right diagonal"},
+ "Flip across upper left/lower right diagonal"},
{GST_VIDEOFLIP_METHOD_OTHER, "7",
- "Flip across upper right/lower left diagonal"},
+ "Flip across upper right/lower left diagonal"},
{0, NULL, NULL},
};
+
if (!videoflip_method_type) {
videoflip_method_type = g_enum_register_static ("GstVideoflipMethod",
- videoflip_methods);
+ videoflip_methods);
}
return videoflip_method_type;
}
@@ -101,8 +102,9 @@ gst_videoflip_get_type (void)
0,
gst_videoflip_init,
};
+
videoflip_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstVideoflip", &videoflip_info, 0);
+ "GstVideoflip", &videoflip_info, 0);
}
return videoflip_type;
}
@@ -130,7 +132,7 @@ gst_videoflip_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_videoflip_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_videoflip_formats + i);
+ gst_videoflip_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -147,8 +149,8 @@ gst_videoflip_class_init (gpointer g_class, gpointer class_data)
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_VIDEOFLIP_METHOD, GST_VIDEOFLIP_METHOD_90R,
- G_PARAM_READWRITE));
+ GST_TYPE_VIDEOFLIP_METHOD, GST_VIDEOFLIP_METHOD_90R,
+ G_PARAM_READWRITE));
gobject_class->set_property = gst_videoflip_set_property;
gobject_class->get_property = gst_videoflip_get_property;
@@ -332,51 +334,51 @@ gst_videoflip_flip (GstVideoflip * videoflip, unsigned char *dest,
switch (videoflip->method) {
case GST_VIDEOFLIP_METHOD_90R:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - x) * sw + y];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - x) * sw + y];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_90L:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[x * sw + (sw - 1 - y)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[x * sw + (sw - 1 - y)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_180:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - y) * sw + (sw - 1 - x)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - y) * sw + (sw - 1 - x)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_HORIZ:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[y * sw + (sw - 1 - x)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[y * sw + (sw - 1 - x)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_VERT:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - y) * sw + x];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - y) * sw + x];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_TRANS:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[x * sw + y];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[x * sw + y];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_OTHER:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - x) * sw + (sw - 1 - y)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - x) * sw + (sw - 1 - y)];
+ }
}
break;
default:
diff --git a/gst/videofilter/gstvideotemplate.c b/gst/videofilter/gstvideotemplate.c
index abe699fe..aa64ef89 100644
--- a/gst/videofilter/gstvideotemplate.c
+++ b/gst/videofilter/gstvideotemplate.c
@@ -103,8 +103,9 @@ gst_videotemplate_get_type (void)
0,
gst_videotemplate_init,
};
+
videotemplate_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstVideotemplate", &videotemplate_info, 0);
+ "GstVideotemplate", &videotemplate_info, 0);
}
return videotemplate_type;
}
@@ -130,7 +131,7 @@ gst_videotemplate_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_videotemplate_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_videotemplate_formats + i);
+ gst_videotemplate_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -148,8 +149,8 @@ gst_videotemplate_class_init (gpointer g_class, gpointer class_data)
#if 0
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_VIDEOTEMPLATE_METHOD, GST_VIDEOTEMPLATE_METHOD_1,
- G_PARAM_READWRITE));
+ GST_TYPE_VIDEOTEMPLATE_METHOD, GST_VIDEOTEMPLATE_METHOD_1,
+ G_PARAM_READWRITE));
#endif
gobject_class->set_property = gst_videotemplate_set_property;
diff --git a/gst/videoflip/gstvideoflip.c b/gst/videoflip/gstvideoflip.c
index 9c7816de..f0160675 100644
--- a/gst/videoflip/gstvideoflip.c
+++ b/gst/videoflip/gstvideoflip.c
@@ -77,14 +77,15 @@ gst_videoflip_method_get_type (void)
{GST_VIDEOFLIP_METHOD_HORIZ, "4", "Flip horizontally"},
{GST_VIDEOFLIP_METHOD_VERT, "5", "Flip vertically"},
{GST_VIDEOFLIP_METHOD_TRANS, "6",
- "Flip across upper left/lower right diagonal"},
+ "Flip across upper left/lower right diagonal"},
{GST_VIDEOFLIP_METHOD_OTHER, "7",
- "Flip across upper right/lower left diagonal"},
+ "Flip across upper right/lower left diagonal"},
{0, NULL, NULL},
};
+
if (!videoflip_method_type) {
videoflip_method_type = g_enum_register_static ("GstVideoflipMethod",
- videoflip_methods);
+ videoflip_methods);
}
return videoflip_method_type;
}
@@ -131,9 +132,10 @@ gst_videoflip_get_type (void)
0,
(GInstanceInitFunc) gst_videoflip_init,
};
+
videoflip_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstVideoflip",
- &videoflip_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstVideoflip",
+ &videoflip_info, 0);
}
return videoflip_type;
}
@@ -161,8 +163,8 @@ gst_videoflip_class_init (GstVideoflipClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_VIDEOFLIP_METHOD, GST_VIDEOFLIP_METHOD_90R,
- G_PARAM_READWRITE));
+ GST_TYPE_VIDEOFLIP_METHOD, GST_VIDEOFLIP_METHOD_90R,
+ G_PARAM_READWRITE));
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
@@ -213,7 +215,7 @@ gst_videoflip_sink_getcaps (GstPad * pad)
* the peer's formats. Create a list of them. */
for (i = 0; i < videoflip_n_formats; i++) {
GstCaps *fromcaps =
- gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL);
+ gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL);
if (gst_caps_is_always_compatible (fromcaps, peercaps)) {
gst_caps_append (capslist, fromcaps);
}
diff --git a/gst/videoflip/videoflip.c b/gst/videoflip/videoflip.c
index 16db2102..d7307057 100644
--- a/gst/videoflip/videoflip.c
+++ b/gst/videoflip/videoflip.c
@@ -60,15 +60,15 @@ videoflip_get_cap (struct videoflip_format_struct *format)
if (format->bpp) {
structure = gst_structure_new ("video/x-raw-rgb",
- "depth", G_TYPE_INT, format->bpp,
- "bpp", G_TYPE_INT, format->depth,
- "endianness", G_TYPE_INT, format->endianness,
- "red_mask", G_TYPE_INT, format->red_mask,
- "green_mask", G_TYPE_INT, format->green_mask,
- "blue_mask", G_TYPE_INT, format->blue_mask, NULL);
+ "depth", G_TYPE_INT, format->bpp,
+ "bpp", G_TYPE_INT, format->depth,
+ "endianness", G_TYPE_INT, format->endianness,
+ "red_mask", G_TYPE_INT, format->red_mask,
+ "green_mask", G_TYPE_INT, format->green_mask,
+ "blue_mask", G_TYPE_INT, format->blue_mask, NULL);
} else {
structure = gst_structure_new ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, fourcc, NULL);
+ "format", GST_TYPE_FOURCC, fourcc, NULL);
}
return structure;
@@ -89,8 +89,8 @@ videoflip_find_by_caps (const GstCaps * caps)
c = gst_caps_new_full (videoflip_get_cap (videoflip_formats + i), NULL);
if (c) {
if (gst_caps_is_always_compatible (caps, c)) {
- gst_caps_free (c);
- return videoflip_formats + i;
+ gst_caps_free (c);
+ return videoflip_formats + i;
}
gst_caps_free (c);
}
@@ -184,51 +184,51 @@ gst_videoflip_flip (GstVideoflip * videoflip, unsigned char *dest,
switch (videoflip->method) {
case GST_VIDEOFLIP_METHOD_90R:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - x) * sw + y];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - x) * sw + y];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_90L:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[x * sw + (sw - 1 - y)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[x * sw + (sw - 1 - y)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_180:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - y) * sw + (sw - 1 - x)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - y) * sw + (sw - 1 - x)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_HORIZ:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[y * sw + (sw - 1 - x)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[y * sw + (sw - 1 - x)];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_VERT:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - y) * sw + x];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - y) * sw + x];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_TRANS:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[x * sw + y];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[x * sw + y];
+ }
}
break;
case GST_VIDEOFLIP_METHOD_OTHER:
for (y = 0; y < dh; y++) {
- for (x = 0; x < dw; x++) {
- dest[y * dw + x] = src[(sh - 1 - x) * sw + (sw - 1 - y)];
- }
+ for (x = 0; x < dw; x++) {
+ dest[y * dw + x] = src[(sh - 1 - x) * sw + (sw - 1 - y)];
+ }
}
break;
default:
diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c
index 757330f0..ea9324a8 100644
--- a/gst/wavenc/gstwavenc.c
+++ b/gst/wavenc/gstwavenc.c
@@ -44,9 +44,9 @@ static void gst_wavenc_chain (GstPad * pad, GstData * _data);
struct riff_struct
{
- guint8 id[4]; /* RIFF */
+ guint8 id[4]; /* RIFF */
guint32 len;
- guint8 wav_id[4]; /* WAVE */
+ guint8 wav_id[4]; /* WAVE */
};
struct chunk_struct
@@ -62,7 +62,7 @@ struct common_struct
guint32 dwSamplesPerSec;
guint32 dwAvgBytesPerSec;
guint16 wBlockAlign;
- guint16 wBitsPerSample; /* Only for PCM */
+ guint16 wBitsPerSample; /* Only for PCM */
};
struct wave_header
@@ -83,11 +83,11 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "rate = (int) [ 1, MAX ], "
- "channels = (int) [ 1, MAX ], "
- "endianness = (int) LITTLE_ENDIAN, "
- "width = (int) { 8, 16 }, "
- "depth = (int) { 8, 16 }, " "signed = (boolean) true")
+ "rate = (int) [ 1, MAX ], "
+ "channels = (int) [ 1, MAX ], "
+ "endianness = (int) LITTLE_ENDIAN, "
+ "width = (int) { 8, 16 }, "
+ "depth = (int) { 8, 16 }, " "signed = (boolean) true")
);
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
@@ -193,7 +193,7 @@ static gboolean
gst_wavenc_setup (GstWavEnc * wavenc)
{
struct wave_header wave;
- gint size = 0x7fffffff; /* Use a bogus size initially */
+ gint size = 0x7fffffff; /* Use a bogus size initially */
wave.common.wChannels = wavenc->channels;
wave.common.wBitsPerSample = wavenc->bits;
@@ -283,14 +283,14 @@ gst_wavenc_init (GstWavEnc * wavenc)
wavenc->sinkpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
- "sink"), "sink");
+ "sink"), "sink");
gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->sinkpad);
gst_pad_set_chain_function (wavenc->sinkpad, gst_wavenc_chain);
gst_pad_set_link_function (wavenc->sinkpad, gst_wavenc_sinkconnect);
wavenc->srcpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
- "src"), "src");
+ "src"), "src");
gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->srcpad);
wavenc->setup = FALSE;
@@ -303,23 +303,39 @@ struct _maps
{
guint32 id;
char *name;
-} maps[] = {
+}
+maps[] =
+{
{
- GST_RIFF_INFO_IARL, "Location"}, {
- GST_RIFF_INFO_IART, "Artist"}, {
- GST_RIFF_INFO_ICMS, "Commissioner"}, {
- GST_RIFF_INFO_ICMT, "Comment"}, {
- GST_RIFF_INFO_ICOP, "Copyright"}, {
- GST_RIFF_INFO_ICRD, "Creation Date"}, {
- GST_RIFF_INFO_IENG, "Engineer"}, {
- GST_RIFF_INFO_IGNR, "Genre"}, {
- GST_RIFF_INFO_IKEY, "Keywords"}, {
- GST_RIFF_INFO_INAM, "Title"}, /* Name */
+ GST_RIFF_INFO_IARL, "Location"}
+ , {
+ GST_RIFF_INFO_IART, "Artist"}
+ , {
+ GST_RIFF_INFO_ICMS, "Commissioner"}
+ , {
+ GST_RIFF_INFO_ICMT, "Comment"}
+ , {
+ GST_RIFF_INFO_ICOP, "Copyright"}
+ , {
+ GST_RIFF_INFO_ICRD, "Creation Date"}
+ , {
+ GST_RIFF_INFO_IENG, "Engineer"}
+ , {
+ GST_RIFF_INFO_IGNR, "Genre"}
+ , {
+ GST_RIFF_INFO_IKEY, "Keywords"}
+ , {
+ GST_RIFF_INFO_INAM, "Title"}
+ , /* Name */
{
- GST_RIFF_INFO_IPRD, "Product"}, {
- GST_RIFF_INFO_ISBJ, "Subject"}, {
- GST_RIFF_INFO_ISFT, "Software"}, {
- GST_RIFF_INFO_ITCH, "Technician"}, {
+ GST_RIFF_INFO_IPRD, "Product"}
+ , {
+ GST_RIFF_INFO_ISBJ, "Subject"}
+ , {
+ GST_RIFF_INFO_ISFT, "Software"}
+ , {
+ GST_RIFF_INFO_ITCH, "Technician"}
+ , {
0, NULL}
};
@@ -361,20 +377,20 @@ write_metadata (GstWavEnc * wavenc)
char *tmp;
int len, req, i;
- need_to_write = TRUE; /* We've got at least one entry */
+ need_to_write = TRUE; /* We've got at least one entry */
gst_props_entry_get_string (entry, &text);
- len = strlen (text) + 1; /* The length in the file includes the \0 */
+ len = strlen (text) + 1; /* The length in the file includes the \0 */
tmp = g_strdup_printf (GST_FOURCC_FORMAT "%d%s", GST_FOURCC_ARGS (id),
- GUINT32_TO_LE (len), text);
+ GUINT32_TO_LE (len), text);
g_string_append (info_str, tmp);
g_free (tmp);
/* Check that we end on an even boundary */
req = ((len + 8) + 1) & ~1;
for (i = 0; i < req - len; i++) {
- g_string_append_printf (info_str, "%c", 0);
+ g_string_append_printf (info_str, "%c", 0);
}
total += req;
@@ -404,7 +420,7 @@ write_cues (GstWavEnc * wavenc)
int num_cues, total = 4;
if (gst_props_get (wavenc->metadata->properties,
- "cues", &cue_list, NULL) == FALSE) {
+ "cues", &cue_list, NULL) == FALSE) {
/* No cues, move along please, nothing to see here */
return;
}
@@ -472,13 +488,13 @@ write_labels (GstWavEnc * wavenc)
#define LTXT_SIZE 28
ltxt = g_string_new ("ltxt ");
- ltxt->str[8] = GUINT32_TO_LE (i); /* Identifier */
- ltxt->str[12] = GUINT32_TO_LE (0); /* Sample Length */
- ltxt->str[16] = GUINT32_TO_LE (0); /* FIXME: Don't save the purpose yet */
- ltxt->str[20] = GUINT16_TO_LE (0); /* Country */
- ltxt->str[22] = GUINT16_TO_LE (0); /* Language */
- ltxt->str[24] = GUINT16_TO_LE (0); /* Dialect */
- ltxt->str[26] = GUINT16_TO_LE (0); /* Code Page */
+ ltxt->str[8] = GUINT32_TO_LE (i); /* Identifier */
+ ltxt->str[12] = GUINT32_TO_LE (0); /* Sample Length */
+ ltxt->str[16] = GUINT32_TO_LE (0); /* FIXME: Don't save the purpose yet */
+ ltxt->str[20] = GUINT16_TO_LE (0); /* Country */
+ ltxt->str[22] = GUINT16_TO_LE (0); /* Language */
+ ltxt->str[24] = GUINT16_TO_LE (0); /* Dialect */
+ ltxt->str[26] = GUINT16_TO_LE (0); /* Code Page */
g_string_append (ltxt, label);
g_free (label);
@@ -489,7 +505,7 @@ write_labels (GstWavEnc * wavenc)
/* Check that we end on an even boundary */
req = ((len + 8) + 1) & ~1;
for (j = 0; j < req - len; j++) {
- g_string_append_printf (ltxt, "%c", 0);
+ g_string_append_printf (ltxt, "%c", 0);
}
total += req;
@@ -525,7 +541,7 @@ write_labels (GstWavEnc * wavenc)
/* Check our size */
req = ((len + 8) + 1) & ~1;
for (j = 0; j < req - len; j++) {
- g_string_append_printf (labl, "%c", 0);
+ g_string_append_printf (labl, "%c", 0);
}
total += req;
@@ -561,7 +577,7 @@ write_labels (GstWavEnc * wavenc)
/* Size check */
req = ((len + 8) + 1) & ~1;
for (j = 0; j < req - len; j++) {
- g_string_append_printf (note, "%c", 0);
+ g_string_append_printf (note, "%c", 0);
}
total += req;
@@ -592,7 +608,7 @@ gst_wavenc_chain (GstPad * pad, GstData * _data)
if (!wavenc->setup) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (wavenc, CORE, NEGOTIATION, (NULL),
- ("encoder not initialised (input is not audio?)"));
+ ("encoder not initialised (input is not audio?)"));
return;
}
@@ -603,9 +619,9 @@ gst_wavenc_chain (GstPad * pad, GstData * _data)
#if 0
/* Write our metadata if we have any */
if (wavenc->metadata) {
- write_metadata (wavenc);
- write_cues (wavenc);
- write_labels (wavenc);
+ write_metadata (wavenc);
+ write_cues (wavenc);
+ write_labels (wavenc);
}
#endif
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index c2f6a00f..ef30fce3 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -65,22 +65,22 @@ static GstStaticPadTemplate src_template_factory =
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) little_endian, "
- "signed = (boolean) { true, false }, "
- "width = (int) { 8, 16 }, "
- "depth = (int) { 8, 16 }, "
- "rate = (int) [ 8000, 48000 ], "
- "channels = (int) [ 1, 2 ]; "
- "audio/mpeg, "
- "mpegversion = (int) 1, "
- "layer = (int) [ 1, 3 ], "
- "rate = (int) [ 8000, 48000 ], "
- "channels = (int) [ 1, 2 ]; "
- "audio/x-alaw, "
- "rate = (int) [ 8000, 48000 ], "
- "channels = (int) [ 1, 2 ]; "
- "audio/x-mulaw, "
- "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
+ "endianness = (int) little_endian, "
+ "signed = (boolean) { true, false }, "
+ "width = (int) { 8, 16 }, "
+ "depth = (int) { 8, 16 }, "
+ "rate = (int) [ 8000, 48000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/mpeg, "
+ "mpegversion = (int) 1, "
+ "layer = (int) [ 1, 3 ], "
+ "rate = (int) [ 8000, 48000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/x-alaw, "
+ "rate = (int) [ 8000, 48000 ], "
+ "channels = (int) [ 1, 2 ]; "
+ "audio/x-mulaw, "
+ "rate = (int) [ 8000, 48000 ], " "channels = (int) [ 1, 2 ]")
);
/* WavParse signals and args */
@@ -116,9 +116,10 @@ gst_wavparse_get_type (void)
0,
(GInstanceInitFunc) gst_wavparse_init,
};
+
wavparse_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstWavParse", &wavparse_info,
- 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstWavParse", &wavparse_info,
+ 0);
}
return wavparse_type;
}
@@ -225,7 +226,7 @@ gst_wavparse_parse_adtl (GstWavParse * wavparse, int len)
while (len > 0) {
got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
+ gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
if (got_bytes != sizeof (gst_riff_chunk)) {
return;
}
@@ -242,146 +243,146 @@ gst_wavparse_parse_adtl (GstWavParse * wavparse, int len)
switch (chunk.id) {
case GST_RIFF_adtl_labl:
- got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata,
- sizeof (struct _gst_riff_labl));
- if (got_bytes != sizeof (struct _gst_riff_labl)) {
- return;
- }
+ got_bytes =
+ gst_bytestream_peek_bytes (bs, &tempdata,
+ sizeof (struct _gst_riff_labl));
+ if (got_bytes != sizeof (struct _gst_riff_labl)) {
+ return;
+ }
- temp_labl = (struct _gst_riff_labl *) tempdata;
- labl.id = GUINT32_FROM_LE (temp_labl->id);
- labl.size = GUINT32_FROM_LE (temp_labl->size);
- labl.identifier = GUINT32_FROM_LE (temp_labl->identifier);
+ temp_labl = (struct _gst_riff_labl *) tempdata;
+ labl.id = GUINT32_FROM_LE (temp_labl->id);
+ labl.size = GUINT32_FROM_LE (temp_labl->size);
+ labl.identifier = GUINT32_FROM_LE (temp_labl->identifier);
- gst_bytestream_flush (bs, sizeof (struct _gst_riff_labl));
- len -= sizeof (struct _gst_riff_labl);
+ gst_bytestream_flush (bs, sizeof (struct _gst_riff_labl));
+ len -= sizeof (struct _gst_riff_labl);
- got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, labl.size - 4);
- if (got_bytes != labl.size - 4) {
- return;
- }
+ got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, labl.size - 4);
+ if (got_bytes != labl.size - 4) {
+ return;
+ }
- label_name = (char *) tempdata;
+ label_name = (char *) tempdata;
- gst_bytestream_flush (bs, ((labl.size - 4) + 1) & ~1);
- len -= (((labl.size - 4) + 1) & ~1);
+ gst_bytestream_flush (bs, ((labl.size - 4) + 1) & ~1);
+ len -= (((labl.size - 4) + 1) & ~1);
- new_caps = gst_caps_new ("label",
- "application/x-gst-metadata",
- gst_props_new ("identifier", G_TYPE_INT (labl.identifier),
- "name", G_TYPE_STRING (label_name), NULL));
+ new_caps = gst_caps_new ("label",
+ "application/x-gst-metadata",
+ gst_props_new ("identifier", G_TYPE_INT (labl.identifier),
+ "name", G_TYPE_STRING (label_name), NULL));
- if (gst_props_get (props, "labels", &caps, NULL)) {
- caps = g_list_append (caps, new_caps);
- } else {
- caps = g_list_append (NULL, new_caps);
+ if (gst_props_get (props, "labels", &caps, NULL)) {
+ caps = g_list_append (caps, new_caps);
+ } else {
+ caps = g_list_append (NULL, new_caps);
- entry = gst_props_entry_new ("labels", GST_PROPS_GLIST (caps));
- gst_props_add_entry (props, entry);
- }
+ entry = gst_props_entry_new ("labels", GST_PROPS_GLIST (caps));
+ gst_props_add_entry (props, entry);
+ }
- break;
+ break;
case GST_RIFF_adtl_ltxt:
- got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata,
- sizeof (struct _gst_riff_ltxt));
- if (got_bytes != sizeof (struct _gst_riff_ltxt)) {
- return;
- }
-
- temp_ltxt = (struct _gst_riff_ltxt *) tempdata;
- ltxt.id = GUINT32_FROM_LE (temp_ltxt->id);
- ltxt.size = GUINT32_FROM_LE (temp_ltxt->size);
- ltxt.identifier = GUINT32_FROM_LE (temp_ltxt->identifier);
- ltxt.length = GUINT32_FROM_LE (temp_ltxt->length);
- ltxt.purpose = GUINT32_FROM_LE (temp_ltxt->purpose);
- ltxt.country = GUINT16_FROM_LE (temp_ltxt->country);
- ltxt.language = GUINT16_FROM_LE (temp_ltxt->language);
- ltxt.dialect = GUINT16_FROM_LE (temp_ltxt->dialect);
- ltxt.codepage = GUINT16_FROM_LE (temp_ltxt->codepage);
-
- gst_bytestream_flush (bs, sizeof (struct _gst_riff_ltxt));
- len -= sizeof (struct _gst_riff_ltxt);
-
- if (ltxt.size - 20 > 0) {
- got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, ltxt.size - 20);
- if (got_bytes != ltxt.size - 20) {
- return;
- }
-
- gst_bytestream_flush (bs, ((ltxt.size - 20) + 1) & ~1);
- len -= (((ltxt.size - 20) + 1) & ~1);
-
- label_name = (char *) tempdata;
- } else {
- label_name = "";
- }
-
- new_caps = gst_caps_new ("ltxt",
- "application/x-gst-metadata",
- gst_props_new ("identifier", G_TYPE_INT (ltxt.identifier),
- "name", G_TYPE_STRING (label_name),
- "length", G_TYPE_INT (ltxt.length), NULL));
-
- if (gst_props_get (props, "ltxts", &caps, NULL)) {
- caps = g_list_append (caps, new_caps);
- } else {
- caps = g_list_append (NULL, new_caps);
-
- entry = gst_props_entry_new ("ltxts", GST_PROPS_GLIST (caps));
- gst_props_add_entry (props, entry);
- }
-
- break;
+ got_bytes =
+ gst_bytestream_peek_bytes (bs, &tempdata,
+ sizeof (struct _gst_riff_ltxt));
+ if (got_bytes != sizeof (struct _gst_riff_ltxt)) {
+ return;
+ }
+
+ temp_ltxt = (struct _gst_riff_ltxt *) tempdata;
+ ltxt.id = GUINT32_FROM_LE (temp_ltxt->id);
+ ltxt.size = GUINT32_FROM_LE (temp_ltxt->size);
+ ltxt.identifier = GUINT32_FROM_LE (temp_ltxt->identifier);
+ ltxt.length = GUINT32_FROM_LE (temp_ltxt->length);
+ ltxt.purpose = GUINT32_FROM_LE (temp_ltxt->purpose);
+ ltxt.country = GUINT16_FROM_LE (temp_ltxt->country);
+ ltxt.language = GUINT16_FROM_LE (temp_ltxt->language);
+ ltxt.dialect = GUINT16_FROM_LE (temp_ltxt->dialect);
+ ltxt.codepage = GUINT16_FROM_LE (temp_ltxt->codepage);
+
+ gst_bytestream_flush (bs, sizeof (struct _gst_riff_ltxt));
+ len -= sizeof (struct _gst_riff_ltxt);
+
+ if (ltxt.size - 20 > 0) {
+ got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, ltxt.size - 20);
+ if (got_bytes != ltxt.size - 20) {
+ return;
+ }
+
+ gst_bytestream_flush (bs, ((ltxt.size - 20) + 1) & ~1);
+ len -= (((ltxt.size - 20) + 1) & ~1);
+
+ label_name = (char *) tempdata;
+ } else {
+ label_name = "";
+ }
+
+ new_caps = gst_caps_new ("ltxt",
+ "application/x-gst-metadata",
+ gst_props_new ("identifier", G_TYPE_INT (ltxt.identifier),
+ "name", G_TYPE_STRING (label_name),
+ "length", G_TYPE_INT (ltxt.length), NULL));
+
+ if (gst_props_get (props, "ltxts", &caps, NULL)) {
+ caps = g_list_append (caps, new_caps);
+ } else {
+ caps = g_list_append (NULL, new_caps);
+
+ entry = gst_props_entry_new ("ltxts", GST_PROPS_GLIST (caps));
+ gst_props_add_entry (props, entry);
+ }
+
+ break;
case GST_RIFF_adtl_note:
- got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata,
- sizeof (struct _gst_riff_note));
- if (got_bytes != sizeof (struct _gst_riff_note)) {
- return;
- }
+ got_bytes =
+ gst_bytestream_peek_bytes (bs, &tempdata,
+ sizeof (struct _gst_riff_note));
+ if (got_bytes != sizeof (struct _gst_riff_note)) {
+ return;
+ }
- temp_note = (struct _gst_riff_note *) tempdata;
- note.id = GUINT32_FROM_LE (temp_note->id);
- note.size = GUINT32_FROM_LE (temp_note->size);
- note.identifier = GUINT32_FROM_LE (temp_note->identifier);
+ temp_note = (struct _gst_riff_note *) tempdata;
+ note.id = GUINT32_FROM_LE (temp_note->id);
+ note.size = GUINT32_FROM_LE (temp_note->size);
+ note.identifier = GUINT32_FROM_LE (temp_note->identifier);
- gst_bytestream_flush (bs, sizeof (struct _gst_riff_note));
- len -= sizeof (struct _gst_riff_note);
+ gst_bytestream_flush (bs, sizeof (struct _gst_riff_note));
+ len -= sizeof (struct _gst_riff_note);
- got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, note.size - 4);
- if (got_bytes != note.size - 4) {
- return;
- }
+ got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, note.size - 4);
+ if (got_bytes != note.size - 4) {
+ return;
+ }
- gst_bytestream_flush (bs, ((note.size - 4) + 1) & ~1);
- len -= (((note.size - 4) + 1) & ~1);
+ gst_bytestream_flush (bs, ((note.size - 4) + 1) & ~1);
+ len -= (((note.size - 4) + 1) & ~1);
- label_name = (char *) tempdata;
+ label_name = (char *) tempdata;
- new_caps = gst_caps_new ("note",
- "application/x-gst-metadata",
- gst_props_new ("identifier", G_TYPE_INT (note.identifier),
- "name", G_TYPE_STRING (label_name), NULL));
+ new_caps = gst_caps_new ("note",
+ "application/x-gst-metadata",
+ gst_props_new ("identifier", G_TYPE_INT (note.identifier),
+ "name", G_TYPE_STRING (label_name), NULL));
- if (gst_props_get (props, "notes", &caps, NULL)) {
- caps = g_list_append (caps, new_caps);
- } else {
- caps = g_list_append (NULL, new_caps);
+ if (gst_props_get (props, "notes", &caps, NULL)) {
+ caps = g_list_append (caps, new_caps);
+ } else {
+ caps = g_list_append (NULL, new_caps);
- entry = gst_props_entry_new ("notes", GST_PROPS_GLIST (caps));
- gst_props_add_entry (props, entry);
- }
+ entry = gst_props_entry_new ("notes", GST_PROPS_GLIST (caps));
+ gst_props_add_entry (props, entry);
+ }
- break;
+ break;
default:
- g_print ("Unknown chunk: " GST_FOURCC_FORMAT "\n",
- GST_FOURCC_ARGS (chunk.id));
- return;
+ g_print ("Unknown chunk: " GST_FOURCC_FORMAT "\n",
+ GST_FOURCC_ARGS (chunk.id));
+ return;
}
}
@@ -401,7 +402,7 @@ gst_wavparse_parse_info (GstWavParse * wavparse, int len)
while (len > 0) {
got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
+ gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
temp_chunk = (gst_riff_chunk *) tempdata;
chunk.id = GUINT32_FROM_LE (temp_chunk->id);
@@ -433,65 +434,65 @@ gst_wavparse_parse_info (GstWavParse * wavparse, int len)
- find type */
switch (chunk.id) {
case GST_RIFF_INFO_IARL:
- type = "Location";
- break;
+ type = "Location";
+ break;
case GST_RIFF_INFO_IART:
- type = "Artist";
- break;
+ type = "Artist";
+ break;
case GST_RIFF_INFO_ICMS:
- type = "Commissioner";
- break;
+ type = "Commissioner";
+ break;
case GST_RIFF_INFO_ICMT:
- type = "Comment";
- break;
+ type = "Comment";
+ break;
case GST_RIFF_INFO_ICOP:
- type = "Copyright";
- break;
+ type = "Copyright";
+ break;
case GST_RIFF_INFO_ICRD:
- type = "Creation Date";
- break;
+ type = "Creation Date";
+ break;
case GST_RIFF_INFO_IENG:
- type = "Engineer";
- break;
+ type = "Engineer";
+ break;
case GST_RIFF_INFO_IGNR:
- type = "Genre";
- break;
+ type = "Genre";
+ break;
case GST_RIFF_INFO_IKEY:
- type = "Keywords";
- break;
+ type = "Keywords";
+ break;
case GST_RIFF_INFO_INAM:
- type = "Title"; /* name */
- break;
+ type = "Title"; /* name */
+ break;
case GST_RIFF_INFO_IPRD:
- type = "Product";
- break;
+ type = "Product";
+ break;
case GST_RIFF_INFO_ISBJ:
- type = "Subject";
- break;
+ type = "Subject";
+ break;
case GST_RIFF_INFO_ISFT:
- type = "Software";
- break;
+ type = "Software";
+ break;
case GST_RIFF_INFO_ITCH:
- type = "Technician";
- break;
+ type = "Technician";
+ break;
default:
- g_print ("Unknown: %4.4s\n", (char *) &chunk.id);
- type = NULL;
- break;
+ g_print ("Unknown: %4.4s\n", (char *) &chunk.id);
+ type = NULL;
+ break;
}
if (type) {
@@ -523,8 +524,8 @@ gst_wavparse_parse_cues (GstWavParse * wavparse, int len)
int required;
got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata,
- sizeof (struct _gst_riff_cue));
+ gst_bytestream_peek_bytes (bs, &tempdata,
+ sizeof (struct _gst_riff_cue));
temp_cue = (struct _gst_riff_cue *) tempdata;
/* fixup for our big endian friends */
@@ -557,9 +558,9 @@ gst_wavparse_parse_cues (GstWavParse * wavparse, int len)
GstCaps *caps;
caps = gst_caps_new ("cues",
- "application/x-gst-metadata",
- gst_props_new ("identifier", G_TYPE_INT (points[i].identifier),
- "position", G_TYPE_INT (points[i].offset), NULL));
+ "application/x-gst-metadata",
+ gst_props_new ("identifier", G_TYPE_INT (points[i].identifier),
+ "position", G_TYPE_INT (points[i].offset), NULL));
cues = g_list_append (cues, caps);
}
@@ -597,45 +598,45 @@ gst_wavparse_parse_fmt (GstWavParse * wavparse, guint size)
switch (wavparse->format) {
case GST_RIFF_WAVE_FORMAT_ALAW:
case GST_RIFF_WAVE_FORMAT_MULAW:{
- char *mime = (wavparse->format == GST_RIFF_WAVE_FORMAT_ALAW) ?
- "audio/x-alaw" : "audio/x-mulaw";
- if (wavparse->width != 8) {
- g_warning ("Ignoring invalid width %d", wavparse->width);
- return;
- }
-
- caps = gst_caps_new_simple (mime,
- "rate", G_TYPE_INT, wavparse->rate,
- "channels", G_TYPE_INT, wavparse->channels, NULL);
+ char *mime = (wavparse->format == GST_RIFF_WAVE_FORMAT_ALAW) ?
+ "audio/x-alaw" : "audio/x-mulaw";
+ if (wavparse->width != 8) {
+ g_warning ("Ignoring invalid width %d", wavparse->width);
+ return;
+ }
+
+ caps = gst_caps_new_simple (mime,
+ "rate", G_TYPE_INT, wavparse->rate,
+ "channels", G_TYPE_INT, wavparse->channels, NULL);
}
- break;
+ break;
case GST_RIFF_WAVE_FORMAT_PCM:
- caps = gst_caps_new_simple ("audio/x-raw-int",
- "endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
- "signed", G_TYPE_BOOLEAN, (wavparse->width > 8) ? TRUE : FALSE,
- "width", G_TYPE_INT, wavparse->width,
- "depth", G_TYPE_INT, wavparse->width,
- "rate", G_TYPE_INT, wavparse->rate,
- "channels", G_TYPE_INT, wavparse->channels, NULL);
- break;
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
+ "signed", G_TYPE_BOOLEAN, (wavparse->width > 8) ? TRUE : FALSE,
+ "width", G_TYPE_INT, wavparse->width,
+ "depth", G_TYPE_INT, wavparse->width,
+ "rate", G_TYPE_INT, wavparse->rate,
+ "channels", G_TYPE_INT, wavparse->channels, NULL);
+ break;
case GST_RIFF_WAVE_FORMAT_MPEGL12:
case GST_RIFF_WAVE_FORMAT_MPEGL3:{
- int layer = (wavparse->format == GST_RIFF_WAVE_FORMAT_MPEGL12) ? 2 : 3;
+ int layer = (wavparse->format == GST_RIFF_WAVE_FORMAT_MPEGL12) ? 2 : 3;
- caps = gst_caps_new_simple ("audio/mpeg",
- "mpegversion", G_TYPE_INT, 1,
- "layer", G_TYPE_INT, layer,
- "rate", G_TYPE_INT, wavparse->rate,
- "channels", G_TYPE_INT, wavparse->channels, NULL);
+ caps = gst_caps_new_simple ("audio/mpeg",
+ "mpegversion", G_TYPE_INT, 1,
+ "layer", G_TYPE_INT, layer,
+ "rate", G_TYPE_INT, wavparse->rate,
+ "channels", G_TYPE_INT, wavparse->channels, NULL);
}
- break;
+ break;
default:
- GST_ELEMENT_ERROR (wavparse, STREAM, NOT_IMPLEMENTED, (NULL),
- ("format %d not handled", wavparse->format));
- return;
+ GST_ELEMENT_ERROR (wavparse, STREAM, NOT_IMPLEMENTED, (NULL),
+ ("format %d not handled", wavparse->format));
+ return;
}
if (caps) {
@@ -697,7 +698,7 @@ gst_wavparse_loop (GstElement * element)
if (wavparse->seek_pending) {
GST_DEBUG ("wavparse: seek pending to %" G_GINT64_FORMAT " %08llx",
- wavparse->seek_offset, (unsigned long long) wavparse->seek_offset);
+ wavparse->seek_offset, (unsigned long long) wavparse->seek_offset);
if (!gst_bytestream_seek (bs, wavparse->seek_offset, GST_SEEK_METHOD_SET)) {
GST_INFO ("wavparse: Could not seek");
@@ -722,17 +723,17 @@ gst_wavparse_loop (GstElement * element)
got_bytes = gst_bytestream_peek (bs, &buf, desired);
if (got_bytes != desired) {
- /* EOS? */
- GstEvent *event;
- guint32 remaining;
-
- gst_bytestream_get_status (bs, &remaining, &event);
- if (event && GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
- gst_pad_event_default (wavparse->sinkpad, event);
- } else {
- GST_ELEMENT_ERROR (element, RESOURCE, READ, (NULL), (NULL));
- }
- return;
+ /* EOS? */
+ GstEvent *event;
+ guint32 remaining;
+
+ gst_bytestream_get_status (bs, &remaining, &event);
+ if (event && GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
+ gst_pad_event_default (wavparse->sinkpad, event);
+ } else {
+ GST_ELEMENT_ERROR (element, RESOURCE, READ, (NULL), (NULL));
+ }
+ return;
}
wavparse->dataleft -= got_bytes;
@@ -755,15 +756,15 @@ gst_wavparse_loop (GstElement * element)
/* read first two dwords to get chunktype and size */
while (TRUE) {
got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
+ gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
temp_chunk = (gst_riff_riff *) tempdata;
if (got_bytes < sizeof (gst_riff_chunk)) {
- if (!gst_wavparse_handle_sink_event (wavparse)) {
- return;
- }
+ if (!gst_wavparse_handle_sink_event (wavparse)) {
+ return;
+ }
} else {
- break;
+ break;
}
}
@@ -773,31 +774,31 @@ gst_wavparse_loop (GstElement * element)
switch (chunk.id) {
case GST_RIFF_TAG_RIFF:
case GST_RIFF_TAG_LIST:
- /* Read complete list chunk */
- while (TRUE) {
- got_bytes =
- gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_list));
- temp_chunk = (gst_riff_riff *) tempdata;
- if (got_bytes < sizeof (gst_riff_list)) {
- if (!gst_wavparse_handle_sink_event (wavparse)) {
- return;
- }
- } else {
- break;
- }
- }
-
- chunk.type = GUINT32_FROM_LE (temp_chunk->type);
- skipsize = sizeof (gst_riff_list);
- break;
+ /* Read complete list chunk */
+ while (TRUE) {
+ got_bytes =
+ gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_list));
+ temp_chunk = (gst_riff_riff *) tempdata;
+ if (got_bytes < sizeof (gst_riff_list)) {
+ if (!gst_wavparse_handle_sink_event (wavparse)) {
+ return;
+ }
+ } else {
+ break;
+ }
+ }
+
+ chunk.type = GUINT32_FROM_LE (temp_chunk->type);
+ skipsize = sizeof (gst_riff_list);
+ break;
case GST_RIFF_TAG_cue:
- skipsize = 0;
- break;
+ skipsize = 0;
+ break;
default:
- skipsize = sizeof (gst_riff_chunk);
- break;
+ skipsize = sizeof (gst_riff_chunk);
+ break;
}
gst_bytestream_flush (bs, skipsize);
} while (FALSE);
@@ -808,9 +809,9 @@ gst_wavparse_loop (GstElement * element)
switch (wavparse->state) {
case GST_WAVPARSE_START:
if (chunk.id != GST_RIFF_TAG_RIFF && chunk.type != GST_RIFF_RIFF_WAVE) {
- GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL),
- ("chunk.id %08x chunk.type %08x", chunk.id, chunk.type));
- return;
+ GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL),
+ ("chunk.id %08x chunk.type %08x", chunk.id, chunk.type));
+ return;
}
wavparse->state = GST_WAVPARSE_OTHER;
@@ -822,45 +823,45 @@ gst_wavparse_loop (GstElement * element)
GST_DEBUG ("riff tag: %4.4s %08x", (char *) &chunk.id, chunk.size);
switch (chunk.id) {
- case GST_RIFF_TAG_data:
- wavparse->state = GST_WAVPARSE_DATA;
- wavparse->dataleft = chunk.size;
- wavparse->byteoffset = 0;
- flush = 0;
- break;
-
- case GST_RIFF_TAG_fmt:
- gst_wavparse_parse_fmt (wavparse, chunk.size);
- flush = 0;
- break;
-
- case GST_RIFF_TAG_cue:
- //gst_wavparse_parse_cues (wavparse, chunk.size);
- break;
-
- case GST_RIFF_TAG_LIST:
- GST_DEBUG ("list type: %4.4s", (char *) &chunk.type);
- switch (chunk.type) {
- case GST_RIFF_LIST_INFO:
- //gst_wavparse_parse_info (wavparse, chunk.size - 4);
- //flush = 0;
-
- break;
-
- case GST_RIFF_LIST_adtl:
- //gst_wavparse_parse_adtl (wavparse, chunk.size - 4);
- //flush = 0;
- break;
-
- default:
- //flush = 0;
- break;
- }
-
- default:
- GST_DEBUG (" ***** unknown chunkid %08x", chunk.id);
- //flush = 0;
- break;
+ case GST_RIFF_TAG_data:
+ wavparse->state = GST_WAVPARSE_DATA;
+ wavparse->dataleft = chunk.size;
+ wavparse->byteoffset = 0;
+ flush = 0;
+ break;
+
+ case GST_RIFF_TAG_fmt:
+ gst_wavparse_parse_fmt (wavparse, chunk.size);
+ flush = 0;
+ break;
+
+ case GST_RIFF_TAG_cue:
+ //gst_wavparse_parse_cues (wavparse, chunk.size);
+ break;
+
+ case GST_RIFF_TAG_LIST:
+ GST_DEBUG ("list type: %4.4s", (char *) &chunk.type);
+ switch (chunk.type) {
+ case GST_RIFF_LIST_INFO:
+ //gst_wavparse_parse_info (wavparse, chunk.size - 4);
+ //flush = 0;
+
+ break;
+
+ case GST_RIFF_LIST_adtl:
+ //gst_wavparse_parse_adtl (wavparse, chunk.size - 4);
+ //flush = 0;
+ break;
+
+ default:
+ //flush = 0;
+ break;
+ }
+
+ default:
+ GST_DEBUG (" ***** unknown chunkid %08x", chunk.id);
+ //flush = 0;
+ break;
}
break;
@@ -897,10 +898,11 @@ gst_wavparse_get_formats (GstPad * pad)
static GstFormat formats[] = {
GST_FORMAT_TIME,
GST_FORMAT_BYTES,
- GST_FORMAT_DEFAULT, /* a "frame", ie a set of samples per Hz */
+ GST_FORMAT_DEFAULT, /* a "frame", ie a set of samples per Hz */
0,
0
};
+
return formats;
}
@@ -921,7 +923,7 @@ gst_wavparse_pad_convert (GstPad * pad,
bytes_per_sample = wavparse->channels * wavparse->width / 8;
if (bytes_per_sample == 0) {
GST_DEBUG ("bytes_per_sample 0, probably an mp3 - channels %d, width %d",
- wavparse->channels, wavparse->width);
+ wavparse->channels, wavparse->width);
return FALSE;
}
byterate = (glong) (bytes_per_sample * wavparse->rate);
@@ -951,33 +953,33 @@ gst_wavparse_pad_convert (GstPad * pad,
switch (src_format) {
case GST_FORMAT_BYTES:
if (*dest_format == GST_FORMAT_DEFAULT)
- *dest_value = src_value / bytes_per_sample;
+ *dest_value = src_value / bytes_per_sample;
else if (*dest_format == GST_FORMAT_TIME)
- *dest_value = src_value * GST_SECOND / byterate;
+ *dest_value = src_value * GST_SECOND / byterate;
else {
- GST_DEBUG ("can't convert from bytes to other than units/time");
- return FALSE;
+ GST_DEBUG ("can't convert from bytes to other than units/time");
+ return FALSE;
}
break;
case GST_FORMAT_DEFAULT:
if (*dest_format == GST_FORMAT_BYTES)
- *dest_value = src_value * bytes_per_sample;
+ *dest_value = src_value * bytes_per_sample;
else if (*dest_format == GST_FORMAT_TIME)
- *dest_value = src_value * GST_SECOND / wavparse->rate;
+ *dest_value = src_value * GST_SECOND / wavparse->rate;
else {
- GST_DEBUG ("can't convert from units to other than bytes/time");
- return FALSE;
+ GST_DEBUG ("can't convert from units to other than bytes/time");
+ return FALSE;
}
break;
case GST_FORMAT_TIME:
if (*dest_format == GST_FORMAT_BYTES)
- *dest_value = src_value * byterate / GST_SECOND;
+ *dest_value = src_value * byterate / GST_SECOND;
else if (*dest_format == GST_FORMAT_DEFAULT)
- *dest_value = src_value * wavparse->rate / GST_SECOND;
+ *dest_value = src_value * wavparse->rate / GST_SECOND;
else {
- GST_DEBUG ("can't convert from time to other than bytes/units");
- return FALSE;
+ GST_DEBUG ("can't convert from time to other than bytes/units");
+ return FALSE;
}
*dest_value = *dest_value & ~(bytes_per_sample - 1);
@@ -997,6 +999,7 @@ gst_wavparse_get_query_types (GstPad * pad)
GST_QUERY_POSITION,
0
};
+
return types;
}
@@ -1016,12 +1019,12 @@ gst_wavparse_pad_query (GstPad * pad, GstQueryType type,
/* only support byte, time and unit queries */
wavparse = GST_WAVPARSE (gst_pad_get_parent (pad));
if (!gst_pad_query (GST_PAD_PEER (wavparse->sinkpad), type,
- &peer_format, &peer_value)) {
+ &peer_format, &peer_value)) {
GST_DEBUG ("Could not query sink pad's peer");
return FALSE;
}
if (!gst_pad_convert (wavparse->sinkpad, peer_format, peer_value,
- format, value)) {
+ format, value)) {
GST_DEBUG ("Could not convert sink pad's peer");
return FALSE;
}
@@ -1036,6 +1039,7 @@ gst_wavparse_get_event_masks (GstPad * pad)
{GST_EVENT_SEEK, GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH},
{0,}
};
+
return gst_wavparse_src_event_masks;
}
@@ -1056,7 +1060,7 @@ gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
/* we can only seek when in the DATA state */
if (wavparse->state != GST_WAVPARSE_DATA) {
- return FALSE;
+ return FALSE;
}
format = GST_FORMAT_BYTES;
@@ -1064,14 +1068,14 @@ gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
/* bring format to bytes for the peer element,
* FIXME be smarter here */
res = gst_pad_convert (pad,
- GST_EVENT_SEEK_FORMAT (event),
- GST_EVENT_SEEK_OFFSET (event), &format, &byteoffset);
+ GST_EVENT_SEEK_FORMAT (event),
+ GST_EVENT_SEEK_OFFSET (event), &format, &byteoffset);
if (res) {
- /* ok, seek worked, update our state */
- wavparse->seek_offset = byteoffset;
- wavparse->seek_pending = TRUE;
- wavparse->need_discont = TRUE;
+ /* ok, seek worked, update our state */
+ wavparse->seek_offset = byteoffset;
+ wavparse->seek_pending = TRUE;
+ wavparse->need_discont = TRUE;
}
break;
}