mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
alsasink: Improve logging in write() function
This moves the "written X frames" lower so that we don't trace confusing negative values on errors and add the error code in the "Write error" log. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1261>
This commit is contained in:
parent
f3601164d2
commit
7b76c97de9
1 changed files with 2 additions and 2 deletions
|
@ -1072,9 +1072,8 @@ gst_alsasink_write (GstAudioSink * asink, gpointer data, guint length)
|
|||
GST_DELAY_SINK_UNLOCK (asink);
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (asink, "written %d frames out of %d", err, cptr);
|
||||
if (err < 0) {
|
||||
GST_DEBUG_OBJECT (asink, "Write error: %s", snd_strerror (err));
|
||||
GST_DEBUG_OBJECT (asink, "Write error: %s (%d)", snd_strerror (err), err);
|
||||
if (err == -EAGAIN) {
|
||||
continue;
|
||||
} else if (err == -ENODEV) {
|
||||
|
@ -1089,6 +1088,7 @@ gst_alsasink_write (GstAudioSink * asink, gpointer data, guint length)
|
|||
break;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (asink, "written %d frames out of %d", err, cptr);
|
||||
ptr += snd_pcm_frames_to_bytes (alsa->handle, err);
|
||||
cptr -= err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue