util.h 618 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "defs.h"
  3. namespace ffmpeg {
  4. /**
  5. * FFMPEG library utility functions.
  6. */
  7. namespace Util {
  8. std::string generateErrorDesc(int errorCode);
  9. size_t serialize(const AVSubtitle& sub, ByteStorage* out);
  10. bool deserialize(const ByteStorage& buf, AVSubtitle* sub);
  11. size_t size(const AVSubtitle& sub);
  12. void setFormatDimensions(
  13. size_t& destW,
  14. size_t& destH,
  15. size_t userW,
  16. size_t userH,
  17. size_t srcW,
  18. size_t srcH,
  19. size_t minDimension,
  20. size_t maxDimension,
  21. size_t cropImage);
  22. bool validateVideoFormat(const VideoFormat& format);
  23. } // namespace Util
  24. } // namespace ffmpeg