MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Toggle main menu visibility
Loading...
Searching...
No Matches
include
maplibre_native_c
platform
linux.h
Go to the documentation of this file.
1
5
6
#ifndef MAPLIBRE_NATIVE_C_PLATFORM_LINUX_H
7
#define MAPLIBRE_NATIVE_C_PLATFORM_LINUX_H
8
9
#include <stddef.h>
10
#include <stdint.h>
11
12
#include "
../base.h
"
13
#include "
../completion.h
"
14
#include "
../map.h
"
15
#include "
../render_session.h
"
16
#include "
../render_target.h
"
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
23
typedef
struct
mln_dma_buf_format
{
25
uint32_t
fourcc
;
27
uint64_t
modifier
;
28
}
mln_dma_buf_format
;
29
40
typedef
struct
mln_dma_buf_ring_descriptor
{
41
uint32_t
size
;
42
mln_logical_size
logical_size
MLN_BINDING(
"required=true"
);
44
uint32_t
buffer_count
MLN_BINDING(
"required=true"
);
49
const
mln_dma_buf_format
*
formats
50
MLN_BINDING(
"length=format_count;required=true"
);
51
size_t
format_count
;
52
}
mln_dma_buf_ring_descriptor
;
53
55
typedef
struct
mln_dma_buf_plane
{
60
int32_t
fd
;
62
uint32_t
offset
;
64
uint32_t
stride
;
65
}
mln_dma_buf_plane
;
66
68
typedef
struct
mln_dma_buf_frame
{
69
uint32_t
size
;
70
uint32_t
width
;
71
uint32_t
height
;
72
double
scale_factor
;
74
uint32_t
slot
;
75
uint32_t
fourcc
;
76
uint64_t
modifier
;
82
const
mln_dma_buf_plane
*
planes
83
MLN_BINDING(
"length=plane_count;lifetime=owner"
);
84
size_t
plane_count
;
85
}
mln_dma_buf_frame
;
86
114
MLN_BINDING(
"execution=lifecycle;platforms=freebsd,linux"
)
115
MLN_API
mln_status
mln_map_attach_dma_buf_ring
(
116
mln_map
map, const
mln_dma_buf_ring_descriptor
* descriptor,
117
mln_vulkan_device
device MLN_BINDING(
"nullable=true"
),
118
const
mln_render_session_attach_options
* options,
119
mln_render_session
* out_session MLN_BINDING(
"direction=out"
),
120
const
mln_completion
* completion,
mln_diagnostic
* out_diagnostic
121
) MLN_NOEXCEPT;
122
145
MLN_BINDING(
"view_owner=frame;platforms=freebsd,linux"
)
146
MLN_API
mln_status
mln_acquired_frame_get_dma_buf
(
147
mln_acquired_frame
frame,
148
mln_dma_buf_frame
* out_frame MLN_BINDING(
"direction=out"
),
149
mln_diagnostic
* out_diagnostic
150
) MLN_NOEXCEPT;
151
152
#ifdef __cplusplus
153
}
154
#endif
155
156
#endif
// MAPLIBRE_NATIVE_C_PLATFORM_LINUX_H
base.h
mln_render_session
uint64_t mln_render_session
Definition
base.h:147
mln_map
uint64_t mln_map
Definition
base.h:112
mln_vulkan_device
uint64_t mln_vulkan_device
Definition
base.h:127
mln_acquired_frame
uint64_t mln_acquired_frame
Definition
base.h:154
mln_status
mln_status
Definition
base.h:41
completion.h
mln_map_attach_dma_buf_ring
mln_status mln_map_attach_dma_buf_ring(mln_map map, const mln_dma_buf_ring_descriptor *descriptor, mln_vulkan_device device, const mln_render_session_attach_options *options, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_acquired_frame_get_dma_buf
mln_status mln_acquired_frame_get_dma_buf(mln_acquired_frame frame, mln_dma_buf_frame *out_frame, mln_diagnostic *out_diagnostic)
map.h
render_session.h
render_target.h
mln_completion
Definition
completion.h:66
mln_diagnostic
Definition
base.h:84
mln_dma_buf_format
Definition
linux.h:23
mln_dma_buf_format::fourcc
uint32_t fourcc
Definition
linux.h:25
mln_dma_buf_format::modifier
uint64_t modifier
Definition
linux.h:27
mln_dma_buf_frame
Definition
linux.h:68
mln_dma_buf_frame::height
uint32_t height
Definition
linux.h:71
mln_dma_buf_frame::width
uint32_t width
Definition
linux.h:70
mln_dma_buf_frame::plane_count
size_t plane_count
Definition
linux.h:84
mln_dma_buf_frame::planes
const mln_dma_buf_plane * planes
Definition
linux.h:83
mln_dma_buf_frame::size
uint32_t size
Definition
linux.h:69
mln_dma_buf_frame::modifier
uint64_t modifier
Definition
linux.h:76
mln_dma_buf_frame::scale_factor
double scale_factor
Definition
linux.h:72
mln_dma_buf_frame::fourcc
uint32_t fourcc
Definition
linux.h:75
mln_dma_buf_frame::slot
uint32_t slot
Definition
linux.h:74
mln_dma_buf_plane
Definition
linux.h:55
mln_dma_buf_plane::stride
uint32_t stride
Definition
linux.h:64
mln_dma_buf_plane::fd
int32_t fd
Definition
linux.h:60
mln_dma_buf_plane::offset
uint32_t offset
Definition
linux.h:62
mln_dma_buf_ring_descriptor
Definition
linux.h:40
mln_dma_buf_ring_descriptor::formats
const mln_dma_buf_format * formats
Definition
linux.h:50
mln_dma_buf_ring_descriptor::format_count
size_t format_count
Definition
linux.h:51
mln_dma_buf_ring_descriptor::logical_size
mln_logical_size logical_size
Definition
linux.h:42
mln_dma_buf_ring_descriptor::buffer_count
uint32_t buffer_count
Definition
linux.h:44
mln_dma_buf_ring_descriptor::size
uint32_t size
Definition
linux.h:41
mln_logical_size
Definition
map.h:196
mln_render_session_attach_options
Definition
render_target.h:125
Generated by
1.18.0