GstSingleQueue *q = (GstSingleQueue *) tmp->data;
gst_data_queue_get_level (q->queue, &size);
- GST_DEBUG_OBJECT_ID (q->debug_id, "Requested buffers size: %d,"
+ GST_DEBUG_ID (q->debug_id, "Requested buffers size: %d,"
" current: %d, current max %d", new_size, size.visible,
q->max_size.visible);
gboolean res = FALSE;
GstPad *srcpad = g_weak_ref_get (&sq->srcpad);
- GST_LOG_OBJECT_ID (sq->debug_id, "starting task");
+ GST_LOG_ID (sq->debug_id, "starting task");
if (srcpad) {
res = gst_pad_start_task (srcpad,
gboolean result = FALSE;
GstPad *srcpad = g_weak_ref_get (&sq->srcpad);
- GST_LOG_OBJECT_ID (sq->debug_id, "pausing task");
+ GST_LOG_ID (sq->debug_id, "pausing task");
if (srcpad) {
result = gst_pad_pause_task (srcpad);
gst_object_unref (srcpad);
gboolean result = FALSE;
GstPad *srcpad = g_weak_ref_get (&sq->srcpad);
- GST_LOG_OBJECT_ID (sq->debug_id, "stopping task");
+ GST_LOG_ID (sq->debug_id, "stopping task");
if (srcpad) {
result = gst_pad_stop_task (srcpad);
gst_object_unref (srcpad);
gst_single_queue_flush (GstMultiQueue * mq, GstSingleQueue * sq, gboolean flush,
gboolean full)
{
- GST_DEBUG_OBJECT_ID (sq->debug_id, "flush %s", (flush ? "start" : "stop"));
+ GST_DEBUG_ID (sq->debug_id, "flush %s", (flush ? "start" : "stop"));
if (flush) {
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
sq->flushing = TRUE;
/* wake up non-linked task */
- GST_LOG_OBJECT_ID (sq->debug_id, "Waking up eventually waiting task");
+ GST_LOG_ID (sq->debug_id, "Waking up eventually waiting task");
g_cond_signal (&sq->turn);
sq->last_query = FALSE;
g_cond_signal (&sq->query_handled);
gst_data_queue_get_level (sq->queue, &size);
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"visible %u/%u, bytes %u/%u, time %" G_GUINT64_FORMAT "/%"
G_GUINT64_FORMAT, size.visible, sq->max_size.visible,
size.bytes, sq->max_size.bytes, sq->cur_time, sq->max_size.time);
if (oq->cached_sinktime < 0)
some_inactive = TRUE;
}
- GST_LOG_OBJECT_ID (oq->debug_id,
+ GST_LOG_ID (oq->debug_id,
"sinktime:%" GST_STIME_FORMAT " low:%" GST_STIME_FORMAT
" high:%" GST_STIME_FORMAT,
GST_STIME_ARGS (oq->cached_sinktime), GST_STIME_ARGS (low),
sink_time = sq->sinktime = my_segment_to_running_time (&sq->sink_segment,
sq->sink_segment.position);
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"sink_segment.position:%" GST_TIME_FORMAT ", sink_time:%"
GST_STIME_FORMAT, GST_TIME_ARGS (sq->sink_segment.position),
GST_STIME_ARGS (sink_time));
} else
src_time = sq->srctime;
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"sink %" GST_STIME_FORMAT ", src %" GST_STIME_FORMAT,
GST_STIME_ARGS (sink_time), GST_STIME_ARGS (src_time));
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
if (ppos) {
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Applying base of %" GST_TIME_FORMAT,
+ GST_DEBUG_ID (sq->debug_id, "Applying base of %" GST_TIME_FORMAT,
GST_TIME_ARGS (ppos));
segment->base = ppos;
}
sq->src_tainted = TRUE;
}
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"configured SEGMENT %" GST_SEGMENT_FORMAT, segment);
/* segment can update the time level of the queue */
if (duration != GST_CLOCK_TIME_NONE)
timestamp += duration;
- GST_DEBUG_OBJECT_ID (sq->debug_id, "%s position updated to %" GST_TIME_FORMAT,
+ GST_DEBUG_ID (sq->debug_id, "%s position updated to %" GST_TIME_FORMAT,
segment == &sq->sink_segment ? "sink" : "src", GST_TIME_ARGS (timestamp));
segment->position = timestamp;
timestamp += duration;
}
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"%s position updated to %" GST_TIME_FORMAT,
segment == &sq->sink_segment ? "sink" : "src",
GST_TIME_ARGS (timestamp));
gst_data_queue_limits_changed (sq->queue);
if (G_UNLIKELY (*allow_drop)) {
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Dropping EOS buffer %p with ts %" GST_TIME_FORMAT,
buffer, GST_TIME_ARGS (timestamp));
gst_buffer_unref (buffer);
} else {
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Pushing buffer %p with ts %" GST_TIME_FORMAT,
buffer, GST_TIME_ARGS (timestamp));
result = gst_pad_push (srcpad, buffer);
}
if (G_UNLIKELY (*allow_drop)) {
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Dropping EOS event %p of type %s",
event, GST_EVENT_TYPE_NAME (event));
gst_event_unref (event);
} else {
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Pushing event %p of type %s", event, GST_EVENT_TYPE_NAME (event));
gst_pad_push_event (srcpad, event);
query = GST_QUERY_CAST (object);
if (G_UNLIKELY (*allow_drop)) {
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Dropping EOS query %p", query);
+ GST_DEBUG_ID (sq->debug_id, "Dropping EOS query %p", query);
gst_query_unref (query);
res = FALSE;
} else {
goto done;
next:
- GST_DEBUG_OBJECT_ID (sq->debug_id, "trying to pop an object");
+ GST_DEBUG_ID (sq->debug_id, "trying to pop an object");
if (sq->flushing)
goto out_flushing;
/* Get running time of the item. Events will have GST_CLOCK_STIME_NONE */
next_time = get_running_time (&sq->src_segment, object, FALSE);
- GST_LOG_OBJECT_ID (sq->debug_id, "newid:%d , oldid:%d",
- newid, sq->last_oldid);
+ GST_LOG_ID (sq->debug_id, "newid:%d , oldid:%d", newid, sq->last_oldid);
/* If we're not-linked, we do some extra work because we might need to
* wait before pushing. If we're linked but there's a gap in the IDs,
if (sq->srcresult == GST_FLOW_NOT_LINKED
|| (sq->last_oldid == G_MAXUINT32) || (newid != (sq->last_oldid + 1))
|| sq->last_oldid > mq->highid) {
- GST_LOG_OBJECT_ID (sq->debug_id, "CHECKING srcresult: %s",
+ GST_LOG_ID (sq->debug_id, "CHECKING srcresult: %s",
gst_flow_get_name (sq->srcresult));
/* Check again if we're flushing after the lock is taken,
/* Recompute the high time */
compute_high_time (mq, sq->groupid);
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"groupid %d high_time %" GST_STIME_FORMAT " next_time %"
GST_STIME_FORMAT, sq->groupid, GST_STIME_ARGS (sq->group_high_time),
GST_STIME_ARGS (next_time));
while (should_wait && sq->srcresult == GST_FLOW_NOT_LINKED) {
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Sleeping for not-linked wakeup with "
"newid %u, highid %u, next_time %" GST_STIME_FORMAT
", high_time %" GST_STIME_FORMAT, newid, mq->highid,
compute_high_time (mq, sq->groupid);
compute_high_id (mq);
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Woken from sleeping for not-linked "
+ GST_DEBUG_ID (sq->debug_id, "Woken from sleeping for not-linked "
"wakeup with newid %u, highid %u, next_time %" GST_STIME_FORMAT
", high_time %" GST_STIME_FORMAT " mq high_time %" GST_STIME_FORMAT,
newid, mq->highid,
if (sq->flushing)
goto out_flushing;
- GST_LOG_OBJECT_ID (sq->debug_id, "BEFORE PUSHING sq->srcresult: %s",
+ GST_LOG_ID (sq->debug_id, "BEFORE PUSHING sq->srcresult: %s",
gst_flow_get_name (sq->srcresult));
/* Update time stats */
&& result == GST_FLOW_NOT_LINKED) {
GList *tmp;
- GST_LOG_OBJECT_ID (sq->debug_id, "Changed from active to non-active");
+ GST_LOG_ID (sq->debug_id, "Changed from active to non-active");
compute_high_id (mq);
compute_high_time (mq, sq->groupid);
GstSingleQueue *sq2 = (GstSingleQueue *) tmp->data;
if (sq2->srcresult == GST_FLOW_NOT_LINKED) {
- GST_LOG_OBJECT_ID (sq2->debug_id, "Waking up singlequeue");
+ GST_LOG_ID (sq2->debug_id, "Waking up singlequeue");
sq2->pushed = FALSE;
sq2->srcresult = GST_FLOW_OK;
g_cond_signal (&sq2->turn);
* sure we are relaying the correct info wrt proper segment */
if (result == GST_FLOW_EOS && !dropping &&
sq->srcresult != GST_FLOW_NOT_LINKED) {
- GST_DEBUG_OBJECT_ID (sq->debug_id, "starting EOS drop");
+ GST_DEBUG_ID (sq->debug_id, "starting EOS drop");
dropping = TRUE;
/* pretend we have not seen EOS yet for upstream's sake */
result = sq->srcresult;
/* queue empty, so stop dropping
* we can commit the result we have now,
* which is either OK after a segment, or EOS */
- GST_DEBUG_OBJECT_ID (sq->debug_id, "committed EOS drop");
+ GST_DEBUG_ID (sq->debug_id, "committed EOS drop");
dropping = FALSE;
result = GST_FLOW_EOS;
}
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
gst_multi_queue_post_buffering (mq);
- GST_LOG_OBJECT_ID (sq->debug_id,
+ GST_LOG_ID (sq->debug_id,
"AFTER PUSHING sq->srcresult: %s (is_eos:%d)",
gst_flow_get_name (sq->srcresult), GST_PAD_IS_EOS (srcpad));
single_queue_underrun_cb (sq->queue, sq);
gst_data_queue_set_flushing (sq->queue, TRUE);
gst_pad_pause_task (srcpad);
- GST_LOG_OBJECT_ID (sq->debug_id,
+ GST_LOG_ID (sq->debug_id,
"task paused, reason:%s", gst_flow_get_name (sq->srcresult));
goto done;
}
timestamp = GST_BUFFER_DTS_OR_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
- GST_LOG_OBJECT_ID (sq->debug_id,
+ GST_LOG_ID (sq->debug_id,
"About to enqueue buffer %p with id %d (pts:%"
GST_TIME_FORMAT " dts:%" GST_TIME_FORMAT " dur:%" GST_TIME_FORMAT ")",
buffer, curid, GST_TIME_ARGS (GST_BUFFER_PTS (buffer)),
dval = my_segment_to_running_time (&sq->sink_segment, val);
if (GST_CLOCK_STIME_IS_VALID (dval)) {
sq->cached_sinktime = dval;
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Cached sink time now %" G_GINT64_FORMAT " %"
GST_STIME_FORMAT, sq->cached_sinktime,
GST_STIME_ARGS (sq->cached_sinktime));
/* ERRORS */
flushing:
{
- GST_LOG_OBJECT_ID (sq->debug_id, "exit because task paused, reason: %s",
+ GST_LOG_ID (sq->debug_id, "exit because task paused, reason: %s",
gst_flow_get_name (sq->srcresult));
if (item)
gst_multi_queue_item_destroy (item);
GstStreamFlags stream_flags;
gst_event_parse_stream_flags (event, &stream_flags);
if ((stream_flags & GST_STREAM_FLAG_SPARSE)) {
- GST_INFO_OBJECT_ID (sq->debug_id, "Stream is sparse");
+ GST_INFO_ID (sq->debug_id, "Stream is sparse");
sq->is_sparse = TRUE;
}
}
break;
}
case GST_EVENT_FLUSH_START:
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Received flush start event");
+ GST_DEBUG_ID (sq->debug_id, "Received flush start event");
res = gst_pad_push_event (srcpad, event);
goto done;
case GST_EVENT_FLUSH_STOP:
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Received flush stop event");
+ GST_DEBUG_ID (sq->debug_id, "Received flush stop event");
res = gst_pad_push_event (srcpad, event);
item = gst_multi_queue_mo_item_new ((GstMiniObject *) event, curid);
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Enqueuing event %p of type %s with id %d",
event, GST_EVENT_TYPE_NAME (event), curid);
gst_object_unref (srcpad);
if (res == FALSE)
flowret = GST_FLOW_ERROR;
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Returning %s",
- gst_flow_get_name (flowret));
+ GST_DEBUG_ID (sq->debug_id, "Returning %s", gst_flow_get_name (flowret));
return flowret;
flushing:
{
gst_object_unref (srcpad);
- GST_LOG_OBJECT_ID (sq->debug_id, "Exit because task paused, reason: %s",
+ GST_LOG_ID (sq->debug_id, "Exit because task paused, reason: %s",
gst_flow_get_name (sq->srcresult));
if (sref)
gst_event_unref (sref);
item = gst_multi_queue_mo_item_new ((GstMiniObject *) query, curid);
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Enqueuing query %p of type %s with id %d",
query, GST_QUERY_TYPE_NAME (query), curid);
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
return FALSE;
}
- GST_DEBUG_OBJECT_ID (sq->debug_id, "active: %d", active);
+ GST_DEBUG_ID (sq->debug_id, "active: %d", active);
switch (mode) {
case GST_PAD_MODE_PUSH:
if (GST_CLOCK_STIME_IS_VALID (sq->next_time) &&
GST_CLOCK_STIME_IS_VALID (high_time)
&& sq->next_time <= high_time) {
- GST_LOG_OBJECT_ID (sq->debug_id, "Waking up singlequeue");
+ GST_LOG_ID (sq->debug_id, "Waking up singlequeue");
g_cond_signal (&sq->turn);
}
}
GstSingleQueue *sq = (GstSingleQueue *) tmp->data;
if (sq->srcresult == GST_FLOW_NOT_LINKED &&
sq->nextid != 0 && sq->nextid <= mq->highid) {
- GST_LOG_OBJECT_ID (sq->debug_id, "Waking up singlequeue");
+ GST_LOG_ID (sq->debug_id, "Waking up singlequeue");
g_cond_signal (&sq->turn);
}
}
continue;
}
- GST_LOG_OBJECT_ID (sq->debug_id, "nextid:%d, oldid:%d, srcresult:%s",
+ GST_LOG_ID (sq->debug_id, "nextid:%d, oldid:%d, srcresult:%s",
sq->nextid, sq->oldid, gst_flow_get_name (sq->srcresult));
/* No need to consider queues which are not waiting */
if (sq->nextid == 0) {
- GST_LOG_OBJECT_ID (sq->debug_id, "not waiting - ignoring");
+ GST_LOG_ID (sq->debug_id, "not waiting - ignoring");
gst_object_unref (srcpad);
continue;
}
continue;
}
- GST_LOG_OBJECT_ID (sq->debug_id,
+ GST_LOG_ID (sq->debug_id,
"inspecting (group:%d) , next_time:%" GST_STIME_FORMAT
", last_time:%" GST_STIME_FORMAT ", srcresult:%s", sq->groupid,
GST_STIME_ARGS (sq->next_time), GST_STIME_ARGS (sq->last_time),
if (sq->srcresult == GST_FLOW_NOT_LINKED) {
/* No need to consider queues which are not waiting */
if (!GST_CLOCK_STIME_IS_VALID (sq->next_time)) {
- GST_LOG_OBJECT_ID (sq->debug_id, "Not waiting - ignoring");
+ GST_LOG_ID (sq->debug_id, "Not waiting - ignoring");
gst_object_unref (srcpad);
continue;
}
gst_data_queue_get_level (sq->queue, &size);
- GST_LOG_OBJECT_ID (sq->debug_id,
+ GST_LOG_ID (sq->debug_id,
"EOS %d, visible %u/%u, bytes %u/%u, time %"
G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT, sq->is_eos, size.visible,
sq->max_size.visible, size.bytes, sq->max_size.bytes, sq->cur_time,
continue;
if (oq->srcresult == GST_FLOW_NOT_LINKED) {
- GST_LOG_OBJECT_ID (sq->debug_id, "Queue is not-linked");
+ GST_LOG_ID (sq->debug_id, "Queue is not-linked");
continue;
}
- GST_LOG_OBJECT_ID (oq->debug_id, "Checking queue");
+ GST_LOG_ID (oq->debug_id, "Checking queue");
if (gst_data_queue_is_empty (oq->queue) && !oq->is_sparse) {
- GST_LOG_OBJECT_ID (oq->debug_id, "Queue is empty");
+ GST_LOG_ID (oq->debug_id, "Queue is empty");
empty_found = TRUE;
break;
}
if (empty_found) {
if (IS_FILLED (sq, visible, size.visible)) {
sq->max_size.visible = size.visible + 1;
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"Bumping max visible to %d", sq->max_size.visible);
filled = FALSE;
}
/* Overrun is always forwarded, since this is blocking the upstream element */
if (filled) {
- GST_DEBUG_OBJECT_ID (sq->debug_id, "Queue is filled, signalling overrun");
+ GST_DEBUG_ID (sq->debug_id, "Queue is filled, signalling overrun");
g_signal_emit (mq, gst_multi_queue_signals[SIGNAL_OVERRUN], 0);
}
}
}
if (sq->srcresult == GST_FLOW_NOT_LINKED) {
- GST_LOG_OBJECT_ID (sq->debug_id, "Single Queue is empty but not-linked");
+ GST_LOG_ID (sq->debug_id, "Single Queue is empty but not-linked");
gst_object_unref (mq);
return;
} else {
- GST_LOG_OBJECT_ID (sq->debug_id,
+ GST_LOG_ID (sq->debug_id,
"Single Queue is empty, Checking other single queues");
}
gst_data_queue_get_level (oq->queue, &size);
if (IS_FILLED (oq, visible, size.visible)) {
oq->max_size.visible = size.visible + 1;
- GST_DEBUG_OBJECT_ID (oq->debug_id,
+ GST_DEBUG_ID (oq->debug_id,
"queue is filled, bumping its max visible to %d",
oq->max_size.visible);
gst_data_queue_limits_changed (oq->queue);
return TRUE;
}
- GST_DEBUG_OBJECT_ID (sq->debug_id,
+ GST_DEBUG_ID (sq->debug_id,
"visible %u/%u, bytes %u/%u, time %" G_GUINT64_FORMAT "/%"
G_GUINT64_FORMAT, visible, sq->max_size.visible, bytes,
sq->max_size.bytes, sq->cur_time, sq->max_size.time);
}
g_rec_mutex_unlock (GST_STATE_GET_LOCK (mqueue));
- GST_DEBUG_OBJECT_ID (sq->debug_id, "GstSingleQueue created and pads added");
+ GST_DEBUG_ID (sq->debug_id, "GstSingleQueue created and pads added");
return sq;
}