2023-02-08 18:12:00 +01:00
|
|
|
/* PipeWire */
|
|
|
|
|
/* SPDX-FileCopyrightText: Copyright © 2020 Wim Taymans */
|
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
2021-06-18 23:03:58 +02:00
|
|
|
|
|
|
|
|
#include <spa/utils/list.h>
|
|
|
|
|
#include <spa/utils/hook.h>
|
|
|
|
|
#include <pipewire/work-queue.h>
|
|
|
|
|
|
2021-06-18 23:36:35 +02:00
|
|
|
#include "client.h"
|
2021-06-18 23:03:58 +02:00
|
|
|
#include "internal.h"
|
2021-09-22 09:28:54 +10:00
|
|
|
#include "log.h"
|
2022-02-20 21:34:53 +01:00
|
|
|
#include "operation.h"
|
2021-06-18 23:03:58 +02:00
|
|
|
#include "pending-sample.h"
|
|
|
|
|
#include "sample-play.h"
|
|
|
|
|
|
|
|
|
|
void pending_sample_free(struct pending_sample *ps)
|
|
|
|
|
{
|
|
|
|
|
struct client * const client = ps->client;
|
|
|
|
|
struct impl * const impl = client->impl;
|
2022-02-20 21:34:53 +01:00
|
|
|
struct operation *o;
|
2021-06-18 23:03:58 +02:00
|
|
|
|
|
|
|
|
spa_list_remove(&ps->link);
|
|
|
|
|
spa_hook_remove(&ps->listener);
|
|
|
|
|
pw_work_queue_cancel(impl->work_queue, ps, SPA_ID_INVALID);
|
|
|
|
|
|
2022-02-20 21:34:53 +01:00
|
|
|
if ((o = operation_find(client, ps->tag)) != NULL)
|
|
|
|
|
operation_free(o);
|
|
|
|
|
|
2021-06-18 23:03:58 +02:00
|
|
|
sample_play_destroy(ps->play);
|
|
|
|
|
}
|