if (!vorbisdec_type) {
static const GTypeInfo vorbisdec_info = {
- sizeof (VorbisDecClass), NULL,
+ sizeof (VorbisDecClass),
+ NULL,
NULL,
(GClassInitFunc) gst_vorbisdec_class_init,
NULL,
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:
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);
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. */
}
}
}
- /* 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);
}
}
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);
#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) \
if (!vorbisenc_type) {
static const GTypeInfo vorbisenc_info = {
- sizeof (VorbisEncClass), NULL,
+ sizeof (VorbisEncClass),
+ NULL,
NULL,
(GClassInitFunc) gst_vorbisenc_class_init,
NULL,
/* 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));
#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) \