1 /*****************************************************************************
2 * d3d9_fmt.h : D3D9 helper calls
3 *****************************************************************************
4 * Copyright © 2017 VLC authors, VideoLAN and VideoLabs
6 * Authors: Steve Lhomme <robux4@gmail.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 #ifndef VLC_VIDEOCHROMA_D3D9_FMT_H_
24 #define VLC_VIDEOCHROMA_D3D9_FMT_H_
26 #include <vlc_picture.h>
32 /* owned by the vout for VLC_CODEC_D3D9_OPAQUE */
35 LPDIRECT3DSURFACE9 surface
;
40 HINSTANCE hdll
; /* handle of the opened d3d9 dll */
50 /* d3d9_handle_t hd3d; TODO */
53 LPDIRECT3DDEVICE9 dev
;
54 LPDIRECT3DDEVICE9EX devex
;
58 /* creation parameters */
59 D3DPRESENT_PARAMETERS pp
;
65 #include "../codec/avcodec/va_surface.h"
67 picture_sys_t
*ActivePictureSys(picture_t
*p_pic
);
69 static inline void AcquirePictureSys(picture_sys_t
*p_sys
)
71 IDirect3DSurface9_AddRef(p_sys
->surface
);
74 static inline void ReleasePictureSys(picture_sys_t
*p_sys
)
76 IDirect3DSurface9_Release(p_sys
->surface
);
79 HRESULT
D3D9_CreateDevice(vlc_object_t
*, d3d9_handle_t
*, HWND
,
80 const video_format_t
*, d3d9_device_t
*out
);
81 #define D3D9_CreateDevice(a,b,c,d,e) D3D9_CreateDevice( VLC_OBJECT(a), b, c, d, e )
83 void D3D9_ReleaseDevice(d3d9_device_t
*);
84 int D3D9_Create(vlc_object_t
*, d3d9_handle_t
*);
85 #define D3D9_Create(a,b) D3D9_Create( VLC_OBJECT(a), b )
87 void D3D9_Destroy(d3d9_handle_t
*);
89 int D3D9_FillPresentationParameters(d3d9_handle_t
*, const video_format_t
*, d3d9_device_t
*);
91 #endif /* VLC_VIDEOCHROMA_D3D9_FMT_H_ */