[vlc-devel] [PATCH] directdraw: add prefix to GUID
Zhao Zhili
quinkblack at foxmail.com
Thu Jul 12 05:56:35 CEST 2018
I'm taking FFmpeg as a reference
https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/dxva2.c;h=32416112bfd9cdd69965cb35a189cac54ddefca9;hb=HEAD#l35
I don't know how DECLSPEC_SELECTANY works and why it doesn't work in my
case.
#ifndef DECLSPEC_SELECTANY
#define DECLSPEC_SELECTANY __declspec(selectany)
#endif
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const
GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6,
b7, b8 } }
Please review.
On 2018年07月04日 18:52, Zhao Zhili wrote:
> Fix static linking.
> ---
> modules/video_output/win32/directdraw.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/modules/video_output/win32/directdraw.c b/modules/video_output/win32/directdraw.c
> index 0af3ba0..590ee80 100644
> --- a/modules/video_output/win32/directdraw.c
> +++ b/modules/video_output/win32/directdraw.c
> @@ -171,8 +171,8 @@ struct vout_display_sys_t
> #include <initguid.h>
> #undef GUID_EXT
> #define GUID_EXT
> -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);
> +DEFINE_GUID(VLC_IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56);
> +DEFINE_GUID(VLC_IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27);
>
> static picture_pool_t *Pool (vout_display_t *, unsigned);
> static void Display(vout_display_t *, picture_t *, subpicture_t *);
> @@ -645,7 +645,7 @@ static int DirectXOpenDDraw(vout_display_t *vd)
>
> /* Get the IDirectDraw2 interface */
> void *ptr;
> - hr = IDirectDraw_QueryInterface(ddobject, &IID_IDirectDraw2,
> + hr = IDirectDraw_QueryInterface(ddobject, &VLC_IID_IDirectDraw2,
> &ptr);
> /* Release the unused interface */
> IDirectDraw_Release(ddobject);
> @@ -828,7 +828,7 @@ static int DirectXOpenDisplay(vout_display_t *vd)
> }
>
> void *ptr;
> - hr = IDirectDrawSurface_QueryInterface(display, &IID_IDirectDrawSurface2,
> + hr = IDirectDrawSurface_QueryInterface(display, &VLC_IID_IDirectDrawSurface2,
> &ptr);
> /* Release the old interface */
> IDirectDrawSurface_Release(display);
> @@ -928,7 +928,7 @@ static int DirectXCreateSurface(vout_display_t *vd,
>
> /* Now that the surface is created, try to get a newer DirectX interface */
> hr = IDirectDrawSurface_QueryInterface(surface_v1,
> - &IID_IDirectDrawSurface2,
> + &VLC_IID_IDirectDrawSurface2,
> (LPVOID *)surface);
> IDirectDrawSurface_Release(surface_v1);
> if (hr != DD_OK) {
More information about the vlc-devel
mailing list