简体   繁体   English

live555 onDemandServer流多播

[英]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. 我设法编写了一个从OnDemandServerMediaSubsession派生的MediaSubsession,并且在VLC中有一个流在一个视图中工作,但是如果尝试打开2个VLC实例,我会看到这两个流都变慢了一点。 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? 我如何在live555中传递多个地址,如何将其传递给MediaSubsession?

Any help would be greatly appreciated. 任何帮助将不胜感激。

In you derived class you should set reuseFirstSource = true calling OnDemandServerMediaSubsession constructor : 在派生类中,应设置reuseFirstSource = true,以调用OnDemandServerMediaSubsession构造函数:

  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. 如果要使用多播,则应该覆盖PassiveServerMediaSubsession而不是专用于单播流的OnDemandServerMediaSubsession。
You will find samples in the testProgs folder for instance testMKVStreamer.cpp 您将在testProgs文件夹中找到实例testMKVStreamer.cpp的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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