common.c File Reference

Include dependency graph for common.c:


Functions

int CheckError (vout_display_t *vd, xcb_connection_t *conn, const char *str, xcb_void_cookie_t ck)
 Check for an error.
xcb_connection_t * Connect (vlc_object_t *obj)
 Connect to the X server.
vout_window_tGetWindow (vout_display_t *vd, xcb_connection_t *conn, const xcb_screen_t **restrict pscreen, bool *restrict pshm)
 Create a VLC video X window object, find the corresponding X server screen, and probe the MIT-SHM extension.
int GetWindowSize (struct vout_window_t *wnd, xcb_connection_t *conn, unsigned *restrict width, unsigned *restrict height)
 Gets the size of an X window.
xcb_cursor_t CreateBlankCursor (xcb_connection_t *conn, const xcb_screen_t *scr)
 Create a blank cursor.
int PictureResourceAlloc (vout_display_t *vd, picture_resource_t *res, size_t size, xcb_connection_t *conn, bool attach)
 Initialize a picture buffer as shared memory, according to the video output format.
void PictureResourceFree (picture_resource_t *res, xcb_connection_t *conn)
 Release picture private data: detach the shared memory segment.

Function Documentation

int CheckError ( vout_display_t vd,
xcb_connection_t *  conn,
const char *  str,
xcb_void_cookie_t  ck 
)

Check for an error.

References err, msg_Err, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by PictureResourceAlloc().

xcb_connection_t* Connect ( vlc_object_t obj  ) 

Connect to the X server.

References msg_Dbg, msg_Err, strndup(), and var_CreateGetNonEmptyString.

xcb_cursor_t CreateBlankCursor ( xcb_connection_t *  conn,
const xcb_screen_t *  scr 
)

Create a blank cursor.

Note that the pixmaps are leaked (until the X disconnection). Hence, this function should be called no more than once per X connection.

Parameters:
conn XCB connection
scr target XCB screen

vout_window_t* GetWindow ( vout_display_t vd,
xcb_connection_t *  conn,
const xcb_screen_t **restrict  pscreen,
bool *restrict  pshm 
) [read]

int GetWindowSize ( struct vout_window_t wnd,
xcb_connection_t *  conn,
unsigned *restrict  width,
unsigned *restrict  height 
)

Gets the size of an X window.

References vout_window_t::handle, and vout_window_t::xid.

int PictureResourceAlloc ( vout_display_t vd,
picture_resource_t res,
size_t  size,
xcb_connection_t *  conn,
bool  attach 
)

Initialize a picture buffer as shared memory, according to the video output format.

If a attach is true, the segment is attached to the X server (MIT-SHM extension).

References CheckError(), msg_Err, msg_Info, picture_resource_t::p, picture_resource_t::p_pixels, picture_resource_t::p_sys, picture_sys_t::segment, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Get().

void PictureResourceFree ( picture_resource_t res,
xcb_connection_t *  conn 
)

Release picture private data: detach the shared memory segment.

References picture_resource_t::p, picture_resource_t::p_pixels, picture_resource_t::p_sys, and picture_sys_t::segment.

Referenced by Get(), and ResetPictures().


Generated on Sun Mar 14 08:06:33 2010 for VLC by  doxygen 1.5.6