demuxer.h 383 B

1234567891011121314151617181920
  1. #pragma once
  2. #include <string>
  3. extern "C" {
  4. #include "libavformat/avformat.h"
  5. }
  6. class Demuxer {
  7. public:
  8. Demuxer(const std::string &file_name);
  9. ~Demuxer();
  10. AVCodecParameters* video_codec_parameters();
  11. int video_stream_index() const;
  12. AVRational time_base() const;
  13. bool operator()(AVPacket &packet);
  14. private:
  15. AVFormatContext* format_context_{};
  16. int video_stream_index_{};
  17. };