Commit 7f84d638 authored by Wim Taymans's avatar Wim Taymans
Browse files

Various changes and cleanups.

Original commit message from CVS:
Various changes and cleanups.
parent 468a8b36
......@@ -64,7 +64,8 @@ vorbisdec_get_type (void)
if (!vorbisdec_type) {
static const GTypeInfo vorbisdec_info = {
sizeof (VorbisDecClass), NULL,
sizeof (VorbisDecClass),
NULL,
NULL,
(GClassInitFunc) gst_vorbisdec_class_init,
NULL,
......@@ -113,9 +114,6 @@ gst_vorbisdec_pull (VorbisDec * vorbisdec, ogg_sync_state * oy)
buf = gst_pad_pull (vorbisdec->sinkpad);
/* this is fatal */
g_assert (buf != NULL);
if (GST_IS_EVENT (buf)) {
switch (GST_EVENT_TYPE (buf)) {
case GST_EVENT_FLUSH:
......@@ -173,11 +171,7 @@ gst_vorbisdec_loop (GstElement * element)
stream initial header) We need the first page to get the stream
serialno. */
/* FIXME HACK! trap COTHREAD_STOPPING here */
if (GST_ELEMENT_IS_COTHREAD_STOPPING (vorbisdec)) {
GST_DEBUG (0, "HACK HACK HACK, switching to cothread zero on COTHREAD_STOPPING\n");
cothread_switch (cothread_current_main ());
}
gst_element_yield (GST_ELEMENT (vorbisdec));
/* submit a 4k block to libvorbis' Ogg layer */
buf = gst_vorbisdec_pull (vorbisdec, &oy);
......@@ -193,7 +187,7 @@ gst_vorbisdec_loop (GstElement * element)
if (ogg_sync_pageout (&oy, &og) != 1) {
/* error case. Must not be Vorbis data */
gst_element_error (element, "input does not appear to be an Ogg bitstream.");
return;
break;
}
/* Get the serial number and set up the rest of decode. */
......@@ -265,14 +259,7 @@ gst_vorbisdec_loop (GstElement * element)
}
}
}
/* no harm in not checkiindent: Standard input:375: Warning:old style assignment ambiguity in "=-". Assuming "= -"
ng before adding more */
/* FIXME HACK! trap COTHREAD_STOPPING here */
if (GST_ELEMENT_IS_COTHREAD_STOPPING (vorbisdec)) {
GST_DEBUG (0, "HACK HACK HACK, switching to cothread zero on COTHREAD_STOPPING\n");
cothread_switch (cothread_current_main ());
}
gst_element_yield (GST_ELEMENT (vorbisdec));
buf = gst_vorbisdec_pull (vorbisdec, &oy);
bytes = GST_BUFFER_SIZE (buf);
......@@ -420,12 +407,7 @@ ng before adding more */
}
}
if (!eos) {
/* FIXME HACK! trap COTHREAD_STOPPING here */
if (GST_ELEMENT_IS_COTHREAD_STOPPING (vorbisdec)) {
GST_DEBUG (0, "HACK HACK HACK, switching to cothread zero on COTHREAD_STOPPING\n");
cothread_switch (cothread_current_main ());
}
gst_element_yield (GST_ELEMENT (vorbisdec));
buf = gst_vorbisdec_pull (vorbisdec, &oy);
bytes = GST_BUFFER_SIZE (buf);
......
......@@ -37,7 +37,7 @@ extern "C" {
#define GST_VORBISDEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VORBISDEC,VorbisDec))
#define GST_VORBISDEC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VORBISDEC,VorbisDec))
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VORBISDEC,VorbisDecClass))
#define GST_IS_VORBISDEC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VORBISDEC))
#define GST_IS_VORBISDEC_CLASS(obj) \
......
......@@ -74,7 +74,8 @@ vorbisenc_get_type (void)
if (!vorbisenc_type) {
static const GTypeInfo vorbisenc_info = {
sizeof (VorbisEncClass), NULL,
sizeof (VorbisEncClass),
NULL,
NULL,
(GClassInitFunc) gst_vorbisenc_class_init,
NULL,
......@@ -163,7 +164,7 @@ gst_vorbisenc_setup (VorbisEnc * vorbisenc)
/* add a comment */
vorbis_comment_init (&vorbisenc->vc);
vorbis_comment_add (&vorbisenc->vc, comment);
vorbis_comment_add (&vorbisenc->vc, (gchar *)comment);
gst_element_send_event (GST_ELEMENT (vorbisenc),
gst_event_new_info ("comment", GST_PROPS_STRING (comment), NULL));
......
......@@ -36,7 +36,7 @@ extern "C" {
#define GST_VORBISENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VORBISENC,VorbisEnc))
#define GST_VORBISENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VORBISENC,VorbisEnc))
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VORBISENC,VorbisEncClass))
#define GST_IS_VORBISENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VORBISENC))
#define GST_IS_VORBISENC_CLASS(obj) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment