directx.c File Reference

Include dependency graph for directx.c:


Data Structures

struct  picture_sys_t
struct  dx_format_t

Defines

#define MONITOR_DEFAULTTONEAREST   2
#define HW_YUV_TEXT   N_("Use hardware YUV->RGB conversions")
#define HW_YUV_LONGTEXT
#define SYSMEM_TEXT   N_("Use video buffers in system memory")
#define SYSMEM_LONGTEXT
#define TRIPLEBUF_TEXT   N_("Use triple buffering for overlays")
#define TRIPLEBUF_LONGTEXT
#define DEVICE_TEXT   N_("Name of desired display device")
#define DEVICE_LONGTEXT
#define DX_HELP
#define GUID_EXT

Functions

static int Open (vlc_object_t *object)
 This function allocates and initialize the DirectX vout display.
static void Close (vlc_object_t *object)
 Terminate a vout display created by Open.
static int FindDevicesCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
 DEFINE_GUID (IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56)
 DEFINE_GUID (IID_IDirectDrawSurface2, 0x57805885, 0x6eec, 0x11cf, 0x94, 0x41, 0xa8, 0x23, 0x03, 0xc1, 0x0e, 0x27)
static picture_pool_tPool (vout_display_t *, unsigned)
static void Display (vout_display_t *, picture_t *)
static int Control (vout_display_t *, int, va_list)
static void Manage (vout_display_t *)
static int WallpaperCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
static int DirectXOpen (vout_display_t *, video_format_t *fmt)
static void DirectXClose (vout_display_t *)
static int DirectXLock (picture_t *)
static void DirectXUnlock (picture_t *)
static int DirectXUpdateOverlay (vout_display_t *vd, LPDIRECTDRAWSURFACE2 surface)
 Move or resize overlay surface on video display.
static void WallpaperChange (vout_display_t *vd, bool use_wallpaper)
static int DirectXOpenDDraw (vout_display_t *)
static void DirectXCloseDDraw (vout_display_t *)
static int DirectXOpenDisplay (vout_display_t *vd)
 Create and initialize display according to preferences specified in the vout thread fields.
static void DirectXCloseDisplay (vout_display_t *vd)
static int DirectXCreatePool (vout_display_t *, bool *, video_format_t *)
static void DirectXDestroyPool (vout_display_t *)
static BOOL WINAPI DirectXOpenDDrawCallback (GUID *guid, LPTSTR desc, LPTSTR drivername, VOID *context, HMONITOR hmon)
static void DirectXGetDDrawCaps (vout_display_t *vd)
 Probe the capabilities of the hardware.
static void DirectXCreateClipper (vout_display_t *vd)
 Create a clipper that will be used when blitting the RGB surface to the main display.
static uint32_t DirectXFindColorkey (vout_display_t *vd, uint32_t *color)
 It finds out the 32bits RGB pixel value of the colorkey.
static int DirectXCreateSurface (vout_display_t *vd, LPDIRECTDRAWSURFACE2 *surface, const video_format_t *fmt, DWORD fourcc, bool use_overlay, bool use_sysmem, int backbuffer_count)
 Create an YUV overlay or RGB surface for the video.
static void DirectXDestroySurface (LPDIRECTDRAWSURFACE2 surface)
static int DirectXLockSurface (LPDIRECTDRAWSURFACE2 front_surface, LPDIRECTDRAWSURFACE2 surface, DDSURFACEDESC *ddsd)
 This function locks a surface and get the surface descriptor.
static void DirectXUnlockSurface (LPDIRECTDRAWSURFACE2 front_surface, LPDIRECTDRAWSURFACE2 surface)
static int DirectXCheckLockingSurface (LPDIRECTDRAWSURFACE2 front_surface, LPDIRECTDRAWSURFACE2 surface)
static DWORD DirectXGetFourcc (vlc_fourcc_t codec)
static int DirectXCreatePictureResourceYuvOverlay (vout_display_t *vd, const video_format_t *fmt, DWORD fourcc)
static int DirectXCreatePictureResourceYuv (vout_display_t *vd, const video_format_t *fmt, DWORD fourcc)
static int DirectXCreatePictureResourceRgb (vout_display_t *vd, video_format_t *fmt)
static int DirectXCreatePictureResource (vout_display_t *vd, bool *use_overlay, video_format_t *fmt)
static void DirectXDestroyPictureResource (vout_display_t *vd)
static BOOL WINAPI DirectXEnumCallback2 (GUID *guid, LPTSTR desc, LPTSTR drivername, VOID *context, HMONITOR hmon)

Variables

static const char *const device [] = { "" }
static const char *const device_text [] = { N_("Default") }

Define Documentation

#define DEVICE_LONGTEXT

Value:

