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.

71 lines
1.9KB

  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. };
  35. typedef struct VideoDemuxData {
  36. const AVClass *class; /**< Class for private options. */
  37. int img_first;
  38. int img_last;
  39. int img_number;
  40. int64_t pts;
  41. int img_count;
  42. int is_pipe;
  43. int split_planes; /**< use independent file for each Y, U, V plane */
  44. char path[1024];
  45. char *pixel_format; /**< Set by a private option. */
  46. int width, height; /**< Set by a private option. */
  47. AVRational framerate; /**< Set by a private option. */
  48. int loop;
  49. int pattern_type; /**< PatternType */
  50. int use_glob;
  51. #if HAVE_GLOB
  52. glob_t globstate;
  53. #endif
  54. int start_number;
  55. int start_number_range;
  56. int frame_size;
  57. int ts_from_file;
  58. } VideoDemuxData;
  59. extern const AVOption ff_img_options[];
  60. int ff_img_read_header(AVFormatContext *s1);
  61. int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt);
  62. #endif