1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #250, basic stream caster framework. 2.0.104

This commit is contained in:
winlin 2015-01-24 16:31:32 +08:00
parent 6463d22a14
commit 711b6ca277
2 changed files with 9 additions and 2 deletions

View file

@ -230,9 +230,16 @@ int SrsListener::cycle()
#ifdef SRS_AUTO_STREAM_CASTER
SrsUdpListener::SrsUdpListener(SrsServer* server, SrsListenerType type, SrsConfDirective* c) : SrsListener(server, type)
{
_type = type;
nb_buf = SRS_UDP_MAX_PACKET_SIZE;
buf = new char[nb_buf];
caster = new SrsMpegtsOverUdp(c);
// the caller already ensure the type is ok,
// we just assert here for unknown stream caster.
srs_assert(_type == SrsListenerMpegTsOverUdp);
if (_type == SrsListenerMpegTsOverUdp) {
caster = new SrsMpegtsOverUdp(c);
}
}
SrsUdpListener::~SrsUdpListener()