PipeWire: pipewire/timer-queue.h Source File

PipeWire 1.6.8

Loading...
Searching...
No Matches
timer-queue.h
Go to the documentation of this file.
1/* PipeWire */
2/* SPDX-FileCopyrightText: Copyright © 2025 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef PIPEWIRE_TIMER_QUEUE_H
6#define PIPEWIRE_TIMER_QUEUE_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
15
20struct pw_timer_queue;
21
22#include <pipewire/loop.h>
23
24typedef void (*pw_timer_callback) (void *data);
25
26struct pw_timer {
27 struct spa_list link;
28 struct pw_timer_queue *queue;
29 struct timespec timeout;
30 pw_timer_callback callback;
31 void *data;
32 uint32_t padding[16];
33};
34
35 struct pw_timer_queue *pw_timer_queue_new(struct pw_loop *loop);
36 void pw_timer_queue_destroy(struct pw_timer_queue *queue);
37
38int pw_timer_queue_add(struct pw_timer_queue *queue, struct pw_timer *timer,
39 struct timespec *abs_time, int64_t timeout_ns,
40 pw_timer_callback callback, void *data);
41int pw_timer_queue_cancel(struct pw_timer *timer);
42
46
47#ifdef __cplusplus
48}
49#endif
50
51#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