mirror of https://github.com/FFmpeg/FFmpeg.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.6 KiB
85 lines
2.6 KiB
16 years ago
|
/*
|
||
16 years ago
|
* The Video Decode and Presentation API for UNIX (VDPAU) is used for
|
||
|
* hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1.
|
||
16 years ago
|
*
|
||
16 years ago
|
* Copyright (C) 2008 NVIDIA
|
||
16 years ago
|
*
|
||
|
* This file is part of FFmpeg.
|
||
|
*
|
||
|
* FFmpeg is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2.1 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* FFmpeg is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Lesser General Public
|
||
|
* License along with FFmpeg; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*/
|
||
|
|
||
|
#ifndef AVCODEC_VDPAU_RENDER_H
|
||
|
#define AVCODEC_VDPAU_RENDER_H
|
||
|
|
||
|
/**
|
||
|
* \defgroup Decoder VDPAU Decoder and Renderer
|
||
|
*
|
||
16 years ago
|
* VDPAU hardware acceleration has two modules
|
||
|
* - VDPAU decoding
|
||
|
* - VDPAU presentation
|
||
16 years ago
|
*
|
||
16 years ago
|
* The VDPAU decoding module parses all headers using FFmpeg
|
||
|
* parsing mechanisms and uses VDPAU for the actual decoding.
|
||
16 years ago
|
*
|
||
|
* As per the current implementation, the actual decoding
|
||
16 years ago
|
* and rendering (API calls) are done as part of the VDPAU
|
||
16 years ago
|
* presentation (vo_vdpau.c) module.
|
||
|
*
|
||
|
* @{
|
||
|
* \defgroup VDPAU_Decoding VDPAU Decoding
|
||
|
* \ingroup Decoder
|
||
|
* @{
|
||
|
*/
|
||
|
|
||
|
#include "vdpau/vdpau.h"
|
||
|
#include "vdpau/vdpau_x11.h"
|
||
|
|
||
16 years ago
|
/** \brief The videoSurface is used for rendering. */
|
||
16 years ago
|
#define FF_VDPAU_STATE_USED_FOR_RENDER 1
|
||
|
|
||
|
/**
|
||
16 years ago
|
* \brief The videoSurface is needed for reference/prediction.
|
||
|
* The codec manipulates this.
|
||
16 years ago
|
*/
|
||
|
#define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
|
||
|
|
||
|
/**
|
||
16 years ago
|
* \brief This structure is used as a callback between the FFmpeg
|
||
16 years ago
|
* decoder (vd_) and presentation (vo_) module.
|
||
16 years ago
|
* This is used for defining a video frame containing surface,
|
||
|
* picture parameter, bitstream information etc which are passed
|
||
|
* between the FFmpeg decoder and its clients.
|
||
16 years ago
|
*/
|
||
16 years ago
|
struct vdpau_render_state {
|
||
|
VdpVideoSurface surface; ///< Used as rendered surface, never changed.
|
||
16 years ago
|
|
||
16 years ago
|
int state; ///< Holds FF_VDPAU_STATE_* values.
|
||
16 years ago
|
|
||
16 years ago
|
/** picture parameter information for all supported codecs */
|
||
16 years ago
|
union VdpPictureInfo {
|
||
16 years ago
|
VdpPictureInfoH264 h264;
|
||
|
} info;
|
||
|
|
||
16 years ago
|
/** Describe size/location of the compressed video data. */
|
||
16 years ago
|
int bitstreamBuffersAllocated;
|
||
16 years ago
|
int bitstreamBuffersUsed;
|
||
|
VdpBitstreamBuffer *bitstreamBuffers;
|
||
|
};
|
||
|
|
||
|
/* @}*/
|
||
|
|
||
|
#endif /* AVCODEC_VDPAU_RENDER_H */
|