简体   繁体   中英

live555 onDemandServer to stream multicast

I have managed to write a MediaSubsession that is derived from OnDemandServerMediaSubsession and I have a stream working in VLC for one view, but if I try to open 2 instances of VLC I see that the streams both slow down a little. Do I need to multicast this? how do I do this? How do I pass in mutlicast addresses etc in live555, do I pass it into the MediaSubsession?

Any help would be greatly appreciated.

In you derived class you should set reuseFirstSource = true calling OnDemandServerMediaSubsession constructor :

  OnDemandServerMediaSubsession(UsageEnvironment& env, Boolean reuseFirstSource,
                                portNumBits initialPortNum = 6970,
                                Boolean multiplexRTCPWithRTP = False);

This will create only one source that will be shared by all the sinks.

If you would like to use multicast you should overide PassiveServerMediaSubsession instead of OnDemandServerMediaSubsession that is dedicated to unicast streaming.
You will find samples in the testProgs folder for instance testMKVStreamer.cpp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM