constants.go RawHistoryFolder
1package spa
2
3// Media type constants for SPA media types.
4const (
5 MediaTypeUnknown = 0
6 MediaTypeAudio = 1
7 MediaTypeVideo = 2
8 MediaTypeImage = 3
9 MediaTypeBinary = 4
10 MediaTypeStream = 5
11 MediaTypeApplication = 6
12)
13
14// Direction constants for port directions.
15const (
16 DirectionInput = 0
17 DirectionOutput = 1
18)
19
20// SPA pod types (spa/utils/type.h).
21const (
22 TypeId = 3
23 TypeInt = 4
24 TypeRectangle = 10
25 TypeFraction = 11
26 TypeObject = 15
27 TypeChoice = 19
28
29 TypeObjectFormat = 0x40003 // SPA_TYPE_OBJECT_Format
30 TypeObjectParamBuffers = 0x40004 // SPA_TYPE_OBJECT_ParamBuffers
31 TypeObjectParamMeta = 0x40005 // SPA_TYPE_OBJECT_ParamMeta
32)
33
34// SPA choice types (spa/utils/defs.h).
35const (
36 ChoiceNone = 0
37 ChoiceRange = 1
38 ChoiceEnum = 3
39 ChoiceFlags = 4
40)
41
42// SPA param ids (spa/param/param.h).
43const (
44 ParamEnumFormat = 3
45 ParamFormat = 4
46 ParamBuffers = 5
47 ParamMeta = 6
48)
49
50// SPA format property keys (spa/param/format.h).
51const (
52 FormatKeyMediaType = 1
53 FormatKeyMediaSubtype = 2
54 FormatKeyVideoFormat = 0x20001
55 FormatKeyVideoModifier = 0x20002
56 FormatKeyVideoSize = 0x20003
57 FormatKeyVideoFramerate = 0x20004
58 FormatKeyVideoMaxRate = 0x20005
59)
60
61// SPA media subtypes (spa/param/format.h).
62const MediaSubtypeRaw = 1
63
64// SPA buffers param keys (spa/param/buffers.h).
65const (
66 BuffersKeyBuffers = 1
67 BuffersKeyBlocks = 2
68 BuffersKeySize = 3
69 BuffersKeyStride = 4
70 BuffersKeyAlign = 5
71 BuffersKeyDataType = 6
72)
73
74// SPA meta param keys (spa/param/buffers.h) and meta types (spa/buffer/meta.h).
75const (
76 MetaKeyType = 1
77 MetaKeySize = 2
78
79 MetaTypeHeader = 1 // SPA_META_Header
80 MetaHeaderSize = 32 // sizeof(struct spa_meta_header)
81)
82
83// SPA data types (spa/buffer/buffer.h) and flags.
84const (
85 DataMemFd = 2
86 DataDmaBuf = 3
87
88 DataFlagReadWrite = 3 // SPA_DATA_FLAG_READWRITE
89
90 ChunkFlagCorrupted = 1 // SPA_CHUNK_FLAG_CORRUPTED
91 MetaHeaderFlagCorrupted = 2 // SPA_META_HEADER_FLAG_CORRUPTED
92 IDInvalid = 0xffffffff // SPA_ID_INVALID
93)
94
95// SPA raw video formats (spa/param/video/raw.h).
96type VideoFormat uint32
97
98const (
99 VideoFormatBGRx VideoFormat = 8
100 VideoFormatBGRA VideoFormat = 12
101)