|
anbox-platform-sdk
1.28.0
Anbox Platform SDK API documentation
|
Platform defines the custom Anbox platform implemented by a plugin. More...
#include <platform.h>
Collaboration diagram for anbox::Platform:Public Member Functions | |
| Platform ()=default | |
| virtual | ~Platform ()=default |
| Platform (const Platform &)=delete | |
| Platform & | operator= (const Platform &)=delete |
| virtual AudioProcessor * | audio_processor ()=0 |
| Retrieve the platform audio processor instance. More... | |
| virtual InputProcessor * | input_processor ()=0 |
| Retrieve the platform input processor instance. More... | |
| virtual GraphicsProcessor * | graphics_processor () |
| Retrieve the platform graphics processor instance. More... | |
| virtual SensorProcessor * | sensor_processor () |
| Retrieve the platform sensor processor instance. More... | |
| virtual GpsProcessor * | gps_processor () |
| Retrieve the platform gps processor instance. More... | |
| virtual CameraProcessor * | camera_processor () |
| Retrieve the platform camera processor instance. More... | |
| virtual AnboxProxy * | anbox_proxy () |
| Retrieve the platform anbox proxy. More... | |
| virtual VideoDecoder * | create_video_decoder (AnboxVideoCodecType codec_type) |
| Create a video decoder instances for a codec of the given name. More... | |
| virtual VhalConnector * | vhal_connector () |
| Retrieve the platform vhal connector instance. More... | |
| virtual bool | ready () const =0 |
| Query the platform for its ready status. More... | |
| virtual int | wait_until_ready ()=0 |
| Wait for platform plugin to be initialized. More... | |
| virtual int | get_config_item (AnboxPlatformConfigurationKey key, void *data, size_t data_size)=0 |
| Retrieve the configuration options provided by the platform plugin. More... | |
| virtual int | stop () |
| Ask the platform to stop any pending work it has to prepare for Anbox to terminate. More... | |
| virtual void | handle_event (AnboxEventType type) |
| Handle an event sending from Anbox. More... | |
| virtual int | set_config_item (AnboxPlatformConfigurationKey key, void *data, size_t data_size) |
| Set the configuration options by Anbox to the platform. More... | |
| virtual int | set_config_items (const AnboxPlatformConfigurationItem *items, size_t count) |
| Set multiple configuration options to the platform in a single transaction. More... | |
| virtual void | setup_event_tracer (AnboxTracerGetCategoryEnabledFunc get_category_enabled_callback, AnboxTracerAddEventFunc add_event_callback) |
| Register an external event tracing implementation withe platform. More... | |
Platform defines the custom Anbox platform implemented by a plugin.
It supports the following features:
Definition at line 45 of file platform.h.
|
default |
|
virtualdefault |
|
delete |
|
inlinevirtual |
Retrieve the platform anbox proxy.
A platform is supposed to have only a single anbox proxy instance at all time.
Definition at line 128 of file platform.h.
|
pure virtual |
Retrieve the platform audio processor instance.
A platform is supposed to have only a single audio processor instance at all time.
|
inlinevirtual |
Retrieve the platform camera processor instance.
A platform is supposed to have only a single camera processor instance at all time.
Definition at line 118 of file platform.h.
|
inlinevirtual |
Create a video decoder instances for a codec of the given name.
Definition at line 136 of file platform.h.
|
pure virtual |
Retrieve the configuration options provided by the platform plugin.
This function provides a way for Anbox to read a specific configuration option from the plugin.
| key | Plugin configuration option key to retrieve. |
| data | Pointer to the buffer where the configuration value will be stored. |
| data_size | Size in bytes of the memory buffer data points to. |
data is nullptr).key does not exist.data_size is not large enough to hold the value.
|
inlinevirtual |
Retrieve the platform gps processor instance.
A platform is supposed to have only a single gps processor instance at all time.
Definition at line 106 of file platform.h.
|
inlinevirtual |
Retrieve the platform graphics processor instance.
A platform is supposed to have only a single graphics processor instance at all time. Providing a graphics processor is not mandatory for a platform.
Definition at line 84 of file platform.h.
|
inlinevirtual |
Handle an event sending from Anbox.
Some operations (E.g. trigger an action) or initialization routine of a platform may require Android container fully booted or all essential components of Anbox are fully initialized.
This enables a platform to get notified when an event was fired from Anbox and perform one specific operation when a certain event is received.
Definition at line 213 of file platform.h.
|
pure virtual |
Retrieve the platform input processor instance.
A platform is supposed to have only a single input processor instance at all time.
|
pure virtual |
Query the platform for its ready status.
A platform is supposed to have different status during initialization
|
inlinevirtual |
Retrieve the platform sensor processor instance.
A platform is supposed to have only a single sensor processor instance at all time.
Definition at line 95 of file platform.h.
|
inlinevirtual |
Set the configuration options by Anbox to the platform.
This function provides a way for Anbox to write a configuration option to the plugin.
| key | Plugin configuration option key. |
| data | Pointer stores the address of the configuration key value. If nullptr is provided along with a data_size of 0, the platform should reset the configuration item to its default value. |
| data_size | Size in bytes of the memory the data pointer points to. Must be 0 when data is nullptr for a reset operation. |
data_size is not large enough to hold the value.Definition at line 232 of file platform.h.
|
inlinevirtual |
Set multiple configuration options to the platform in a single transaction.
This function allows setting multiple configuration items simultaneously. It is particularly useful for updating interdependent parameters (e.g., min and max video bitrates) where individual updates might fail due to temporary validation inconsistencies.
| items | Pointer to an array of AnboxPlatformConfigurationItem structures. Each item in the array follows the same reset logic as set_config_item: if an item has its data field set to nullptr and data_size set to 0, that specific configuration item should be reset to its default value. |
| count | The number of configuration items in the items array. |
Definition at line 263 of file platform.h.
|
inlinevirtual |
Register an external event tracing implementation withe platform.
| get_category_enabled_callback | Callback the platform can use to determine if a certain tracing category is enabled |
| add_event_callback | Callback to submit a tracing event to the Anbox runtime |
Definition at line 275 of file platform.h.
|
inlinevirtual |
Ask the platform to stop any pending work it has to prepare for Anbox to terminate.
Anbox will wait for the function to return before it finishes its termination process. The function is called very early on before the Android container is stopped.
The platform is expected to stop its processors and don't provide any further data to Anbox. Any further data provided to Anbox after the function has returned will not be considered.
Definition at line 202 of file platform.h.
|
inlinevirtual |
Retrieve the platform vhal connector instance.
A platform is supposed to have only a single vhal connector instance at all time.
Definition at line 151 of file platform.h.
|
pure virtual |
Wait for platform plugin to be initialized.
This function allows the caller to wait until the plugin platform has fully initialized all internal components. Once the platform plugin reports it is ready Anbox will start the Android container.