N_("In a multiple monitor configuration, you can " \
    "specify the Windows device name of the display that you want the video " \
    "window to open on. For example, \"\\\\.\\DISPLAY1\" or " \
    "\"\\\\.\\DISPLAY2\".")

#define DEVICE_TEXT   N_("Name of desired display device")

#define DX_HELP

Value:

N_("Recommended video output for Windows XP. " \
    "Incompatible with Vista's Aero interface" )

#define GUID_EXT

#define HW_YUV_LONGTEXT

Value:

N_(\
    "Try to use hardware acceleration for YUV->RGB conversions. " \
    "This option doesn't have any effect when using overlays.")

#define HW_YUV_TEXT   N_("Use hardware YUV->RGB conversions")

#define MONITOR_DEFAULTTONEAREST   2

#define SYSMEM_LONGTEXT

Value:

N_(\
    "Create video buffers in system memory instead of video memory. This " \
    "isn't recommended as usually using video memory allows to benefit from " \
    "more hardware acceleration (like rescaling or YUV->RGB conversions). " \
    "This option doesn't have any effect when using overlays.")

#define SYSMEM_TEXT   N_("Use video buffers in system memory")

#define TRIPLEBUF_LONGTEXT

Value:

N_(\
    "Try to use triple buffering when using YUV overlays. That results in " \
    "much better video quality (no flickering).")

#define TRIPLEBUF_TEXT   N_("Use triple buffering for overlays")


Function Documentation

static void Close ( vlc_object_t p_this  )  [static]

Terminate a vout display created by Open.

Close the module.

Destroys the X11 window.

Disconnect from the X server.

Close a SDL video output.

It destroys an OpenGL vout display.

Terminate a vout display created by Open.

It destroyes a Direct3D vout display.

Terminate an output method created by Open.

Release the drawable.

Close a libcaca video output.

Close a aa video output method.

Close the filter.

Terminate a splitter module.

This function closes a clone video splitter module.

Common close function.

Releases allocate resources.

Close: Destructor.

Parameters:
p_this pointer to this filter object
p_this,: the filter object

static int Control ( vout_display_t vd,
int  query,
va_list  args 
) [static]

DEFINE_GUID ( IID_IDirectDrawSurface2  ,
0x57805885  ,
0x6eec  ,
0x11cf  ,
0x94  ,
0x41  ,
0xa8  ,
0x23  ,
0x03  ,
0xc1  ,
0x0e  ,
0x27   
)

DEFINE_GUID ( IID_IDirectDraw2  ,
0xB3A6F3E0  ,
0x2B43  ,
0x11CF  ,
0xA2  ,
0xDE  ,
0x00  ,
0xAA  ,
0x00  ,
0xB9  ,
0x33  ,
0x56   
)

static int DirectXCheckLockingSurface ( LPDIRECTDRAWSURFACE2  front_surface,
LPDIRECTDRAWSURFACE2  surface 
) [static]

static void DirectXClose ( vout_display_t vd  )  [static]

static void DirectXCloseDDraw ( vout_display_t vd  )  [static]

References vout_display_t::sys.

Referenced by DirectXClose().

static void DirectXCloseDisplay ( vout_display_t vd  )  [static]

static void DirectXCreateClipper ( vout_display_t vd  )  [static]

Create a clipper that will be used when blitting the RGB surface to the main display.

This clipper prevents us to modify by mistake anything on the screen which doesn't belong to our window. For example when a part of our video window is hidden by another window.

References vout_display_sys_t::display, vout_display_sys_t::hvideownd, msg_Warn, and vout_display_t::sys.

Referenced by DirectXOpenDisplay().

static int DirectXCreatePictureResource ( vout_display_t vd,
bool *  use_overlay,
video_format_t fmt 
) [static]

static int DirectXCreatePictureResourceRgb ( vout_display_t vd,
video_format_t fmt 
) [static]

static int DirectXCreatePictureResourceYuv ( vout_display_t vd,
const video_format_t fmt,
DWORD  fourcc 
) [static]

static int DirectXCreatePictureResourceYuvOverlay ( vout_display_t vd,
const video_format_t fmt,
DWORD  fourcc 
) [static]

static int DirectXCreatePool ( vout_display_t vd,
bool *  use_overlay,
video_format_t fmt 
) [static]

static int DirectXCreateSurface ( vout_display_t vd,
LPDIRECTDRAWSURFACE2 *  surface,
const video_format_t fmt,
DWORD  fourcc,
bool  use_overlay,
bool  use_sysmem,
int  backbuffer_count 
) [static]

Create an YUV overlay or RGB surface for the video.

