I need to send some extra data `sendIframes` when a new client connects to our RTSP server. This is what I have found and done so far
env->taskScheduler().scheduleDelayedTask(5000000, (TaskFunc*)sendIframes, NULL); //failed //delaying is useless as we need to send only to the new client connects EventTriggerId eId = env->taskScheduler().createEventTrigger((TaskFunc*)sendIframes); env->taskScheduler().triggerEvent(eId,NULL);//failed //how do we trigger it when new client connects or when streaming starts for the new client? env->taskScheduler().setBackgroundHandling(0, SOCKET_READABLE|SOCKET_WRITABLE,(TaskScheduler::BackgroundHandlerProc*)&sendIframes,NULL);//how to use this? //this looks like the right way to do what we want but how exactly? env->taskScheduler().doEventLoop(); // does not return `doEventLoop()` handles new connections and send stream to the new clients all be itself. At the moment only thing I can think of is to edit the source code of Live555. void StreamState::startPlaying(Destinations* dests, unsigned clientSessionId, TaskFunc* rtcpRRHandler, void* rtcpRRHandlerClientData, ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler, void* serverRequestAlternativeByteHandlerClientData) { //..... //run sendIframes(); //..... }
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel