Hi everyone,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am developing software which is a multithreaded program and one thread requires the transport stream packets to be streamed from my data structures. I should also take care of mutual exclusion to the access of the data structure .I have created a new Device Source and implemented the doGetNextFrame() and deliverFrame() functions.<br>
<br>the doGetNextFrame() function reads from the data strcutres and calls the deliver frame function.<br>the deliverFrame function copies the data to fTo and then deletes the respective bytes from the data strucutre.<br><br>
//I have modelled the actual thread which streams along the lines of testMPEG2TransportStreamer.cpp<br><br><br><br><br>in the play() function i do the following steps<br><br>vectorSource = VectorDeviceSource::createNew(*env, g_packets_outputvector, g_packets_outputvectorlock,signal_vector);<br>
<br>//where vectorSource is the new Device Source i have created.<br><br>videoSource = MPEG2TransportStreamFramer::createNew(*env, vectorSource);<br>&nbsp;//then i create a videoSource for Framer and i pass theVectorSource object.<br>
<br>then i call <br><br>videoSink-&gt;startPlaying(*videoSource, afterPlaying, videoSink);<br><br><br><br><br>BUT my program some how does not work properly...<br><br>firslty it gets stuck in the deliverFrame() function always ....and uses lot of CPU and causes the other threads running to slow down as well.....<br>
<br>I read some of the posts of live555 and feared that may be the program is going to a infinite loop..so i tried using the watchVariable in the event loop , but even that did not work .....<br><br><br>1) it would be great if some can help me in what i am missing .....<br>
<br><br>i can claify if something is missing .........<br><br>Regards<br>Anand.<br>&nbsp;&nbsp;&nbsp; <br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>&nbsp;<br>