direct3d.c File Reference

Include dependency graph for direct3d.c:


Data Structures

struct  picture_sys_t
struct  d3d_format_t
struct  CUSTOMVERTEX

Defines

#define DESKTOP_TEXT   N_("Enable desktop mode ")
#define DESKTOP_LONGTEXT
#define D3D_HELP   N_("Recommended video output for Windows Vista and later versions")
#define D3DFVF_CUSTOMVERTEX   (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)

Functions

static int OpenVideoXP (vlc_object_t *)
static int OpenVideoVista (vlc_object_t *)
static void Close (vlc_object_t *object)
 It destroyes a Direct3D vout display.
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static int Open (vlc_object_t *object)
 It creates a Direct3D vout display.
static picture_pool_tPool (vout_display_t *, unsigned)
static void Prepare (vout_display_t *, picture_t *)
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 Direct3DCreate (vout_display_t *vd)
 It initializes an instance of Direct3D9.
static int Direct3DReset (vout_display_t *vd)
 It reset the Direct3D9 device and its resources.
static void Direct3DDestroy (vout_display_t *vd)
 It releases an instance of Direct3D9.
static int Direct3DOpen (vout_display_t *vd, video_format_t *fmt)
 It creates a Direct3D device and the associated resources.
static void Direct3DClose (vout_display_t *vd)
 It releases the Direct3D9 device and its resources.
static void Direct3DRenderScene (vout_display_t *vd, LPDIRECT3DSURFACE9 surface)
 It copies picture surface into a texture and renders into a scene.
static int DesktopCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
static bool IsVistaOrAbove (void)
static int Direct3DLockSurface (picture_t *picture)
 It locks the surface associated to the picture and get the surface descriptor which amongst other things has the pointer to the picture data and its pitch.
static void Direct3DUnlockSurface (picture_t *picture)
 It unlocks the surface associated to the picture.
static int ControlResetDevice (vout_display_t *vd)
static int ControlReopenDevice (vout_display_t *vd)
static int Direct3DFillPresentationParameters (vout_display_t *vd)
 It setup vout_display_sys_t::d3dpp and vout_display_sys_t::rect_display from the default adapter.
static int Direct3DCreateResources (vout_display_t *vd, video_format_t *fmt)
 It creates the picture and scene resources.
static void Direct3DDestroyResources (vout_display_t *vd)
 It destroys the picture and scene resources.
static int Direct3DCreatePool (vout_display_t *vd, video_format_t *fmt)
 It creates the pool of picture (only 1).
static void Direct3DDestroyPool (vout_display_t *vd)
 It destroys the pool of picture and its resources.
static int Direct3DCreateScene (vout_display_t *vd)
 It allocates and initializes the resources needed to render the scene.
static void Direct3DDestroyScene (vout_display_t *vd)
 It releases the scene resources.
static int Direct3DCheckConversion (vout_display_t *vd, D3DFORMAT src, D3DFORMAT dst)
 It tests if the conversion from src to dst is supported.
static const d3d_format_tDirect3DFindFormat (vout_display_t *vd, vlc_fourcc_t chroma, D3DFORMAT target)
 It returns the format (closest to chroma) that can be converted to target.

Variables

static const d3d_format_t d3d_formats []

Define Documentation

#define D3D_HELP   N_("Recommended video output for Windows Vista and later versions")

#define D3DFVF_CUSTOMVERTEX   (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)

#define DESKTOP_LONGTEXT

Value:

N_(\
    "The desktop mode allows you to display the video on the desktop.")

#define DESKTOP_TEXT   N_("Enable desktop mode ")


Function Documentation

static void Close ( vlc_object_t p_this  )  [static]

It destroyes a Direct3D vout display.

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]

static int ControlReopenDevice ( vout_display_t vd  )  [static]

static int ControlResetDevice ( vout_display_t vd  )  [static]

References Direct3DReset().

Referenced by Control().

static int DesktopCallback ( vlc_object_t object,
char const *  psz_cmd,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  p_data 
) [static]

