Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
45
TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPart.h
Normal file
45
TMessagesProj/jni/voip/tgcalls/group/AudioStreamingPart.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef TGCALLS_AUDIO_STREAMING_PART_H
|
||||
#define TGCALLS_AUDIO_STREAMING_PART_H
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "AudioStreamingPartPersistentDecoder.h"
|
||||
|
||||
namespace tgcalls {
|
||||
|
||||
class AudioStreamingPartState;
|
||||
|
||||
class AudioStreamingPart {
|
||||
public:
|
||||
struct StreamingPartChannel {
|
||||
uint32_t ssrc = 0;
|
||||
std::vector<int16_t> pcmData;
|
||||
int numSamples = 0;
|
||||
};
|
||||
|
||||
explicit AudioStreamingPart(std::vector<uint8_t> &&data, std::string const &container, bool isSingleChannel);
|
||||
~AudioStreamingPart();
|
||||
|
||||
AudioStreamingPart(const AudioStreamingPart&) = delete;
|
||||
AudioStreamingPart(AudioStreamingPart&& other) {
|
||||
_state = other._state;
|
||||
other._state = nullptr;
|
||||
}
|
||||
AudioStreamingPart& operator=(const AudioStreamingPart&) = delete;
|
||||
AudioStreamingPart& operator=(AudioStreamingPart&&) = delete;
|
||||
|
||||
std::map<std::string, int32_t> getEndpointMapping() const;
|
||||
int getRemainingMilliseconds() const;
|
||||
std::vector<StreamingPartChannel> get10msPerChannel(AudioStreamingPartPersistentDecoder &persistentDecoder);
|
||||
|
||||
private:
|
||||
AudioStreamingPartState *_state = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue