demux: mp4: avoid audio cuts on seek
[vlc.git] / modules / video_chroma / d3d9_fmt.h
blob840ecb56e849cdc5fed0d8a6978f2b7c993dad7a
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>
28 /* owned by the vout for VLC_CODEC_D3D9_OPAQUE */
29 struct picture_sys_t
31 LPDIRECT3DSURFACE9 surface;
34 #include "../codec/avcodec/va_surface.h"
36 static inline picture_sys_t *ActivePictureSys(picture_t *p_pic)
38 struct va_pic_context *pic_ctx = (struct va_pic_context*)p_pic->context;
39 return pic_ctx ? &pic_ctx->picsys : p_pic->p_sys;
42 static inline void AcquirePictureSys(picture_sys_t *p_sys)
44 IDirect3DSurface9_AddRef(p_sys->surface);
47 static inline void ReleasePictureSys(picture_sys_t *p_sys)
49 IDirect3DSurface9_Release(p_sys->surface);
52 #endif /* VLC_VIDEOCHROMA_D3D9_FMT_H_ */