avcodec.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #include "vsrc_buffer.h"
  31. /**
  32. * Copy the frame properties of src to dst, without copying the actual
  33. * image data.
  34. */
  35. void avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
  36. /**
  37. * Create and return a picref reference from the data and properties
  38. * contained in frame.
  39. *
  40. * @param perms permissions to assign to the new buffer reference
  41. */
  42. AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
  43. /**
  44. * Fill an AVFrame with the information stored in picref.
  45. *
  46. * @param frame an already allocated AVFrame
  47. * @param picref a video buffer reference
  48. * @return 0 in case of success, a negative AVERROR code in case of
  49. * failure
  50. */
  51. int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
  52. const AVFilterBufferRef *picref);
  53. /**
  54. * Add frame data to buffer_src.
  55. *
  56. * @param buffer_src pointer to a buffer source context
  57. * @param flags a combination of AV_VSRC_BUF_FLAG_* flags
  58. * @return >= 0 in case of success, a negative AVERROR code in case of
  59. * failure
  60. */
  61. int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src,
  62. const AVFrame *frame, int flags);
  63. #endif /* AVFILTER_AVCODEC_H */