X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvdpau_internal.h;h=e1ea4306f2a18ad20b70bf8494f375e91ac70096;hb=51c810e62b63a1451b337b1cba0141b386066668;hp=0f3652b729021843dce5f571664989504346ab94;hpb=eb1ac04e59cbba7743c10dd5854b6efdfb6a2ebe;p=ffmpeg diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h index 0f3652b7290..e1ea4306f2a 100644 --- a/libavcodec/vdpau_internal.h +++ b/libavcodec/vdpau_internal.h @@ -55,6 +55,39 @@ union AVVDPAUPictureInfo { #include "vdpau.h" #endif +typedef struct VDPAUHWContext { + AVVDPAUContext context; + VdpDevice device; + VdpGetProcAddress *get_proc_address; + char reset; + unsigned char flags; +} VDPAUHWContext; + +typedef struct VDPAUContext { + /** + * VDPAU device handle + */ + VdpDevice device; + + /** + * VDPAU decoder handle + */ + VdpDecoder decoder; + + /** + * VDPAU device driver + */ + VdpGetProcAddress *get_proc_address; + + /** + * VDPAU decoder render callback + */ + VdpDecoderRender *render; + + uint32_t width; + uint32_t height; +} VDPAUContext; + struct vdpau_picture_context { /** * VDPAU picture information. @@ -76,10 +109,17 @@ struct vdpau_picture_context { */ VdpBitstreamBuffer *bitstream_buffers; }; -#endif + +int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, + int level); +#endif //CONFIG_VDPAU + +int ff_vdpau_common_uninit(AVCodecContext *avctx); int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic, const uint8_t *buffer, uint32_t size); +int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, + struct vdpau_picture_context *pic); int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx); int ff_vdpau_add_buffer(struct vdpau_picture_context *pic, const uint8_t *buf, uint32_t buf_size);