anbox-platform-sdk  1.25.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 
651 
652  /*
653  * A pointer to a null-terminated ('\0') string containing additional configuration
654  * data used by the platform during initialization or NULL if no additional
655  * configuration data is available.
656  */
657  const char* extra_config_data;
658 };
659 
665  const char name[MAX_STRING_LENGTH];
672 };
673 
677 typedef enum {
685 
689 typedef enum {
691  PORTRAIT = 0,
699 
703 typedef enum {
711 
715 typedef enum {
721 
725 typedef enum {
731 
741  uint32_t fps;
743  uint32_t width;
745  uint32_t height;
746 };
747 
753  uint8_t* data;
755  size_t size;
756 };
757 
758 #define GNSS_MAX_MEASUREMENT 64
759 
761 typedef int64_t GpsUtcTime;
762 
766 typedef enum : uint8_t {
767  UNKNOWN = 0,
768  GPS = 1,
769  SBAS = 2,
770  GLONASS = 3,
771  QZSS = 4,
772  BEIDOU = 5,
773  GALILEO = 6,
775 
790 typedef enum : uint32_t {
792  STATE_CODE_LOCK = 1 << 0,
793  STATE_BIT_SYNC = 1 << 1,
805  STATE_SBAS_SYNC = 1 << 13,
806  STATE_TOW_KNOWN = 1 << 14,
809 
813 typedef enum : uint16_t {
815  HAS_LEAP_SECOND = 1 << 0,
819  HAS_FULL_BIAS = 1 << 2,
821  HAS_BIAS = 1 << 3,
825  HAS_DRIFT = 1 << 5,
827  HAS_DRIFT_UNCERTAINTY = 1 << 6
829 
844  int16_t svid;
845 
851 
859 
928 
935 
942  double c_n0_dbhz;
943 
970 
978 
987 };
988 
992 struct GnssClock {
1012  int64_t time_ns;
1013 
1029  int64_t full_bias_ns;
1030 
1040  double bias_ns;
1041 
1052 
1065  double drift_nsps;
1066 
1076 
1107 
1112 };
1120  double latitude;
1124  double longitude;
1128  double altitude;
1135 };
1136 
1144  char status;
1146  double latitude;
1150  double longitude;
1154  float speed;
1156  float bearing;
1163 };
1164 
1175 
1178 
1181 };
1182 
1183 
1187 typedef enum : uint32_t {
1189  Unknown = 1 << 0,
1191  GGA = 1 << 1,
1193  RMC = 1 << 2,
1196  GNSSv1 = 1 << 3,
1198 
1207  union {
1211  };
1212 };
1213 
1218 typedef enum {
1226 
1231 typedef enum {
1237 
1242 typedef struct {
1246  EGLNativeDisplayType native_display;
1247 
1252  EGLNativeWindowType native_window;
1253 
1260 
1269 
1279 
1284 typedef enum {
1286  POINTER = 0,
1294 
1305  int32_t device_id;
1308  uint16_t type;
1310  uint16_t code;
1313  int32_t value;
1314 };
1315 
1316 #define MAX_SENSOR_DATA_LENGTH 16
1317 #define MAX_VECTOR_DATA_LENGTH 3
1318 
1322 typedef enum : uint32_t {
1324  NONE = 0,
1326  ACCELERATION = 1 << 0,
1328  GYROSCOPE = 1 << 1,
1330  MAGNETOMETER = 1 << 2,
1332  ORIENTATION = 1 << 3,
1334  TEMPERATURE = 1 << 4,
1336  PROXIMITY = 1 << 5,
1338  LIGHT = 1 << 6,
1340  PRESSURE = 1 << 7,
1342  HUMIDITY = 1 << 8,
1343 } AnboxSensorType;
1344 
1350  union {
1353  struct {
1355  float x;
1357  float y;
1359  float z;
1360  } axis;
1361  struct {
1363  float azimuth;
1365  float pitch;
1367  float roll;
1369  };
1370 };
1371 
1378  union {
1391  float proximity;
1393  float light;
1395  float pressure;
1397  float humidity;
1398  };
1399 };
1400 
1407 typedef enum {
1412 
1420 typedef enum {
1432 
1440 typedef enum {
1446 
1452 typedef enum {
1457 
1467  int64_t timestamp;
1468  int32_t area_id;
1469  int32_t prop;
1472  int32_t* int32_values;
1476  int64_t* int64_values;
1477  uint32_t bytes_size;
1478  uint8_t* bytes;
1481 };
1482 
1497  int32_t area_id;
1506 };
1507 
1523  int32_t prop;
1530  int32_t* config_array;
1535  uint32_t prop_name_size;
1536  char* prop_name;
1537 };
1538 
1543 typedef enum {
1550 
1556  uint32_t configs_size;
1558 };
1559 
1565  int32_t prop_id;
1566  int32_t area_id;
1568  int32_t* int32_values;
1572  int64_t* int64_values;
1573  uint32_t bytes_size;
1574  uint8_t* bytes;
1577 };
1578 
1584  int32_t prop_id;
1585  int32_t area_id;
1588  int32_t* int32_values;
1592  int64_t* int64_values;
1593  uint32_t bytes_size;
1594  uint8_t* bytes;
1597 };
1598 
1602 typedef enum : uint8_t {
1604  /* H.264 / AVC */
1607 
1611 typedef enum : uint8_t {
1613  /* YUV420P */
1616 
1621  /* Target output width */
1622  uint32_t width = 0;
1623  /* Target output height */
1624  uint32_t height = 0;
1625  /* Expected output pixel format */
1627 };
1628 
1633  /* Pixel format of the image */
1635  /* Width of the image */
1636  uint32_t width = 0;
1637  /* Height of the image */
1638  uint32_t height = 0;
1639  /* Presentation timestmap of the image in milliseconds */
1640  int64_t pts = 0;
1641  /* Color matrix coefficients of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1642  uint8_t color_matrix = 0;
1643  /* Color primaries of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1644  uint8_t color_primaries = 0;
1645  /* Color transfer of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1646  uint8_t color_transfer = 0;
1647  /* Color range of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1648  uint8_t color_range = 0;
1649  /* Size of the image data */
1650  uint64_t size = 0;
1651  /* Data of the image */
1652  uint8_t* data = nullptr;
1653 };
1654 
1659 typedef const unsigned char* (*AnboxTracerGetCategoryEnabledFunc)(const char* name);
1660 
1664 typedef enum {
1670 
1671 
1675 typedef enum {
1684 
1699 typedef void (*AnboxTracerAddEventFunc)(
1700  char phase,
1701  const unsigned char* category,
1702  const char* name,
1703  unsigned long long id,
1704  int num_args,
1705  const char** arg_names,
1706  const unsigned char* arg_types,
1707  const unsigned long long* arg_values,
1708  unsigned char flags);
1709 
1710 #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:735
uint32_t fps
Definition: types.h:741
uint32_t height
Definition: types.h:745
uint32_t width
Definition: types.h:743
AnboxCameraFacingMode facing_mode
Definition: types.h:739
AnboxVideoColorSpaceFormat format
Definition: types.h:737
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:1124
char latitudeHemi
Definition: types.h:1122
double altitude
Definition: types.h:1128
double latitude
Definition: types.h:1120
char longitudeHemi
Definition: types.h:1126
char altitudeUnit
Definition: types.h:1130
GpsUtcTime time
Definition: types.h:1118
float verticalAccuracy
Definition: types.h:1134
float horizontalAccuracy
Definition: types.h:1132
GnssClock clock
Definition: types.h:1174
GnssMeasurement measurements[GNSS_MAX_MEASUREMENT]
Definition: types.h:1180
size_t measurement_count
Definition: types.h:1177
AnboxGnssData gnss_data
Definition: types.h:1210
AnboxGGAData gga_data
Definition: types.h:1208
AnboxGpsDataType data_type
Definition: types.h:1206
AnboxRMCData rmc_data
Definition: types.h:1209
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:1242
AnboxGraphicsFlipMode output_flip_mode
Definition: types.h:1259
EGLNativeDisplayType native_display
Definition: types.h:1246
EGLNativeWindowType native_window
Definition: types.h:1252
AnboxGraphicsTextureFormat texture_format
Definition: types.h:1268
AnboxInputEvent is similar to the input_event that is defined in the Linux kernel API....
Definition: types.h:1301
uint16_t code
Definition: types.h:1310
int32_t device_id
Definition: types.h:1305
uint16_t type
Definition: types.h:1308
int32_t value
Definition: types.h:1313
AnboxInputDeviceType device_type
Definition: types.h:1303
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
uint32_t android_api_level
Definition: types.h:650
const char * extra_config_data
Definition: types.h:657
AnboxPlatformDescriptor provides information about the implemented platform.
Definition: types.h:663
uint32_t platform_version
Definition: types.h:671
const char vendor[MAX_STRING_LENGTH]
Definition: types.h:667
const char name[MAX_STRING_LENGTH]
Definition: types.h:665
const char description[MAX_STRING_LENGTH]
Definition: types.h:669
char latitudeHemi
Definition: types.h:1148
GpsUtcTime time
Definition: types.h:1142
float bearing
Definition: types.h:1156
double longitude
Definition: types.h:1150
char status
Definition: types.h:1144
float verticalAccuracy
Definition: types.h:1162
float horizontalAccuracy
Definition: types.h:1160
GpsUtcTime date
Definition: types.h:1158
double latitude
Definition: types.h:1146
char longitudeHemi
Definition: types.h:1152
float speed
Definition: types.h:1154
AnboxSensorData represents the sensor data stucture,.
Definition: types.h:1375
float temperature
Definition: types.h:1389
AnboxSensorVector gyroscope
Definition: types.h:1383
AnboxSensorVector orientation
Definition: types.h:1385
float humidity
Definition: types.h:1397
AnboxSensorVector magnetic
Definition: types.h:1387
float light
Definition: types.h:1393
AnboxSensorVector acceleration
Definition: types.h:1381
float pressure
Definition: types.h:1395
float proximity
Definition: types.h:1391
AnboxSensorType sensor_type
Definition: types.h:1377
float values[MAX_SENSOR_DATA_LENGTH]
Definition: types.h:1379
AnboxSensorVector represents acceleration along each device axis or current device rotation angles: a...
Definition: types.h:1349
float v[MAX_VECTOR_DATA_LENGTH]
Definition: types.h:1352
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:1555
AnboxVhalPropertyConfig * configs
Definition: types.h:1557
AnboxVhalAreaConfig describes the configuration of a given area id for a VHAL property.
Definition: types.h:1496
int32_t min_int32_value
Definition: types.h:1498
float min_float_value
Definition: types.h:1502
char(* area_names)[MAX_VHAL_AREA_NAME_LENGTH]
Definition: types.h:1505
float max_float_value
Definition: types.h:1503
int64_t max_int64_value
Definition: types.h:1501
int64_t min_int64_value
Definition: types.h:1500
int32_t area_id
Definition: types.h:1497
int32_t max_int32_value
Definition: types.h:1499
uint32_t area_names_size
Definition: types.h:1504
AnboxVhalCommandGet describes a get request to send to the Android VHAL.
Definition: types.h:1564
int32_t area_id
Definition: types.h:1566
uint32_t string_value_size
Definition: types.h:1575
uint32_t int32_values_size
Definition: types.h:1567
int32_t * int32_values
Definition: types.h:1568
uint32_t float_values_size
Definition: types.h:1569
char * string_value
Definition: types.h:1576
int32_t prop_id
Definition: types.h:1565
uint32_t bytes_size
Definition: types.h:1573
uint8_t * bytes
Definition: types.h:1574
int64_t * int64_values
Definition: types.h:1572
float * float_values
Definition: types.h:1570
uint32_t int64_values_size
Definition: types.h:1571
AnboxVhalCommandSet describes a set request to send to the Android VHAL.
Definition: types.h:1583
uint32_t int64_values_size
Definition: types.h:1591
uint32_t int32_values_size
Definition: types.h:1587
int32_t * int32_values
Definition: types.h:1588
char * string_value
Definition: types.h:1596
uint8_t * bytes
Definition: types.h:1594
uint32_t string_value_size
Definition: types.h:1595
AnboxVhalPropertyStatus status
Definition: types.h:1586
int32_t area_id
Definition: types.h:1585
uint32_t float_values_size
Definition: types.h:1589
int64_t * int64_values
Definition: types.h:1592
int32_t prop_id
Definition: types.h:1584
uint32_t bytes_size
Definition: types.h:1593
float * float_values
Definition: types.h:1590
AnboxVhalPropertyConfig describes the configuration of a VHAL property.
Definition: types.h:1522
uint32_t config_array_size
Definition: types.h:1529
AnboxVhalPropertyChangeMode change_mode
Definition: types.h:1526
AnboxVhalPropertyType value_type
Definition: types.h:1524
AnboxVhalPropertyAccess access
Definition: types.h:1525
int32_t * config_array
Definition: types.h:1530
AnboxVhalAreaConfig * area_configs
Definition: types.h:1528
uint32_t config_string_size
Definition: types.h:1531
uint32_t area_configs_size
Definition: types.h:1527
uint32_t prop_name_size
Definition: types.h:1535
AnboxVhalPropertyValue describes the current value of a VHAL property, as returned by a get call to t...
Definition: types.h:1466
uint32_t float_values_size
Definition: types.h:1473
uint32_t string_value_size
Definition: types.h:1479
int64_t * int64_values
Definition: types.h:1476
uint32_t int64_values_size
Definition: types.h:1475
uint32_t bytes_size
Definition: types.h:1477
float * float_values
Definition: types.h:1474
uint32_t int32_values_size
Definition: types.h:1471
int32_t * int32_values
Definition: types.h:1472
AnboxVhalPropertyStatus status
Definition: types.h:1470
AnboxVideoDecoderConfig describes the configuration of a video decoder.
Definition: types.h:1620
AnboxVideoPixelFormat output_format
Definition: types.h:1626
AnboxVideoFrame represents a single complete video frame.
Definition: types.h:751
size_t size
Definition: types.h:755
uint8_t * data
Definition: types.h:753
AnboxVideoImage describes a decoded image returned by the video decoder.
Definition: types.h:1632
uint8_t color_range
Definition: types.h:1648
uint32_t width
Definition: types.h:1636
uint8_t * data
Definition: types.h:1652
uint8_t color_matrix
Definition: types.h:1642
uint8_t color_primaries
Definition: types.h:1644
uint64_t size
Definition: types.h:1650
uint32_t height
Definition: types.h:1638
AnboxVideoPixelFormat pixel_format
Definition: types.h:1634
uint8_t color_transfer
Definition: types.h:1646
int64_t pts
Definition: types.h:1640
uint32_t hw_clock_discontinuity_count
Definition: types.h:1106
int64_t time_ns
Definition: types.h:1012
double drift_nsps
Definition: types.h:1065
double bias_ns
Definition: types.h:1040
GnssClockFlags flags
Definition: types.h:1111
double bias_uncertainty_ns
Definition: types.h:1051
int64_t full_bias_ns
Definition: types.h:1029
double drift_uncertainty_nsps
Definition: types.h:1075
double pseudorange_rate_uncertainty_mps
Definition: types.h:977
GnssMeasurementState state
Definition: types.h:858
float carrier_frequency_hz
Definition: types.h:986
double c_n0_dbhz
Definition: types.h:942
int16_t svid
Definition: types.h:844
GnssConstellationType constellation
Definition: types.h:850
double pseudorange_rate_mps
Definition: types.h:969
int64_t received_sv_time_in_ns
Definition: types.h:927
int64_t received_sv_time_uncertainty_in_ns
Definition: types.h:934
AnboxVhalPropertyChangeMode
AnboxVhalPropertyChangeMode describes how the property changes.
Definition: types.h:1452
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_CONTINUOUS
Definition: types.h:1455
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_ON_CHANGE
Definition: types.h:1454
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_STATIC
Definition: types.h:1453
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:725
@ CAMERA_FACING_MODE_REAR
Definition: types.h:729
@ CAMERA_FACING_MODE_FRONT
Definition: types.h:727
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:689
@ LANDSCAPE_REVERSED
Definition: types.h:697
@ LANDSCAPE
Definition: types.h:693
@ PORTRAIT_REVERSED
Definition: types.h:695
@ PORTRAIT
Definition: types.h:691
AnboxGraphicsTextureFormat
AnboxGraphicsTextureFormat describes a list of supported texture formats Anbox can provide a frame in...
Definition: types.h:1231
@ TEXTURE_FORMAT_RGBA
Definition: types.h:1233
@ TEXTURE_FORMAT_BGRA
Definition: types.h:1235
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:1420
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT_VEC
Definition: types.h:1428
@ ANBOX_VHAL_PROPERTY_TYPE_INT32
Definition: types.h:1423
@ ANBOX_VHAL_PROPERTY_TYPE_MIXED
Definition: types.h:1430
@ ANBOX_VHAL_PROPERTY_TYPE_BYTES
Definition: types.h:1429
@ ANBOX_VHAL_PROPERTY_TYPE_INT64_VEC
Definition: types.h:1426
@ ANBOX_VHAL_PROPERTY_TYPE_INT32_VEC
Definition: types.h:1424
@ ANBOX_VHAL_PROPERTY_TYPE_BOOLEAN
Definition: types.h:1422
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT
Definition: types.h:1427
@ ANBOX_VHAL_PROPERTY_TYPE_STRING
Definition: types.h:1421
@ ANBOX_VHAL_PROPERTY_TYPE_INT64
Definition: types.h:1425
AnboxTraceEventPhase
Type defining the phase of a trace event, e.g. begin/end pair.
Definition: types.h:1664
@ ANBOX_TRACE_EVENT_PHASE_COUNTER
Definition: types.h:1668
@ ANBOX_TRACE_EVENT_PHASE_END
Definition: types.h:1666
@ ANBOX_TRACE_EVENT_PHASE_BEGIN
Definition: types.h:1665
@ ANBOX_TRACE_EVENT_PHASE_INSTANT
Definition: types.h:1667
AnboxPlatformConfigurationItemValueType
Definition: types.h:405
@ BOOLEAN
Definition: types.h:407
GnssClockFlags
Definition: types.h:813
@ HAS_LEAP_SECOND
Definition: types.h:815
@ HAS_BIAS
Definition: types.h:821
@ HAS_DRIFT
Definition: types.h:825
@ HAS_FULL_BIAS
Definition: types.h:819
@ HAS_DRIFT_UNCERTAINTY
Definition: types.h:827
@ HAS_BIAS_UNCERTAINTY
Definition: types.h:823
@ HAS_TIME_UNCERTAINTY
Definition: types.h:817
GnssConstellationType
Definition: types.h:766
@ GPS
Definition: types.h:768
@ QZSS
Definition: types.h:771
@ SBAS
Definition: types.h:769
@ UNKNOWN
Definition: types.h:767
@ GLONASS
Definition: types.h:770
@ BEIDOU
Definition: types.h:772
@ GALILEO
Definition: types.h:773
#define MAX_SENSOR_DATA_LENGTH
Definition: types.h:1316
AnboxVideoCodecType
AnboxVideoCodecType describes the type of a video codec.
Definition: types.h:1602
@ ANBOX_VIDEO_CODEC_TYPE_H264
Definition: types.h:1605
@ ANBOX_VIDEO_CODEC_TYPE_UNKNOWN
Definition: types.h:1603
#define MAX_VECTOR_DATA_LENGTH
Definition: types.h:1317
#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:1187
@ RMC
Definition: types.h:1193
@ Unknown
Definition: types.h:1189
@ GNSSv1
Definition: types.h:1196
@ GGA
Definition: types.h:1191
AnboxGraphicsFlipMode
AnboxGraphicsFlipMode describes if the final frame needs to be flipped to have the right visual orien...
Definition: types.h:1218
@ FLIP_MODE_VERTICAL
Definition: types.h:1222
@ FLIP_MODE_NONE
Definition: types.h:1220
@ FLIP_MODE_HORIZONTAL
Definition: types.h:1224
AnboxCameraOrientation
describes the orientations that Anbox supports in the camea processor
Definition: types.h:715
@ CAMERA_ORIENTATION_LANDSCAPE
Definition: types.h:719
@ CAMERA_ORIENTATION_PORTRAIT
Definition: types.h:717
AnboxVhalPropertyAccess
AnboxVhalPropertyAccess describes if the property is read, write, or both.
Definition: types.h:1440
@ ANBOX_VHAL_PROPERTY_ACCESS_WRITE
Definition: types.h:1443
@ ANBOX_VHAL_PROPERTY_ACCESS_READ
Definition: types.h:1442
@ ANBOX_VHAL_PROPERTY_ACCESS_READ_WRITE
Definition: types.h:1444
@ ANBOX_VHAL_PROPERTY_ACCESS_NONE
Definition: types.h:1441
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:1699
AnboxTraceEventArgType
Type of an argument passed with a trace event.
Definition: types.h:1675
@ ANBOX_TRACE_EVENT_ARG_TYPE_STRING
Definition: types.h:1681
@ ANBOX_TRACE_EVENT_ARG_TYPE_BOOL
Definition: types.h:1676
@ ANBOX_TRACE_EVENT_ARG_TYPE_UINT
Definition: types.h:1677
@ ANBOX_TRACE_EVENT_ARG_TYPE_INT
Definition: types.h:1678
@ ANBOX_TRACE_EVENT_ARG_TYPE_DOUBLE
Definition: types.h:1679
@ ANBOX_TRACE_EVENT_ARG_TYPE_POINTER
Definition: types.h:1680
@ ANBOX_TRACE_EVENT_ARG_TYPE_COPY_STRING
Definition: types.h:1682
GnssMeasurementState
Definition: types.h:790
@ STATE_CODE_LOCK
Definition: types.h:792
@ STATE_MSEC_AMBIGUOUS
Definition: types.h:796
@ STATE_TOW_KNOWN
Definition: types.h:806
@ STATE_GLO_TOD_KNOWN
Definition: types.h:807
@ STATE_SYMBOL_SYNC
Definition: types.h:797
@ STATE_GLO_TOD_DECODED
Definition: types.h:799
@ STATE_GAL_E1BC_CODE_LOCK
Definition: types.h:802
@ STATE_GLO_STRING_SYNC
Definition: types.h:798
@ STATE_SBAS_SYNC
Definition: types.h:805
@ STATE_UNKNOWN
Definition: types.h:791
@ STATE_SUBFRAME_SYNC
Definition: types.h:794
@ STATE_BIT_SYNC
Definition: types.h:793
@ STATE_GAL_E1B_PAGE_SYNC
Definition: types.h:804
@ STATE_BDS_D2_SUBFRAME_SYNC
Definition: types.h:801
@ STATE_GAL_E1C_2ND_CODE_LOCK
Definition: types.h:803
@ STATE_TOW_DECODED
Definition: types.h:795
@ STATE_BDS_D2_BIT_SYNC
Definition: types.h:800
AnboxVideoPixelFormat
AnboxVideoPixelFormat describes a pixel format.
Definition: types.h:1611
@ ANBOX_VIDEO_PIXEL_FORMAT_YUV420P
Definition: types.h:1614
@ ANBOX_VIDEO_PIXEL_FORMAT_UNKNOWN
Definition: types.h:1612
AnboxVhalPropertyStatus
AnboxVhalPropertyStatus describes the status of a VHAL property.
Definition: types.h:1407
@ ANBOX_VHAL_PROPERTY_STATUS_ERROR
Definition: types.h:1410
@ ANBOX_VHAL_PROPERTY_STATUS_AVAILABLE
Definition: types.h:1408
@ ANBOX_VHAL_PROPERTY_STATUS_UNAVAILABLE
Definition: types.h:1409
#define GNSS_MAX_MEASUREMENT
Definition: types.h:758
AnboxVhalAnswerStatus
AnboxVhalAnswerStatus describes the return status of a request sent to the Android VHAL.
Definition: types.h:1543
@ ANBOX_VHAL_ANSWER_STATUS_UNKNOWN
Definition: types.h:1548
@ ANBOX_VHAL_ANSWER_STATUS_OK
Definition: types.h:1544
@ ANBOX_VHAL_ANSWER_STATUS_INVALID
Definition: types.h:1546
AnboxVideoColorSpaceFormat
AnboxVideoColorFormat describes the color space format of a video frame.
Definition: types.h:703
@ VIDEO_FRAME_FORMAT_UNKNOWN
Definition: types.h:705
@ VIDEO_FRAME_FORMAT_YUV420
Definition: types.h:707
@ VIDEO_FRAME_FORMAT_RGBA
Definition: types.h:709
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:1322
@ ORIENTATION
Definition: types.h:1332
@ PROXIMITY
Definition: types.h:1336
@ MAGNETOMETER
Definition: types.h:1330
@ PRESSURE
Definition: types.h:1340
@ GYROSCOPE
Definition: types.h:1328
@ NONE
Definition: types.h:1324
@ TEMPERATURE
Definition: types.h:1334
@ ACCELERATION
Definition: types.h:1326
@ LIGHT
Definition: types.h:1338
@ HUMIDITY
Definition: types.h:1342
AnboxInputDeviceType
AnboxInputDeviceType describes the type of device an input event belongs to. Possible device types ar...
Definition: types.h:1284
@ GAMEPAD
Definition: types.h:1292
@ TOUCHPANEL
Definition: types.h:1290
@ POINTER
Definition: types.h:1286
@ KEYBOARD
Definition: types.h:1288
#define ANBOX_GRAPHICS_BUFFER_MAX_PLANES
Definition: types.h:287
AnboxEventType
AnboxEventType describes the type of event sent from Anbox.
Definition: types.h:677
@ ANBOX_EVENT_TYPE_TERMINATING
Definition: types.h:683
@ ANBOX_EVENT_TYPE_INITIALIZATION_FINISHED
Definition: types.h:681
@ ANBOX_EVENT_TYPE_ANDROID_BOOT_FINISHED
Definition: types.h:679
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:761