[Live-devel] Reception Packet Information

Dixon Siu dixonsiu at mediaglue.co.jp
Wed Jun 23 10:51:44 PDT 2004


Sorry to bother you again, Ross.

I wasn't clear on the doEventLoop issue. So in order to have my function
being executed by live.com's event loop every n microseconds, should I do
the following:
In main:
{
...
env->taskScheduler().scheduleDelayedTask(n,
getCurrentReceiverPacketInfo,data); // this will be executed once
env0>taskScheduler().doEventLoop(); // no return
}

The trick is that within getCurrentReceiverPacketInfo(), I should do this:
{
// perform information gathering
...
// at the end, schedule another task
env->taskScheduler().scheduleDelayedTask(n, getCurrentReceiverPacketInfo,
data); // this will be executed next
}

So it will be recursively executed by doEventLoop every n microseconds AND
does not affect the live.com's thread. The idea is kind of like
doGetNextFrame() in each source reading class, doGetNextFrame() perform the
reading, then at the very end, there is a scheduleDelayedTask() call to loop
back. Please correct me if I am wrong.

Regards,
Dixon

> -----Original Message-----
> From: live-devel-bounces at ns.live.com
> [mailto:live-devel-bounces at ns.live.com]On Behalf Of Ross Finlayson
> Sent: Tuesday, June 22, 2004 7:07 PM
> To: LIVE.COM Streaming Media - development & use
> Subject: RE: [Live-devel] Reception Packet Information
>
>
>
> >If I follow you correctly, I should call
> >env->taskScheduler().scheduleDelayedTask(n, getCurrentReceiverPacketInfo,
> >data) within my application.
>
> Yes, but note that each call to "scheduleDelayedTask()" will cause your
> "getCurrentReceiverPacketInfo()" function to be called just once.  So,
> you'll need to re-invoke "scheduleDelayedTask()" each time.
>
> >So it means that every n seconds,  the main thread  will receive a
> >"callback" from live.com's thread.
>
> No, there's only one 'thread' of control.  What will happen is
> that every n
> *micro*seconds, an event will occur, and be handled within the
> event loop -
> i.e., the "doEventLoop()" call.
>
> You should perhaps re-familiarize yourself with
> <http://www.live.com/liveMedia/faq.html#control-flow>
>
>
> 	Ross Finlayson
> 	LIVE.COM
> 	<http://www.live.com/>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
>
>
> __________ NOD32 1.793 (20040622) Information __________
>
> This message was checked by NOD32 Antivirus System.
> http://www.nod32.com
>
>



More information about the live-devel mailing list