static int Direct3DCheckConversion ( vout_display_t vd,
D3DFORMAT  src,
D3DFORMAT  dst 
) [static]

It tests if the conversion from src to dst is supported.

References msg_Err, vout_display_t::sys, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Direct3DFindFormat().

static void Direct3DClose ( vout_display_t vd  )  [static]

It releases the Direct3D9 device and its resources.

References Direct3DDestroyResources(), and vout_display_t::sys.

Referenced by ControlReopenDevice().

static int Direct3DCreate ( vout_display_t vd  )  [static]

It initializes an instance of Direct3D9.

References GetProcAddress(), LoadLibrary, msg_Err, msg_Warn, vout_display_t::sys, VLC_EGENERIC, and VLC_SUCCESS.

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

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

It creates the picture and scene resources.

References Direct3DCreatePool(), Direct3DCreateScene(), msg_Err, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Direct3DOpen(), and Direct3DReset().

static int Direct3DCreateScene ( vout_display_t vd  )  [static]

It allocates and initializes the resources needed to render the scene.

References D3DFVF_CUSTOMVERTEX, msg_Dbg, msg_Err, vout_display_t::sys, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Direct3DCreateResources().

static void Direct3DDestroy ( vout_display_t vd  )  [static]

It releases an instance of Direct3D9.

References FreeLibrary(), and vout_display_t::sys.

static void Direct3DDestroyPool ( vout_display_t vd  )  [static]

static void Direct3DDestroyResources ( vout_display_t vd  )  [static]

It destroys the picture and scene resources.

References Direct3DDestroyPool(), and Direct3DDestroyScene().

Referenced by Direct3DClose(), and Direct3DReset().

static void Direct3DDestroyScene ( vout_display_t vd  )  [static]

It releases the scene resources.

References msg_Dbg, and vout_display_t::sys.

Referenced by Direct3DDestroyResources().

static int Direct3DFillPresentationParameters ( vout_display_t vd  )  [static]

It setup vout_display_sys_t::d3dpp and vout_display_sys_t::rect_display from the default adapter.

References __MAX, vout_display_sys_t::hvideownd, msg_Err, vout_display_sys_t::rect_display, vout_display_t::sys, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Direct3DOpen(), and Direct3DReset().

static const d3d_format_t* Direct3DFindFormat ( vout_display_t vd,
vlc_fourcc_t  chroma,
D3DFORMAT  target 
) [static]

static int Direct3DLockSurface ( picture_t picture  )  [static]

It locks the surface associated to the picture and get the surface descriptor which amongst other things has the pointer to the picture data and its pitch.

References picture_t::format, video_format_t::i_chroma, plane_t::i_lines, plane_t::i_pitch, picture_t::i_planes, picture_t::p, plane_t::p_pixels, picture_t::p_sys, picture_sys_t::surface, VLC_CODEC_I420, VLC_CODEC_J420, VLC_CODEC_YV12, VLC_EGENERIC, vlc_fourcc_AreUVPlanesSwapped(), and VLC_SUCCESS.

Referenced by Direct3DCreatePool(), and Prepare().

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

static void Direct3DRenderScene ( vout_display_t vd,
LPDIRECT3DSURFACE9  surface 
) [static]

It copies picture surface into a texture and renders into a scene.

This function is intented for higher end 3D cards, with pixel shader support and at least 64 MiB of video RAM.

References D3DFVF_CUSTOMVERTEX, CUSTOMVERTEX::diffuse, dst, msg_Dbg, vout_display_sys_t::rect_dest_clipped, vout_display_sys_t::rect_src_clipped, CUSTOMVERTEX::rhw, src, vout_display_t::sys, CUSTOMVERTEX::tu, CUSTOMVERTEX::tv, vout_display_SendEventPicturesInvalid(), CUSTOMVERTEX::x, CUSTOMVERTEX::y, and CUSTOMVERTEX::z.

Referenced by Prepare().

static int Direct3DReset ( vout_display_t vd  )  [static]

static void Direct3DUnlockSurface ( picture_t picture  )  [static]

It unlocks the surface associated to the picture.

