PipeWire 1.6.8

Loading...
Searching...
No Matches
type-info.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_BUFFER_TYPES_H
6#define SPA_BUFFER_TYPES_H
7
8#include <spa/buffer/buffer.h>
9#include <spa/buffer/meta.h>
10#include <spa/utils/type.h>
11
16
17#ifdef __cplusplus
18 extern "C" {
19#endif
20
21#define SPA_TYPE_INFO_Buffer SPA_TYPE_INFO_POINTER_BASE "Buffer"
22#define SPA_TYPE_INFO_BUFFER_BASE SPA_TYPE_INFO_Buffer ":"
23
25#define SPA_TYPE_INFO_Data SPA_TYPE_INFO_ENUM_BASE "Data"
26#define SPA_TYPE_INFO_DATA_BASE SPA_TYPE_INFO_Data ":"
27
29#define SPA_TYPE_INFO_DATA_Fd SPA_TYPE_INFO_DATA_BASE "Fd"
30#define SPA_TYPE_INFO_DATA_FD_BASE SPA_TYPE_INFO_DATA_Fd ":"
31
32 static const struct spa_type_info spa_type_data_type[] = {
33 { SPA_DATA_Invalid, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_BASE "Invalid", NULL },
34 { SPA_DATA_MemPtr, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_BASE "MemPtr", NULL },
35 { SPA_DATA_MemFd, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_FD_BASE "MemFd", NULL },
36 { SPA_DATA_DmaBuf, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_FD_BASE "DmaBuf", NULL },
37 { SPA_DATA_MemId, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_BASE "MemId", NULL },
38 { SPA_DATA_SyncObj, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_BASE "SyncObj", NULL },
39 { 0, 0, NULL, NULL },
40};
41
42#define SPA_TYPE_INFO_Meta SPA_TYPE_INFO_POINTER_BASE "Meta"
43#define SPA_TYPE_INFO_META_BASE SPA_TYPE_INFO_Meta ":"
44
45#define SPA_TYPE_INFO_META_Array SPA_TYPE_INFO_META_BASE "Array"
46#define SPA_TYPE_INFO_META_ARRAY_BASE SPA_TYPE_INFO_META_Array ":"
47
48#define SPA_TYPE_INFO_META_Region SPA_TYPE_INFO_META_BASE "Region"
49#define SPA_TYPE_INFO_META_REGION_BASE SPA_TYPE_INFO_META_Region ":"
50
51#define SPA_TYPE_INFO_META_ARRAY_Region SPA_TYPE_INFO_META_ARRAY_BASE "Region"
52#define SPA_TYPE_INFO_META_ARRAY_REGION_BASE SPA_TYPE_INFO_META_ARRAY_Region ":"
53
54/* VideoTransform meta */
55#define SPA_TYPE_INFO_META_Transformation SPA_TYPE_INFO_ENUM_BASE "Meta:Transformation"
56#define SPA_TYPE_INFO_META_TRANSFORMATION_BASE SPA_TYPE_INFO_META_Transformation ":"
57
58 static const struct spa_type_info spa_type_meta_videotransform_type[] = {
59 { SPA_META_TRANSFORMATION_None, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "None", NULL },
60 { SPA_META_TRANSFORMATION_90, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "90", NULL },
61 { SPA_META_TRANSFORMATION_180, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "180", NULL },
62 { SPA_META_TRANSFORMATION_270, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "270", NULL },
63 { SPA_META_TRANSFORMATION_Flipped, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "Flipped", NULL },
64 { SPA_META_TRANSFORMATION_Flipped90, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "Flipped90", NULL },
65 { SPA_META_TRANSFORMATION_Flipped180, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "Flipped180", NULL },
66 { SPA_META_TRANSFORMATION_Flipped270, SPA_TYPE_Int, SPA_TYPE_INFO_META_TRANSFORMATION_BASE "Flipped270", NULL },
67 { 0, 0, NULL, NULL },
68};
69
70 static const struct spa_type_info spa_type_meta_type[] = {
71 { SPA_META_Invalid, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Invalid", NULL },
72 { SPA_META_Header, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Header", NULL },
73 { SPA_META_VideoCrop, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_REGION_BASE "VideoCrop", NULL },
74 { SPA_META_VideoDamage, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_ARRAY_REGION_BASE "VideoDamage", NULL },
75 { SPA_META_Bitmap, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Bitmap", NULL },
76 { SPA_META_Cursor, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Cursor", NULL },
77 { SPA_META_Control, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Control", NULL },
78 { SPA_META_Busy, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Busy", NULL },
79 { SPA_META_VideoTransform, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "VideoTransform", NULL },
80 { SPA_META_SyncTimeline, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "SyncTimeline", NULL },
81 { 0, 0, NULL, NULL },
82};
83
87
88#ifdef __cplusplus
89} /* extern "C" */
90#endif
91
92#endif /* SPA_BUFFER_TYPES_H */
buffer.h
spa/buffer/buffer.h
spa_type_meta_videotransform_type
static const struct spa_type_info spa_type_meta_videotransform_type[]
Definition type-info.h:79
SPA_TYPE_INFO_META_REGION_BASE
#define SPA_TYPE_INFO_META_REGION_BASE
Definition type-info.h:66
SPA_TYPE_INFO_DATA_FD_BASE
#define SPA_TYPE_INFO_DATA_FD_BASE
Definition type-info.h:41
SPA_TYPE_INFO_META_TRANSFORMATION_BASE
#define SPA_TYPE_INFO_META_TRANSFORMATION_BASE
Definition type-info.h:77
spa_type_data_type
static const struct spa_type_info spa_type_data_type[]
Definition type-info.h:43
SPA_TYPE_INFO_META_BASE
#define SPA_TYPE_INFO_META_BASE
Definition type-info.h:56
SPA_TYPE_INFO_META_ARRAY_REGION_BASE
#define SPA_TYPE_INFO_META_ARRAY_REGION_BASE
Definition type-info.h:71
SPA_TYPE_INFO_DATA_BASE
#define SPA_TYPE_INFO_DATA_BASE
Definition type-info.h:35
spa_type_meta_type
static const struct spa_type_info spa_type_meta_type[]
Definition type-info.h:91
SPA_META_TRANSFORMATION_Flipped270
@ SPA_META_TRANSFORMATION_Flipped270
flip then rotate around 270 degree counter-clockwise
Definition meta.h:187
SPA_META_TRANSFORMATION_Flipped
@ SPA_META_TRANSFORMATION_Flipped
180 degree flipped around the vertical axis.
Definition meta.h:182
SPA_META_TRANSFORMATION_270
@ SPA_META_TRANSFORMATION_270
270 degree counter-clockwise
Definition meta.h:181
SPA_META_TRANSFORMATION_Flipped180
@ SPA_META_TRANSFORMATION_Flipped180
flip then rotate around 180 degree counter-clockwise
Definition meta.h:186
SPA_META_TRANSFORMATION_Flipped90
@ SPA_META_TRANSFORMATION_Flipped90
flip then rotate around 90 degree counter-clockwise
Definition meta.h:185
SPA_META_TRANSFORMATION_None
@ SPA_META_TRANSFORMATION_None
no transform
Definition meta.h:178
SPA_META_TRANSFORMATION_90
@ SPA_META_TRANSFORMATION_90
90 degree counter-clockwise
Definition meta.h:179
SPA_META_TRANSFORMATION_180
@ SPA_META_TRANSFORMATION_180
180 degree counter-clockwise
Definition meta.h:180
SPA_META_VideoDamage
@ SPA_META_VideoDamage
array of struct spa_meta_region with damage, where an invalid entry or end-of-array marks the end.
Definition meta.h:39
SPA_META_Bitmap
@ SPA_META_Bitmap
struct spa_meta_bitmap
Definition meta.h:40
SPA_META_VideoTransform
@ SPA_META_VideoTransform
struct spa_meta_transform
Definition meta.h:45
SPA_META_Cursor
@ SPA_META_Cursor
struct spa_meta_cursor
Definition meta.h:41
SPA_META_Busy
@ SPA_META_Busy
don't write to buffer when count > 0
Definition meta.h:44
SPA_META_VideoCrop
@ SPA_META_VideoCrop
struct spa_meta_region with cropping data
Definition meta.h:38
SPA_META_SyncTimeline
@ SPA_META_SyncTimeline
struct spa_meta_sync_timeline
Definition meta.h:46
SPA_META_Header
@ SPA_META_Header
struct spa_meta_header
Definition meta.h:37
SPA_META_Control
@ SPA_META_Control
metadata contains a spa_meta_control associated with the data
Definition meta.h:42
SPA_META_Invalid
@ SPA_META_Invalid
Definition meta.h:36
SPA_DATA_MemFd
@ SPA_DATA_MemFd
memfd, mmap to get to memory.
Definition buffer.h:45
SPA_DATA_MemPtr
@ SPA_DATA_MemPtr
pointer to memory, the data field in struct spa_data is set.
Definition buffer.h:43
SPA_DATA_SyncObj
@ SPA_DATA_SyncObj
a syncobj, usually requires a spa_meta_sync_timeline metadata with timeline points.
Definition buffer.h:52
SPA_DATA_Invalid
@ SPA_DATA_Invalid
Definition buffer.h:42
SPA_DATA_MemId
@ SPA_DATA_MemId
memory is identified with an id.
Definition buffer.h:49
SPA_DATA_DmaBuf
@ SPA_DATA_DmaBuf
fd to dmabuf memory.
Definition buffer.h:46
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition type.h:45
SPA_TYPE_Pointer
@ SPA_TYPE_Pointer
Definition type.h:58
meta.h
spa/buffer/meta.h
type.h
spa/utils/type.h
spa_type_info
Definition type.h:156