libgpac
Documentation of the core library of GPAC
compositor_tools.c File Reference
#include "gpac.h"
#include <gpac/main.h>
#include <gpac/events.h>
#include <gpac/filters.h>
#include <gpac/compositor.h>
#include <gpac/modules/video_out.h>
#include <gpac/avparse.h>
#include <dlfcn.h>
#include <pwd.h>
#include <unistd.h>
#include <gpac/revision.h>
+ Include dependency graph for compositor_tools.c:

Data Structures

struct  _mp4c_key
 

Macros

#define DESKTOP_GUI
 
#define VK_MOD   GF_KEY_MOD_CTRL
 

Enumerations

enum  MP4C_Command {
  MP4C_RELOAD =0 , MP4C_OPEN , MP4C_DISCONNECT , MP4C_PAUSE_RESUME ,
  MP4C_STEP , MP4C_SEEK , MP4C_SEEK_TIME , MP4C_TIME ,
  MP4C_UPDATE , MP4C_EVALJS , MP4C_SCREENSHOT , MP4C_DUMPSCENE ,
  MP4C_STRESSMODE , MP4C_NAVMODE , MP4C_LASTVP , MP4C_OGL2D ,
  MP4C_AR_4_3 , MP4C_AR_16_9 , MP4C_AR_NONE , MP4C_AR_ORIG ,
  MP4C_LOGS , MP4C_RELOAD_OPTS , MP4C_DISP_RTI , MP4C_DISP_FPS ,
  MP4C_HELP , MP4C_DOWNRATE , MP4C_VMEM_CACHE
}
 

Functions

static void mp4c_take_screenshot (Bool for_coverage)
 
void mp4c_help (u32 argmode)
 
static MP4C_Command get_gui_cmd (u8 char_code)
 
void gpac_open_urls (const char *urls)
 
static void mp4c_print_help ()
 
static void print_time (u64 time)
 
static void update_rti (const char *legend)
 
static void set_window_caption ()
 
static void switch_bench (u32 is_on)
 
static void do_set_speed (Fixed desired_speed)
 
Bool mp4c_event_proc (void *ptr, GF_Event *evt)
 
static void set_navigation ()
 
static void on_rti_log (void *cbk, GF_LOG_Level ll, GF_LOG_Tool lm, const char *fmt, va_list list)
 
static void init_rti_logs (char *rti_file, Bool use_rtix)
 
Bool mp4c_parse_arg (char *arg, char *arg_val)
 
void load_compositor (GF_Filter *)
 
void unload_compositor ()
 
Bool mp4c_task ()
 
Bool mp4c_handle_prompt (u8 char_val)
 

Variables

u32 compositor_mode
 
static Bool reload = GF_FALSE
 
static u32 window_flags =0
 
static Bool do_coverage = GF_FALSE
 
FILE * helpout
 
u32 gen_doc
 
u32 help_flags
 
static u32 bench_mode = 0
 
static u32 bench_mode_start = 0
 
static u32 bench_buffer = 0
 
static Bool eos_seen = GF_FALSE
 
static Bool addon_visible = GF_TRUE
 
static Bool is_connected = GF_FALSE
 
static u64 duration_ms =0
 
static GF_Err last_error = GF_OK
 
static Bool enable_add_ons = GF_TRUE
 
static Fixed playback_speed = FIX_ONE
 
static u32 display_rti = 0
 
static Bool can_seek = GF_FALSE
 
static u64 log_rti_time_start = 0
 
static Bool loop_at_end = GF_FALSE
 
static const char * update_str = NULL
 
static const char * update_type = "js"
 
static u32 forced_width =0
 
static u32 forced_height =0
 
static u32 align_mode = 0
 
static u32 init_w = 0
 
static u32 init_h = 0
 
static u32 last_x
 
static u32 last_y
 
static Bool right_down = GF_FALSE
 
static GF_Filter * comp_filter = NULL
 
static GF_Compositor * compositor = NULL
 
GF_GPACArg mp4c_args []
 
struct _mp4c_key MP4C_Keys []
 
static u32 rti_update_time_ms = 200
 
static FILE * rti_logs = NULL
 
char * caption = NULL
 
static char * rti_file =NULL
 
Bool use_rtix = GF_FALSE
 
char * send_command = NULL
 
u32 initial_service_id = 0
 
Bool auto_exit = GF_FALSE
 
Bool pause_at_first = GF_FALSE
 
Bool no_keyboard = GF_FALSE
 
Double play_from = 0
 
static Bool has_args =GF_FALSE
 
Bool start_fs = GF_FALSE
 
static char szBuf [8192]
 

Data Structure Documentation

◆ _mp4c_key

struct _mp4c_key
Data Fields
u8 char_code
MP4C_Command cmd_type
const char * cmd_help
u32 flags

Macro Definition Documentation

◆ DESKTOP_GUI

#define DESKTOP_GUI

◆ VK_MOD

#define VK_MOD   GF_KEY_MOD_CTRL

Enumeration Type Documentation

◆ MP4C_Command

