video_stream.h 621 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "stream.h"
  3. #include "video_sampler.h"
  4. namespace ffmpeg {
  5. /**
  6. * Class uses FFMPEG library to decode one video stream.
  7. */
  8. class VideoStream : public Stream {
  9. public:
  10. VideoStream(
  11. AVFormatContext* inputCtx,
  12. int index,
  13. bool convertPtsToWallTime,
  14. const VideoFormat& format,
  15. int64_t loggingUuid);
  16. ~VideoStream() override;
  17. private:
  18. int initFormat() override;
  19. int copyFrameBytes(ByteStorage* out, bool flush) override;
  20. void setHeader(DecoderHeader* header, bool flush) override;
  21. private:
  22. std::unique_ptr<VideoSampler> sampler_;
  23. };
  24. } // namespace ffmpeg