+2006-02-28 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * ext/annodex/gstcmmldec.c: (gst_cmml_dec_sink_event),
+ (gst_cmml_dec_new_buffer), (gst_cmml_dec_parse_preamble),
+ (gst_cmml_dec_parse_head), (gst_cmml_dec_push_clip):
+ * ext/annodex/gstcmmlparser.c: (gst_cmml_parser_parse_chunk):
+ Add a little extra debug. Make the decoder not return NOT_LINKED,
+ as we want to continue decoding all CMML and emitting tags.
+
2006-02-27 Michael Smith <msmith@fluendo.com>
* ext/annodex/gstskeltag.c:
if (dec->flow_return == GST_FLOW_OK)
dec->flow_return = gst_pad_push (dec->srcpad, buffer);
+ if (dec->flow_return == GST_FLOW_NOT_LINKED)
+ dec->flow_return = GST_FLOW_OK; /* Ignore NOT_LINKED */
break;
}
if (data)
memcpy (GST_BUFFER_DATA (*buffer), data, size);
GST_BUFFER_TIMESTAMP (*buffer) = dec->timestamp;
+ } else if (res == GST_FLOW_NOT_LINKED) {
+ GST_DEBUG_OBJECT (dec, "alloc function return NOT-LINKED, ignoring");
} else {
GST_WARNING_OBJECT (dec, "alloc function returned error %s",
gst_flow_get_name (res));
/* push the root element */
dec->flow_return = gst_cmml_dec_new_buffer (dec,
encoded_preamble, strlen ((gchar *) encoded_preamble), &buffer);
- if (dec->flow_return != GST_FLOW_OK)
- goto done;
+ if (dec->flow_return == GST_FLOW_OK) {
+ dec->flow_return = gst_pad_push (dec->srcpad, buffer);
+ }
- dec->flow_return = gst_pad_push (dec->srcpad, buffer);
+ if (dec->flow_return == GST_FLOW_NOT_LINKED)
+ dec->flow_return = GST_FLOW_OK; /* Ignore NOT_LINKED */
if (!GST_FLOW_IS_FATAL (dec->flow_return)) {
GST_INFO_OBJECT (dec, "preamble parsed");
}
-done:
g_free (encoded_preamble);
return;
}
g_free (head_str);
if (dec->flow_return == GST_FLOW_OK)
dec->flow_return = gst_pad_push (dec->srcpad, buffer);
+ if (dec->flow_return == GST_FLOW_NOT_LINKED)
+ dec->flow_return = GST_FLOW_OK; /* Ignore NOT_LINKED */
}
/* send a TAG_MESSAGE event for a clip */
clip_str, strlen ((gchar *) clip_str), &buffer);
if (dec->flow_return == GST_FLOW_OK)
dec->flow_return = gst_pad_push (dec->srcpad, buffer);
+ if (dec->flow_return == GST_FLOW_NOT_LINKED)
+ dec->flow_return = GST_FLOW_OK; /* Ignore NOT_LINKED */
g_free (clip_str);
}
(startElementNsSAX2Func) gst_cmml_parser_parse_start_element_ns;
parser->context->sax->endElementNs =
(endElementNsSAX2Func) gst_cmml_parser_parse_end_element_ns;
- parser->context->sax->processingInstruction =
- (processingInstructionSAXFunc)
+ parser->context->sax->processingInstruction = (processingInstructionSAXFunc)
gst_cmml_parser_parse_processing_instruction;
parser->preamble_callback = NULL;
parser->cmml_end_callback = NULL;
if (xmlres != XML_ERR_OK) {
xmlErrorPtr xml_error = xmlCtxtGetLastError (parser->context);
+ GST_DEBUG ("Error occurred decoding chunk %s", data);
g_set_error (err,
GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, xml_error->message);
return FALSE;