summaryrefslogtreecommitdiffstats
path: root/ext/mplex
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
commit4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69 (patch)
tree8f41b30e571aa6ed88b53f5471d5e38461136e60 /ext/mplex
parent9f4226fe55f09cf5809376b467aa3f46dbf7b5c2 (diff)
downloadgst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.tar.gz
gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.tar.bz2
gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.zip
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'ext/mplex')
-rw-r--r--ext/mplex/gstmplex.cc86
-rw-r--r--ext/mplex/gstmplexibitstream.cc18
-rw-r--r--ext/mplex/gstmplexjob.cc37
3 files changed, 72 insertions, 69 deletions
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index 8f2c9385..9ec4a931 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -39,7 +39,7 @@ GST_STATIC_PAD_TEMPLATE ("video_%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("video/mpeg, "
- "mpegversion = (int) [ 1, 2 ], " "systemstream = (boolean) false")
+ "mpegversion = (int) [ 1, 2 ], " "systemstream = (boolean) false")
);
static GstStaticPadTemplate audio_sink_templ =
@@ -47,16 +47,16 @@ static GstStaticPadTemplate audio_sink_templ =
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("audio/mpeg, "
- "mpegversion = (int) 1, "
- "layer = (int) [ 1, 2 ]; "
- "audio/x-ac3; "
- "audio/x-dts; "
- "audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (boolean) TRUE, "
- "width = (int) { 16, 20, 24 }, "
- "depth = (int) { 16, 20, 24 }, "
- "rate = (int) { 48000, 96000 }, " "channels = (int) [ 1, 6 ]")
+ "mpegversion = (int) 1, "
+ "layer = (int) [ 1, 2 ]; "
+ "audio/x-ac3; "
+ "audio/x-dts; "
+ "audio/x-raw-int, "
+ "endianness = (int) BYTE_ORDER, "
+ "signed = (boolean) TRUE, "
+ "width = (int) { 16, 20, 24 }, "
+ "depth = (int) { 16, 20, 24 }, "
+ "rate = (int) { 48000, 96000 }, " "channels = (int) [ 1, 6 ]")
);
/* FIXME: subtitles */
@@ -99,8 +99,8 @@ gst_mplex_get_type (void)
};
gst_mplex_type =
- g_type_register_static (GST_TYPE_ELEMENT,
- "GstMplex", &gst_mplex_info, (GTypeFlags) 0);
+ g_type_register_static (GST_TYPE_ELEMENT,
+ "GstMplex", &gst_mplex_info, (GTypeFlags) 0);
}
return gst_mplex_type;
@@ -114,7 +114,7 @@ gst_mplex_base_init (GstMplexClass * klass)
"Codec/Muxer",
"High-quality MPEG/DVD/SVCD/VCD video/audio multiplexer",
"Andrew Stevens <andrew.stevens@nexgo.de>\n"
- "Ronald Bultje <rbultje@ronald.bitfreak.net>"
+ "Ronald Bultje <rbultje@ronald.bitfreak.net>"
};
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
@@ -191,7 +191,7 @@ gst_mplex_loop (GstElement * element)
const GList *item;
for (item = gst_element_get_pad_list (element);
- item != NULL; item = item->next) {
+ item != NULL; item = item->next) {
StreamKind type;
GstMplexIBitStream *inputstream;
JobStream *jobstream;
@@ -202,16 +202,16 @@ gst_mplex_loop (GstElement * element)
/* skip our source pad */
if (GST_PAD_DIRECTION (pad) == GST_PAD_SRC)
- continue;
+ continue;
/* create inputstream, assure we've got caps */
inputstream = new GstMplexIBitStream (pad);
/* skip unnegotiated pads */
if (!(caps = GST_PAD_CAPS (pad))) {
- delete inputstream;
+ delete inputstream;
- continue;
+ continue;
}
/* get format */
@@ -219,41 +219,41 @@ gst_mplex_loop (GstElement * element)
mime = gst_structure_get_name (structure);
if (!strcmp (mime, "video/mpeg")) {
- VideoParams *params;
+ VideoParams *params;
- type = MPEG_VIDEO;
+ type = MPEG_VIDEO;
- params = VideoParams::Default (mplex->job->mux_format);
- mplex->job->video_param.push_back (params);
- mplex->job->video_tracks++;
+ params = VideoParams::Default (mplex->job->mux_format);
+ mplex->job->video_param.push_back (params);
+ mplex->job->video_tracks++;
} else if (!strcmp (mime, "audio/mpeg")) {
- type = MPEG_AUDIO;
- mplex->job->audio_tracks++;
+ type = MPEG_AUDIO;
+ mplex->job->audio_tracks++;
} else if (!strcmp (mime, "audio/x-ac3")) {
- type = AC3_AUDIO;
- mplex->job->audio_tracks++;
+ type = AC3_AUDIO;
+ mplex->job->audio_tracks++;
} else if (!strcmp (mime, "audio/x-dts")) {
- type = DTS_AUDIO;
- mplex->job->audio_tracks++;
+ type = DTS_AUDIO;
+ mplex->job->audio_tracks++;
} else if (!strcmp (mime, "audio/x-raw-int")) {
- LpcmParams *params;
- gint bits, chans, rate;
+ LpcmParams *params;
+ gint bits, chans, rate;
- type = LPCM_AUDIO;
+ type = LPCM_AUDIO;
- /* set LPCM params */
- gst_structure_get_int (structure, "depth", &bits);
- gst_structure_get_int (structure, "rate", &rate);
- gst_structure_get_int (structure, "channels", &chans);
- params = LpcmParams::Checked (rate, chans, bits);
+ /* set LPCM params */
+ gst_structure_get_int (structure, "depth", &bits);
+ gst_structure_get_int (structure, "rate", &rate);
+ gst_structure_get_int (structure, "channels", &chans);
+ params = LpcmParams::Checked (rate, chans, bits);
- mplex->job->lpcm_param.push_back (params);
- mplex->job->audio_tracks++;
- mplex->job->lpcm_tracks++;
+ mplex->job->lpcm_param.push_back (params);
+ mplex->job->audio_tracks++;
+ mplex->job->lpcm_tracks++;
} else {
- delete inputstream;
+ delete inputstream;
- continue;
+ continue;
}
jobstream = new JobStream (inputstream, type);
@@ -262,7 +262,7 @@ gst_mplex_loop (GstElement * element)
if (!mplex->job->video_tracks && !mplex->job->audio_tracks) {
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL),
- ("no input video or audio tracks set up before loop function"));
+ ("no input video or audio tracks set up before loop function"));
return;
}
diff --git a/ext/mplex/gstmplexibitstream.cc b/ext/mplex/gstmplexibitstream.cc
index 612866f5..d749fe2a 100644
--- a/ext/mplex/gstmplexibitstream.cc
+++ b/ext/mplex/gstmplexibitstream.cc
@@ -53,7 +53,7 @@ IBitStream ()
if (!ReadIntoBuffer () && buffered == 0) {
GST_ELEMENT_ERROR (gst_pad_get_parent (_pad), RESOURCE, READ, (NULL),
- ("Failed to read from input pad %s", gst_pad_get_name (pad)));
+ ("Failed to read from input pad %s", gst_pad_get_name (pad)));
}
}
@@ -70,6 +70,7 @@ size_t GstMplexIBitStream::ReadStreamBytes (uint8_t * buf, size_t size)
{
guint8 *
data;
+
guint
read;
@@ -78,18 +79,19 @@ size_t GstMplexIBitStream::ReadStreamBytes (uint8_t * buf, size_t size)
if ((read = gst_bytestream_peek_bytes (bs, &data, size)) != size) {
GstEvent *
- event;
+ event;
+
guint
- pending;
+ pending;
gst_bytestream_get_status (bs, &pending, &event);
if (event) {
switch (GST_EVENT_TYPE (event)) {
- case GST_EVENT_EOS:
- eos = TRUE;
- break;
- default:
- break;
+ case GST_EVENT_EOS:
+ eos = TRUE;
+ break;
+ default:
+ break;
}
gst_event_unref (event);
}
diff --git a/ext/mplex/gstmplexjob.cc b/ext/mplex/gstmplexjob.cc
index 8ff23bda..f13aa36a 100644
--- a/ext/mplex/gstmplexjob.cc
+++ b/ext/mplex/gstmplexjob.cc
@@ -68,7 +68,7 @@ gst_mplex_format_get_type (void)
};
mplex_format_type =
- g_enum_register_static ("GstMplexFormat", mplex_formats);
+ g_enum_register_static ("GstMplexFormat", mplex_formats);
}
return mplex_format_type;
@@ -94,52 +94,53 @@ GstMplexJob::initProperties (GObjectClass * klass)
/* encoding profile */
g_object_class_install_property (klass, ARG_FORMAT,
g_param_spec_enum ("format", "Format", "Encoding profile format",
- GST_TYPE_MPLEX_FORMAT, 0, (GParamFlags) G_PARAM_READWRITE));
+ GST_TYPE_MPLEX_FORMAT, 0, (GParamFlags) G_PARAM_READWRITE));
/* total stream datarate. Normally, this shouldn't be needed, but
* some DVD/VCD/SVCD players really need strict values to handle
* the created files correctly. */
g_object_class_install_property (klass, ARG_MUX_BITRATE,
g_param_spec_int ("mux-bitrate", "Mux. bitrate",
- "Bitrate of output stream in kbps (0 = autodetect)",
- 0, 15 * 1024, 0, (GParamFlags) G_PARAM_READWRITE));
+ "Bitrate of output stream in kbps (0 = autodetect)",
+ 0, 15 * 1024, 0, (GParamFlags) G_PARAM_READWRITE));
#if 0
{
- "video-buffer", 1, 0, 'b'},
+ "video-buffer", 1, 0, 'b'}
+ ,
#endif
/* some boolean stuff for headers */
g_object_class_install_property (klass, ARG_VBR,
g_param_spec_boolean ("vbr", "VBR",
- "Whether the input video stream is variable bitrate",
- FALSE, (GParamFlags) G_PARAM_READWRITE));
+ "Whether the input video stream is variable bitrate",
+ FALSE, (GParamFlags) G_PARAM_READWRITE));
g_object_class_install_property (klass, ARG_SYSTEM_HEADERS,
g_param_spec_boolean ("system-headers", "System headers",
- "Create system header in every pack for generic formats",
- FALSE, (GParamFlags) G_PARAM_READWRITE));
+ "Create system header in every pack for generic formats",
+ FALSE, (GParamFlags) G_PARAM_READWRITE));
g_object_class_install_property (klass, ARG_SPLIT_SEQUENCE,
g_param_spec_boolean ("split-sequence", "Split sequence",
- "Simply split a sequence across files "
- "(rather than building run-out/run-in)",
- FALSE, (GParamFlags) G_PARAM_READWRITE));
+ "Simply split a sequence across files "
+ "(rather than building run-out/run-in)",
+ FALSE, (GParamFlags) G_PARAM_READWRITE));
/* size of a segment (followed by EOS) */
g_object_class_install_property (klass, ARG_SEGMENT_SIZE,
g_param_spec_int ("max-segment-size", "Max. segment size",
- "Max. size per segment/file in MB (0 = unlimited)",
- 0, 10 * 1024, 0, (GParamFlags) G_PARAM_READWRITE));
+ "Max. size per segment/file in MB (0 = unlimited)",
+ 0, 10 * 1024, 0, (GParamFlags) G_PARAM_READWRITE));
/* packets per pack (generic formats) */
g_object_class_install_property (klass, ARG_PACKETS_PER_PACK,
g_param_spec_int ("packets-per-pack", "Packets per pack",
- "Number of packets per pack for generic formats",
- 1, 100, 1, (GParamFlags) G_PARAM_READWRITE));
+ "Number of packets per pack for generic formats",
+ 1, 100, 1, (GParamFlags) G_PARAM_READWRITE));
/* size of one sector */
g_object_class_install_property (klass, ARG_SECTOR_SIZE,
g_param_spec_int ("sector-size", "Sector size",
- "Specify sector size in bytes for generic formats",
- 256, 16384, 2048, (GParamFlags) G_PARAM_READWRITE));
+ "Specify sector size in bytes for generic formats",
+ 256, 16384, 2048, (GParamFlags) G_PARAM_READWRITE));
}
/*