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.

87 lines
2.5KB

  1. /*
  2. * Video Decode and Presentation API for UNIX (VDPAU) is used for
  3. * HW decode acceleration for 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. #ifndef AVCODEC_VDPAU_RENDER_H
  24. #define AVCODEC_VDPAU_RENDER_H
  25. /**
  26. * \defgroup Decoder VDPAU Decoder and Renderer
  27. *
  28. * VDPAU HW acceleration has two modules
  29. * - VDPAU Decoding
  30. * - VDPAU Presentation
  31. *
  32. * VDPAU decoding module parses all headers using FFmpeg
  33. * parsing mechanism and uses VDPAU for the actual decoding.
  34. *
  35. * As per the current implementation, the actual decoding
  36. * and rendering (API calls) are done as part of VDPAU
  37. * presentation (vo_vdpau.c) module.
  38. *
  39. * @{
  40. * \defgroup VDPAU_Decoding VDPAU Decoding
  41. * \ingroup Decoder
  42. * @{
  43. */
  44. #include "vdpau/vdpau.h"
  45. #include "vdpau/vdpau_x11.h"
  46. /**
  47. * \brief The videoSurface is used for render.
  48. */
  49. #define FF_VDPAU_STATE_USED_FOR_RENDER 1
  50. /**
  51. * \brief The videoSurface is needed for reference/prediction,
  52. * codec manipulates this.
  53. */
  54. #define FF_VDPAU_STATE_USED_FOR_REFERENCE 2
  55. /**
  56. * \brief This structure is used as a CALL-BACK between the ffmpeg
  57. * decoder (vd_) and presentation (vo_) module.
  58. * This is used for defining a video-frame containing surface,
  59. * picture-parameter, bitstream informations etc which are passed
  60. * between ffmpeg decoder and its clients.
  61. */
  62. struct vdpau_render_state{
  63. VdpVideoSurface surface; ///< used as rendered surface, never changed.
  64. int state; ///< Holds FF_VDPAU_STATE_* values
  65. /** Picture Parameter information for all supported codecs */
  66. union _VdpPictureInfo {
  67. VdpPictureInfoH264 h264;
  68. } info;
  69. /** Describe size/location of the compressed video data */
  70. int bitstreamBuffersAlloced;
  71. int bitstreamBuffersUsed;
  72. VdpBitstreamBuffer *bitstreamBuffers;
  73. };
  74. /* @}*/
  75. #endif /* AVCODEC_VDPAU_RENDER_H */