| 14 | } |
| 15 | |
| 16 | int VideoStream::videoStreamRead(uint8_t *buffer, int size) { |
| 17 | if (!_isPlaying) |
| 18 | return 0; |
| 19 | |
| 20 | _stream.read(reinterpret_cast<char *>(buffer), size); |
| 21 | if (_stream) |
| 22 | return static_cast<int>(_stream.gcount()); |
| 23 | |
| 24 | return -1; |
| 25 | } |
| 26 | |
| 27 | bool VideoStream::processFrame() { |
| 28 | if (_avFormatContext == nullptr || !_isPlaying) |