anbox-platform-sdk  1.28.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 */
408  /* 32-bit unsigned integer value */
410  /* string value, represented as a null-terminated character array */
413 
414 /*
415  * @brief AnboxPlatformConfigurationItemInfo describes a single platform configuration item
416  *
417  * It allows the platform to define a set of configuration items which will remain transparent
418  * to Anbox but can be changed through it's /1.0/platform HTTP API endpoint at runtime.
419  */
420 typedef struct {
421  /* ID of the configuration item, must be >= PLATFORM_CONFIGURATION_ID_START and <= PLATFORM_CONFIGURATION_ID_END */
422  int id;
423  /* Name of the configuration item */
424  char name[MAX_NAME_LENGTH];
425  /* Type of the value the configuration item stores */
428 
429 /*
430  * @brief AnboxPlatformConfigurationInfo describes a set of platform specific
431  * configuration items.
432  *
433  * Anbox will query the platform for available configuration items and make
434  * them accessible through its /1.0/platform HTTP API endpoint. This allows
435  * runtime configuration of the platform.
436  */
437 typedef struct {
438  /* Number of available configuration items */
439  uint16_t num_items;
440  /* Available configuration items or NULL if none are available */
443 
451 typedef struct {
452  /* Number of Android system properties required by a platform*/
453  uint16_t size;
454  /* Array of Android system properties */
455  const char** properties;
457 
462 typedef enum {
471 
480 
489 
502 
514 
526 
538 
548 
549  /*
550  * List of supported video codecs supported by the video decoder implemented
551  * by the platform.
552  *
553  * Anbox will instruct it's HAL layer on the Android side to only exposed
554  * support for the codecs listed.
555  *
556  * The value of this configuration item is of type AnboxVideoCodecType[]
557  */
559 
560  /*
561  * The graphics implementation type defines how graphics acceleration will be
562  * provided to the Android container.
563  *
564  * Anbox supports different ways of exposing graphic acceleration to the Android
565  * container. Graphics acceleration can either be provided through a translation
566  * layer where all access to the GPU happens on the Anbox side and Android has
567  * no direct access to the GPU. Alternatively Android can get direct GPU access
568  * and perform all graphics acceleration directly.
569  *
570  * If not provided by a platform implementation, Anbox will default to
571  * ANBOX_GRAPHICS_IMPLEMENTATION_TYPE_HOST_RENDERING
572  *
573  * The value of this configuration item is of type `AnboxGraphicsImplementationType`
574  */
576 
577  /*
578  * Configuration details for direct graphics acceleration
579  *
580  * The platform can further detail on how nativ graphics acceleration will be
581  * made available inside the Android container. This allows defining GL/Vulkan
582  * driver implementation names and other things.
583  *
584  * The value of this configuration item is of type `AnboxDirectGraphicsConfiguration`
585  */
587 
588  /*
589  * Information about platform specific configuration options
590  *
591  * The value of this configuration is of type AnboxPlatformConfigurationInfo
592  */
594 
595  /*
596  * Base uid used in the Android contaienr
597  *
598  * The value of this configuration item is of type `uint32_t`.
599  */
601 
602  /*
603  * Path to Vulkan ICD to be used for host side rendering
604  *
605  * The value of this configuration item is of type `const char*`
606  */
608 
609  /*
610  * Path to the DRM render node Anbox should use for host side
611  * rendering.
612  *
613  * The value of this configuration item is of type `const char*`
614  */
616 
617  /*
618  * Whether the platform requires support for sw sync primitives or not.
619  *
620  * The value of this configuration item is of type `uint8_t` which
621  * represents a boolean value, encoded as 8 bit unsigned integer type
622  * (uint8_t) where 0 = false and > 0 = true
623  *
624  * Not used anymore since 1.27
625  */
627 
628  /*
629  * Android system properties required to forward to Android container
630  *
631  * The value of this configuration item is of type `AnboxAndroidSystemProperties`
632  */
634 
635  /*
636  * The API defines a range of platform specific configuration items which can be
637  * dynamically exposed by the platform. PLATFORM_CONFIGURATION_START specifies
638  * the first configuration item id.
639  */
641 
642  /*
643  * The API defines a range of platform specific configuration items which can be
644  * dynamically exposed by the platform. PLATFORM_CONFIGURATION_END specifies
645  * the last configuration item id.
646  */
649 
650 
659 
666  void* data;
667 
673  size_t data_size;
674 };
682 
683  /*
684  * A pointer to a null-terminated ('\0') string containing additional configuration
685  * data used by the platform during initialization or NULL if no additional
686  * configuration data is available.
687  */
688  const char* extra_config_data;
689 };
690 
696  const char name[MAX_STRING_LENGTH];
703 };
704 
708 typedef enum {
716 
720 typedef enum {
722  PORTRAIT = 0,
730 
734 typedef enum {
742 
746 typedef enum {
752 
756 typedef enum {
762 
772  uint32_t fps;
774  uint32_t width;
776  uint32_t height;
777 };
778 
784  uint8_t* data;
786  size_t size;
787 };
788 
789 #define GNSS_MAX_MEASUREMENT 64
790 
792 typedef int64_t GpsUtcTime;
793 
797 typedef enum : uint8_t {
798  UNKNOWN = 0,
799  GPS = 1,
800  SBAS = 2,
801  GLONASS = 3,
802  QZSS = 4,
803  BEIDOU = 5,
804  GALILEO = 6,
806 
821 typedef enum : uint32_t {
823  STATE_CODE_LOCK = 1 << 0,
824  STATE_BIT_SYNC = 1 << 1,
836  STATE_SBAS_SYNC = 1 << 13,
837  STATE_TOW_KNOWN = 1 << 14,
840 
844 typedef enum : uint16_t {
846  HAS_LEAP_SECOND = 1 << 0,
850  HAS_FULL_BIAS = 1 << 2,
852  HAS_BIAS = 1 << 3,
856  HAS_DRIFT = 1 << 5,
858  HAS_DRIFT_UNCERTAINTY = 1 << 6
860 
875  int16_t svid;
876 
882 
890 
959 
966 
973  double c_n0_dbhz;
974 
1001 
1009 
1018 };
1019 
1023 struct GnssClock {
1043  int64_t time_ns;
1044 
1060  int64_t full_bias_ns;
1061 
1071  double bias_ns;
1072 
1083 
1096  double drift_nsps;
1097 
1107 
1138 
1143 };
1151  double latitude;
1155  double longitude;
1159  double altitude;
1166 };
1167 
1175  char status;
1177  double latitude;
1181  double longitude;
1185  float speed;
1187  float bearing;
1194 };
1195 
1206 
1209 
1212 };
1213 
1214 
1218 typedef enum : uint32_t {
1220  Unknown = 1 << 0,
1222  GGA = 1 << 1,
1224  RMC = 1 << 2,
1227  GNSSv1 = 1 << 3,
1229 
1238  union {
1242  };
1243 };
1244 
1249 typedef enum {
1257 
1262 typedef enum {
1268 
1273 typedef struct {
1277  EGLNativeDisplayType native_display;
1278 
1283  EGLNativeWindowType native_window;
1284 
1291 
1300 
1310 
1315 typedef enum {
1317  POINTER = 0,
1325 
1336  int32_t device_id;
1339  uint16_t type;
1341  uint16_t code;
1344  int32_t value;
1345 };
1346 
1347 #define MAX_SENSOR_DATA_LENGTH 16
1348 #define MAX_VECTOR_DATA_LENGTH 3
1349 
1353 typedef enum : uint32_t {
1355  NONE = 0,
1357  ACCELERATION = 1 << 0,
1359  GYROSCOPE = 1 << 1,
1361  MAGNETOMETER = 1 << 2,
1363  ORIENTATION = 1 << 3,
1365  TEMPERATURE = 1 << 4,
1367  PROXIMITY = 1 << 5,
1369  LIGHT = 1 << 6,
1371  PRESSURE = 1 << 7,
1373  HUMIDITY = 1 << 8,
1374 } AnboxSensorType;
1375 
1381  union {
1384  struct {
1386  float x;
1388  float y;
1390  float z;
1391  } axis;
1392  struct {
1394  float azimuth;
1396  float pitch;
1398  float roll;
1400  };
1401 };
1402 
1409  union {
1422  float proximity;
1424  float light;
1426  float pressure;
1428  float humidity;
1429  };
1430 };
1431 
1438 typedef enum {
1443 
1451 typedef enum {
1463 
1471 typedef enum {
1477 
1483 typedef enum {
1488 
1498  int64_t timestamp;
1499  int32_t area_id;
1500  int32_t prop;
1503  int32_t* int32_values;
1507  int64_t* int64_values;
1508  uint32_t bytes_size;
1509  uint8_t* bytes;
1512 };
1513 
1528  int32_t area_id;
1537 };
1538 
1554  int32_t prop;
1561  int32_t* config_array;
1566  uint32_t prop_name_size;
1567  char* prop_name;
1568 };
1569 
1574 typedef enum {
1581 
1587  uint32_t configs_size;
1589 };
1590 
1596  int32_t prop_id;
1597  int32_t area_id;
1599  int32_t* int32_values;
1603  int64_t* int64_values;
1604  uint32_t bytes_size;
1605  uint8_t* bytes;
1608 };
1609 
1615  int32_t prop_id;
1616  int32_t area_id;
1619  int32_t* int32_values;
1623  int64_t* int64_values;
1624  uint32_t bytes_size;
1625  uint8_t* bytes;
1628 };
1629 
1633 typedef enum : uint8_t {
1635  /* H.264 / AVC */
1638 
1642 typedef enum : uint8_t {
1644  /* YUV420P */
1647 
1652  /* Target output width */
1653  uint32_t width = 0;
1654  /* Target output height */
1655  uint32_t height = 0;
1656  /* Expected output pixel format */
1658 };
1659 
1664  /* Pixel format of the image */
1666  /* Width of the image */
1667  uint32_t width = 0;
1668  /* Height of the image */
1669  uint32_t height = 0;
1670  /* Presentation timestmap of the image in milliseconds */
1671  int64_t pts = 0;
1672  /* Color matrix coefficients of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1673  uint8_t color_matrix = 0;
1674  /* Color primaries of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1675  uint8_t color_primaries = 0;
1676  /* Color transfer of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1677  uint8_t color_transfer = 0;
1678  /* Color range of the image as defined in E.2.1 (VUI parameters semantics) of the H264 specification */
1679  uint8_t color_range = 0;
1680  /* Size of the image data */
1681  uint64_t size = 0;
1682  /* Data of the image */
1683  uint8_t* data = nullptr;
1684 };
1685 
1690 typedef const unsigned char* (*AnboxTracerGetCategoryEnabledFunc)(const char* name);
1691 
1695 typedef enum {
1701 
1702 
1706 typedef enum {
1715 
1730 typedef void (*AnboxTracerAddEventFunc)(
1731  char phase,
1732  const unsigned char* category,
1733  const char* name,
1734  unsigned long long id,
1735  int num_args,
1736  const char** arg_names,
1737  const unsigned char* arg_types,
1738  const unsigned long long* arg_values,
1739  unsigned char flags);
1740 
1741 #endif
AnboxAndroidSystemProperties describes the Android system properties provided by a platform to be for...
Definition: types.h:451
const char ** properties
Definition: types.h:455
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:766
uint32_t fps
Definition: types.h:772
uint32_t height
Definition: types.h:776
uint32_t width
Definition: types.h:774
AnboxCameraFacingMode facing_mode
Definition: types.h:770
AnboxVideoColorSpaceFormat format
Definition: types.h:768
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:1155
char latitudeHemi
Definition: types.h:1153
double altitude
Definition: types.h:1159
double latitude
Definition: types.h:1151
char longitudeHemi
Definition: types.h:1157
char altitudeUnit
Definition: types.h:1161
GpsUtcTime time
Definition: types.h:1149
float verticalAccuracy
Definition: types.h:1165
float horizontalAccuracy
Definition: types.h:1163
GnssClock clock
Definition: types.h:1205
GnssMeasurement measurements[GNSS_MAX_MEASUREMENT]
Definition: types.h:1211
size_t measurement_count
Definition: types.h:1208
AnboxGnssData gnss_data
Definition: types.h:1241
AnboxGGAData gga_data
Definition: types.h:1239
AnboxGpsDataType data_type
Definition: types.h:1237
AnboxRMCData rmc_data
Definition: types.h:1240
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:1273
AnboxGraphicsFlipMode output_flip_mode
Definition: types.h:1290
EGLNativeDisplayType native_display
Definition: types.h:1277
EGLNativeWindowType native_window
Definition: types.h:1283
AnboxGraphicsTextureFormat texture_format
Definition: types.h:1299
AnboxInputEvent is similar to the input_event that is defined in the Linux kernel API....
Definition: types.h:1332
uint16_t code
Definition: types.h:1341
int32_t device_id
Definition: types.h:1336
uint16_t type
Definition: types.h:1339
int32_t value
Definition: types.h:1344
AnboxInputDeviceType device_type
Definition: types.h:1334
AnboxPlatformConfigurationItemInfo ** items
Definition: types.h:441
AnboxPlatformConfigurationItemValueType type
Definition: types.h:426
Represents a single configuration item.
Definition: types.h:654
void * data
Pointer to the value buffer for this configuration key. The caller is responsible for ensuring the me...
Definition: types.h:666
AnboxPlatformConfigurationKey key
The unique identifier for the configuration option.
Definition: types.h:658
size_t data_size
The size of the memory buffer (in bytes) pointed to by data. This is used for type-safety and bounds ...
Definition: types.h:673
AnboxPlatformConfiguration holds platform configuration options which Anbox supplies to the platform ...
Definition: types.h:679
uint32_t android_api_level
Definition: types.h:681
const char * extra_config_data
Definition: types.h:688
AnboxPlatformDescriptor provides information about the implemented platform.
Definition: types.h:694
uint32_t platform_version
Definition: types.h:702
const char vendor[MAX_STRING_LENGTH]
Definition: types.h:698
const char name[MAX_STRING_LENGTH]
Definition: types.h:696
const char description[MAX_STRING_LENGTH]
Definition: types.h:700
char latitudeHemi
Definition: types.h:1179
GpsUtcTime time
Definition: types.h:1173
float bearing
Definition: types.h:1187
double longitude
Definition: types.h:1181
char status
Definition: types.h:1175
float verticalAccuracy
Definition: types.h:1193
float horizontalAccuracy
Definition: types.h:1191
GpsUtcTime date
Definition: types.h:1189
double latitude
Definition: types.h:1177
char longitudeHemi
Definition: types.h:1183
float speed
Definition: types.h:1185
AnboxSensorData represents the sensor data stucture,.
Definition: types.h:1406
float temperature
Definition: types.h:1420
AnboxSensorVector gyroscope
Definition: types.h:1414
AnboxSensorVector orientation
Definition: types.h:1416
float humidity
Definition: types.h:1428
AnboxSensorVector magnetic
Definition: types.h:1418
float light
Definition: types.h:1424
AnboxSensorVector acceleration
Definition: types.h:1412
float pressure
Definition: types.h:1426
float proximity
Definition: types.h:1422
AnboxSensorType sensor_type
Definition: types.h:1408
float values[MAX_SENSOR_DATA_LENGTH]
Definition: types.h:1410
AnboxSensorVector represents acceleration along each device axis or current device rotation angles: a...
Definition: types.h:1380
float v[MAX_VECTOR_DATA_LENGTH]
Definition: types.h:1383
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:1586
AnboxVhalPropertyConfig * configs
Definition: types.h:1588
AnboxVhalAreaConfig describes the configuration of a given area id for a VHAL property.
Definition: types.h:1527
int32_t min_int32_value
Definition: types.h:1529
float min_float_value
Definition: types.h:1533
char(* area_names)[MAX_VHAL_AREA_NAME_LENGTH]
Definition: types.h:1536
float max_float_value
Definition: types.h:1534
int64_t max_int64_value
Definition: types.h:1532
int64_t min_int64_value
Definition: types.h:1531
int32_t area_id
Definition: types.h:1528
int32_t max_int32_value
Definition: types.h:1530
uint32_t area_names_size
Definition: types.h:1535
AnboxVhalCommandGet describes a get request to send to the Android VHAL.
Definition: types.h:1595
int32_t area_id
Definition: types.h:1597
uint32_t string_value_size
Definition: types.h:1606
uint32_t int32_values_size
Definition: types.h:1598
int32_t * int32_values
Definition: types.h:1599
uint32_t float_values_size
Definition: types.h:1600
char * string_value
Definition: types.h:1607
int32_t prop_id
Definition: types.h:1596
uint32_t bytes_size
Definition: types.h:1604
uint8_t * bytes
Definition: types.h:1605
int64_t * int64_values
Definition: types.h:1603
float * float_values
Definition: types.h:1601
uint32_t int64_values_size
Definition: types.h:1602
AnboxVhalCommandSet describes a set request to send to the Android VHAL.
Definition: types.h:1614
uint32_t int64_values_size
Definition: types.h:1622
uint32_t int32_values_size
Definition: types.h:1618
int32_t * int32_values
Definition: types.h:1619
char * string_value
Definition: types.h:1627
uint8_t * bytes
Definition: types.h:1625
uint32_t string_value_size
Definition: types.h:1626
AnboxVhalPropertyStatus status
Definition: types.h:1617
int32_t area_id
Definition: types.h:1616
uint32_t float_values_size
Definition: types.h:1620
int64_t * int64_values
Definition: types.h:1623
int32_t prop_id
Definition: types.h:1615
uint32_t bytes_size
Definition: types.h:1624
float * float_values
Definition: types.h:1621
AnboxVhalPropertyConfig describes the configuration of a VHAL property.
Definition: types.h:1553
uint32_t config_array_size
Definition: types.h:1560
AnboxVhalPropertyChangeMode change_mode
Definition: types.h:1557
AnboxVhalPropertyType value_type
Definition: types.h:1555
AnboxVhalPropertyAccess access
Definition: types.h:1556
int32_t * config_array
Definition: types.h:1561
AnboxVhalAreaConfig * area_configs
Definition: types.h:1559
uint32_t config_string_size
Definition: types.h:1562
uint32_t area_configs_size
Definition: types.h:1558
uint32_t prop_name_size
Definition: types.h:1566
AnboxVhalPropertyValue describes the current value of a VHAL property, as returned by a get call to t...
Definition: types.h:1497
uint32_t float_values_size
Definition: types.h:1504
uint32_t string_value_size
Definition: types.h:1510
int64_t * int64_values
Definition: types.h:1507
uint32_t int64_values_size
Definition: types.h:1506
uint32_t bytes_size
Definition: types.h:1508
float * float_values
Definition: types.h:1505
uint32_t int32_values_size
Definition: types.h:1502
int32_t * int32_values
Definition: types.h:1503
AnboxVhalPropertyStatus status
Definition: types.h:1501
AnboxVideoDecoderConfig describes the configuration of a video decoder.
Definition: types.h:1651
AnboxVideoPixelFormat output_format
Definition: types.h:1657
AnboxVideoFrame represents a single complete video frame.
Definition: types.h:782
size_t size
Definition: types.h:786
uint8_t * data
Definition: types.h:784
AnboxVideoImage describes a decoded image returned by the video decoder.
Definition: types.h:1663
uint8_t color_range
Definition: types.h:1679
uint32_t width
Definition: types.h:1667
uint8_t * data
Definition: types.h:1683
uint8_t color_matrix
Definition: types.h:1673
uint8_t color_primaries
Definition: types.h:1675
uint64_t size
Definition: types.h:1681
uint32_t height
Definition: types.h:1669
AnboxVideoPixelFormat pixel_format
Definition: types.h:1665
uint8_t color_transfer
Definition: types.h:1677
int64_t pts
Definition: types.h:1671
uint32_t hw_clock_discontinuity_count
Definition: types.h:1137
int64_t time_ns
Definition: types.h:1043
double drift_nsps
Definition: types.h:1096
double bias_ns
Definition: types.h:1071
GnssClockFlags flags
Definition: types.h:1142
double bias_uncertainty_ns
Definition: types.h:1082
int64_t full_bias_ns
Definition: types.h:1060
double drift_uncertainty_nsps
Definition: types.h:1106
double pseudorange_rate_uncertainty_mps
Definition: types.h:1008
GnssMeasurementState state
Definition: types.h:889
float carrier_frequency_hz
Definition: types.h:1017
double c_n0_dbhz
Definition: types.h:973
int16_t svid
Definition: types.h:875
GnssConstellationType constellation
Definition: types.h:881
double pseudorange_rate_mps
Definition: types.h:1000
int64_t received_sv_time_in_ns
Definition: types.h:958
int64_t received_sv_time_uncertainty_in_ns
Definition: types.h:965
AnboxVhalPropertyChangeMode
AnboxVhalPropertyChangeMode describes how the property changes.
Definition: types.h:1483
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_CONTINUOUS
Definition: types.h:1486
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_ON_CHANGE
Definition: types.h:1485
@ ANBOX_VHAL_PROPERTY_CHANGE_MODE_STATIC
Definition: types.h:1484
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:756
@ CAMERA_FACING_MODE_REAR
Definition: types.h:760
@ CAMERA_FACING_MODE_FRONT
Definition: types.h:758
AnboxPlatformConfigurationKey
AnboxPlatformConfigurationKey specifies configuration items which allow to influence the behavior and...
Definition: types.h:462
@ ENABLE_SW_SYNC_SUPPORT
Definition: types.h:626
@ BINDER_DEVICES
Definition: types.h:547
@ ANDROID_SYSTEM_PROPERTIES
Definition: types.h:633
@ OPENGL_ES1_CM_DRIVER_PATH
Definition: types.h:479
@ CONTAINER_BASE_UID
Definition: types.h:600
@ DIRECT_GRAPHICS_CONFIGURATION
Definition: types.h:586
@ DRM_RENDER_NODE_PATH
Definition: types.h:615
@ SUPPORTED_VIDEO_DECODE_CODECS
Definition: types.h:558
@ OPENGL_ES2_DRIVER_PATH
Definition: types.h:488
@ AUDIO_SPEC
Definition: types.h:513
@ VULKAN_ICD_PATH
Definition: types.h:607
@ GRAPHICS_IMPLEMENTATION_TYPE
Definition: types.h:575
@ AUDIO_INPUT_SPEC
Definition: types.h:537
@ PLATFORM_CONFIGURATION_INFO
Definition: types.h:593
@ DISPLAY_SPEC
Definition: types.h:501
@ DISPLAY_SPEC2
Definition: types.h:525
@ PLATFORM_CONFIGURATION_ID_START
Definition: types.h:640
@ EGL_DRIVER_PATH
Definition: types.h:470
@ PLATFORM_CONFIGURATION_ID_END
Definition: types.h:647
AnboxScreenOrientationType
AnboxScreenOrientationType describes the type of display orientation.
Definition: types.h:720
@ LANDSCAPE_REVERSED
Definition: types.h:728
@ LANDSCAPE
Definition: types.h:724
@ PORTRAIT_REVERSED
Definition: types.h:726
@ PORTRAIT
Definition: types.h:722
AnboxGraphicsTextureFormat
AnboxGraphicsTextureFormat describes a list of supported texture formats Anbox can provide a frame in...
Definition: types.h:1262
@ TEXTURE_FORMAT_RGBA
Definition: types.h:1264
@ TEXTURE_FORMAT_BGRA
Definition: types.h:1266
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:1451
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT_VEC
Definition: types.h:1459
@ ANBOX_VHAL_PROPERTY_TYPE_INT32
Definition: types.h:1454
@ ANBOX_VHAL_PROPERTY_TYPE_MIXED
Definition: types.h:1461
@ ANBOX_VHAL_PROPERTY_TYPE_BYTES
Definition: types.h:1460
@ ANBOX_VHAL_PROPERTY_TYPE_INT64_VEC
Definition: types.h:1457
@ ANBOX_VHAL_PROPERTY_TYPE_INT32_VEC
Definition: types.h:1455
@ ANBOX_VHAL_PROPERTY_TYPE_BOOLEAN
Definition: types.h:1453
@ ANBOX_VHAL_PROPERTY_TYPE_FLOAT
Definition: types.h:1458
@ ANBOX_VHAL_PROPERTY_TYPE_STRING
Definition: types.h:1452
@ ANBOX_VHAL_PROPERTY_TYPE_INT64
Definition: types.h:1456
AnboxTraceEventPhase
Type defining the phase of a trace event, e.g. begin/end pair.
Definition: types.h:1695
@ ANBOX_TRACE_EVENT_PHASE_COUNTER
Definition: types.h:1699
@ ANBOX_TRACE_EVENT_PHASE_END
Definition: types.h:1697
@ ANBOX_TRACE_EVENT_PHASE_BEGIN
Definition: types.h:1696
@ ANBOX_TRACE_EVENT_PHASE_INSTANT
Definition: types.h:1698
AnboxPlatformConfigurationItemValueType
Definition: types.h:405
@ UINT32
Definition: types.h:409
@ BOOLEAN
Definition: types.h:407
@ STRING
Definition: types.h:411
GnssClockFlags
Definition: types.h:844
@ HAS_LEAP_SECOND
Definition: types.h:846
@ HAS_BIAS
Definition: types.h:852
@ HAS_DRIFT
Definition: types.h:856
@ HAS_FULL_BIAS
Definition: types.h:850
@ HAS_DRIFT_UNCERTAINTY
Definition: types.h:858
@ HAS_BIAS_UNCERTAINTY
Definition: types.h:854
@ HAS_TIME_UNCERTAINTY
Definition: types.h:848
GnssConstellationType
Definition: types.h:797
@ GPS
Definition: types.h:799
@ QZSS
Definition: types.h:802
@ SBAS
Definition: types.h:800
@ UNKNOWN
Definition: types.h:798
@ GLONASS
Definition: types.h:801
@ BEIDOU
Definition: types.h:803
@ GALILEO
Definition: types.h:804
#define MAX_SENSOR_DATA_LENGTH
Definition: types.h:1347
AnboxVideoCodecType
AnboxVideoCodecType describes the type of a video codec.
Definition: types.h:1633
@ ANBOX_VIDEO_CODEC_TYPE_H264
Definition: types.h:1636
@ ANBOX_VIDEO_CODEC_TYPE_UNKNOWN
Definition: types.h:1634
#define MAX_VECTOR_DATA_LENGTH
Definition: types.h:1348
#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:1218
@ RMC
Definition: types.h:1224
@ Unknown
Definition: types.h:1220
@ GNSSv1
Definition: types.h:1227
@ GGA
Definition: types.h:1222
AnboxGraphicsFlipMode
AnboxGraphicsFlipMode describes if the final frame needs to be flipped to have the right visual orien...
Definition: types.h:1249
@ FLIP_MODE_VERTICAL
Definition: types.h:1253
@ FLIP_MODE_NONE
Definition: types.h:1251
@ FLIP_MODE_HORIZONTAL
Definition: types.h:1255
AnboxCameraOrientation
describes the orientations that Anbox supports in the camea processor
Definition: types.h:746
@ CAMERA_ORIENTATION_LANDSCAPE
Definition: types.h:750
@ CAMERA_ORIENTATION_PORTRAIT
Definition: types.h:748
AnboxVhalPropertyAccess
AnboxVhalPropertyAccess describes if the property is read, write, or both.
Definition: types.h:1471
@ ANBOX_VHAL_PROPERTY_ACCESS_WRITE
Definition: types.h:1474
@ ANBOX_VHAL_PROPERTY_ACCESS_READ
Definition: types.h:1473
@ ANBOX_VHAL_PROPERTY_ACCESS_READ_WRITE
Definition: types.h:1475
@ ANBOX_VHAL_PROPERTY_ACCESS_NONE
Definition: types.h:1472
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:1730
AnboxTraceEventArgType
Type of an argument passed with a trace event.
Definition: types.h:1706
@ ANBOX_TRACE_EVENT_ARG_TYPE_STRING
Definition: types.h:1712
@ ANBOX_TRACE_EVENT_ARG_TYPE_BOOL
Definition: types.h:1707
@ ANBOX_TRACE_EVENT_ARG_TYPE_UINT
Definition: types.h:1708
@ ANBOX_TRACE_EVENT_ARG_TYPE_INT
Definition: types.h:1709
@ ANBOX_TRACE_EVENT_ARG_TYPE_DOUBLE
Definition: types.h:1710
@ ANBOX_TRACE_EVENT_ARG_TYPE_POINTER
Definition: types.h:1711
@ ANBOX_TRACE_EVENT_ARG_TYPE_COPY_STRING
Definition: types.h:1713
GnssMeasurementState
Definition: types.h:821
@ STATE_CODE_LOCK
Definition: types.h:823
@ STATE_MSEC_AMBIGUOUS
Definition: types.h:827
@ STATE_TOW_KNOWN
Definition: types.h:837
@ STATE_GLO_TOD_KNOWN
Definition: types.h:838
@ STATE_SYMBOL_SYNC
Definition: types.h:828
@ STATE_GLO_TOD_DECODED
Definition: types.h:830
@ STATE_GAL_E1BC_CODE_LOCK
Definition: types.h:833
@ STATE_GLO_STRING_SYNC
Definition: types.h:829
@ STATE_SBAS_SYNC
Definition: types.h:836
@ STATE_UNKNOWN
Definition: types.h:822
@ STATE_SUBFRAME_SYNC
Definition: types.h:825
@ STATE_BIT_SYNC
Definition: types.h:824
@ STATE_GAL_E1B_PAGE_SYNC
Definition: types.h:835
@ STATE_BDS_D2_SUBFRAME_SYNC
Definition: types.h:832
@ STATE_GAL_E1C_2ND_CODE_LOCK
Definition: types.h:834
@ STATE_TOW_DECODED
Definition: types.h:826
@ STATE_BDS_D2_BIT_SYNC
Definition: types.h:831
AnboxVideoPixelFormat
AnboxVideoPixelFormat describes a pixel format.
Definition: types.h:1642
@ ANBOX_VIDEO_PIXEL_FORMAT_YUV420P
Definition: types.h:1645
@ ANBOX_VIDEO_PIXEL_FORMAT_UNKNOWN
Definition: types.h:1643
AnboxVhalPropertyStatus
AnboxVhalPropertyStatus describes the status of a VHAL property.
Definition: types.h:1438
@ ANBOX_VHAL_PROPERTY_STATUS_ERROR
Definition: types.h:1441
@ ANBOX_VHAL_PROPERTY_STATUS_AVAILABLE
Definition: types.h:1439
@ ANBOX_VHAL_PROPERTY_STATUS_UNAVAILABLE
Definition: types.h:1440
#define GNSS_MAX_MEASUREMENT
Definition: types.h:789
AnboxVhalAnswerStatus
AnboxVhalAnswerStatus describes the return status of a request sent to the Android VHAL.
Definition: types.h:1574
@ ANBOX_VHAL_ANSWER_STATUS_UNKNOWN
Definition: types.h:1579
@ ANBOX_VHAL_ANSWER_STATUS_OK
Definition: types.h:1575
@ ANBOX_VHAL_ANSWER_STATUS_INVALID
Definition: types.h:1577
AnboxVideoColorSpaceFormat
AnboxVideoColorFormat describes the color space format of a video frame.
Definition: types.h:734
@ VIDEO_FRAME_FORMAT_UNKNOWN
Definition: types.h:736
@ VIDEO_FRAME_FORMAT_YUV420
Definition: types.h:738
@ VIDEO_FRAME_FORMAT_RGBA
Definition: types.h:740
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:1353
@ ORIENTATION
Definition: types.h:1363
@ PROXIMITY
Definition: types.h:1367
@ MAGNETOMETER
Definition: types.h:1361
@ PRESSURE
Definition: types.h:1371
@ GYROSCOPE
Definition: types.h:1359
@ NONE
Definition: types.h:1355
@ TEMPERATURE
Definition: types.h:1365
@ ACCELERATION
Definition: types.h:1357
@ LIGHT
Definition: types.h:1369
@ HUMIDITY
Definition: types.h:1373
AnboxInputDeviceType
AnboxInputDeviceType describes the type of device an input event belongs to. Possible device types ar...
Definition: types.h:1315
@ GAMEPAD
Definition: types.h:1323
@ TOUCHPANEL
Definition: types.h:1321
@ POINTER
Definition: types.h:1317
@ KEYBOARD
Definition: types.h:1319
#define ANBOX_GRAPHICS_BUFFER_MAX_PLANES
Definition: types.h:287
AnboxEventType
AnboxEventType describes the type of event sent from Anbox.
Definition: types.h:708
@ ANBOX_EVENT_TYPE_TERMINATING
Definition: types.h:714
@ ANBOX_EVENT_TYPE_INITIALIZATION_FINISHED
Definition: types.h:712
@ ANBOX_EVENT_TYPE_ANDROID_BOOT_FINISHED
Definition: types.h:710
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:792