libgpac
Documentation of the core library of GPAC
x11_out.c File Reference
#include "x11_out.h"
#include <gpac/constants.h>
#include <gpac/utf.h>
#include <sys/time.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <errno.h>
+ Include dependency graph for x11_out.c:

Data Structures

struct  X11KeyToGPAC
 

Macros

#define PROP_MOTIF_WM_HINTS_ELEMENTS   5
 
#define MWM_HINTS_DECORATIONS   (1L << 1)
 

Enumerations

enum  {
  GF_PIXEL_IYUV = GF_4CC('I', 'Y', 'U', 'V') , GF_PIXEL_I420 = GF_4CC('I', '4', '2', '0') , GF_PIXEL_UYNV = GF_4CC('U', 'Y', 'N', 'V') , GF_PIXEL_YUNV = GF_4CC('Y', 'U', 'N', 'V') ,
  GF_PIXEL_V422 = GF_4CC('V', '4', '2', '2') , GF_PIXEL_YV12 = GF_4CC('Y', 'V', '1', '2') , GF_PIXEL_Y422 = GF_4CC('Y', '4', '2', '2') , GF_PIXEL_YUY2 = GF_4CC('Y', 'U', 'Y', '2')
}
 

Functions

void X11_SetupWindow (GF_VideoOutput *vout)
 
GF_Err X11_Flush (struct _video_out *vout, GF_Window *dest)
 
static void x11_translate_key (u32 X11Key, GF_EventKey *evt)
 
static int X11_Pending (Display *display)
 
static void X11_HandleEvents (GF_VideoOutput *vout)
 
static void X11_ReleaseBackBuffer (GF_VideoOutput *vout)
 
GF_Err X11_InitBackBuffer (GF_VideoOutput *vout, u32 VideoWidth, u32 VideoHeight)
 
GF_Err X11_ResizeBackBuffer (struct _video_out *vout, u32 newWidth, u32 newHeight)
 
GF_Err X11_ProcessEvent (struct _video_out *vout, GF_Event *evt)
 
GF_Err X11_SetFullScreen (struct _video_out *vout, u32 bFullScreenOn, u32 *screen_width, u32 *screen_height)
 
GF_Err X11_LockBackBuffer (struct _video_out *vout, GF_VideoSurface *vi, u32 do_lock)
 
static int X11_BadAccess_ByPass (Display *display, XErrorEvent *event)
 
static void X11_XScreenSaverState (XWindow *xwin, Bool turn_on)
 
GF_Err X11_Setup (struct _video_out *vout, void *os_handle, void *os_display, u32 flags)
 
void X11_Shutdown (struct _video_out *vout)
 
void * NewX11VideoOutput ()
 
void DeleteX11VideoOutput (GF_VideoOutput *vout)
 
GPAC_MODULE_EXPORT const u32QueryInterfaces ()
 
GPAC_MODULE_EXPORT GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
GPAC_MODULE_EXPORT void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static X11KeyToGPAC X11Keys []
 
static u32 num_x11_keys = sizeof(X11Keys) / sizeof(X11KeyToGPAC)
 
static XErrorHandler old_handler = NULL
 
static int selectinput_err = 0
 
static GF_GPACArg X11Args []
 

Data Structure Documentation

◆ X11KeyToGPAC

struct X11KeyToGPAC
Data Fields
u32 x11_key
u32 gf_key
u32 gf_flags

Macro Definition Documentation

◆ PROP_MOTIF_WM_HINTS_ELEMENTS

#define PROP_MOTIF_WM_HINTS_ELEMENTS   5

◆ MWM_HINTS_DECORATIONS

#define MWM_HINTS_DECORATIONS   (1L << 1)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GF_PIXEL_IYUV 
GF_PIXEL_I420 
GF_PIXEL_UYNV 

YUV packed format

GF_PIXEL_YUNV 

YUV packed format

GF_PIXEL_V422 

YUV packed format

GF_PIXEL_YV12 
GF_PIXEL_Y422 
GF_PIXEL_YUY2 

Function Documentation

◆ X11_SetupWindow()

void X11_SetupWindow ( GF_VideoOutput vout)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ X11_Flush()

GF_Err X11_Flush ( struct _video_out *  vout,
GF_Window dest 
)
+ Here is the caller graph for this function:

◆ x11_translate_key()

static void x11_translate_key ( u32  X11Key,
GF_EventKey evt 
)
static
+ Here is the caller graph for this function:

◆ X11_Pending()

static int X11_Pending ( Display *  display)
static
+ Here is the caller graph for this function:

◆ X11_HandleEvents()

static void X11_HandleEvents ( GF_VideoOutput vout)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ X11_ReleaseBackBuffer()

static void X11_ReleaseBackBuffer ( GF_VideoOutput vout)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ X11_InitBackBuffer()

GF_Err X11_InitBackBuffer ( GF_VideoOutput vout,
u32  VideoWidth,
u32  VideoHeight 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ X11_ResizeBackBuffer()

GF_Err X11_ResizeBackBuffer ( struct _video_out *  vout,
u32  newWidth,
u32  newHeight 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ X11_ProcessEvent()

GF_Err X11_ProcessEvent ( struct _video_out *  vout,
GF_Event evt 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ X11_SetFullScreen()

GF_Err X11_SetFullScreen ( struct _video_out *  vout,
u32  bFullScreenOn,
u32 screen_width,
u32 screen_height 
)
+ Here is the caller graph for this function:

◆ X11_LockBackBuffer()

GF_Err X11_LockBackBuffer ( struct _video_out *  vout,
GF_VideoSurface vi,
u32  do_lock 
)
+ Here is the caller graph for this function:

◆ X11_BadAccess_ByPass()

static int X11_BadAccess_ByPass ( Display *  display,
XErrorEvent *  event 
)
static
+ Here is the caller graph for this function:

◆ X11_XScreenSaverState()

static void X11_XScreenSaverState ( XWindow xwin,
Bool  turn_on 
)
static
+ Here is the caller graph for this function:

◆ X11_Setup()

GF_Err X11_Setup ( struct _video_out *  vout,
void *  os_handle,
void *  os_display,
u32  flags 
)
+ Here is the caller graph for this function:

◆ X11_Shutdown()

void X11_Shutdown ( struct _video_out *  vout)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewX11VideoOutput()

void* NewX11VideoOutput ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteX11VideoOutput()

void DeleteX11VideoOutput ( GF_VideoOutput vout)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QueryInterfaces()

GPAC_MODULE_EXPORT const u32* QueryInterfaces ( )

◆ LoadInterface()

GPAC_MODULE_EXPORT GF_BaseInterface* LoadInterface ( u32  InterfaceType)
+ Here is the call graph for this function:

◆ ShutdownInterface()

GPAC_MODULE_EXPORT void ShutdownInterface ( GF_BaseInterface ifce)
+ Here is the call graph for this function:

Variable Documentation

◆ X11Keys

X11KeyToGPAC X11Keys[]
static

◆ num_x11_keys

u32 num_x11_keys = sizeof(X11Keys) / sizeof(X11KeyToGPAC)
static

◆ old_handler

XErrorHandler old_handler = NULL
static

◆ selectinput_err

int selectinput_err = 0
static

◆ X11Args

GF_GPACArg X11Args[]
static
Initial value:
= {
GF_DEF_ARG("offscreen-yuv", NULL, "enable offscreen yuv", "true", NULL, GF_ARG_BOOL, 0),
GF_DEF_ARG("no-vsync", NULL, "disable vertical synchro", "false", NULL, GF_ARG_BOOL, 0),
GF_DEF_ARG("hwvmem", NULL, "specify (2D rendering only) memory type of main video backbuffer. Depending on the scene type, this may drastically change the playback speed\n"
"- always: always on hardware\n"
"- never: always on system memory\n"
"- auto: selected by GPAC based on content type (graphics or video)", "auto", "auto|always|never", GF_ARG_INT, GF_ARG_HINT_EXPERT|GF_ARG_SUBSYS_VIDEO),
GF_DEF_ARG("colorkey", NULL, "enable colorkey for overlays", "true", NULL, GF_ARG_BOOL, 0),
{0},
}
#define GF_ARG_SUBSYS_VIDEO
Definition: main.h:138
#define GF_ARG_INT
Definition: main.h:151
#define GF_DEF_ARG(_a, _b, _c, _d, _e, _f, _g)
Definition: main.h:166
#define GF_ARG_HINT_EXPERT
Definition: main.h:123
#define GF_ARG_BOOL
Definition: main.h:149