Enumerator
MP4C_RELOAD 
MP4C_OPEN 
MP4C_DISCONNECT 
MP4C_PAUSE_RESUME 
MP4C_STEP 
MP4C_SEEK 
MP4C_SEEK_TIME 
MP4C_TIME 
MP4C_UPDATE 
MP4C_EVALJS 
MP4C_SCREENSHOT 
MP4C_DUMPSCENE 
MP4C_STRESSMODE 
MP4C_NAVMODE 
MP4C_LASTVP 
MP4C_OGL2D 
MP4C_AR_4_3 
MP4C_AR_16_9 
MP4C_AR_NONE 
MP4C_AR_ORIG 
MP4C_LOGS 
MP4C_RELOAD_OPTS 
MP4C_DISP_RTI 
MP4C_DISP_FPS 
MP4C_HELP 
MP4C_DOWNRATE 
MP4C_VMEM_CACHE 

Function Documentation

◆ mp4c_take_screenshot()

static void mp4c_take_screenshot ( Bool  for_coverage)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp4c_help()

void mp4c_help ( u32  argmode)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_gui_cmd()

static MP4C_Command get_gui_cmd ( u8  char_code)
static
+ Here is the caller graph for this function:

◆ gpac_open_urls()

void gpac_open_urls ( const char *  urls)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp4c_print_help()

static void mp4c_print_help ( )
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_time()

static void print_time ( u64  time)
static
+ Here is the caller graph for this function:

◆ update_rti()

static void update_rti ( const char *  legend)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_window_caption()

static void set_window_caption ( )
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switch_bench()

static void switch_bench ( u32  is_on)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ do_set_speed()

static void do_set_speed ( Fixed  desired_speed)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp4c_event_proc()

Bool mp4c_event_proc ( void *  ptr,
GF_Event evt 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_navigation()

static void set_navigation ( )
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_rti_log()

static void on_rti_log ( void *  cbk,
GF_LOG_Level  ll,
GF_LOG_Tool  lm,
const char *  fmt,
va_list  list 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_rti_logs()

static void init_rti_logs ( char *  rti_file,
Bool  use_rtix 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp4c_parse_arg()

Bool mp4c_parse_arg ( char *  arg,
char *  arg_val 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_compositor()

void load_compositor ( GF_Filter *  filter)
+ Here is the call graph for this function:

◆ unload_compositor()

void unload_compositor ( void  )
+ Here is the call graph for this function:

◆ mp4c_task()

Bool mp4c_task ( void  )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp4c_handle_prompt()

Bool mp4c_handle_prompt ( u8  char_val)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ compositor_mode

u32 compositor_mode
extern

◆ reload

Bool reload = GF_FALSE
static

◆ window_flags

u32 window_flags =0
static

◆ do_coverage

Bool do_coverage = GF_FALSE
static

◆ helpout

FILE* helpout
extern

◆ gen_doc

u32 gen_doc
extern

◆ help_flags

u32 help_flags
extern

◆ bench_mode

u32 bench_mode = 0
static

◆ bench_mode_start

u32 bench_mode_start = 0
static

◆ bench_buffer

u32 bench_buffer = 0
static

◆ eos_seen

Bool eos_seen = GF_FALSE
static

◆ addon_visible

Bool addon_visible = GF_TRUE
static

◆ is_connected

Bool is_connected = GF_FALSE
static

◆ duration_ms

u64 duration_ms =0
static

◆ last_error

GF_Err last_error = GF_OK
static

◆ enable_add_ons

Bool enable_add_ons = GF_TRUE
static

◆ playback_speed

Fixed playback_speed = FIX_ONE
static

◆ display_rti

u32 display_rti = 0
static

◆ can_seek

Bool can_seek = GF_FALSE
static

◆ log_rti_time_start

u64 log_rti_time_start = 0
static

◆ loop_at_end

Bool loop_at_end = GF_FALSE
static

◆ update_str

const char* update_str = NULL
static

◆ update_type

const char* update_type = "js"
static

◆ forced_width

u32 forced_width =0
static

◆ forced_height

u32 forced_height =0
static

◆ align_mode

u32 align_mode = 0
static

◆ init_w

u32 init_w = 0
static

◆ init_h

u32 init_h = 0
static

◆ last_x

u32 last_x
static

◆ last_y

u32 last_y
static

◆ right_down

Bool right_down = GF_FALSE
static

◆ comp_filter

GF_Filter* comp_filter = NULL
static

◆ compositor

GF_Compositor* compositor = NULL
static

◆ mp4c_args

GF_GPACArg mp4c_args[]

◆ MP4C_Keys

struct _mp4c_key MP4C_Keys[]

◆ rti_update_time_ms

u32 rti_update_time_ms = 200
static

◆ rti_logs

FILE* rti_logs = NULL
static

◆ caption

char* caption = NULL

◆ rti_file

char* rti_file =NULL
static

◆ use_rtix

Bool use_rtix = GF_FALSE

◆ send_command

char* send_command = NULL

◆ initial_service_id

u32 initial_service_id = 0

◆ auto_exit

Bool auto_exit = GF_FALSE

◆ pause_at_first

Bool pause_at_first = GF_FALSE

◆ no_keyboard

Bool no_keyboard = GF_FALSE

◆ play_from

Double play_from = 0

◆ has_args

Bool has_args =GF_FALSE
static

◆ start_fs

Bool start_fs = GF_FALSE

◆ szBuf

char szBuf[8192]
static