<DIV>Sorry, I think writing Chinese is more simple to me.</DIV>
<DIV> </DIV>
<DIV>To Zhang Xiang:</DIV>
<DIV> 我想testprog里的程序已经很清楚了,你问的其实是一个C++的问题.</DIV>
<DIV> 程序的运行流程我也没有弄太清楚,但是我可以讲讲我个人的理解.</DIV>
<DIV> 程序里应该说有两个线程,doeventloop()和play().doeventloop其实就是调用了singlestep()来while()了一个死循环,它始终保证一个schedule一直在执行,这个应该说是程序的主循环.你说的dogetnextframe()等程序其实是一个间接的重入,</DIV>
<DIV> play()-->afterplaying()-->play()</DIV>
<DIV>然后反复的循环,这中间就调用了getnextframe()等很多你看得晕乎乎的程序.</DIV>
<DIV> 其实你根本不用管这些程序的中间的执行过程是怎样的,你只要能理解你需要的testprog的大概流程,然后做你需要的修改.最重要的一点,就是你应该知道你的stream是如何write_data()到程序中,而在客户端又是怎么被read_data()的.</DIV>
<DIV ></DIV>
<P><BR>在2007-03-26,xiang zhang <xngzhng@yahoo.com.cn> 写道:<BR></P>
<BLOCKQUOTE style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>
<DIV>Hello!</DIV>
<DIV>I am Zhang Xiang, graduate student from Zhe Jiang University,China. I’m confused about how the function SingleStep() works. Specifically speaking, when there is a video connection request from remote PC, how does SingleStep() handle this request and call other functions such as DeliverFrame(), doGetNextframe(), to deliver video stream which is encoded in H.264 form?</DIV>
<DIV> Thanks!!</DIV>
<DIV>Best wishes!</DIV>
<DIV> yours Xiang </DIV></FONT></SPAN>
<P></P>
<HR SIZE=1>
<A href="http://music.yahoo.com.cn/?source=mail_mailbox_footer" target=blank>Mp3疯狂搜-新歌热歌高速下 </A></BLOCKQUOTE><br><!-- footer --><br><hr>
<a style="font-size:12px;line-height:15px; color:#000; text-decoration:none" href="http://www.126.com/" target="_blank">独家!网易3G免费邮,还赠送280兆网盘 <span style="font-family:Tahoma; text-decoration:underline; color:blue">www.126.com</span> </a>