Loading...
Searching...
No Matches
timer-queue.h
Go to the documentation of this file.
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2025 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef PIPEWIRE_TIMER_QUEUE_H
#define PIPEWIRE_TIMER_QUEUE_H
#ifdef __cplusplus
extern "C" {
#endif
struct pw_timer_queue;
#include <pipewire/loop.h>
typedef void (*pw_timer_callback) (void *data);
struct pw_timer {
struct spa_list link;
struct pw_timer_queue *queue;
struct timespec timeout;
pw_timer_callback callback;
void *data;
uint32_t padding[16];
};
struct pw_timer_queue *pw_timer_queue_new(struct pw_loop *loop);
void pw_timer_queue_destroy(struct pw_timer_queue *queue);
int pw_timer_queue_add(struct pw_timer_queue *queue, struct pw_timer *timer,
struct timespec *abs_time, int64_t timeout_ns,
pw_timer_callback callback, void *data);
int pw_timer_queue_cancel(struct pw_timer *timer);
#ifdef __cplusplus
}
#endif
#endif /* PIPEWIRE_TIMER_QUEUE_H */
pw_timer_queue_destroy
void pw_timer_queue_destroy(struct pw_timer_queue *queue)
Definition timer-queue.c:101
pw_timer_queue_add
int pw_timer_queue_add(struct pw_timer_queue *queue, struct pw_timer *timer, struct timespec *abs_time, int64_t timeout_ns, pw_timer_callback callback, void *data)
Definition timer-queue.c:136
pw_timer_queue_new
struct pw_timer_queue * pw_timer_queue_new(struct pw_loop *loop)
Definition timer-queue.c:74
pw_timer_callback
void(* pw_timer_callback)(void *data)
Definition timer-queue.h:29
pw_timer_queue_cancel
int pw_timer_queue_cancel(struct pw_timer *timer)
Definition timer-queue.c:183
loop.h
pipewire/loop.h
pw_loop
Definition loop.h:33
pw_timer
Definition timer-queue.h:31
pw_timer::data
void * data
Definition timer-queue.h:36
pw_timer::callback
pw_timer_callback callback
Definition timer-queue.h:35
pw_timer::link
struct spa_list link
Definition timer-queue.h:32
pw_timer::timeout
struct timespec timeout
Definition timer-queue.h:34
pw_timer::padding
uint32_t padding[16]
Definition timer-queue.h:37
pw_timer::queue
struct pw_timer_queue * queue
Definition timer-queue.h:33