<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">i made a little change to testmpeg4videostreamer.<br>i put everything in a class (myServer.h and myServer.cpp) then call everything in my main function (main.cpp)<br>the source code looks like this:<br><br>this is the myServer class<br><br style="font-style: italic;"><span style="font-style: italic;">class myServer{</span><br style="font-style: italic;"><span style="font-style: italic;">void myServer :: init(){</span><br style="font-style: italic;"><span style="font-style: italic;">// i move almost all function to here except the play() and doeventloop.</span><br style="font-style: italic;"><span style="font-style: italic;">}</span><br style="font-style: italic;"><span style="font-style: italic;">void myServer::play (){</span><br style="font-style: italic;"><span style="font-style: italic;">// still the same "play"
 function</span><br style="font-style: italic;"><span style="font-style: italic;">}</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">...</span><br style="font-style: italic;"><span style="font-style: italic;">...</span><br style="font-style: italic;"><span style="font-style: italic;">...</span><br style="font-style: italic;"><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">}</span><br><br>and this is the main function<br><br><span style="font-style: italic;">#include"myServer.h"</span><br style="font-style: italic;"><span style="font-style: italic;">int main(){</span><br style="font-style: italic;"><span style="font-style: italic;">myServer Sender;</span><br style="font-style: italic;"><span style="font-style: italic;">Sender.init();</span><br style="font-style: italic;"><span style="font-style: italic;">Sender.play();</span><br style="font-style: italic;"><span
 style="font-style: italic;">Sender.env-&gt;taskScheduler().doEventLoop();</span><br style="font-style: italic;"><span style="font-style: italic;">}</span><br><br><br>it doesn't work....<br>it gives the message BasicTaskScheduler:SingleStep():Select() fails: no error<br><br><br>but if i put the doeventloop in the play function<br>and the play function within the init function then it will work. the working source code is like this:<br><br style="font-style: italic;"><span style="font-style: italic;">class myServer{</span><br style="font-style: italic;"><span style="font-style: italic;">void myServer :: init(){</span><br style="font-style: italic;">
<span style="font-style: italic;">// i move ALL of the functions here.</span><span style="font-style: italic;"></span><br style="font-style: italic;">
<span style="font-style: italic;">}</span><br style="font-style: italic;">
<span style="font-style: italic;">void myServer::play (){</span><br style="font-style: italic;">
<span style="font-style: italic;">//&nbsp; the same "play" function</span><br style="font-style: italic;">
<span style="font-style: italic;">}</span><br style="font-style: italic;">
<span style="font-style: italic;">...</span><br style="font-style: italic;"><span style="font-style: italic;">...</span><br style="font-style: italic;"><span style="font-style: italic;">...</span><br style="font-style: italic;"><span style="font-style: italic;">}<br><br style="font-style: italic;"></span><span style="font-style: italic;">#include"myServer.h"</span><br style="font-style: italic;">
<span style="font-style: italic;">int main(){</span><br style="font-style: italic;">
<span style="font-style: italic;">myServer Sender;</span><br style="font-style: italic;">
<span style="font-style: italic;">Sender.init();</span><br style="font-style: italic;">
<span style="font-style: italic;">}</span><br><br><br><br>is it normal?<br>if it is, can you please tell me how to make it works, because i really need to call the init function and the play function (and also the doeventloop) separately in the main function.<br><br>i would be really grateful for every hint.<br><br>thank you,<br>Gunar<br></div><br>
<hr size=1>Cheap Talk? <a href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">Check out</a> Yahoo! Messenger's low PC-to-Phone call rates.</body></html>