audio: Add logging that was useful in figuring out the last commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
This commit is contained in:
Nirbheek Chauhan 2021-12-20 21:43:25 +05:30 committed by GStreamer Marge Bot
parent 554a2a5145
commit 945fd11907
3 changed files with 12 additions and 3 deletions

View file

@ -282,6 +282,7 @@ gst_audio_aggregator_convert_pad_update_converter (GstAudioAggregatorConvertPad
if (in_info->finfo->format == GST_AUDIO_FORMAT_UNKNOWN) {
/* If we haven't received caps yet, this pad should not have
* a buffer to convert anyway */
GST_FIXME_OBJECT (aaggcpad, "UNREACHABLE CODE: Unknown input format");
return;
}
@ -293,6 +294,7 @@ gst_audio_aggregator_convert_pad_update_converter (GstAudioAggregatorConvertPad
/* FIXME: Not converting when we need to but the config is invalid (e.g.
* because the mix-matrix is not the right size) produces garbage. An
* invalid config should cause a GST_FLOW_NOT_NEGOTIATED. */
GST_FIXME_OBJECT (aaggcpad, "Failed to update converter");
return;
}
@ -1335,7 +1337,7 @@ gst_audio_aggregator_sink_event (GstAggregator * agg,
gst_event_parse_segment (event, &segment);
if (segment->format != GST_FORMAT_TIME) {
GST_ERROR_OBJECT (agg, "Segment of type %s are not supported,"
GST_ERROR_OBJECT (aggpad, "Segment of type %s are not supported,"
" only TIME segments are supported",
gst_format_get_name (segment->format));
gst_event_unref (event);

View file

@ -759,6 +759,9 @@ gst_audio_resample_process (GstAudioResample * resample, GstBuffer * inbuf,
in_len = srcabuf.n_samples;
out_len = gst_audio_converter_get_out_frames (resample->converter, in_len);
GST_DEBUG_OBJECT (resample, "in %" G_GSIZE_FORMAT " frames, out %"
G_GSIZE_FORMAT " frames", in_len, out_len);
/* ensure that the output buffer is not bigger than what we need */
gst_buffer_set_size (outbuf, out_len * resample->in.bpf);

View file

@ -3016,6 +3016,8 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
GstFlowReturn flow_return;
GstClockTime buf_pts;
GST_TRACE_OBJECT (aggpad, "entering chain internal");
PAD_LOCK (aggpad);
flow_return = aggpad->priv->flow_return;
if (flow_return != GST_FLOW_OK)
@ -3054,7 +3056,7 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
SRC_UNLOCK (self);
goto flushing;
}
GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed");
GST_DEBUG_OBJECT (aggpad, "Waiting for buffer to be consumed (chain)");
GST_OBJECT_UNLOCK (self);
SRC_UNLOCK (self);
PAD_WAIT_EVENT (aggpad);
@ -3112,7 +3114,7 @@ gst_aggregator_pad_chain_internal (GstAggregator * self,
GST_OBJECT_UNLOCK (self);
SRC_UNLOCK (self);
GST_DEBUG_OBJECT (aggpad, "Done chaining");
GST_TRACE_OBJECT (aggpad, "Done chaining");
return flow_return;
@ -3133,6 +3135,8 @@ gst_aggregator_pad_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
GstFlowReturn ret;
GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
GST_TRACE_OBJECT (aggpad, "entering chain");
PAD_FLUSH_LOCK (aggpad);
ret = gst_aggregator_pad_chain_internal (GST_AGGREGATOR_CAST (object),