1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-02 17:51:06 +01:00
libtgvoip/controller/protocol/Stream.h
2020-03-19 17:05:49 +01:00

43 lines
743 B
C++

#pragma once
namespace tgvoip
{
struct StreamInfo
{
StreamInfo() = delete;
StreamInfo(uint8_t _id, StreamType _type) : id(_id), type(_type){};
uint8_t id;
StreamType type;
bool enabled = true;
bool paused = false;
};
struct MediaStreamInfo
{
int32_t userID;
uint32_t codec;
};
struct AudioStreamInfo : public MediaStreamInfo
{
bool extraECEnabled;
uint16_t frameDuration;
};
struct VideoStreamInfo : public MediaStreamInfo
{
unsigned int width = 0;
unsigned int height = 0;
uint16_t rotation = 0;
std::vector<Buffer> codecSpecificData;
bool csdIsValid = false;
int resolution;
};
using IncomingStream = StreamInfo;
} // namespace tgvoip
#include "packets/PacketSender.h"