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:
parent
e9802f5f41
commit
9c8549c31c
@ -126,7 +126,7 @@ gst_tinyalsa_sink_getcaps (GstBaseSink * bsink, GstCaps * filter)
|
|||||||
GValue formats = { 0, };
|
GValue formats = { 0, };
|
||||||
GValue format = { 0, };
|
GValue format = { 0, };
|
||||||
struct pcm_params *params = NULL;
|
struct pcm_params *params = NULL;
|
||||||
struct pcm_mask *mask;
|
const struct pcm_mask *mask = NULL;
|
||||||
int rate_min, rate_max, channels_min, channels_max;
|
int rate_min, rate_max, channels_min, channels_max;
|
||||||
guint16 m;
|
guint16 m;
|
||||||
|
|
||||||
@ -384,11 +384,13 @@ gst_tinyalsa_sink_write (GstAudioSink * asink, gpointer data, guint length)
|
|||||||
{
|
{
|
||||||
GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink);
|
GstTinyalsaSink *sink = GST_TINYALSA_SINK (asink);
|
||||||
int ret;
|
int ret;
|
||||||
|
unsigned int requested_frames;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
GST_DEBUG_OBJECT (sink, "Starting write");
|
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) {
|
if (ret == -EPIPE) {
|
||||||
GST_WARNING_OBJECT (sink, "Got an underrun");
|
GST_WARNING_OBJECT (sink, "Got an underrun");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user