Loading...
Searching...
No Matches
System
SPA » Support

I/O, clock, polling, timer, and signal interfaces. More...

## Files

file | system.h
| spa/support/system.h

## Data Structures

struct | spa_system
struct | spa_poll_event
struct | spa_system_methods

## Macros

#define | SPA_TYPE_INTERFACE_System SPA_TYPE_INFO_INTERFACE_BASE "System"
| a collection of core system functions
#define | SPA_TYPE_INTERFACE_DataSystem SPA_TYPE_INFO_INTERFACE_BASE "DataSystem"
#define | SPA_VERSION_SYSTEM 0
#define | SPA_IO_IN (1 << 0)
#define | SPA_IO_OUT (1 << 2)
#define | SPA_IO_ERR (1 << 3)
#define | SPA_IO_HUP (1 << 4)
#define | SPA_FD_CLOEXEC (1<<0)
#define | SPA_FD_NONBLOCK (1<<1)
#define | SPA_FD_EVENT_SEMAPHORE (1<<2)
#define | SPA_FD_TIMER_ABSTIME (1<<3)
#define | SPA_FD_TIMER_CANCEL_ON_SET (1<<4)
#define | SPA_VERSION_SYSTEM_METHODS 0
#define | spa_system_ioctl(object, fd, request, ...)

## Functions

SPA_API_SYSTEM ssize_t | spa_system_read (struct spa_system *object, int fd, void *buf, size_t count)
SPA_API_SYSTEM ssize_t | spa_system_write (struct spa_system *object, int fd, const void *buf, size_t count)
SPA_API_SYSTEM int | spa_system_close (struct spa_system *object, int fd)
SPA_API_SYSTEM int | spa_system_clock_gettime (struct spa_system *object, int clockid, struct timespec *value)
SPA_API_SYSTEM int | spa_system_clock_getres (struct spa_system *object, int clockid, struct timespec *res)
SPA_API_SYSTEM int | spa_system_pollfd_create (struct spa_system *object, int flags)
SPA_API_SYSTEM int | spa_system_pollfd_add (struct spa_system *object, int pfd, int fd, uint32_t events, void *data)
SPA_API_SYSTEM int | spa_system_pollfd_mod (struct spa_system *object, int pfd, int fd, uint32_t events, void *data)
SPA_API_SYSTEM int | spa_system_pollfd_del (struct spa_system *object, int pfd, int fd)
SPA_API_SYSTEM int | spa_system_pollfd_wait (struct spa_system *object, int pfd, struct spa_poll_event *ev, int n_ev, int timeout)
SPA_API_SYSTEM int | spa_system_timerfd_create (struct spa_system *object, int clockid, int flags)
SPA_API_SYSTEM int | spa_system_timerfd_settime (struct spa_system *object, int fd, int flags, const struct itimerspec *new_value, struct itimerspec *old_value)
SPA_API_SYSTEM int | spa_system_timerfd_gettime (struct spa_system *object, int fd, struct itimerspec *curr_value)
SPA_API_SYSTEM int | spa_system_timerfd_read (struct spa_system *object, int fd, uint64_t *expirations)
SPA_API_SYSTEM int | spa_system_eventfd_create (struct spa_system *object, int flags)
SPA_API_SYSTEM int | spa_system_eventfd_write (struct spa_system *object, int fd, uint64_t count)
SPA_API_SYSTEM int | spa_system_eventfd_read (struct spa_system *object, int fd, uint64_t *count)
SPA_API_SYSTEM int | spa_system_signalfd_create (struct spa_system *object, int signal, int flags)
SPA_API_SYSTEM int | spa_system_signalfd_read (struct spa_system *object, int fd, int *signal)

## Detailed Description

I/O, clock, polling, timer, and signal interfaces.

## Macro Definition Documentation

## SPA_TYPE_INTERFACE_System

#define SPA_TYPE_INTERFACE_System SPA_TYPE_INFO_INTERFACE_BASE "System"

a collection of core system functions

Examples
  local-v4l2.c, spa/examples/adapter-control.c, spa/examples/example-control.c, spa/examples/local-libcamera.c, spa/examples/local-v4l2.c, and spa/examples/local-videotestsrc.c.

## SPA_TYPE_INTERFACE_DataSystem

#define SPA_TYPE_INTERFACE_DataSystem SPA_TYPE_INFO_INTERFACE_BASE "DataSystem"

Examples
  spa/examples/adapter-control.c, spa/examples/example-control.c, and spa/examples/local-videotestsrc.c.

## SPA_VERSION_SYSTEM

#define SPA_VERSION_SYSTEM 0

## SPA_IO_IN

#define SPA_IO_IN (1 << 0)

## SPA_IO_OUT

#define SPA_IO_OUT (1 << 2)

## SPA_IO_ERR

#define SPA_IO_ERR (1 << 3)

## SPA_IO_HUP

#define SPA_IO_HUP (1 << 4)

## SPA_FD_CLOEXEC

#define SPA_FD_CLOEXEC (1<<0)

Examples
  audio-src-ring2.c.

## SPA_FD_NONBLOCK

#define SPA_FD_NONBLOCK (1<<1)

## SPA_FD_EVENT_SEMAPHORE

#define SPA_FD_EVENT_SEMAPHORE (1<<2)

## SPA_FD_TIMER_ABSTIME

#define SPA_FD_TIMER_ABSTIME (1<<3)

## SPA_FD_TIMER_CANCEL_ON_SET

#define SPA_FD_TIMER_CANCEL_ON_SET (1<<4)

## SPA_VERSION_SYSTEM_METHODS

#define SPA_VERSION_SYSTEM_METHODS 0

## spa_system_ioctl

#define spa_system_ioctl | ( |  | object,
|  |  | fd,
|  |  | request,
|  |  | ... )

Value:
spa_api_method_fast_r(int, -ENOTSUP, spa_system, &object->iface, ioctl, 0, fd, request, ##__VA_ARGS__)
spa_api_method_fast_r
#define spa_api_method_fast_r(rtype, def, type, o, method, version,...)
Definition hook.h:325
spa_system
Definition system.h:56
spa_system::iface
struct spa_interface iface
Definition system.h:56

## Function Documentation

## spa_system_read()

SPA_API_SYSTEM ssize_t spa_system_read | ( | struct spa_system * | object,
|  | int | fd,
|  | void * | buf,
|  | size_t | count )

## spa_system_write()

SPA_API_SYSTEM ssize_t spa_system_write | ( | struct spa_system * | object,
|  | int | fd,
|  | const void * | buf,
|  | size_t | count )

## spa_system_close()

SPA_API_SYSTEM int spa_system_close | ( | struct spa_system * | object,
|  | int | fd )

## spa_system_clock_gettime()

SPA_API_SYSTEM int spa_system_clock_gettime | ( | struct spa_system * | object,
|  | int | clockid,
|  | struct timespec * | value )

## spa_system_clock_getres()

SPA_API_SYSTEM int spa_system_clock_getres | ( | struct spa_system * | object,
|  | int | clockid,
|  | struct timespec * | res )

## spa_system_pollfd_create()

SPA_API_SYSTEM int spa_system_pollfd_create | ( | struct spa_system * | object,
|  | int | flags )

## spa_system_pollfd_add()

SPA_API_SYSTEM int spa_system_pollfd_add | ( | struct spa_system * | object,
|  | int | pfd,
|  | int | fd,
|  | uint32_t | events,
|  | void * | data )

## spa_system_pollfd_mod()

SPA_API_SYSTEM int spa_system_pollfd_mod | ( | struct spa_system * | object,
|  | int | pfd,
|  | int | fd,
|  | uint32_t | events,
|  | void * | data )

## spa_system_pollfd_del()

SPA_API_SYSTEM int spa_system_pollfd_del | ( | struct spa_system * | object,
|  | int | pfd,
|  | int | fd )

## spa_system_pollfd_wait()

SPA_API_SYSTEM int spa_system_pollfd_wait | ( | struct spa_system * | object,
|  | int | pfd,
|  | struct spa_poll_event * | ev,
|  | int | n_ev,
|  | int | timeout )

## spa_system_timerfd_create()

SPA_API_SYSTEM int spa_system_timerfd_create | ( | struct spa_system * | object,
|  | int | clockid,
|  | int | flags )

## spa_system_timerfd_settime()

SPA_API_SYSTEM int spa_system_timerfd_settime | ( | struct spa_system * | object,
|  | int | fd,
|  | int | flags,
|  | const struct itimerspec * | new_value,
|  | struct itimerspec * | old_value )

## spa_system_timerfd_gettime()

SPA_API_SYSTEM int spa_system_timerfd_gettime | ( | struct spa_system * | object,
|  | int | fd,
|  | struct itimerspec * | curr_value )

## spa_system_timerfd_read()

SPA_API_SYSTEM int spa_system_timerfd_read | ( | struct spa_system * | object,
|  | int | fd,
|  | uint64_t * | expirations )

## spa_system_eventfd_create()

SPA_API_SYSTEM int spa_system_eventfd_create | ( | struct spa_system * | object,
|  | int | flags )

Examples
  audio-src-ring2.c.

## spa_system_eventfd_write()

SPA_API_SYSTEM int spa_system_eventfd_write | ( | struct spa_system * | object,
|  | int | fd,
|  | uint64_t | count )

Examples
  audio-src-ring2.c.

## spa_system_eventfd_read()

SPA_API_SYSTEM int spa_system_eventfd_read | ( | struct spa_system * | object,
|  | int | fd,
|  | uint64_t * | count )

Examples
  audio-src-ring2.c.

## spa_system_signalfd_create()

SPA_API_SYSTEM int spa_system_signalfd_create | ( | struct spa_system * | object,
|  | int | signal,
|  | int | flags )

## spa_system_signalfd_read()

SPA_API_SYSTEM int spa_system_signalfd_read | ( | struct spa_system * | object,
|  | int | fd,
|  | int * | signal )