NekoX/TMessagesProj/jni/voip/tgcalls/group/StreamingPart.h

40 lines
867 B
C
Raw Normal View History

2021-03-19 11:25:58 +01:00
#ifndef TGCALLS_STREAMING_PART_H
#define TGCALLS_STREAMING_PART_H
#include "absl/types/optional.h"
#include <vector>
2021-06-25 02:43:10 +02:00
#include <stdint.h>
2021-03-19 11:25:58 +01:00
namespace tgcalls {
class StreamingPartState;
class StreamingPart {
public:
struct StreamingPartChannel {
uint32_t ssrc = 0;
std::vector<int16_t> pcmData;
};
explicit StreamingPart(std::vector<uint8_t> &&data);
~StreamingPart();
StreamingPart(const StreamingPart&) = delete;
StreamingPart(StreamingPart&& other) {
_state = other._state;
other._state = nullptr;
}
StreamingPart& operator=(const StreamingPart&) = delete;
StreamingPart& operator=(StreamingPart&&) = delete;
int getRemainingMilliseconds() const;
std::vector<StreamingPartChannel> get10msPerChannel();
private:
StreamingPartState *_state = nullptr;
};
}
#endif