The best method of display is with an YUV overlay because the YUV->RGB conversion is done in hardware. You can also create a plain RGB surface. (Maybe we could also try an RGB overlay surface, which could have hardware scaling and which would also be faster in window mode because you don't need to do any blitting to the main display...)

References DirectXUpdateOverlay(), video_format_t::i_height, video_format_t::i_width, msg_Err, vout_display_t::sys, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by DirectXCreatePictureResourceRgb(), DirectXCreatePictureResourceYuv(), and DirectXCreatePictureResourceYuvOverlay().

static void DirectXDestroyPictureResource ( vout_display_t vd  )  [static]

static void DirectXDestroyPool ( vout_display_t vd  )  [static]

static void DirectXDestroySurface ( LPDIRECTDRAWSURFACE2  surface  )  [static]

static BOOL WINAPI DirectXEnumCallback2 ( GUID guid,
LPTSTR  desc,
LPTSTR  drivername,
VOID *  context,
HMONITOR  hmon 
) [static]

static uint32_t DirectXFindColorkey ( vout_display_t vd,
uint32_t *  color 
) [static]

It finds out the 32bits RGB pixel value of the colorkey.

References vout_display_sys_t::display, and vout_display_t::sys.

Referenced by DirectXOpenDisplay().

static void DirectXGetDDrawCaps ( vout_display_t vd  )  [static]

Probe the capabilities of the hardware.

It is nice to know which features are supported by the hardware so we can find ways to optimize our rendering.

References msg_Dbg, msg_Warn, and vout_display_t::sys.

Referenced by DirectXOpenDDraw().

static DWORD DirectXGetFourcc ( vlc_fourcc_t  codec  )  [static]

static int DirectXLock ( picture_t picture  )  [static]

static int DirectXLockSurface ( LPDIRECTDRAWSURFACE2  front_surface,
LPDIRECTDRAWSURFACE2  surface,
DDSURFACEDESC *  ddsd 
) [static]

This function locks a surface and get the surface descriptor.

References VLC_EGENERIC, and VLC_SUCCESS.

Referenced by DirectXCheckLockingSurface(), and DirectXLock().

static int DirectXOpen ( vout_display_t vd,
video_format_t fmt 
) [static]

static int DirectXOpenDDraw ( vout_display_t vd  )  [static]

static BOOL WINAPI DirectXOpenDDrawCallback ( GUID guid,
LPTSTR  desc,
LPTSTR  drivername,
VOID *  context,
HMONITOR  hmon 
) [static]

static int DirectXOpenDisplay ( vout_display_t vd  )  [static]

Create and initialize display according to preferences specified in the vout thread fields.

References DirectXCreateClipper(), DirectXFindColorkey(), vout_display_sys_t::display, msg_Err, vout_display_t::sys, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by DirectXOpen().

static void DirectXUnlock ( picture_t picture  )  [static]

static void DirectXUnlockSurface ( LPDIRECTDRAWSURFACE2  front_surface,
LPDIRECTDRAWSURFACE2  surface 
) [static]

static int DirectXUpdateOverlay ( vout_display_t vd,
LPDIRECTDRAWSURFACE2  surface 
) [static]

static void Display ( vout_display_t vd,
picture_t picture 
) [static]

static int FindDevicesCallback ( vlc_object_t object,
char const *  name,
vlc_value_t  newval,
vlc_value_t  oldval,
void *  data 
) [static]

static void Manage ( vout_display_t vd  )  [static]

static int Open ( vlc_object_t p_this  )  [static]

This function allocates and initialize the DirectX vout display.

Forward declarations.

Status of this demuxer: Real Media format -----------------.

Basic chorus/flanger/delay audio filter This implements a variable delay filter for VLC.

Todo:

  • Improve CDDB support (non-blocking, cache, .

Open the module.

Create an X11 window.

Probe the X server.

This function initializes SDL vout method.

It creates an OpenGL vout display.

This function allocates and initialize the DirectX vout display.

It creates a Direct3D vout display.

This function allocates and initializes a FB vout method.

Find the drawable set by libvlc application.

This function initializes libcaca vout method.

This function allocates and initializes a aa vout method.

This function allocates and initializes a Wall splitter module.

Open the filter.

This function allocates and initializes a Clone splitter module.

Open: initialize and create stuff.

Connect to the sftp server and ask for a file.

Parameters:
p_this,: the vlc_object
Returns:
VLC_SUCCESS if everything was fine
Parameters:
p_this 
p_this,: the filter object
Returns:
VLC_SUCCESS or vlc error codes

Todo:
Reinstate meta codec name

static picture_pool_t * Pool ( vout_display_t vd,
unsigned  count 
) [static]

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 

static int WallpaperCallback ( vlc_object_t object,
char const *  cmd,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  data 
) [static]

static void WallpaperChange ( vout_display_t vd,
bool  use_wallpaper 
) [static]


Variable Documentation

const char* const device[] = { "" } [static]

const char* const device_text[] = { N_("Default") } [static]


Generated on Tue May 25 08:05:11 2010 for VLC by  doxygen 1.5.6