1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-12-02 17:51:06 +01:00
libtgvoip/controller/protocol/Stream.cpp
2020-03-25 21:38:07 +01:00

49 lines
1.3 KiB
C++

#include "Stream.h"
#include "../../VoIPController.h"
#include "protocol/Index.h"
using namespace tgvoip;
OutgoingAudioStream::OutgoingAudioStream(uint8_t _id) : OutgoingMediaStream(_id, TYPE){};
OutgoingAudioStream::~OutgoingAudioStream(){};
OutgoingVideoStream::OutgoingVideoStream(uint8_t _id) : OutgoingMediaStream(_id, TYPE){};
OutgoingVideoStream::~OutgoingVideoStream(){};
ExtraStreamInfo OutgoingAudioStream::getStreamInfo() const
{
ExtraStreamInfo a;
a.streamId = id;
a.codec = codec;
a.enabled = enabled;
a.type = type;
a.frameDuration = frameDuration;
return a;
}
OutgoingStream::OutgoingStream(uint8_t _id, StreamType _type) : StreamInfo(_id, _type), packetManager(_id){};
OutgoingStream::~OutgoingStream(){};
ExtraStreamInfo OutgoingStream::getStreamInfo() const
{
ExtraStreamInfo a;
a.streamId = id;
a.enabled = enabled;
a.type = type;
return a;
}
OutgoingMediaStream::OutgoingMediaStream(uint8_t id, StreamType type) : OutgoingStream(id, type){};
OutgoingMediaStream::~OutgoingMediaStream(){};
ExtraStreamInfo OutgoingMediaStream::getStreamInfo() const
{
ExtraStreamInfo a;
a.streamId = OutgoingStream::id;
a.codec = codec;
a.enabled = OutgoingStream::enabled;
a.type = OutgoingStream::type;
return a;
}