AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
|
Main loop and graphical rendering. More...
#include <SDL2/SDL.h>
#include <SDL2/SDL_error.h>
#include <SDL2/SDL_events.h>
#include <SDL2/SDL_keyboard.h>
#include <SDL2/SDL_mouse.h>
#include <SDL2/SDL_render.h>
#include <SDL2/SDL_surface.h>
#include <SDL2/SDL_syswm.h>
#include <SDL2/SDL_version.h>
#include <SDL2/SDL_video.h>
#include <X11/Xlib.h>
#include <pthread.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "buffer_sizes.h"
#include "config_env.h"
#include "dump_trace.h"
#include "grabber.h"
#include "host_gl.h"
#include "logger.h"
#include "render_api.h"
#include "sdl_events.h"
#include "sensors.h"
#include "socket.h"
Go to the source code of this file.
Macros | |
#define | LOG_TAG "main" |
#define | USER_EVENT_ROTATION 1 |
#define | USER_EVENT_NEWCLIENT 2 |
#define | INPUT_PORT 22469 |
Functions | |
int | main () |
Variables | |
int | g_height |
Global variable for the window height. More... | |
int | g_width |
Global variable for the window width. More... | |
float | g_rotation = 0.0 |
void * | g_window_id = NULL |
Global variable for the X window id. More... | |
Main loop and graphical rendering.
The main will start the opengl proxy thread, initialize the AOSP rendering libs on the port 22468, run the SDL input translator that connects to the VM on port 22469 that will send raw uinput events; and finally runs the sdl event loop.
Libs required to run the OpenGL remote rendering:
lib64EGL_translator.so.
They can be obtained by building the sdk in the AOSP tree with our specific patch to add a callback function in case of screen rotation.
Definition in file main.c.
#define INPUT_PORT 22469 |
#define USER_EVENT_NEWCLIENT 2 |
#define USER_EVENT_ROTATION 1 |
int g_height |
float g_rotation = 0.0 |
int g_width |