anbox-platform-sdk  1.26.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  *
620  * Not used anymore since 1.27
621  */
623 
624  /*
625  * Android system properties required to forward to Android container
626  *
627  * The value of this configuration item is of type `AnboxAndroidSystemProperties`
628  */
630 
631  /*
632  * The API defines a range of platform specific configuration items which can be
633  * dynamically exposed by the platform. PLATFORM_CONFIGURATION_START specifies
634  * the first configuration item id.
635  */
637 
638  /*
639  * The API defines a range of platform specific configuration items which can be
640  * dynamically exposed by the platform. PLATFORM_CONFIGURATION_END specifies
641  * the last configuration item id.
642  */
645 
653 
654  /*
655  * A pointer to a null-terminated ('\0') string containing additional configuration
656  * data used by the platform during initialization or NULL if no additional
657  * configuration data is available.
658  */
659  const char* extra_config_data;
660 };
661 
667  const char name[MAX_STRING_LENGTH];
674 };
675 
679 typedef enum {
687 
691 typedef enum {
693  PORTRAIT = 0,
701 
705 typedef enum {
713 
717 typedef enum {
723 
727 typedef enum {
733 
743  uint32_t fps;
745  uint32_t width;
747  uint32_t height;
748 };
749 
755  uint8_t* data;
757  size_t size;
758 };
759 
760 #define GNSS_MAX_MEASUREMENT 64
761 
763 typedef int64_t GpsUtcTime;
764 
768 typedef enum : uint8_t {
769  UNKNOWN = 0,
770  GPS = 1,
771  SBAS = 2,
772  GLONASS = 3,
773  QZSS = 4,
774  BEIDOU = 5,
775  GALILEO = 6,
777 
792 typedef enum : uint32_t {
794  STATE_CODE_LOCK = 1 << 0,
795  STATE_BIT_SYNC = 1 << 1,
807  STATE_SBAS_SYNC = 1 << 13,
808  STATE_TOW_KNOWN = 1 << 14,
811 
815 typedef enum : uint16_t {
817  HAS_LEAP_SECOND = 1 << 0,
821  HAS_FULL_BIAS = 1 << 2,
823  HAS_BIAS = 1 << 3,
827  HAS_DRIFT = 1 << 5,
829  HAS_DRIFT_UNCERTAINTY = 1 << 6
831 
846  int16_t svid;
847 
853 
861 
930 
937 
944  double c_n0_dbhz;
945 
972 
980 
989 };
990 
994 struct GnssClock {
1014  int64_t time_ns;
1015 
1031  int64_t full_bias_ns;
1032 
1042  double bias_ns;
1043 
1054 
1067  double drift_nsps;
1068 
1078 
1109 
1114 };
1122  double latitude;
1126  double longitude;
1130  double altitude;
1137 };
1138 
1146  char status;
1148  double latitude;
1152  double longitude;
1156  float speed;
1158  float bearing;
1165 };
1166 
1177 
1180 
1183 };
1184 
1185 
1189 typedef enum : uint32_t {
1191  Unknown = 1 << 0,
1193  GGA = 1 << 1,
1195  RMC = 1 << 2,
1198  GNSSv1 = 1 << 3,
1200 
1209  union {
1213  };
1214 };
1215 
1220 typedef enum {
1228 
1233 typedef enum {
1239 
1244 typedef struct {
1248  EGLNativeDisplayType native_display;
1249 
1254  EGLNativeWindowType native_window;
1255 
1262 
1271 
1281 
1286 typedef enum {
1288  POINTER = 0,
1296 
1307  int32_t device_id;
1310  uint16_t type;
1312  uint16_t code;
1315  int32_t value;
1316 };
1317 
1318 #define MAX_SENSOR_DATA_LENGTH 16
1319 #define MAX_VECTOR_DATA_LENGTH 3
1320 
1324 typedef enum : uint32_t {
1326  NONE = 0,
1328  ACCELERATION = 1 << 0,
1330  GYROSCOPE = 1 << 1,
1332  MAGNETOMETER = 1 << 2,
1334  ORIENTATION = 1 << 3,
1336  TEMPERATURE = 1 << 4,
1338  PROXIMITY = 1 << 5,
1340  LIGHT = 1 << 6,
1342  PRESSURE = 1 << 7,
1344  HUMIDITY = 1 << 8,
1345 } AnboxSensorType;
1346 
1352  union {
1355  struct {
1357  float x;
1359  float y;
1361  float z;
1362  } axis;
1363  struct {
1365  float azimuth;
1367  float pitch;
1369  float roll;
1371  };
1372 };
1373 
1380  union {
1393  float proximity;
1395  float light;
1397  float pressure;
1399  float humidity;
1400  };
1401 };
1402 
1409 typedef enum {
1414 
1422 typedef enum {
1434 
1442 typedef enum {
1448 
1454 typedef enum {
1459 
1469  int64_t timestamp;
1470  int32_t area_id;
1471  int32_t prop;
1474  int32_t* int32_values;
1478  int64_t* int64_values;
1479  uint32_t bytes_size;
1480  uint8_t* bytes;
1483 };
1484 
1499  int32_t area_id;
1508 };
1509 
1525  int32_t prop;
1532  int32_t* config_array;
1537  uint32_t prop_name_size;
1538  char* prop_name;
1539 };
1540 
1545 typedef enum {
1552 
1558  uint32_t configs_size;
1560 };
1561 
1567  int32_t prop_id;
1568  int32_t area_id;
1570  int32_t* int32_values;
1574  int64_t* int64_values;
1575  uint32_t bytes_size;
1576  uint8_t* bytes;
1579 };
1580 
1586  int32_t prop_id;
1587  int32_t area_id;
1590  int32_t* int32_values;
1594  int64_t* int64_values;
1595  uint32_t bytes_size;
1596  uint8_t* bytes;
1599 };
1600 
1604 typedef enum : uint8_t {
1606  /* H.264 / AVC */
1609 
1613 typedef enum : uint8_t {
1615  /* YUV420P */
1618 
1623  /* Target output width */
1624  uint32_t width = 0;
1625  /* Target output height */
1626  uint32_t height = 0;
1627  /* Expected output pixel format */
1629 };
1630 
1635  /* Pixel format of the image */
1637  /* Width of the image */
1638  uint32_t width = 0;
1639  /* Height of the image */
1640  uint32_t height = 0;
1641  /* Presentation timestmap of the image in milliseconds */
1642  int64_t pts = 0;
1643  /* Color matrix coefficients of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1644  uint8_t color_matrix = 0;
1645  /* Color primaries of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1646  uint8_t color_primaries = 0;
1647  /* Color transfer of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1648  uint8_t color_transfer = 0;
1649  /* Color range of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1650  uint8_t color_range = 0;
1651  /* Size of the image data */
1652  uint64_t size = 0;
1653  /* Data of the image */
1654  uint8_t* data = nullptr;
1655 };
1656 
1661 typedef const unsigned char* (*AnboxTracerGetCategoryEnabledFunc)(const char* name);
1662 
1666 typedef enum {
1672 
1673 
1677 typedef enum {
1686 
1701 typedef void (*AnboxTracerAddEventFunc)(
1702  char phase,
1703  const unsigned char* category,
1704  const char* name,
1705  unsigned long long id,
1706  int num_args,
1707  const char** arg_names,
1708  const unsigned char* arg_types,
1709  const unsigned long long* arg_values,
1710  unsigned char flags);
1711 
1712 #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:737
uint32_t fps
Definition: types.h:743
uint32_t height
Definition: types.h:747
uint32_t width
Definition: types.h:745
AnboxCameraFacingMode facing_mode
Definition: types.h:741
AnboxVideoColorSpaceFormat format
Definition: types.h:739
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:1126
char latitudeHemi
Definition: types.h:1124
double altitude
Definition: types.h:1130
double latitude
Definition: types.h:1122
char longitudeHemi
Definition: types.h:1128
char altitudeUnit
Definition: types.h:1132
GpsUtcTime time
Definition: types.h:1120
float verticalAccuracy
Definition: types.h:1136
float horizontalAccuracy
Definition: types.h:1134
GnssClock clock
Definition: types.h:1176
GnssMeasurement measurements[GNSS_MAX_MEASUREMENT]
Definition: types.h:1182
size_t measurement_count
Definition: types.h:1179
AnboxGnssData gnss_data
Definition: types.h:1212
AnboxGGAData gga_data
Definition: types.h:1210
AnboxGpsDataType data_type
Definition: types.h:1208
AnboxRMCData rmc_data
Definition: types.h:1211
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:1244
AnboxGraphicsFlipMode output_flip_mode
Definition: types.h:1261
EGLNativeDisplayType native_display
Definition: types.h:1248
EGLNativeWindowType native_window
Definition: types.h:1254
AnboxGraphicsTextureFormat texture_format
Definition: types.h:1270
AnboxInputEvent is similar to the input_event that is defined in the Linux kernel API....
Definition: types.h:1303
uint16_t code
Definition: types.h:1312
int32_t device_id
Definition: types.h:1307
uint16_t type
Definition: types.h:1310
int32_t value
Definition: types.h:1315
AnboxInputDeviceType device_type
Definition: types.h:1305
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:650
uint32_t android_api_level
Definition: types.h:652
const char * extra_config_data
Definition: types.h:659
AnboxPlatformDescriptor provides information about the implemented platform.
Definition: types.h:665
uint32_t platform_version
Definition: types.h:673
const char vendor[MAX_STRING_LENGTH]
Definition: types.h:669
const char name[MAX_STRING_LENGTH]
Definition: types.h:667
const char description[MAX_STRING_LENGTH]
Definition: types.h:671
char latitudeHemi
Definition: types.h:1150
GpsUtcTime time
Definition: types.h:1144
float bearing
Definition: types.h:1158
double longitude
Definition: types.h:1152
char status
Definition: types.h:1146
float verticalAccuracy
Definition: types.h:1164
float horizontalAccuracy
Definition: types.h:1162
GpsUtcTime date
Definition: types.h:1160
double latitude
Definition: types.h:1148
char longitudeHemi
Definition: types.h:1154
float speed
Definition: types.h:1156
AnboxSensorData represents the sensor data stucture,.
Definition: types.h:1377
float temperature
Definition: types.h:1391
AnboxSensorVector gyroscope
Definition: types.h:1385
AnboxSensorVector orientation
Definition: types.h:1387
float humidity
Definition: types.h:1399
AnboxSensorVector magnetic
Definition: types.h:1389
float light
Definition: types.h:1395
AnboxSensorVector acceleration
Definition: types.h:1383
float pressure
Definition: types.h:1397
float proximity
Definition: types.h:1393
AnboxSensorType sensor_type
Definition: types.h:1379
float values[MAX_SENSOR_DATA_LENGTH]
Definition: types.h:1381
AnboxSensorVector represents acceleration along each device axis or current device rotation angles: a...
Definition: types.h:1351
float v[MAX_VECTOR_DATA_LENGTH]
Definition: types.h:1354
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:1557
AnboxVhalPropertyConfig * configs
Definition: types.h:1559
AnboxVhalAreaConfig describes the configuration of a given area id for a VHAL property.
Definition: types.h:1498
int32_t min_int32_value
Definition: types.h:1500
float min_float_value
Definition: types.h:1504
char(* area_names)[MAX_VHAL_AREA_NAME_LENGTH]
Definition: types.h:1507
float max_float_value
Definition: types.h:1505
int64_t max_int64_value
Definition: types.h:1503
int64_t min_int64_value
Definition: types.h:1502
int32_t area_id
Definition: types.h:1499
int32_t max_int32_value
Definition: types.h:1501
uint32_t area_names_size
Definition: types.h:1506
AnboxVhalCommandGet describes a get request to send to the Android VHAL.
Definition: types.h:1566
int32_t area_id
Definition: types.h:1568
uint32_t string_value_size
Definition: types.h:1577
uint32_t int32_values_size
Definition: types.h:1569
int32_t * int32_values
Definition: types.h:1570
uint32_t float_values_size
Definition: types.h:1571
char * string_value
Definition: types.h:1578
int32_t prop_id
Definition: types.h:1567
uint32_t bytes_size
Definition: types.h:1575
uint8_t * bytes
Definition: types.h:1576
int64_t * int64_values
Definition: types.h:1574
float * float_values
Definition: types.h:1572
uint32_t int64_values_size
Definition: types.h:1573
AnboxVhalCommandSet describes a set request to send to the Android VHAL.
Definition: types.h:1585
uint32_t int64_values_size
Definition: types.h:1593
uint32_t int32_values_size
Definition: types.h:1589
int32_t * int32_values
Definition: types.h:1590
char * string_value
Definition: types.h:1598
uint8_t * bytes
Definition: types.h:1596
uint32_t string_value_size
Definition: types.h:1597
AnboxVhalPropertyStatus status
Definition: types.h:1588
int32_t area_id
Definition: types.h:1587
uint32_t float_values_size
Definition: types.h:1591
int64_t * int64_values
Definition: types.h:1594
int32_t prop_id
Definition: types.h:1586
uint32_t bytes_size
Definition: types.h:1595
float * float_values
Definition: types.h:1592
AnboxVhalPropertyConfig describes the configuration of a VHAL property.
Definition: types.h:1524
uint32_t config_array_size
Definition: types.h:1531
AnboxVhalPropertyChangeMode change_mode
Definition: types.h:1528
AnboxVhalPropertyType value_type
Definition: types.h:1526
AnboxVhalPropertyAccess access
Definition: types.h:1527
int32_t * config_array
Definition: types.h:1532
AnboxVhalAreaConfig * area_configs
Definition: types.h:1530
uint32_t config_string_size
Definition: types.h:1533
uint32_t area_configs_size
Definition: types.h:1529
uint32_t prop_name_size
Definition: types.h:1537
AnboxVhalPropertyValue describes the current value of a VHAL property, as returned by a get call to t...
Definition: types.h:1468
uint32_t float_values_size
Definition: types.h:1475
uint32_t string_value_size
Definition: types.h:1481
int64_t * int64_values
Definition: types.h:1478
uint32_t int64_values_size
Definition: types.h:1477
uint32_t bytes_size
Definition: types.h:1479
float * float_values
Definition: types.h:1476
uint32_t int32_values_size
Definition: types.h:1473
int32_t * int32_values
Definition: types.h:1474
AnboxVhalPropertyStatus status
Definition: types.h:1472
AnboxVideoDecoderConfig describes the configuration of a video decoder.
Definition: types.h:1622
AnboxVideoPixelFormat output_format
Definition: types.h:1628
AnboxVideoFrame represents a single complete video frame.
Definition: types.h:753
size_t size
Definition: types.h:757
uint8_t * data
Definition: types.h:755
AnboxVideoImage describes a decoded image returned by the video decoder.
Definition: types.h:1634
uint8_t color_range
Definition: types.h:1650
uint32_t width
Definition: types.h:1638
uint8_t * data
Definition: types.h:1654
uint8_t color_matrix
Definition: types.h:1644
uint8_t color_primaries
Definition: types.h:1646
uint64_t size
Definition: types.h:1652
uint32_t height
Definition: types.h:1640
AnboxVideoPixelFormat pixel_format
Definition: types.h:1636
uint8_t color_transfer
Definition: types.h:1648
int64_t pts
Definition: types.h:1642
uint32_t hw_clock_discontinuity_count
Definition: types.h:1108
int64_t time_ns
Definition: types.h:1014
double drift_nsps
Definition: types.h:1067
double bias_ns
Definition: types.h:1042
GnssClockFlags flags
Definition: types.h:1113
double bias_uncertainty_ns
Definition: types.h:1053
int64_t full_bias_ns
Definition: types.h:1031
double drift_uncertainty_nsps
Definition: types.h:1077
double pseudorange_rate_uncertainty_mps
Definition: types.h:979
GnssMeasurementState state
Definition: types.h:860
float carrier_frequency_hz
Definition: types.h:988
double c_n0_dbhz
Definition: types.h:944
int16_t svid
Definition: types.h:846
GnssConstellationType constellation
Definition: types.h:852
double pseudorange_rate_mps
Definition: types.h:971
int64_t received_sv_time_in_ns
Definition: types.h:929
int64_t received_sv_time_uncertainty_in_ns
Definition: types.h:936
AnboxVhalPropertyChangeMode
AnboxVhalPropertyChangeMode describes how the property changes.
Definition: types.h:1454
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_CONTINUOUS
Definition: types.h:1457
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_ON_CHANGE
Definition: types.h:1456
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_STATIC
Definition: types.h:1455
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:727
@ CAMERA_FACING_MODE_REAR
Definition: types.h:731
@ CAMERA_FACING_MODE_FRONT
Definition: types.h:729
AnboxPlatformConfigurationKey
AnboxPlatformConfigurationKey specifies configuration items which allow to influence the behavior and...
Definition: types.h:458
@ ENABLE_SW_SYNC_SUPPORT
Definition: types.h:622
@ BINDER_DEVICES
Definition: types.h:543
@ ANDROID_SYSTEM_PROPERTIES
Definition: types.h:629
@ 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:636
@ EGL_DRIVER_PATH
Definition: types.h:466
@ PLATFORM_CONFIGURATION_ID_END
Definition: types.h:643
AnboxScreenOrientationType
AnboxScreenOrientationType describes the type of display orientation.
Definition: types.h:691
@ LANDSCAPE_REVERSED
Definition: types.h:699
@ LANDSCAPE
Definition: types.h:695
@ PORTRAIT_REVERSED
Definition: types.h:697
@ PORTRAIT
Definition: types.h:693
AnboxGraphicsTextureFormat
AnboxGraphicsTextureFormat describes a list of supported texture formats Anbox can provide a frame in...
Definition: types.h:1233
@ TEXTURE_FORMAT_RGBA
Definition: types.h:1235
@ TEXTURE_FORMAT_BGRA
Definition: types.h:1237
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:1422
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT_VEC
Definition: types.h:1430
@ ANBOX_VHAL_PROPERTY_TYPE_INT32
Definition: types.h:1425
@ ANBOX_VHAL_PROPERTY_TYPE_MIXED
Definition: types.h:1432
@ ANBOX_VHAL_PROPERTY_TYPE_BYTES
Definition: types.h:1431
@ ANBOX_VHAL_PROPERTY_TYPE_INT64_VEC
Definition: types.h:1428
@ ANBOX_VHAL_PROPERTY_TYPE_INT32_VEC
Definition: types.h:1426
@ ANBOX_VHAL_PROPERTY_TYPE_BOOLEAN
Definition: types.h:1424
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT
Definition: types.h:1429
@ ANBOX_VHAL_PROPERTY_TYPE_STRING
Definition: types.h:1423
@ ANBOX_VHAL_PROPERTY_TYPE_INT64
Definition: types.h:1427
AnboxTraceEventPhase
Type defining the phase of a trace event, e.g. begin/end pair.
Definition: types.h:1666
@ ANBOX_TRACE_EVENT_PHASE_COUNTER
Definition: types.h:1670
@ ANBOX_TRACE_EVENT_PHASE_END
Definition: types.h:1668
@ ANBOX_TRACE_EVENT_PHASE_BEGIN
Definition: types.h:1667
@ ANBOX_TRACE_EVENT_PHASE_INSTANT
Definition: types.h:1669
AnboxPlatformConfigurationItemValueType
Definition: types.h:405
@ BOOLEAN
Definition: types.h:407
GnssClockFlags
Definition: types.h:815
@ HAS_LEAP_SECOND
Definition: types.h:817
@ HAS_BIAS
Definition: types.h:823
@ HAS_DRIFT
Definition: types.h:827
@ HAS_FULL_BIAS
Definition: types.h:821
@ HAS_DRIFT_UNCERTAINTY
Definition: types.h:829
@ HAS_BIAS_UNCERTAINTY
Definition: types.h:825
@ HAS_TIME_UNCERTAINTY
Definition: types.h:819
GnssConstellationType
Definition: types.h:768
@ GPS
Definition: types.h:770
@ QZSS
Definition: types.h:773
@ SBAS
Definition: types.h:771
@ UNKNOWN
Definition: types.h:769
@ GLONASS
Definition: types.h:772
@ BEIDOU
Definition: types.h:774
@ GALILEO
Definition: types.h:775
#define MAX_SENSOR_DATA_LENGTH
Definition: types.h:1318
AnboxVideoCodecType
AnboxVideoCodecType describes the type of a video codec.
Definition: types.h:1604
@ ANBOX_VIDEO_CODEC_TYPE_H264
Definition: types.h:1607
@ ANBOX_VIDEO_CODEC_TYPE_UNKNOWN
Definition: types.h:1605
#define MAX_VECTOR_DATA_LENGTH
Definition: types.h:1319
#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:1189
@ RMC
Definition: types.h:1195
@ Unknown
Definition: types.h:1191
@ GNSSv1
Definition: types.h:1198
@ GGA
Definition: types.h:1193
AnboxGraphicsFlipMode
AnboxGraphicsFlipMode describes if the final frame needs to be flipped to have the right visual orien...
Definition: types.h:1220
@ FLIP_MODE_VERTICAL
Definition: types.h:1224
@ FLIP_MODE_NONE
Definition: types.h:1222
@ FLIP_MODE_HORIZONTAL
Definition: types.h:1226
AnboxCameraOrientation
describes the orientations that Anbox supports in the camea processor
Definition: types.h:717
@ CAMERA_ORIENTATION_LANDSCAPE
Definition: types.h:721
@ CAMERA_ORIENTATION_PORTRAIT
Definition: types.h:719
AnboxVhalPropertyAccess
AnboxVhalPropertyAccess describes if the property is read, write, or both.
Definition: types.h:1442
@ ANBOX_VHAL_PROPERTY_ACCESS_WRITE
Definition: types.h:1445
@ ANBOX_VHAL_PROPERTY_ACCESS_READ
Definition: types.h:1444
@ ANBOX_VHAL_PROPERTY_ACCESS_READ_WRITE
Definition: types.h:1446
@ ANBOX_VHAL_PROPERTY_ACCESS_NONE
Definition: types.h:1443
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:1701
AnboxTraceEventArgType
Type of an argument passed with a trace event.
Definition: types.h:1677
@ ANBOX_TRACE_EVENT_ARG_TYPE_STRING
Definition: types.h:1683
@ ANBOX_TRACE_EVENT_ARG_TYPE_BOOL
Definition: types.h:1678
@ ANBOX_TRACE_EVENT_ARG_TYPE_UINT
Definition: types.h:1679
@ ANBOX_TRACE_EVENT_ARG_TYPE_INT
Definition: types.h:1680
@ ANBOX_TRACE_EVENT_ARG_TYPE_DOUBLE
Definition: types.h:1681
@ ANBOX_TRACE_EVENT_ARG_TYPE_POINTER
Definition: types.h:1682
@ ANBOX_TRACE_EVENT_ARG_TYPE_COPY_STRING
Definition: types.h:1684
GnssMeasurementState
Definition: types.h:792
@ STATE_CODE_LOCK
Definition: types.h:794
@ STATE_MSEC_AMBIGUOUS
Definition: types.h:798
@ STATE_TOW_KNOWN
Definition: types.h:808
@ STATE_GLO_TOD_KNOWN
Definition: types.h:809
@ STATE_SYMBOL_SYNC
Definition: types.h:799
@ STATE_GLO_TOD_DECODED
Definition: types.h:801
@ STATE_GAL_E1BC_CODE_LOCK
Definition: types.h:804
@ STATE_GLO_STRING_SYNC
Definition: types.h:800
@ STATE_SBAS_SYNC
Definition: types.h:807
@ STATE_UNKNOWN
Definition: types.h:793
@ STATE_SUBFRAME_SYNC
Definition: types.h:796
@ STATE_BIT_SYNC
Definition: types.h:795
@ STATE_GAL_E1B_PAGE_SYNC
Definition: types.h:806
@ STATE_BDS_D2_SUBFRAME_SYNC
Definition: types.h:803
@ STATE_GAL_E1C_2ND_CODE_LOCK
Definition: types.h:805
@ STATE_TOW_DECODED
Definition: types.h:797
@ STATE_BDS_D2_BIT_SYNC
Definition: types.h:802
AnboxVideoPixelFormat
AnboxVideoPixelFormat describes a pixel format.
Definition: types.h:1613
@ ANBOX_VIDEO_PIXEL_FORMAT_YUV420P
Definition: types.h:1616
@ ANBOX_VIDEO_PIXEL_FORMAT_UNKNOWN
Definition: types.h:1614
AnboxVhalPropertyStatus
AnboxVhalPropertyStatus describes the status of a VHAL property.
Definition: types.h:1409
@ ANBOX_VHAL_PROPERTY_STATUS_ERROR
Definition: types.h:1412
@ ANBOX_VHAL_PROPERTY_STATUS_AVAILABLE
Definition: types.h:1410
@ ANBOX_VHAL_PROPERTY_STATUS_UNAVAILABLE
Definition: types.h:1411
#define GNSS_MAX_MEASUREMENT
Definition: types.h:760
AnboxVhalAnswerStatus
AnboxVhalAnswerStatus describes the return status of a request sent to the Android VHAL.
Definition: types.h:1545
@ ANBOX_VHAL_ANSWER_STATUS_UNKNOWN
Definition: types.h:1550
@ ANBOX_VHAL_ANSWER_STATUS_OK
Definition: types.h:1546
@ ANBOX_VHAL_ANSWER_STATUS_INVALID
Definition: types.h:1548
AnboxVideoColorSpaceFormat
AnboxVideoColorFormat describes the color space format of a video frame.
Definition: types.h:705
@ VIDEO_FRAME_FORMAT_UNKNOWN
Definition: types.h:707
@ VIDEO_FRAME_FORMAT_YUV420
Definition: types.h:709
@ VIDEO_FRAME_FORMAT_RGBA
Definition: types.h:711
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:1324
@ ORIENTATION
Definition: types.h:1334
@ PROXIMITY
Definition: types.h:1338
@ MAGNETOMETER
Definition: types.h:1332
@ PRESSURE
Definition: types.h:1342
@ GYROSCOPE
Definition: types.h:1330
@ NONE
Definition: types.h:1326
@ TEMPERATURE
Definition: types.h:1336
@ ACCELERATION
Definition: types.h:1328
@ LIGHT
Definition: types.h:1340
@ HUMIDITY
Definition: types.h:1344
AnboxInputDeviceType
AnboxInputDeviceType describes the type of device an input event belongs to. Possible device types ar...
Definition: types.h:1286
@ GAMEPAD
Definition: types.h:1294
@ TOUCHPANEL
Definition: types.h:1292
@ POINTER
Definition: types.h:1288
@ KEYBOARD
Definition: types.h:1290
#define ANBOX_GRAPHICS_BUFFER_MAX_PLANES
Definition: types.h:287
AnboxEventType
AnboxEventType describes the type of event sent from Anbox.
Definition: types.h:679
@ ANBOX_EVENT_TYPE_TERMINATING
Definition: types.h:685
@ ANBOX_EVENT_TYPE_INITIALIZATION_FINISHED
Definition: types.h:683
@ ANBOX_EVENT_TYPE_ANDROID_BOOT_FINISHED
Definition: types.h:681
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:763