| #include <vector> |
| 6 | #include <stdint.h> |
| 7 |
| 8 | #include "api/video/video_frame.h" |
| 9 | #include "absl/types/optional.h" |
| 10 |
| 11 | // Fix build on Windows - this should appear before FFmpeg timestamp include. |
| 12 | #define _USE_MATH_DEFINES |
| 13 | #include <math.h> |
| 14 |
| 15 | extern "C" { |
| 16 | #include <libavutil/timestamp.h> |
| 17 | #include <libavformat/avformat.h> |
| 18 | #include <libavcodec/avcodec.h> |
| 19 | } |
| 20 |
| 21 | namespace tgcalls { |
| 22 |
| 23 | class AVIOContextImpl { |
| 24 | public: |
| 25 | AVIOContextImpl(std::vector<uint8_t> &&fileData); |
| 26 | ~AVIOContextImpl(); |
| 27 |
| 28 | AVIOContext *getContext() const; |
| 29 |
| 30 | public: |
| 31 | std::vector<uint8_t> _fileData; |
| 32 | int _fileReadPosition = 0; |
| 33 |
| 34 | std::vector<uint8_t> _buffer; |
| 35 | AVIOContext *_context = nullptr; |
| 36 | }; |
| 37 |
| 38 | } |
| 39 |
| 40 | #endif |
| 41 |