tinyalsasink: Fix missing const and deprecations with tinyalsa v2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6311>
This commit is contained in:
L. E. Segovia 2024-03-09 15:19:20 +00:00 committed by GStreamer Marge Bot
parent e9802f5f41
commit 9c8549c31c

View file

@ -126,7 +126,7 @@ gst_tinyalsa_sink_getcaps (GstBaseSink * bsink, GstCaps * filter)
GValue formats = { 0, };
GValue format = { 0, };
struct pcm_params *params = NULL;
struct pcm_mask *mask;
const struct pcm_mask *mask = NULL;
int rate_min, rate_max, channels_min, channels_max;
guint16 m;
@ -384,11 +384,13 @@ gst_tinyalsa_sink_write (GstAudioSink * asink, gpointer data, guint length)
{
GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink);
int ret;
unsigned int requested_frames;
again:
GST_DEBUG_OBJECT (sink, "Starting write");
ret = pcm_write (sink->pcm, data, length);
requested_frames = pcm_bytes_to_frames (sink->pcm, length);
ret = pcm_writei (sink->pcm, data, requested_frames);
if (ret == -EPIPE) {
GST_WARNING_OBJECT (sink, "Got an underrun");