Miam-Player  0.8.0
A nice music player
vdpau.h
Go to the documentation of this file.
1 /*
2  * The Video Decode and Presentation API for UNIX (VDPAU) is used for
3  * hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1.
4  *
5  * Copyright (C) 2008 NVIDIA
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with FFmpeg; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 #ifndef AVCODEC_VDPAU_H
25 #define AVCODEC_VDPAU_H
26 
52 #include <vdpau/vdpau.h>
53 #include <vdpau/vdpau_x11.h>
54 #include "libavutil/avconfig.h"
55 #include "libavutil/attributes.h"
56 
57 #include "avcodec.h"
58 #include "version.h"
59 
60 #if FF_API_BUFS_VDPAU
62  VdpPictureInfoH264 h264;
63  VdpPictureInfoMPEG1Or2 mpeg;
64  VdpPictureInfoVC1 vc1;
65  VdpPictureInfoMPEG4Part2 mpeg4;
66 };
67 #endif
68 
69 struct AVCodecContext;
70 struct AVFrame;
71 
72 typedef int (*AVVDPAU_Render2)(struct AVCodecContext *, struct AVFrame *,
73  const VdpPictureInfo *, uint32_t,
74  const VdpBitstreamBuffer *);
75 
90 typedef struct AVVDPAUContext {
96  VdpDecoder decoder;
97 
103  VdpDecoderRender *render;
104 
105 #if FF_API_BUFS_VDPAU
106 
112  union AVVDPAUPictureInfo info;
113 
121 
129 
137  VdpBitstreamBuffer *bitstream_buffers;
138 #endif
141 
148 
151 
169 int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
170  VdpGetProcAddress *get_proc_address, unsigned flags);
171 
189 int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
190  uint32_t *width, uint32_t *height);
191 
198 
199 #if FF_API_VDPAU_PROFILE
200 
214 int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);
215 #endif
216 
217 #if FF_API_CAP_VDPAU
218 
219 #define FF_VDPAU_STATE_USED_FOR_RENDER 1
220 
225 #define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
226 
235  VdpVideoSurface surface;
236 
237  int state;
238 
240  union AVVDPAUPictureInfo info;
241 
247  VdpBitstreamBuffer *bitstream_buffers;
248 };
249 #endif
250 
251 /* @}*/
252 
253 #endif /* AVCODEC_VDPAU_H */
VdpDecoderRender * render
Definition: vdpau.h:103
Definition: vdpau.h:90
AVVDPAU_Render2 render2
Definition: vdpau.h:139
VdpPictureInfoH264 h264
Definition: vdpau.h:62
Definition: frame.h:184
VdpPictureInfoMPEG4Part2 mpeg4
Definition: vdpau.h:65
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type, uint32_t *width, uint32_t *height)
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *)
attribute_deprecated int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile)
AVVDPAUContext * av_vdpau_alloc_context(void)
attribute_deprecated int bitstream_buffers_allocated
Definition: vdpau.h:120
int(* AVVDPAU_Render2)(struct AVCodecContext *, struct AVFrame *, const VdpPictureInfo *, uint32_t, const VdpBitstreamBuffer *)
Definition: vdpau.h:72
Definition: vdpau.h:61
VdpBitstreamBuffer * bitstream_buffers
Definition: vdpau.h:247
attribute_deprecated int bitstream_buffers_used
Definition: vdpau.h:128
int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, VdpGetProcAddress *get_proc_address, unsigned flags)
attribute_deprecated VdpBitstreamBuffer * bitstream_buffers
Definition: vdpau.h:137
VdpPictureInfoMPEG1Or2 mpeg
Definition: vdpau.h:63
void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2)
Definition: avcodec.h:1676
AVVDPAUContext * av_alloc_vdpaucontext(void)
allocation function for AVVDPAUContext
int bitstream_buffers_used
Definition: vdpau.h:245
int bitstream_buffers_allocated
Definition: vdpau.h:244
int state
Holds FF_VDPAU_STATE_* values.
Definition: vdpau.h:237
struct AVVDPAUContext AVVDPAUContext
#define attribute_deprecated
Definition: attributes.h:98
VdpDecoder decoder
Definition: vdpau.h:96
VdpPictureInfoVC1 vc1
Definition: vdpau.h:64
This structure is used as a callback between the FFmpeg decoder (vd_) and presentation (vo_) module...
Definition: vdpau.h:234
VdpVideoSurface surface
Used as rendered surface, never changed.
Definition: vdpau.h:235