| #include <vector> |
| 6 |
| 7 | namespace tgcalls { |
| 8 |
| 9 | class StreamingPartState; |
| 10 |
| 11 | class StreamingPart { |
| 12 | public: |
| 13 | struct StreamingPartChannel { |
| 14 | uint32_t ssrc = 0; |
| 15 | std::vector<int16_t> pcmData; |
| 16 | }; |
| 17 |
| 18 | explicit StreamingPart(std::vector<uint8_t> &&data); |
| 19 | ~StreamingPart(); |
| 20 |
| 21 | StreamingPart(const StreamingPart&) = delete; |
| 22 | StreamingPart(StreamingPart&& other) { |
| 23 | _state = other._state; |
| 24 | other._state = nullptr; |
| 25 | } |
| 26 | StreamingPart& operator=(const StreamingPart&) = delete; |
| 27 | StreamingPart& operator=(StreamingPart&&) = delete; |
| 28 |
| 29 | int getRemainingMilliseconds() const; |
| 30 | std::vector<StreamingPartChannel> get10msPerChannel(); |
| 31 |
| 32 | private: |
| 33 | StreamingPartState *_state = nullptr; |
| 34 | }; |
| 35 |
| 36 | } |
| 37 |
| 38 | #endif |
| 39 |