vpcc.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (c) 2016 Google Inc.
  3. * Copyright (c) 2016 KongQun Yang (kqyang@google.com)
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file
  23. * internal header for VPx codec configuration utilities.
  24. */
  25. #ifndef AVFORMAT_VPCC_H
  26. #define AVFORMAT_VPCC_H
  27. #include <stdint.h>
  28. #include "avio.h"
  29. #include "avformat.h"
  30. #include "libavcodec/avcodec.h"
  31. typedef struct VPCC {
  32. int profile;
  33. int level;
  34. int bitdepth;
  35. int chroma_subsampling;
  36. int full_range_flag;
  37. } VPCC;
  38. /**
  39. * Writes VP codec configuration to the provided AVIOContext.
  40. *
  41. * @param s address of the AVFormatContext for the logging context.
  42. * @param pb address of the AVIOContext where the vpcC shall be written.
  43. * @param par address of the AVCodecParameters which contains codec information.
  44. * @return >=0 in case of success, a negative value corresponding to an AVERROR
  45. * code in case of failure
  46. */
  47. int ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb,
  48. AVCodecParameters *par);
  49. int ff_isom_get_vpcc_features(AVFormatContext *s, AVCodecParameters *par,
  50. AVRational *frame_rate, VPCC *vpcc);
  51. #endif /* AVFORMAT_VPCC_H */