<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>All,</div>
<div>I used the live555 lib to make a simple RTSP server, my server IP is 135.240.130.30, the inputPort is 1236, the outputPort is 8556,</div>
<div>One phone can send TS packet to 1236 port, another phone can get the packets from rtsp://135.240.130.30:8556/mobileLiveVideo,</div>
<div>This works fine.</div>
<div> </div>
<div>However, I also want to store/save this TS stream source on the live555 server into a stream file,for example(test.ts), after I see the code in testProgs/testReplicator.cpp, I add some code to do this:</div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div>unsigned fOurSessionId;</div>
<div> Port clientRTPPort(0), clientRTCPPort(0), serverRTPPort(0), serverRTCPPort(0);</div>
<div> netAddressBits destinationAddress = 0;</div>
<div> u_int8_t destinationTTL = 0;</div>
<div> Boolean isMulticast = False;</div>
<div> void* streamToken;</div>
<div> subsess->getStreamParameters(fOurSessionId, 0, clientRTPPort,clientRTCPPort, 0,0,0, destinationAddress,destinationTTL, </div>
<div> isMulticast, serverRTPPort,serverRTCPPort, streamToken); </div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div>// get the source </div>
<div> FramedSource* source = subsess->getStreamSource(streamToken);</div>
<div> StreamReplicator* replicator = StreamReplicator::createNew(*env, source);</div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div> // Then create a network (UDP) 'sink' object to receive a replica of the input stream, and start it.</div>
<div> // If you wish, you can duplicate this line - with different network addresses and ports - to create multiple output UDP streams:</div>
<div> startReplicaUDPSink(replicator,"135.240.130.30",8556);</div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div> // Then create a file 'sink' object to receive a replica of the input stream, and start it.</div>
<div> // If you wish, you can duplicate this line - with a different file name - to create multiple output files:</div>
<div> startReplicaFileSink(replicator, "test.ts");</div>
<div> startReplicaFileSink(replicator, "test2.ts");</div>
<div> *env<<"\nstartReplicaFileSink\n";</div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div><font size="2">The <font size="2">startReplicaUDPSink</font><font size="2"> and </font><font size="2">startReplicaFileSink</font><font size="2"> </font><font size="2"> is same as in </font><font size="2">testProgs</font><font size="2">/test</font><font size="2">Replicator</font><font size="2">.cpp</font><font size="2">.</font></font></div>
<div>The problem is the test.ts and test2.ts can save the TS packet correctly, but the phone can not get packets from rtsp://135.240.130.30:8556/mobileLiveVideo,</div>
<div>And an error on my server occurred: </div>
<div>FramedSource[0x1fea260]::getNextFrame(): attempting to read more than once at the same time!</div>
<div>Aborted</div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
<div>Can anyone tell we what’s wrong? Thank you.</div>
<div> </div>
<div>BR,</div>
<div>Chao,Yuan</div>
<div><font face="Times New Roman, serif" size="2"> </font></div>
</font>
</body>
</html>