From: Wim Taymans Date: Sat, 22 Dec 2001 21:18:53 +0000 (+0000) Subject: Various changes and cleanups. X-Git-Tag: start~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f84d638b69f261c4ad8da7bb4b8564459eab316;p=platform%2Fupstream%2Fgst-plugins-base.git Various changes and cleanups. Original commit message from CVS: Various changes and cleanups. --- diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index 64f8261..0eab0b9 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -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); diff --git a/ext/vorbis/vorbisdec.h b/ext/vorbis/vorbisdec.h index 2de17e9..bcbac6e 100644 --- a/ext/vorbis/vorbisdec.h +++ b/ext/vorbis/vorbisdec.h @@ -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) \ diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 06432b0..124cd4b 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -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)); diff --git a/ext/vorbis/vorbisenc.h b/ext/vorbis/vorbisenc.h index dffac76..05e070a 100644 --- a/ext/vorbis/vorbisenc.h +++ b/ext/vorbis/vorbisenc.h @@ -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) \