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.

104 lines
3.4KB

  1. /*
  2. * This file is part of FFmpeg.
  3. *
  4. * FFmpeg is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * FFmpeg is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with FFmpeg; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef AVFILTER_AVCODEC_H
  19. #define AVFILTER_AVCODEC_H
  20. /**
  21. * @file
  22. * libavcodec/libavfilter gluing utilities
  23. *
  24. * This should be included in an application ONLY if the installed
  25. * libavfilter has been compiled with libavcodec support, otherwise
  26. * symbols defined below will not be available.
  27. */
  28. #include "libavcodec/avcodec.h" // AVFrame
  29. #include "avfilter.h"
  30. /**
  31. * Create and return a picref reference from the data and properties
  32. * contained in frame.
  33. *
  34. * @param perms permissions to assign to the new buffer reference
  35. */
  36. AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
  37. /**
  38. * Create and return a picref reference from the data and properties
  39. * contained in frame.
  40. *
  41. * @param perms permissions to assign to the new buffer reference
  42. */
  43. AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
  44. int perms);
  45. /**
  46. * Create and return a buffer reference from the data and properties
  47. * contained in frame.
  48. *
  49. * @param perms permissions to assign to the new buffer reference
  50. */
  51. AVFilterBufferRef *avfilter_get_buffer_ref_from_frame(enum AVMediaType type,
  52. const AVFrame *frame,
  53. int perms);
  54. #ifdef FF_API_FILL_FRAME
  55. /**
  56. * Fill an AVFrame with the information stored in samplesref.
  57. *
  58. * @param frame an already allocated AVFrame
  59. * @param samplesref an audio buffer reference
  60. * @return 0 in case of success, a negative AVERROR code in case of
  61. * failure
  62. * @deprecated Use avfilter_copy_buf_props() instead.
  63. */
  64. attribute_deprecated
  65. int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
  66. const AVFilterBufferRef *samplesref);
  67. /**
  68. * Fill an AVFrame with the information stored in picref.
  69. *
  70. * @param frame an already allocated AVFrame
  71. * @param picref a video buffer reference
  72. * @return 0 in case of success, a negative AVERROR code in case of
  73. * failure
  74. * @deprecated Use avfilter_copy_buf_props() instead.
  75. */
  76. attribute_deprecated
  77. int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
  78. const AVFilterBufferRef *picref);
  79. /**
  80. * Fill an AVFrame with information stored in ref.
  81. *
  82. * @param frame an already allocated AVFrame
  83. * @param ref a video or audio buffer reference
  84. * @return 0 in case of success, a negative AVERROR code in case of
  85. * failure
  86. * @deprecated Use avfilter_copy_buf_props() instead.
  87. */
  88. attribute_deprecated
  89. int avfilter_fill_frame_from_buffer_ref(AVFrame *frame,
  90. const AVFilterBufferRef *ref);
  91. #endif
  92. #endif /* AVFILTER_AVCODEC_H */