add_shortcut("direct3d")
set_callbacks(OpenVideoVista, Close)
- /* FIXME: Hack to avoid unregistering our window class */
- cannot_unload_broken_library()
-
add_submodule()
set_description(N_("Direct3D video output (XP)"))
set_capability("vout display", 70)
vlc_module_end ()
-#if 0 /* FIXME */
- /* check if we registered a window class because we need to
- * unregister it */
- WNDCLASS wndclass;
- if (GetClassInfo(GetModuleHandle(NULL), "VLC DirectX", &wndclass))
- UnregisterClass("VLC DirectX", GetModuleHandle(NULL));
-#endif
-
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
vout_display_info_t info = vd->info;
info.is_slow = true;
info.has_double_click = true;
- info.has_hide_mouse = true;
+ info.has_hide_mouse = false;
info.has_pictures_invalid = true;
+ info.has_event_thread = true;
/* Interaction */
vlc_mutex_init(&sys->lock);
return VLC_SUCCESS;
error:
- Close(VLC_OBJECT(vd));
+ Direct3DClose(vd);
+ CommonClean(vd);
+ Direct3DDestroy(vd);
+ free(vd->sys);
return VLC_EGENERIC;
}
return VLC_EGENERIC;
}
- /* fill in buffer info in first plane */
- picture->p->p_pixels = d3drect.pBits;
- picture->p->i_pitch = d3drect.Pitch;
-
- /* Fill chroma planes for planar YUV */
- if (picture->format.i_chroma == VLC_CODEC_I420 ||
- picture->format.i_chroma == VLC_CODEC_J420 ||
- picture->format.i_chroma == VLC_CODEC_YV12) {
-
- for (int n = 1; n < picture->i_planes; n++) {
- const plane_t *o = &picture->p[n-1];
- plane_t *p = &picture->p[n];
-
- p->p_pixels = o->p_pixels + o->i_lines * o->i_pitch;
- p->i_pitch = d3drect.Pitch / 2;
- }
- /* The d3d buffer is always allocated as YV12 */
- if (vlc_fourcc_AreUVPlanesSwapped(picture->format.i_chroma, VLC_CODEC_YV12)) {
- uint8_t *p_tmp = picture->p[1].p_pixels;
- picture->p[1].p_pixels = picture->p[2].p_pixels;
- picture->p[2].p_pixels = p_tmp;
- }
- }
+ CommonUpdatePicture(picture, d3drect.pBits, d3drect.Pitch);
return VLC_SUCCESS;
}
/**