+2006-01-11 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * ext/ogg/gstoggdemux.c:
+ Change the pad template to src_%d to match the pads that
+ are created from it. decodebin needs this information in order
+ to decide that oggdemux is capable of producing multiple pads
+ (and hence needs queues inserted).
+
+ * ext/ogg/gstoggmux.c: (gst_ogg_mux_queue_pads),
+ (gst_ogg_mux_collected):
+ Make debug output more useful by using GST_PTR_FORMAT.
+
2006-01-11 Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
walk = g_slist_next (walk);
- GST_DEBUG_OBJECT (ogg_mux, "looking at pad %p", pad);
+ GST_DEBUG_OBJECT (ogg_mux, "looking at pad %" GST_PTR_FORMAT " (oggpad %p)",
+ data->pad, pad);
/* try to get a new buffer for this pad if needed and possible */
if (pad->buffer == NULL) {
gboolean incaps;
buf = gst_collect_pads_pop (ogg_mux->collect, data);
- GST_DEBUG_OBJECT (ogg_mux, "popping buffer %p", buf);
+ GST_DEBUG_OBJECT (ogg_mux, "popping buffer %" GST_PTR_FORMAT, buf);
/* On EOS we get a NULL buffer */
if (buf != NULL) {
* pull on */
if (pad->buffer) {
if (gst_ogg_mux_compare_pads (ogg_mux, bestpad, pad) > 0) {
- GST_DEBUG_OBJECT (ogg_mux, "best pad now %p", pad);
+ GST_DEBUG_OBJECT (ogg_mux, "best pad now %" GST_PTR_FORMAT
+ " (oggpad %p)", data->pad, pad);
+
bestpad = pad;
}
} else if (!pad->eos) {
- GST_DEBUG_OBJECT (ogg_mux, "hungry pad %p", pad);
+ GST_DEBUG_OBJECT (ogg_mux, "hungry pad %" GST_PTR_FORMAT
+ " (oggpad %p)", data->pad, pad);
still_hungry = pad;
}
}
/* queue buffers on all pads; find a buffer with the lowest timestamp */
best = gst_ogg_mux_queue_pads (ogg_mux);
- if (best && !best->buffer)
+ if (best && !best->buffer) {
+ GST_DEBUG_OBJECT (ogg_mux, "No buffer available on best pad");
return GST_FLOW_OK;
+ }
- GST_DEBUG_OBJECT (ogg_mux, "best pad %p, pulling %p", best, ogg_mux->pulling);
+ GST_DEBUG_OBJECT (ogg_mux, "best pad %" GST_PTR_FORMAT " (oggpad %p)"
+ " pulling %" GST_PTR_FORMAT, best->collect.pad, best, ogg_mux->pulling);
if (!best) { /* EOS : FIXME !! We need to handle EOS correctly, and set EOS
flags on the ogg pages. */
/* if we don't know which pad to pull on, use the best one */
if (ogg_mux->pulling == NULL) {
ogg_mux->pulling = best;
- GST_DEBUG_OBJECT (ogg_mux, "pulling now %p", ogg_mux->pulling);
+ GST_DEBUG_OBJECT (ogg_mux, "pulling now %" GST_PTR_FORMAT " (oggpad %p)",
+ ogg_mux->pulling->collect.pad, ogg_mux->pulling);
+
/* remember timestamp of first buffer for this new pad */
if (ogg_mux->pulling != NULL) {
ogg_mux->next_ts = GST_BUFFER_TIMESTAMP (ogg_mux->pulling->buffer);
gint64 duration;
gboolean force_flush;
- GST_DEBUG_OBJECT (ogg_mux, "pulling now %p", ogg_mux->pulling);
+ GST_DEBUG_OBJECT (ogg_mux, "pulling now %" GST_PTR_FORMAT " (oggpad %p)",
+ ogg_mux->pulling->collect.pad, ogg_mux->pulling);
/* now see if we have a buffer */
buf = pad->buffer;
*/
if (pad->timestamp < timestamp) {
pad->timestamp = timestamp;
- GST_DEBUG_OBJECT (pad, "Updated timestamp of pad to %" GST_TIME_FORMAT,
+ GST_DEBUG_OBJECT (ogg_mux, "Updated timestamp of pad %" GST_PTR_FORMAT
+ " (oggpad %p) to %" GST_TIME_FORMAT, pad->collect.pad, pad,
GST_TIME_ARGS (timestamp));
}
}