2020-03-24 17:10:40 +01:00
|
|
|
#pragma once
|
2020-03-25 12:37:40 +01:00
|
|
|
#include <vector>
|
|
|
|
#include <cstdint>
|
|
|
|
#include "../../tools/Buffers.h"
|
|
|
|
#include "protocol/Index.h"
|
2020-03-24 17:10:40 +01:00
|
|
|
|
2020-03-24 15:07:56 +01:00
|
|
|
namespace tgvoip
|
|
|
|
{
|
|
|
|
struct StreamInfo
|
|
|
|
{
|
2020-03-25 12:37:40 +01:00
|
|
|
StreamInfo() = delete;
|
2020-03-24 15:07:56 +01:00
|
|
|
StreamInfo(uint8_t _id, StreamType _type) : id(_id), type(_type){};
|
2020-03-25 12:37:40 +01:00
|
|
|
virtual ~StreamInfo() = default;
|
2020-03-24 15:07:56 +01:00
|
|
|
|
|
|
|
uint8_t id;
|
|
|
|
StreamType type;
|
|
|
|
|
|
|
|
bool enabled = true;
|
|
|
|
bool paused = false;
|
|
|
|
};
|
|
|
|
|
2020-03-25 12:37:40 +01:00
|
|
|
struct MediaStreamInfo
|
2020-03-24 15:07:56 +01:00
|
|
|
{
|
2020-03-25 12:37:40 +01:00
|
|
|
virtual ~MediaStreamInfo() = default;
|
|
|
|
|
2020-03-24 15:07:56 +01:00
|
|
|
int32_t userID;
|
|
|
|
|
|
|
|
uint32_t codec;
|
|
|
|
};
|
2020-03-25 12:37:40 +01:00
|
|
|
struct AudioStreamInfo
|
2020-03-24 15:07:56 +01:00
|
|
|
{
|
2020-03-25 12:37:40 +01:00
|
|
|
virtual ~AudioStreamInfo() = default;
|
|
|
|
|
2020-03-24 15:07:56 +01:00
|
|
|
bool extraECEnabled;
|
|
|
|
uint16_t frameDuration;
|
|
|
|
};
|
2020-03-25 12:37:40 +01:00
|
|
|
struct VideoStreamInfo
|
2020-03-24 15:07:56 +01:00
|
|
|
{
|
2020-03-25 12:37:40 +01:00
|
|
|
virtual ~VideoStreamInfo() = default;
|
|
|
|
|
2020-03-24 15:07:56 +01:00
|
|
|
unsigned int width = 0;
|
|
|
|
unsigned int height = 0;
|
|
|
|
uint16_t rotation = 0;
|
2020-03-19 17:05:49 +01:00
|
|
|
|
|
|
|
std::vector<Buffer> codecSpecificData;
|
|
|
|
bool csdIsValid = false;
|
|
|
|
|
2020-03-24 15:07:56 +01:00
|
|
|
int resolution;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace tgvoip
|
|
|
|
|
2020-03-21 21:33:51 +01:00
|
|
|
#include "packets/PacketSender.h"
|