PipeWire: Result handling

PipeWire 0.3.51

Files | Macros
Result handling
SPA » Utilities

Asynchronous result utilities. More...

## Files
file | result.h
| `spa/utils/result.h`

## Macros
#define | SPA_ASYNC_BIT (1 << 30)
#define | SPA_ASYNC_SEQ_MASK (SPA_ASYNC_BIT - 1)
#define | SPA_ASYNC_MASK (~SPA_ASYNC_SEQ_MASK)
#define | SPA_RESULT_IS_OK(res) ((res) >= 0)
#define | SPA_RESULT_IS_ERROR(res) ((res) < 0)
#define | SPA_RESULT_IS_ASYNC(res) (((res) & SPA_ASYNC_MASK) == SPA_ASYNC_BIT)
#define | SPA_RESULT_ASYNC_SEQ(res) ((res) & SPA_ASYNC_SEQ_MASK)
#define | SPA_RESULT_RETURN_ASYNC(seq) (SPA_ASYNC_BIT | SPA_RESULT_ASYNC_SEQ(seq))
#define | spa_strerror(err)

## Detailed Description

Asynchronous result utilities.

## Macro Definition Documentation

## ◆ SPA_ASYNC_BIT

#define SPA_ASYNC_BIT (1 << 30)

## ◆ SPA_ASYNC_SEQ_MASK

#define SPA_ASYNC_SEQ_MASK (SPA_ASYNC_BIT - 1)

## ◆ SPA_ASYNC_MASK

#define SPA_ASYNC_MASK (~SPA_ASYNC_SEQ_MASK)

## ◆ SPA_RESULT_IS_OK

#define SPA_RESULT_IS_OK | ( |  | res | ) | ((res) >= 0)

## ◆ SPA_RESULT_IS_ERROR

#define SPA_RESULT_IS_ERROR | ( |  | res | ) | ((res) < 0)

## ◆ SPA_RESULT_IS_ASYNC

#define SPA_RESULT_IS_ASYNC | ( |  | res | ) | (((res) & SPA_ASYNC_MASK) == SPA_ASYNC_BIT)

## ◆ SPA_RESULT_ASYNC_SEQ

#define SPA_RESULT_ASYNC_SEQ | ( |  | res | ) | ((res) & SPA_ASYNC_SEQ_MASK)

## ◆ SPA_RESULT_RETURN_ASYNC

#define SPA_RESULT_RETURN_ASYNC | ( |  | seq | ) | (SPA_ASYNC_BIT | SPA_RESULT_ASYNC_SEQ(seq))

## ◆ spa_strerror

#define spa_strerror | ( |  | err | ) |

Examples
  bluez-session.c, export-sink.c, export-source.c, export-spa-device.c, export-spa.c, spa/examples/adapter-control.c, spa/examples/example-control.c, spa/examples/local-libcamera.c, spa/examples/local-v4l2.c, video-play-fixate.c, video-play-pull.c, video-play-reneg.c, and video-play.c.