Hi, I noticed a strange effect when calling initiateByMediaType() more than once during session setup. In my application I call setup methods in the following order:
... pSession->initiateByMediaType( "video/H264" ); pClient->setupMediaSubsession(); pSession->initiateByMediaType( "audio/PCMU" ); pClient->setupMediaSubsession(); pClient->playMediaSession(); ... and the problem is that during the first call an audio session is initiated, its session socket is created and a local port is stored in fClientPortNum - but immediately after that this session is deinitiated ( as it is not "video/H264" ), and all sockets are closed. In the next step a video session is initiated and the system assigns exactly the same port to it ( it is ok because all previously open sockets are already closed ). When I call initiateByMediaType( "audio/PCMU" ) an audio session is initiated once again, but now it binds explicitly to fClientPortNum which is the same port as used in a video session ! The system has no problem with it as SO_REUSEADDR is set on both sockets ( and Windows allows multiple sockets to be bound to one address, which is slightly different behaviour as in Unix, I think ), Windows delivers all incoming packets only to one of these sockets, so I hear no audio ( or I see no video ). It happens occasionally, but it is dangerous as everything looks ok, no errors are returned while, in fact, one media session is idle. Regards, Kamil Dobkowski
_______________________________________________ live-devel mailing list [email protected] http://lists.live555.com/mailman/listinfo/live-devel
