anbox-platform-sdk  1.23.0
Anbox Platform SDK API documentation
types.h
Go to the documentation of this file.
1 /*
2  * This file is part of Anbox Platform SDK
3  *
4  * Copyright 2021 Canonical Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef ANBOX_SDK_TYPES_H_
20 #define ANBOX_SDK_TYPES_H_
21 
22 #include <stdint.h>
23 #include <stddef.h>
24 #include <unistd.h>
25 
26 #include <linux/limits.h>
27 #include <linux/input.h>
28 
29 #include <EGL/egl.h>
30 
31 #define MAX_NAME_LENGTH 100
32 #define MAX_STRING_LENGTH 256
33 #define MAX_VHAL_AREA_NAME_LENGTH 32
34 
39 #define ANBOX_PLATFORM_DESCRIPTOR_SECTION ".anbox_platform_descriptor_section"
40 
45 typedef struct {
51  uint32_t width;
52 
58  uint32_t height;
59 
67  uint32_t density;
69 
74 typedef struct {
80  uint32_t width;
81 
87  uint32_t height;
88 
96  uint32_t density;
97 
103  uint32_t fps;
105 
111 typedef enum {
125 
126 /* The audio_format_*_sub_fmt_t declarations are not currently used */
127 
139 typedef enum {
141  AUDIO_FORMAT_INVALID = 0xFFFFFFFFUL,
144  /* DO NOT CHANGE */
146  AUDIO_FORMAT_PCM = 0x00000000UL,
147 
148  /* Aliases */
149  /* note != AudioFormat.ENCODING_PCM_16BIT */
153  /* note != AudioFormat.ENCODING_PCM_8BIT */
170 
174 typedef enum {
180 
190  uint32_t freq;
194  uint8_t channels;
196  uint16_t samples;
197 };
198 
204  char framework[PATH_MAX];
206  char hardware[PATH_MAX];
208  char vendor[PATH_MAX];
209 };
210 
214 typedef uintptr_t AnboxNativeHandle;
215 
219 typedef enum {
251 
255 typedef enum {
266 
273 typedef struct {
277  uint32_t width;
279  uint32_t height;
281  uint32_t stride;
283  uint32_t format;
285 
287 #define ANBOX_GRAPHICS_BUFFER_MAX_PLANES 4
288 
292 typedef struct {
294  uint32_t width;
296  uint32_t height;
298  uint32_t format;
300  uint64_t modifier;
302  uint8_t num_planes;
310 
314 typedef struct {
316  void (*callback)(void* user_data);
318  void* user_data;
319 } AnboxCallback;
320 
325 typedef enum : uint8_t {
326  /* Unknown graphics implementation */
328  /* Host rendering on the Anbox side */
330  /* Direct rendering inside the Android container */
333 
334 
338 typedef enum {
339  /* OpenGL ES 2.0 */
341  /* OpenGL ES 3.0 */
343  /* OpenGL ES 3.1 */
345  /* OpenGL ES 3.2 */
348 
352 typedef enum {
353  /* Vulkan is not supported */
355  /* Vulkan 1.0 */
357  /* Vulkan 1.1 */
359  /* Vulkan 1.2 */
361  /* Vulkan 1.3 */
364 
375 typedef struct {
376  /*
377  * Name of the vendor whichs OpenGL ES implementation Android should use. Value
378  * will be set to the `ro.hardware.egl` Android system property.
379  */
380  char gl_vendor[MAX_NAME_LENGTH];
381 
382  /* Maximum OpenGL ES version supported, see AnboxGraphicsOpenGLESVersion */
383  uint32_t gl_version;
384 
385  /*
386  * Name of the vendor whichs Vulkan implementation Android should use. Value will
387  * be set to the `ro.hardware.vulkan` Android system property.
388  */
389  char vulkan_vendor[MAX_NAME_LENGTH];
390 
391  /* Maximum Vulkan version supported, see AnboxGraphicsVulkanVersion */
392  uint32_t vulkan_version;
393 
394  /*
395  * Name of the gralloc implementation Android should use. Value will be set to the
396  * `ro.hardware.gralloc` Android system property.
397  */
398  char gralloc_vendor[MAX_NAME_LENGTH];
400 
401 /*
402  * @brief Defines the type of the value stored for a configuration item described by
403  * AnboxPlatformConfigurationItemInfo
404  */
405 typedef enum {
406  /* boolean value, represented as 8 bit unsigned integer type (uint8_t) where 0 = false and > 0 = true */
409 
410 /*
411  * @brief AnboxPlatformConfigurationItemInfo describes a single platform configuration item
412  *
413  * It allows the platform to define a set of configuration items which will remain transparent
414  * to Anbox but can be changed through it's /1.0/platform HTTP API endpoint at runtime.
415  */
416 typedef struct {
417  /* ID of the configuration item, must be >= PLATFORM_CONFIGURATION_ID_START and <= PLATFORM_CONFIGURATION_ID_END */
418  int id;
419  /* Name of the configuration item */
420  char name[MAX_NAME_LENGTH];
421  /* Type of the value the configuration item stores */
424 
425 /*
426  * @brief AnboxPlatformConfigurationInfo describes a set of platform specific
427  * configuration items.
428  *
429  * Anbox will query the platform for available configuration items and make
430  * them accessible through its /1.0/platform HTTP API endpoint. This allows
431  * runtime configuration of the platform.
432  */
433 typedef struct {
434  /* Number of available configuration items */
435  uint16_t num_items;
436  /* Available configuration items or NULL if none are available */
439 
447 typedef struct {
448  /* Number of Android system properties required by a platform*/
449  uint16_t size;
450  /* Array of Android system properties */
451  const char** properties;
453 
458 typedef enum {
467 
476 
485 
498 
510 
522 
534 
544 
545  /*
546  * List of supported video codecs supported by the video decoder implemented
547  * by the platform.
548  *
549  * Anbox will instruct it's HAL layer on the Android side to only exposed
550  * support for the codecs listed.
551  *
552  * The value of this configuration item is of type AnboxVideoCodecType[]
553  */
555 
556  /*
557  * The graphics implementation type defines how graphics acceleration will be
558  * provided to the Android container.
559  *
560  * Anbox supports different ways of exposing graphic acceleration to the Android
561  * container. Graphics acceleration can either be provided through a translation
562  * layer where all access to the GPU happens on the Anbox side and Android has
563  * no direct access to the GPU. Alternatively Android can get direct GPU access
564  * and perform all graphics acceleration directly.
565  *
566  * If not provided by a platform implementation, Anbox will default to
567  * ANBOX_GRAPHICS_IMPLEMENTATION_TYPE_HOST_RENDERING
568  *
569  * The value of this configuration item is of type `AnboxGraphicsImplementationType`
570  */
572 
573  /*
574  * Configuration details for direct graphics acceleration
575  *
576  * The platform can further detail on how nativ graphics acceleration will be
577  * made available inside the Android container. This allows defining GL/Vulkan
578  * driver implementation names and other things.
579  *
580  * The value of this configuration item is of type `AnboxDirectGraphicsConfiguration`
581  */
583 
584  /*
585  * Information about platform specific configuration options
586  *
587  * The value of this configuration is of type AnboxPlatformConfigurationInfo
588  */
590 
591  /*
592  * Base uid used in the Android contaienr
593  *
594  * The value of this configuration item is of type `uint32_t`.
595  */
597 
598  /*
599  * Path to Vulkan ICD to be used for host side rendering
600  *
601  * The value of this configuration item is of type `const char*`
602  */
604 
605  /*
606  * Path to the DRM render node Anbox should use for host side
607  * rendering.
608  *
609  * The value of this configuration item is of type `const char*`
610  */
612 
613  /*
614  * Whether the platform requires support for sw sync primitives or not.
615  *
616  * The value of this configuration item is of type `uint8_t` which
617  * represents a boolean value, encoded as 8 bit unsigned integer type
618  * (uint8_t) where 0 = false and > 0 = true
619  */
621 
622  /*
623  * Android system properties required to forward to Android container
624  *
625  * The value of this configuration item is of type `AnboxAndroidSystemProperties`
626  */
628 
629  /*
630  * The API defines a range of platform specific configuration items which can be
631  * dynamically exposed by the platform. PLATFORM_CONFIGURATION_START specifies
632  * the first configuration item id.
633  */
635 
636  /*
637  * The API defines a range of platform specific configuration items which can be
638  * dynamically exposed by the platform. PLATFORM_CONFIGURATION_END specifies
639  * the last configuration item id.
640  */
643 
649 };
650 
656  const char name[MAX_STRING_LENGTH];
663 };
664 
668 typedef enum {
676 
680 typedef enum {
682  PORTRAIT = 0,
690 
694 typedef enum {
702 
706 typedef enum {
712 
716 typedef enum {
722 
732  uint32_t fps;
734  uint32_t width;
736  uint32_t height;
737 };
738 
744  uint8_t* data;
746  size_t size;
747 };
748 
749 #define GNSS_MAX_MEASUREMENT 64
750 
752 typedef int64_t GpsUtcTime;
753 
757 typedef enum : uint8_t {
758  UNKNOWN = 0,
759  GPS = 1,
760  SBAS = 2,
761  GLONASS = 3,
762  QZSS = 4,
763  BEIDOU = 5,
764  GALILEO = 6,
766 
781 typedef enum : uint32_t {
783  STATE_CODE_LOCK = 1 << 0,
784  STATE_BIT_SYNC = 1 << 1,
796  STATE_SBAS_SYNC = 1 << 13,
797  STATE_TOW_KNOWN = 1 << 14,
800 
804 typedef enum : uint16_t {
806  HAS_LEAP_SECOND = 1 << 0,
810  HAS_FULL_BIAS = 1 << 2,
812  HAS_BIAS = 1 << 3,
816  HAS_DRIFT = 1 << 5,
818  HAS_DRIFT_UNCERTAINTY = 1 << 6
820 
835  int16_t svid;
836 
842 
850 
919 
926 
933  double c_n0_dbhz;
934 
961 
969 
978 };
979 
983 struct GnssClock {
1003  int64_t time_ns;
1004 
1020  int64_t full_bias_ns;
1021 
1031  double bias_ns;
1032 
1043 
1056  double drift_nsps;
1057 
1067 
1098 
1103 };
1111  double latitude;
1115  double longitude;
1119  double altitude;
1126 };
1127 
1135  char status;
1137  double latitude;
1141  double longitude;
1145  float speed;
1147  float bearing;
1154 };
1155 
1166 
1169 
1172 };
1173 
1174 
1178 typedef enum : uint32_t {
1180  Unknown = 1 << 0,
1182  GGA = 1 << 1,
1184  RMC = 1 << 2,
1187  GNSSv1 = 1 << 3,
1189 
1198  union {
1202  };
1203 };
1204 
1209 typedef enum {
1217 
1222 typedef enum {
1228 
1233 typedef struct {
1237  EGLNativeDisplayType native_display;
1238 
1243  EGLNativeWindowType native_window;
1244 
1251 
1260 
1270 
1275 typedef enum {
1277  POINTER = 0,
1285 
1296  int32_t device_id;
1299  uint16_t type;
1301  uint16_t code;
1304  int32_t value;
1305 };
1306 
1307 #define MAX_SENSOR_DATA_LENGTH 16
1308 #define MAX_VECTOR_DATA_LENGTH 3
1309 
1313 typedef enum : uint32_t {
1315  NONE = 0,
1317  ACCELERATION = 1 << 0,
1319  GYROSCOPE = 1 << 1,
1321  MAGNETOMETER = 1 << 2,
1323  ORIENTATION = 1 << 3,
1325  TEMPERATURE = 1 << 4,
1327  PROXIMITY = 1 << 5,
1329  LIGHT = 1 << 6,
1331  PRESSURE = 1 << 7,
1333  HUMIDITY = 1 << 8,
1334 } AnboxSensorType;
1335 
1341  union {
1344  struct {
1346  float x;
1348  float y;
1350  float z;
1351  } axis;
1352  struct {
1354  float azimuth;
1356  float pitch;
1358  float roll;
1360  };
1361 };
1362 
1369  union {
1382  float proximity;
1384  float light;
1386  float pressure;
1388  float humidity;
1389  };
1390 };
1391 
1398 typedef enum {
1403 
1411 typedef enum {
1423 
1431 typedef enum {
1437 
1443 typedef enum {
1448 
1458  int64_t timestamp;
1459  int32_t area_id;
1460  int32_t prop;
1463  int32_t* int32_values;
1467  int64_t* int64_values;
1468  uint32_t bytes_size;
1469  uint8_t* bytes;
1472 };
1473 
1488  int32_t area_id;
1497 };
1498 
1514  int32_t prop;
1521  int32_t* config_array;
1526  uint32_t prop_name_size;
1527  char* prop_name;
1528 };
1529 
1534 typedef enum {
1541 
1547  uint32_t configs_size;
1549 };
1550 
1556  int32_t prop_id;
1557  int32_t area_id;
1559  int32_t* int32_values;
1563  int64_t* int64_values;
1564  uint32_t bytes_size;
1565  uint8_t* bytes;
1568 };
1569 
1575  int32_t prop_id;
1576  int32_t area_id;
1579  int32_t* int32_values;
1583  int64_t* int64_values;
1584  uint32_t bytes_size;
1585  uint8_t* bytes;
1588 };
1589 
1593 typedef enum : uint8_t {
1595  /* H.264 / AVC */
1598 
1602 typedef enum : uint8_t {
1604  /* YUV420P */
1607 
1612  /* Target output width */
1613  uint32_t width = 0;
1614  /* Target output height */
1615  uint32_t height = 0;
1616  /* Expected output pixel format */
1618 };
1619 
1624  /* Pixel format of the image */
1626  /* Width of the image */
1627  uint32_t width = 0;
1628  /* Height of the image */
1629  uint32_t height = 0;
1630  /* Presentation timestmap of the image in milliseconds */
1631  int64_t pts = 0;
1632  /* Color matrix coefficients of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1633  uint8_t color_matrix = 0;
1634  /* Color primaries of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1635  uint8_t color_primaries = 0;
1636  /* Color transfer of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1637  uint8_t color_transfer = 0;
1638  /* Color range of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1639  uint8_t color_range = 0;
1640  /* Size of the image data */
1641  uint64_t size = 0;
1642  /* Data of the image */
1643  uint8_t* data = nullptr;
1644 };
1645 
1650 typedef const unsigned char* (*AnboxTracerGetCategoryEnabledFunc)(const char* name);
1651 
1655 typedef enum {
1661 
1662 
1666 typedef enum {
1675 
1690 typedef void (*AnboxTracerAddEventFunc)(
1691  char phase,
1692  const unsigned char* category,
1693  const char* name,
1694  unsigned long long id,
1695  int num_args,
1696  const char** arg_names,
1697  const unsigned char* arg_types,
1698  const unsigned long long* arg_values,
1699  unsigned char flags);
1700 
1701 #endif
AnboxAndroidSystemProperties describes the Android system properties provided by a platform to be for...
Definition: types.h:447
const char ** properties
Definition: types.h:451
The audio input/output format from anbox.
Definition: types.h:188
uint8_t channels
Definition: types.h:194
AnboxAudioFormat format
Definition: types.h:192
uint16_t samples
Definition: types.h:196
uint32_t freq
Definition: types.h:190
The struct of binder devices that being used in Android container.
Definition: types.h:202
char framework[PATH_MAX]
Definition: types.h:204
char vendor[PATH_MAX]
Definition: types.h:208
char hardware[PATH_MAX]
Definition: types.h:206
Generic callback wrapper.
Definition: types.h:314
void * user_data
Definition: types.h:318
AnboxCameraSpec represents the camera specification.
Definition: types.h:726
uint32_t fps
Definition: types.h:732
uint32_t height
Definition: types.h:736
uint32_t width
Definition: types.h:734
AnboxCameraFacingMode facing_mode
Definition: types.h:730
AnboxVideoColorSpaceFormat format
Definition: types.h:728
AnboxDirectGraphicsConfiguration defines how Anbox should configure the graphics implementation insid...
Definition: types.h:375
AnboxDisplaySpec2 describes properties of the virtual display Anbox creates for rendering.
Definition: types.h:74
uint32_t fps
Definition: types.h:103
uint32_t height
Definition: types.h:87
uint32_t width
Definition: types.h:80
uint32_t density
Definition: types.h:96
AnboxDisplaySpec describes properties of the virtual display Anbox creates for rendering.
Definition: types.h:45
uint32_t width
Definition: types.h:51
uint32_t density
Definition: types.h:67
uint32_t height
Definition: types.h:58
double longitude
Definition: types.h:1115
char latitudeHemi
Definition: types.h:1113
double altitude
Definition: types.h:1119
double latitude
Definition: types.h:1111
char longitudeHemi
Definition: types.h:1117
char altitudeUnit
Definition: types.h:1121
GpsUtcTime time
Definition: types.h:1109
float verticalAccuracy
Definition: types.h:1125
float horizontalAccuracy
Definition: types.h:1123
GnssClock clock
Definition: types.h:1165
GnssMeasurement measurements[GNSS_MAX_MEASUREMENT]
Definition: types.h:1171
size_t measurement_count
Definition: types.h:1168
AnboxGnssData gnss_data
Definition: types.h:1201
AnboxGGAData gga_data
Definition: types.h:1199
AnboxGpsDataType data_type
Definition: types.h:1197
AnboxRMCData rmc_data
Definition: types.h:1200
Graphics buffer.
Definition: types.h:292
uint8_t num_planes
Definition: types.h:302
uint64_t modifier
Definition: types.h:300
uint32_t format
Definition: types.h:298
uint32_t width
Definition: types.h:294
uint32_t height
Definition: types.h:296
Graphics buffer.
Definition: types.h:273
uint32_t width
Definition: types.h:277
uint32_t stride
Definition: types.h:281
AnboxNativeHandle handle
Definition: types.h:275
uint32_t format
Definition: types.h:283
uint32_t height
Definition: types.h:279
AnboxDisplaySpec describes properties of the Anbox rendering pipeline the platform plugin can influen...
Definition: types.h:1233
AnboxGraphicsFlipMode output_flip_mode
Definition: types.h:1250
EGLNativeDisplayType native_display
Definition: types.h:1237
EGLNativeWindowType native_window
Definition: types.h:1243
AnboxGraphicsTextureFormat texture_format
Definition: types.h:1259
AnboxInputEvent is similar to the input_event that is defined in the Linux kernel API....
Definition: types.h:1292
uint16_t code
Definition: types.h:1301
int32_t device_id
Definition: types.h:1296
uint16_t type
Definition: types.h:1299
int32_t value
Definition: types.h:1304
AnboxInputDeviceType device_type
Definition: types.h:1294
AnboxPlatformConfigurationItemInfo ** items
Definition: types.h:437
AnboxPlatformConfigurationItemValueType type
Definition: types.h:422
AnboxPlatformConfiguration holds platform configuration options which Anbox supplies to the platform ...
Definition: types.h:648
AnboxPlatformDescriptor provides information about the implemented platform.
Definition: types.h:654
uint32_t platform_version
Definition: types.h:662
const char vendor[MAX_STRING_LENGTH]
Definition: types.h:658
const char name[MAX_STRING_LENGTH]
Definition: types.h:656
const char description[MAX_STRING_LENGTH]
Definition: types.h:660
char latitudeHemi
Definition: types.h:1139
GpsUtcTime time
Definition: types.h:1133
float bearing
Definition: types.h:1147
double longitude
Definition: types.h:1141
char status
Definition: types.h:1135
float verticalAccuracy
Definition: types.h:1153
float horizontalAccuracy
Definition: types.h:1151
GpsUtcTime date
Definition: types.h:1149
double latitude
Definition: types.h:1137
char longitudeHemi
Definition: types.h:1143
float speed
Definition: types.h:1145
AnboxSensorData represents the sensor data stucture,.
Definition: types.h:1366
float temperature
Definition: types.h:1380
AnboxSensorVector gyroscope
Definition: types.h:1374
AnboxSensorVector orientation
Definition: types.h:1376
float humidity
Definition: types.h:1388
AnboxSensorVector magnetic
Definition: types.h:1378
float light
Definition: types.h:1384
AnboxSensorVector acceleration
Definition: types.h:1372
float pressure
Definition: types.h:1386
float proximity
Definition: types.h:1382
AnboxSensorType sensor_type
Definition: types.h:1368
float values[MAX_SENSOR_DATA_LENGTH]
Definition: types.h:1370
AnboxSensorVector represents acceleration along each device axis or current device rotation angles: a...
Definition: types.h:1340
float v[MAX_VECTOR_DATA_LENGTH]
Definition: types.h:1343
struct AnboxSensorVector::@2::@5 angle
struct AnboxSensorVector::@2::@4 axis
AnboxVhalAnswerGet contains the answer for a GetAllPropConfigs or GetPropConfigs request sent to the ...
Definition: types.h:1546
AnboxVhalPropertyConfig * configs
Definition: types.h:1548
AnboxVhalAreaConfig describes the configuration of a given area id for a VHAL property.
Definition: types.h:1487
int32_t min_int32_value
Definition: types.h:1489
float min_float_value
Definition: types.h:1493
char(* area_names)[MAX_VHAL_AREA_NAME_LENGTH]
Definition: types.h:1496
float max_float_value
Definition: types.h:1494
int64_t max_int64_value
Definition: types.h:1492
int64_t min_int64_value
Definition: types.h:1491
int32_t area_id
Definition: types.h:1488
int32_t max_int32_value
Definition: types.h:1490
uint32_t area_names_size
Definition: types.h:1495
AnboxVhalCommandGet describes a get request to send to the Android VHAL.
Definition: types.h:1555
int32_t area_id
Definition: types.h:1557
uint32_t string_value_size
Definition: types.h:1566
uint32_t int32_values_size
Definition: types.h:1558
int32_t * int32_values
Definition: types.h:1559
uint32_t float_values_size
Definition: types.h:1560
char * string_value
Definition: types.h:1567
int32_t prop_id
Definition: types.h:1556
uint32_t bytes_size
Definition: types.h:1564
uint8_t * bytes
Definition: types.h:1565
int64_t * int64_values
Definition: types.h:1563
float * float_values
Definition: types.h:1561
uint32_t int64_values_size
Definition: types.h:1562
AnboxVhalCommandSet describes a set request to send to the Android VHAL.
Definition: types.h:1574
uint32_t int64_values_size
Definition: types.h:1582
uint32_t int32_values_size
Definition: types.h:1578
int32_t * int32_values
Definition: types.h:1579
char * string_value
Definition: types.h:1587
uint8_t * bytes
Definition: types.h:1585
uint32_t string_value_size
Definition: types.h:1586
AnboxVhalPropertyStatus status
Definition: types.h:1577
int32_t area_id
Definition: types.h:1576
uint32_t float_values_size
Definition: types.h:1580
int64_t * int64_values
Definition: types.h:1583
int32_t prop_id
Definition: types.h:1575
uint32_t bytes_size
Definition: types.h:1584
float * float_values
Definition: types.h:1581
AnboxVhalPropertyConfig describes the configuration of a VHAL property.
Definition: types.h:1513
uint32_t config_array_size
Definition: types.h:1520
AnboxVhalPropertyChangeMode change_mode
Definition: types.h:1517
AnboxVhalPropertyType value_type
Definition: types.h:1515
AnboxVhalPropertyAccess access
Definition: types.h:1516
int32_t * config_array
Definition: types.h:1521
AnboxVhalAreaConfig * area_configs
Definition: types.h:1519
uint32_t config_string_size
Definition: types.h:1522
uint32_t area_configs_size
Definition: types.h:1518
uint32_t prop_name_size
Definition: types.h:1526
AnboxVhalPropertyValue describes the current value of a VHAL property, as returned by a get call to t...
Definition: types.h:1457
uint32_t float_values_size
Definition: types.h:1464
uint32_t string_value_size
Definition: types.h:1470
int64_t * int64_values
Definition: types.h:1467
uint32_t int64_values_size
Definition: types.h:1466
uint32_t bytes_size
Definition: types.h:1468
float * float_values
Definition: types.h:1465
uint32_t int32_values_size
Definition: types.h:1462
int32_t * int32_values
Definition: types.h:1463
AnboxVhalPropertyStatus status
Definition: types.h:1461
AnboxVideoDecoderConfig describes the configuration of a video decoder.
Definition: types.h:1611
AnboxVideoPixelFormat output_format
Definition: types.h:1617
AnboxVideoFrame represents a single complete video frame.
Definition: types.h:742
size_t size
Definition: types.h:746
uint8_t * data
Definition: types.h:744
AnboxVideoImage describes a decoded image returned by the video decoder.
Definition: types.h:1623
uint8_t color_range
Definition: types.h:1639
uint32_t width
Definition: types.h:1627
uint8_t * data
Definition: types.h:1643
uint8_t color_matrix
Definition: types.h:1633
uint8_t color_primaries
Definition: types.h:1635
uint64_t size
Definition: types.h:1641
uint32_t height
Definition: types.h:1629
AnboxVideoPixelFormat pixel_format
Definition: types.h:1625
uint8_t color_transfer
Definition: types.h:1637
int64_t pts
Definition: types.h:1631
uint32_t hw_clock_discontinuity_count
Definition: types.h:1097
int64_t time_ns
Definition: types.h:1003
double drift_nsps
Definition: types.h:1056
double bias_ns
Definition: types.h:1031
GnssClockFlags flags
Definition: types.h:1102
double bias_uncertainty_ns
Definition: types.h:1042
int64_t full_bias_ns
Definition: types.h:1020
double drift_uncertainty_nsps
Definition: types.h:1066
double pseudorange_rate_uncertainty_mps
Definition: types.h:968
GnssMeasurementState state
Definition: types.h:849
float carrier_frequency_hz
Definition: types.h:977
double c_n0_dbhz
Definition: types.h:933
int16_t svid
Definition: types.h:835
GnssConstellationType constellation
Definition: types.h:841
double pseudorange_rate_mps
Definition: types.h:960
int64_t received_sv_time_in_ns
Definition: types.h:918
int64_t received_sv_time_uncertainty_in_ns
Definition: types.h:925
AnboxVhalPropertyChangeMode
AnboxVhalPropertyChangeMode describes how the property changes.
Definition: types.h:1443
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_CONTINUOUS
Definition: types.h:1446
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_ON_CHANGE
Definition: types.h:1445
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_STATIC
Definition: types.h:1444
AnboxGraphicsBufferUsage
Definition: types.h:255
@ ANBOX_GRAPHICS_BUFFER_USAGE_WRITE
Definition: types.h:262
@ ANBOX_GRAPHICS_BUFFER_USAGE_UNKNOWN
Definition: types.h:256
@ ANBOX_GRAPHICS_BUFFER_USAGE_RENDERING
Definition: types.h:260
@ ANBOX_GRAPHICS_BUFFER_USAGE_SCANOUT
Definition: types.h:258
@ ANBOX_GRAPHICS_BUFFER_USAGE_LINEAR
Definition: types.h:264
AnboxAudioPcmSubFormat
Audio pcm sub formats.
Definition: types.h:111
@ AUDIO_FORMAT_PCM_SUB_16_BIT
Definition: types.h:113
@ AUDIO_FORMAT_PCM_SUB_FLOAT
Definition: types.h:121
@ AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED
Definition: types.h:123
@ AUDIO_FORMAT_PCM_SUB_32_BIT
Definition: types.h:117
@ AUDIO_FORMAT_PCM_SUB_8_BIT
Definition: types.h:115
@ AUDIO_FORMAT_PCM_SUB_8_24_BIT
Definition: types.h:119
#define MAX_NAME_LENGTH
Definition: types.h:31
AnboxCameraFacingMode
describes the camera facing mode
Definition: types.h:716
@ CAMERA_FACING_MODE_REAR
Definition: types.h:720
@ CAMERA_FACING_MODE_FRONT
Definition: types.h:718
AnboxPlatformConfigurationKey
AnboxPlatformConfigurationKey specifies configuration items which allow to influence the behavior and...
Definition: types.h:458
@ ENABLE_SW_SYNC_SUPPORT
Definition: types.h:620
@ BINDER_DEVICES
Definition: types.h:543
@ ANDROID_SYSTEM_PROPERTIES
Definition: types.h:627
@ OPENGL_ES1_CM_DRIVER_PATH
Definition: types.h:475
@ CONTAINER_BASE_UID
Definition: types.h:596
@ DIRECT_GRAPHICS_CONFIGURATION
Definition: types.h:582
@ DRM_RENDER_NODE_PATH
Definition: types.h:611
@ SUPPORTED_VIDEO_DECODE_CODECS
Definition: types.h:554
@ OPENGL_ES2_DRIVER_PATH
Definition: types.h:484
@ AUDIO_SPEC
Definition: types.h:509
@ VULKAN_ICD_PATH
Definition: types.h:603
@ GRAPHICS_IMPLEMENTATION_TYPE
Definition: types.h:571
@ AUDIO_INPUT_SPEC
Definition: types.h:533
@ PLATFORM_CONFIGURATION_INFO
Definition: types.h:589
@ DISPLAY_SPEC
Definition: types.h:497
@ DISPLAY_SPEC2
Definition: types.h:521
@ PLATFORM_CONFIGURATION_ID_START
Definition: types.h:634
@ EGL_DRIVER_PATH
Definition: types.h:466
@ PLATFORM_CONFIGURATION_ID_END
Definition: types.h:641
AnboxScreenOrientationType
AnboxScreenOrientationType describes the type of display orientation.
Definition: types.h:680
@ LANDSCAPE_REVERSED
Definition: types.h:688
@ LANDSCAPE
Definition: types.h:684
@ PORTRAIT_REVERSED
Definition: types.h:686
@ PORTRAIT
Definition: types.h:682
AnboxGraphicsTextureFormat
AnboxGraphicsTextureFormat describes a list of supported texture formats Anbox can provide a frame in...
Definition: types.h:1222
@ TEXTURE_FORMAT_RGBA
Definition: types.h:1224
@ TEXTURE_FORMAT_BGRA
Definition: types.h:1226
AnboxGraphicsBufferPixelFormat
Pixel format used for the pixels stored in a AnboxGraphicsBuffer or AnboxGraphicsBuffer2.
Definition: types.h:219
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_RGBA_16F
Definition: types.h:235
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_ARGB_8888
Definition: types.h:223
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_YUV_420
Definition: types.h:241
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_XRGB_8888
Definition: types.h:225
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_UNKNOWN
Definition: types.h:221
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_GR_88
Definition: types.h:237
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_R_8
Definition: types.h:243
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_XBGR_8888
Definition: types.h:247
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_NV_12
Definition: types.h:245
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_ABGR_8888
Definition: types.h:231
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_ABGR_2101010
Definition: types.h:239
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_ABGR_16161616F
Definition: types.h:233
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_YVU_420
Definition: types.h:249
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_RGB_565
Definition: types.h:229
@ ANBOX_GRAPHICS_BUFFER_PIXEL_FORMAT_RGB_888
Definition: types.h:227
AnboxVhalPropertyType
AnboxVhalPropertyType describes the type of the value stored by a VHAL property.
Definition: types.h:1411
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT_VEC
Definition: types.h:1419
@ ANBOX_VHAL_PROPERTY_TYPE_INT32
Definition: types.h:1414
@ ANBOX_VHAL_PROPERTY_TYPE_MIXED
Definition: types.h:1421
@ ANBOX_VHAL_PROPERTY_TYPE_BYTES
Definition: types.h:1420
@ ANBOX_VHAL_PROPERTY_TYPE_INT64_VEC
Definition: types.h:1417
@ ANBOX_VHAL_PROPERTY_TYPE_INT32_VEC
Definition: types.h:1415
@ ANBOX_VHAL_PROPERTY_TYPE_BOOLEAN
Definition: types.h:1413
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT
Definition: types.h:1418
@ ANBOX_VHAL_PROPERTY_TYPE_STRING
Definition: types.h:1412
@ ANBOX_VHAL_PROPERTY_TYPE_INT64
Definition: types.h:1416
AnboxTraceEventPhase
Type defining the phase of a trace event, e.g. begin/end pair.
Definition: types.h:1655
@ ANBOX_TRACE_EVENT_PHASE_COUNTER
Definition: types.h:1659
@ ANBOX_TRACE_EVENT_PHASE_END
Definition: types.h:1657
@ ANBOX_TRACE_EVENT_PHASE_BEGIN
Definition: types.h:1656
@ ANBOX_TRACE_EVENT_PHASE_INSTANT
Definition: types.h:1658
AnboxPlatformConfigurationItemValueType
Definition: types.h:405
@ BOOLEAN
Definition: types.h:407
GnssClockFlags
Definition: types.h:804
@ HAS_LEAP_SECOND
Definition: types.h:806
@ HAS_BIAS
Definition: types.h:812
@ HAS_DRIFT
Definition: types.h:816
@ HAS_FULL_BIAS
Definition: types.h:810
@ HAS_DRIFT_UNCERTAINTY
Definition: types.h:818
@ HAS_BIAS_UNCERTAINTY
Definition: types.h:814
@ HAS_TIME_UNCERTAINTY
Definition: types.h:808
GnssConstellationType
Definition: types.h:757
@ GPS
Definition: types.h:759
@ QZSS
Definition: types.h:762
@ SBAS
Definition: types.h:760
@ UNKNOWN
Definition: types.h:758
@ GLONASS
Definition: types.h:761
@ BEIDOU
Definition: types.h:763
@ GALILEO
Definition: types.h:764
#define MAX_SENSOR_DATA_LENGTH
Definition: types.h:1307
AnboxVideoCodecType
AnboxVideoCodecType describes the type of a video codec.
Definition: types.h:1593
@ ANBOX_VIDEO_CODEC_TYPE_H264
Definition: types.h:1596
@ ANBOX_VIDEO_CODEC_TYPE_UNKNOWN
Definition: types.h:1594
#define MAX_VECTOR_DATA_LENGTH
Definition: types.h:1308
#define MAX_STRING_LENGTH
Definition: types.h:32
#define MAX_VHAL_AREA_NAME_LENGTH
Definition: types.h:33
AnboxGpsDataType
AnboxGpsDataType describes all gps data types supported by Anbox.
Definition: types.h:1178
@ RMC
Definition: types.h:1184
@ Unknown
Definition: types.h:1180
@ GNSSv1
Definition: types.h:1187
@ GGA
Definition: types.h:1182
AnboxGraphicsFlipMode
AnboxGraphicsFlipMode describes if the final frame needs to be flipped to have the right visual orien...
Definition: types.h:1209
@ FLIP_MODE_VERTICAL
Definition: types.h:1213
@ FLIP_MODE_NONE
Definition: types.h:1211
@ FLIP_MODE_HORIZONTAL
Definition: types.h:1215
AnboxCameraOrientation
describes the orientations that Anbox supports in the camea processor
Definition: types.h:706
@ CAMERA_ORIENTATION_LANDSCAPE
Definition: types.h:710
@ CAMERA_ORIENTATION_PORTRAIT
Definition: types.h:708
AnboxVhalPropertyAccess
AnboxVhalPropertyAccess describes if the property is read, write, or both.
Definition: types.h:1431
@ ANBOX_VHAL_PROPERTY_ACCESS_WRITE
Definition: types.h:1434
@ ANBOX_VHAL_PROPERTY_ACCESS_READ
Definition: types.h:1433
@ ANBOX_VHAL_PROPERTY_ACCESS_READ_WRITE
Definition: types.h:1435
@ ANBOX_VHAL_PROPERTY_ACCESS_NONE
Definition: types.h:1432
void(* AnboxTracerAddEventFunc)(char phase, const unsigned char *category, const char *name, unsigned long long id, int num_args, const char **arg_names, const unsigned char *arg_types, const unsigned long long *arg_values, unsigned char flags)
Method prototype which will be used by the platform to submit trace events to the tracing implementat...
Definition: types.h:1690
AnboxTraceEventArgType
Type of an argument passed with a trace event.
Definition: types.h:1666
@ ANBOX_TRACE_EVENT_ARG_TYPE_STRING
Definition: types.h:1672
@ ANBOX_TRACE_EVENT_ARG_TYPE_BOOL
Definition: types.h:1667
@ ANBOX_TRACE_EVENT_ARG_TYPE_UINT
Definition: types.h:1668
@ ANBOX_TRACE_EVENT_ARG_TYPE_INT
Definition: types.h:1669
@ ANBOX_TRACE_EVENT_ARG_TYPE_DOUBLE
Definition: types.h:1670
@ ANBOX_TRACE_EVENT_ARG_TYPE_POINTER
Definition: types.h:1671
@ ANBOX_TRACE_EVENT_ARG_TYPE_COPY_STRING
Definition: types.h:1673
GnssMeasurementState
Definition: types.h:781
@ STATE_CODE_LOCK
Definition: types.h:783
@ STATE_MSEC_AMBIGUOUS
Definition: types.h:787
@ STATE_TOW_KNOWN
Definition: types.h:797
@ STATE_GLO_TOD_KNOWN
Definition: types.h:798
@ STATE_SYMBOL_SYNC
Definition: types.h:788
@ STATE_GLO_TOD_DECODED
Definition: types.h:790
@ STATE_GAL_E1BC_CODE_LOCK
Definition: types.h:793
@ STATE_GLO_STRING_SYNC
Definition: types.h:789
@ STATE_SBAS_SYNC
Definition: types.h:796
@ STATE_UNKNOWN
Definition: types.h:782
@ STATE_SUBFRAME_SYNC
Definition: types.h:785
@ STATE_BIT_SYNC
Definition: types.h:784
@ STATE_GAL_E1B_PAGE_SYNC
Definition: types.h:795
@ STATE_BDS_D2_SUBFRAME_SYNC
Definition: types.h:792
@ STATE_GAL_E1C_2ND_CODE_LOCK
Definition: types.h:794
@ STATE_TOW_DECODED
Definition: types.h:786
@ STATE_BDS_D2_BIT_SYNC
Definition: types.h:791
AnboxVideoPixelFormat
AnboxVideoPixelFormat describes a pixel format.
Definition: types.h:1602
@ ANBOX_VIDEO_PIXEL_FORMAT_YUV420P
Definition: types.h:1605
@ ANBOX_VIDEO_PIXEL_FORMAT_UNKNOWN
Definition: types.h:1603
AnboxVhalPropertyStatus
AnboxVhalPropertyStatus describes the status of a VHAL property.
Definition: types.h:1398
@ ANBOX_VHAL_PROPERTY_STATUS_ERROR
Definition: types.h:1401
@ ANBOX_VHAL_PROPERTY_STATUS_AVAILABLE
Definition: types.h:1399
@ ANBOX_VHAL_PROPERTY_STATUS_UNAVAILABLE
Definition: types.h:1400
#define GNSS_MAX_MEASUREMENT
Definition: types.h:749
AnboxVhalAnswerStatus
AnboxVhalAnswerStatus describes the return status of a request sent to the Android VHAL.
Definition: types.h:1534
@ ANBOX_VHAL_ANSWER_STATUS_UNKNOWN
Definition: types.h:1539
@ ANBOX_VHAL_ANSWER_STATUS_OK
Definition: types.h:1535
@ ANBOX_VHAL_ANSWER_STATUS_INVALID
Definition: types.h:1537
AnboxVideoColorSpaceFormat
AnboxVideoColorFormat describes the color space format of a video frame.
Definition: types.h:694
@ VIDEO_FRAME_FORMAT_UNKNOWN
Definition: types.h:696
@ VIDEO_FRAME_FORMAT_YUV420
Definition: types.h:698
@ VIDEO_FRAME_FORMAT_RGBA
Definition: types.h:700
AnboxAudioStreamType
AnboxAudioStreamType describes the audio stream type.
Definition: types.h:174
@ AUDIO_OUTPUT_STREAM
Definition: types.h:176
@ AUDIO_INPUT_STREAM
Definition: types.h:178
AnboxGraphicsOpenGLESVersion
AnboxGraphicsOpenGLESVersion describes a particular OpenGL ES API version.
Definition: types.h:338
@ ANBOX_GRAPHICS_OPENGL_ES_VERSION_2_0
Definition: types.h:340
@ ANBOX_GRAPHICS_OPENGL_ES_VERSION_3_1
Definition: types.h:344
@ ANBOX_GRAPHICS_OPENGL_ES_VERSION_3_0
Definition: types.h:342
@ ANBOX_GRAPHICS_OPENGL_ES_VERSION_3_2
Definition: types.h:346
AnboxGraphicsImplementationType
AnboxGraphicsImplementationType describes type of the graphics implementation the platform provides.
Definition: types.h:325
@ ANBOX_GRAPHICS_IMPLEMENTATION_TYPE_UNKNOWN
Definition: types.h:327
@ ANBOX_GRAPHICS_IMPLEMENTATION_TYPE_DIRECT_RENDERING
Definition: types.h:331
@ ANBOX_GRAPHICS_IMPLEMENTATION_TYPE_HOST_RENDERING
Definition: types.h:329
AnboxGraphicsVulkanVersion
AnboxGraphicsVulkanVersion describes a particular Vulkan API version.
Definition: types.h:352
@ ANBOX_GRAPHICS_VULKAN_VERSION_1_3
Definition: types.h:362
@ ANBOX_GRAPHICS_VULKAN_VERSION_UNSUPPORTED
Definition: types.h:354
@ ANBOX_GRAPHICS_VULKAN_VERSION_1_1
Definition: types.h:358
@ ANBOX_GRAPHICS_VULKAN_VERSION_1_2
Definition: types.h:360
@ ANBOX_GRAPHICS_VULKAN_VERSION_1_0
Definition: types.h:356
AnboxSensorType
AnboxSensorType describes all sensor types supported by Anbox.
Definition: types.h:1313
@ ORIENTATION
Definition: types.h:1323
@ PROXIMITY
Definition: types.h:1327
@ MAGNETOMETER
Definition: types.h:1321
@ PRESSURE
Definition: types.h:1331
@ GYROSCOPE
Definition: types.h:1319
@ NONE
Definition: types.h:1315
@ TEMPERATURE
Definition: types.h:1325
@ ACCELERATION
Definition: types.h:1317
@ LIGHT
Definition: types.h:1329
@ HUMIDITY
Definition: types.h:1333
AnboxInputDeviceType
AnboxInputDeviceType describes the type of device an input event belongs to. Possible device types ar...
Definition: types.h:1275
@ GAMEPAD
Definition: types.h:1283
@ TOUCHPANEL
Definition: types.h:1281
@ POINTER
Definition: types.h:1277
@ KEYBOARD
Definition: types.h:1279
#define ANBOX_GRAPHICS_BUFFER_MAX_PLANES
Definition: types.h:287
AnboxEventType
AnboxEventType describes the type of event sent from Anbox.
Definition: types.h:668
@ ANBOX_EVENT_TYPE_TERMINATING
Definition: types.h:674
@ ANBOX_EVENT_TYPE_INITIALIZATION_FINISHED
Definition: types.h:672
@ ANBOX_EVENT_TYPE_ANDROID_BOOT_FINISHED
Definition: types.h:670
AnboxAudioFormat
Audio format is a 32-bit word that consists of: main format field (upper 8 bits) sub format field (lo...
Definition: types.h:139
@ AUDIO_FORMAT_PCM_FLOAT
Definition: types.h:164
@ AUDIO_FORMAT_PCM_8_24_BIT
Definition: types.h:161
@ AUDIO_FORMAT_PCM_8_BIT
Definition: types.h:155
@ AUDIO_FORMAT_PCM_24_BIT_PACKED
Definition: types.h:167
@ AUDIO_FORMAT_DEFAULT
Definition: types.h:143
@ AUDIO_FORMAT_PCM
Definition: types.h:146
@ AUDIO_FORMAT_PCM_32_BIT
Definition: types.h:158
@ AUDIO_FORMAT_PCM_16_BIT
Definition: types.h:151
@ AUDIO_FORMAT_INVALID
Definition: types.h:141
uintptr_t AnboxNativeHandle
Opaque handle.
Definition: types.h:214
int64_t GpsUtcTime
Definition: types.h:752