References picture_t::p_sys, and picture_sys_t::surface.

Referenced by Direct3DCreatePool(), and Prepare().

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

static bool IsVistaOrAbove ( void   )  [static]

Referenced by OpenVideoVista(), and OpenVideoXP().

static void Manage ( vout_display_t vd  )  [static]

static int Open ( vlc_object_t p_this  )  [static]

It creates a Direct3D 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 int OpenVideoVista ( vlc_object_t obj  )  [static]

static int OpenVideoXP ( vlc_object_t obj  )  [static]

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

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

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 


Variable Documentation

const d3d_format_t d3d_formats[] [static]

Initial value:

 {
    
    { "YV12",       MAKEFOURCC('Y','V','1','2'),     ( ((uint32_t) 'Y' ) | ( ((uint32_t) 'V' ) << 8 )   | ( ((uint32_t) '1' ) << 16 ) | ( ((uint32_t) '2' ) << 24 ) ) ,  0,0,0 },
    { "YV12",       MAKEFOURCC('Y','V','1','2'),     ( ((uint32_t) 'I' ) | ( ((uint32_t) '4' ) << 8 )   | ( ((uint32_t) '2' ) << 16 ) | ( ((uint32_t) '0' ) << 24 ) ) ,  0,0,0 },
    { "YV12",       MAKEFOURCC('Y','V','1','2'),     ( ((uint32_t) 'J' ) | ( ((uint32_t) '4' ) << 8 )   | ( ((uint32_t) '2' ) << 16 ) | ( ((uint32_t) '0' ) << 24 ) ) ,  0,0,0 },
    { "UYVY",       D3DFMT_UYVY,     ( ((uint32_t) 'U' ) | ( ((uint32_t) 'Y' ) << 8 )   | ( ((uint32_t) 'V' ) << 16 ) | ( ((uint32_t) 'Y' ) << 24 ) ) ,  0,0,0 },
    { "YUY2",       D3DFMT_YUY2,     ( ((uint32_t) 'Y' ) | ( ((uint32_t) 'U' ) << 8 )   | ( ((uint32_t) 'Y' ) << 16 ) | ( ((uint32_t) '2' ) << 24 ) ) ,  0,0,0 },
    { "X8R8G8B8",   D3DFMT_X8R8G8B8, ( ((uint32_t) 'R' ) | ( ((uint32_t) 'V' ) << 8 )   | ( ((uint32_t) '3' ) << 16 ) | ( ((uint32_t) '2' ) << 24 ) ) , 0xff0000, 0x00ff00, 0x0000ff },
    { "A8R8G8B8",   D3DFMT_A8R8G8B8, ( ((uint32_t) 'R' ) | ( ((uint32_t) 'V' ) << 8 )   | ( ((uint32_t) '3' ) << 16 ) | ( ((uint32_t) '2' ) << 24 ) ) , 0xff0000, 0x00ff00, 0x0000ff },
    { "8G8B8",      D3DFMT_R8G8B8,   ( ((uint32_t) 'R' ) | ( ((uint32_t) 'V' ) << 8 )   | ( ((uint32_t) '2' ) << 16 ) | ( ((uint32_t) '4' ) << 24 ) ) , 0xff0000, 0x00ff00, 0x0000ff },
    { "R5G6B5",     D3DFMT_R5G6B5,   ( ((uint32_t) 'R' ) | ( ((uint32_t) 'V' ) << 8 )   | ( ((uint32_t) '1' ) << 16 ) | ( ((uint32_t) '6' ) << 24 ) ) , 0x1f<<11, 0x3f<<5,  0x1f<<0 },
    { "X1R5G5B5",   D3DFMT_X1R5G5B5, ( ((uint32_t) 'R' ) | ( ((uint32_t) 'V' ) << 8 )   | ( ((uint32_t) '1' ) << 16 ) | ( ((uint32_t) '5' ) << 24 ) ) , 0x1f<<10, 0x1f<<5,  0x1f<<0 },

    { NULL, 0, 0, 0,0,0}
}


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