Skip to content

Commit

Permalink
replace pa_ext_stream_restore2_info with pa_ext_stream_restore_info
Browse files Browse the repository at this point in the history
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
  • Loading branch information
freemangordon committed Apr 9, 2023
1 parent bd31a3e commit 55d766c
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions libmafw-gst-renderer/mafw-gst-renderer-worker-volume.c
Expand Up @@ -97,7 +97,7 @@ static gchar *_get_client_name(void) {
}

static void _ext_stream_restore_read_cb(pa_context *c,
const pa_ext_stream_restore2_info *i,
const pa_ext_stream_restore_info *i,
int eol,
void *userdata)
{
Expand Down Expand Up @@ -248,7 +248,7 @@ _state_cb(pa_context *c, void *data)
case PA_CONTEXT_READY: {
pa_operation *o;

o = pa_ext_stream_restore2_read(c, _ext_stream_restore_read_cb,
o = pa_ext_stream_restore_read(c, _ext_stream_restore_read_cb,
wvolume);
g_assert(o != NULL);
pa_operation_unref(o);
Expand All @@ -261,7 +261,7 @@ _state_cb(pa_context *c, void *data)
}

static void _ext_stream_restore_read_cb_init(pa_context *c,
const pa_ext_stream_restore2_info *i,
const pa_ext_stream_restore_info *i,
int eol,
void *userdata)
{
Expand Down Expand Up @@ -316,7 +316,7 @@ static void _ext_stream_restore_subscribe_cb(pa_context *c, void *userdata)
{
pa_operation *o;

o = pa_ext_stream_restore2_read(c, _ext_stream_restore_read_cb, userdata);
o = pa_ext_stream_restore_read(c, _ext_stream_restore_read_cb, userdata);
g_assert(o != NULL);
pa_operation_unref(o);
}
Expand Down Expand Up @@ -344,7 +344,7 @@ _state_cb_init(pa_context *c, void *data)

g_debug("PA_CONTEXT_READY");

o = pa_ext_stream_restore2_read(c,
o = pa_ext_stream_restore_read(c,
_ext_stream_restore_read_cb_init,
closure);
g_assert(o != NULL);
Expand Down Expand Up @@ -413,8 +413,7 @@ static void _remove_set_timeout(MafwGstRendererWorkerVolume *wvolume)

static gboolean _set_timeout(gpointer data)
{
pa_ext_stream_restore2_info info;
pa_ext_stream_restore2_info *infos[1];
pa_ext_stream_restore_info info;
MafwGstRendererWorkerVolume *wvolume = data;

if (wvolume->pending_operation) {
Expand All @@ -431,8 +430,6 @@ static gboolean _set_timeout(gpointer data)
info.channel_map.channels = 1;
info.channel_map.map[0] = PA_CHANNEL_POSITION_MONO;
info.device = NULL;
info.volume_is_absolute = TRUE;
infos[0] = &info;

info.mute = wvolume->current_mute;
pa_cvolume_init(&info.volume);
Expand All @@ -451,12 +448,10 @@ static gboolean _set_timeout(gpointer data)
wvolume->pending_operation_volume = wvolume->current_volume;
wvolume->pending_operation_mute = wvolume->current_mute;

wvolume->pa_operation = pa_ext_stream_restore2_write(
wvolume->pa_operation = pa_ext_stream_restore_write(
wvolume->context,
PA_UPDATE_REPLACE,
(const pa_ext_stream_restore2_info*
const *)infos,
1, TRUE, _success_cb, wvolume);
&info, 1, TRUE, _success_cb, wvolume);

if (wvolume->pa_operation == NULL) {
g_critical("NULL operation when writing volume to "
Expand Down

0 comments on commit 55d766c

Please sign in to comment.