img2.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Image format
  3. * Copyright (c) 2014 Michael Niedermayer
  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. #ifndef AVFORMAT_IMG2_H
  22. #define AVFORMAT_IMG2_H
  23. #include <stdint.h>
  24. #include "avformat.h"
  25. #include "libavutil/opt.h"
  26. #if HAVE_GLOB
  27. #include <glob.h>
  28. #endif
  29. enum PatternType {
  30. PT_GLOB_SEQUENCE,
  31. PT_GLOB,
  32. PT_SEQUENCE,
  33. PT_NONE,
  34. PT_DEFAULT
  35. };
  36. typedef struct VideoDemuxData {
  37. const AVClass *class; /**< Class for private options. */
  38. int img_first;
  39. int img_last;
  40. int img_number;
  41. int64_t pts;
  42. int img_count;
  43. int is_pipe;
  44. int split_planes; /**< use independent file for each Y, U, V plane */
  45. char path[1024];
  46. char *pixel_format; /**< Set by a private option. */
  47. int width, height; /**< Set by a private option. */
  48. AVRational framerate; /**< Set by a private option. */
  49. int loop;
  50. int pattern_type; /**< PatternType */
  51. int use_glob;
  52. #if HAVE_GLOB
  53. glob_t globstate;
  54. #endif
  55. int start_number;
  56. int start_number_range;
  57. int frame_size;
  58. int ts_from_file;
  59. int export_path_metadata; /**< enabled when set to 1. */
  60. } VideoDemuxData;
  61. typedef struct IdStrMap {
  62. enum AVCodecID id;
  63. const char *str;
  64. } IdStrMap;
  65. extern const IdStrMap ff_img_tags[];
  66. extern const AVOption ff_img_options[];
  67. int ff_img_read_header(AVFormatContext *s1);
  68. int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt);
  69. #endif