[Live-devel] Need your expertise

hornsby adrian_hornsby at yahoo.co.uk
Wed Jun 1 12:29:47 PDT 2005


Hi Ross,

Thanks for making things clear in my head.
I found my problem and fixed it by doing
doGetNextFrame() instead of getNextFrame(...) when I needed new data. I guess 
I got a little confused.

Thanks for everything again
regards,
adrian


On Monday 30 May 2005 22:00, Ross Finlayson wrote:
> >I'm having a problem with the function getNextFrame() and
> > afterGetting(this)
>
> [...]
>
> >       afterGettingFrame1()
> >    {
> >    //algo that check where to splice in the fTo buffer
> >    //then copy data from fTo to fTobis //work
>
> I wasn't really able to follow exactly what you're trying to do, but the
> section above suggests that possibly you're a bit confused about the
> use/purpose of "fTo".
>
> When a "FramedSource" is executing "doGetNextFrame()" (the virtual function
> that implements "getNextFrame()"), then "fTo" is a pointer to an area of
> memory - supplied by the downstream caller - that is to receive the
> data.  The "FramedSource" that's executing "doGetNextFrame()" must copy (or
> arrange to copy) data *to* the memory pointed to by "fTo".  This is usually
> done by code like:
>
>          // suppose that we have the data in an internal buffer "buf", size
> "size"
>          if (size <= fMaxSize) {
>                  fFrameSize = size;
>                  fNumTruncatedBytes = 0;
>          } else { // the downstream caller doesn't have enough memory for
> us fFrameSize = fMaxSize;
>                  fNumTruncatedBytes = size - fMaxSize;
>          }
>          memmove(fTo, buf, fFrameSize);
>
> I.e., if object A calls B->getNextFrame(to, maxSize, ...)
> then, in B::doGetNextFrame():
>          "fTo" is the "to" pointer that was passed to "B->getNextFrame()"
>          "fMaxSize" is the "maxSize" pointer that was passed to
> "B->getNextFrame()"
>
>
> 	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

-- 
##########################
  This is all around ...
http://hornsby.freezee.org
##########################

	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com


More information about the live-devel mailing list