|
|
@ -52,6 +52,68 @@ |
|
|
|
#include <vdpau/vdpau.h> |
|
|
|
#include <vdpau/vdpau.h> |
|
|
|
#include <vdpau/vdpau_x11.h> |
|
|
|
#include <vdpau/vdpau_x11.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
union VdpPictureInfo { |
|
|
|
|
|
|
|
VdpPictureInfoH264 h264; |
|
|
|
|
|
|
|
VdpPictureInfoMPEG1Or2 mpeg; |
|
|
|
|
|
|
|
VdpPictureInfoVC1 vc1; |
|
|
|
|
|
|
|
VdpPictureInfoMPEG4Part2 mpeg4; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* This structure is used to share data between the libavcodec library and |
|
|
|
|
|
|
|
* the client video application. |
|
|
|
|
|
|
|
* The user shall zero-allocate the structure and make it available as |
|
|
|
|
|
|
|
* AVCodecContext.hwaccel_context. Members can be set by the user once |
|
|
|
|
|
|
|
* during initialization or through each AVCodecContext.get_buffer() |
|
|
|
|
|
|
|
* function call. In any case, they must be valid prior to calling |
|
|
|
|
|
|
|
* decoding functions. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
typedef struct AVVDPAUContext { |
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* VDPAU decoder handle |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Set by user. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
VdpDecoder decoder; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* VDPAU decoder render callback |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Set by the user. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
VdpDecoderRender *render; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* VDPAU picture information |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Set by libavcodec. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
union VdpPictureInfo info; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Allocated size of the bitstream_buffers table. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Set by libavcodec. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
int bitstream_buffers_allocated; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Useful bitstream buffers in the bitstream buffers table. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Set by libavcodec. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
int bitstream_buffers_used; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Table of bitstream buffers. |
|
|
|
|
|
|
|
* The user is responsible for freeing this buffer using av_freep(). |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Set by libavcodec. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
VdpBitstreamBuffer *bitstream_buffers; |
|
|
|
|
|
|
|
} AVVDPAUContext; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @brief The videoSurface is used for rendering. */ |
|
|
|
/** @brief The videoSurface is used for rendering. */ |
|
|
|
#define FF_VDPAU_STATE_USED_FOR_RENDER 1 |
|
|
|
#define FF_VDPAU_STATE_USED_FOR_RENDER 1 |
|
|
|
|
|
|
|
|
|
|
@ -74,12 +136,7 @@ struct vdpau_render_state { |
|
|
|
int state; ///< Holds FF_VDPAU_STATE_* values.
|
|
|
|
int state; ///< Holds FF_VDPAU_STATE_* values.
|
|
|
|
|
|
|
|
|
|
|
|
/** picture parameter information for all supported codecs */ |
|
|
|
/** picture parameter information for all supported codecs */ |
|
|
|
union VdpPictureInfo { |
|
|
|
union VdpPictureInfo info; |
|
|
|
VdpPictureInfoH264 h264; |
|
|
|
|
|
|
|
VdpPictureInfoMPEG1Or2 mpeg; |
|
|
|
|
|
|
|
VdpPictureInfoVC1 vc1; |
|
|
|
|
|
|
|
VdpPictureInfoMPEG4Part2 mpeg4; |
|
|
|
|
|
|
|
} info; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Describe size/location of the compressed video data.
|
|
|
|
/** Describe size/location of the compressed video data.
|
|
|
|
Set to 0 when freeing bitstream_buffers. */ |
|
|
|
Set to 0 when freeing bitstream_buffers. */ |
|
|
|