[Live-devel] DeviceSource "not so clean" fix

Dixon Siu dixonsiu at mediaglue.co.jp
Tue May 25 14:24:12 PDT 2004


Hi Ross,

Thanks for the clarification. From the template of DeviceSource, I
miss-undetstood the meaning of "In" and thought that I have to initialize it
and keep it up-to-date. That is why, in my DeviceSource constructor, I also
assigned a pointer address to fTo. I will review the classes.

Only one question: how come the following code exists in
ByteStreamFileSource::doGetNextFrame()
	if (fPreferredFrameSize > 0) && fPreferredFrameSize < fMaxSize){
		fMaxSize = fPreferredFrameSize;
	}

The above code sets the value of fMaxSize.

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: Monday, May 24, 2004 11:38 PM
> To: LIVE.COM Streaming Media - development & use
> Subject: Re: [Live-devel] DeviceSource "not so clean" fix
>
>
>
> >         fMaxSize = fPreferredFrameSize;
>
> Once again, this is wrong.  "fMaxSize" (just like "fTo") is an input
> parameter (which was set in the original call to "getNextFrame()").  It's
> not something that you set yourself (in "doGetNextFrame()").
>
> Once again, to summarize: In your "doGetNextFrame()" member function
> implementation, you
> - *read* (but don't set) "fTo" and "fMaxSize"
> - *set* "fFrameSize" and "fPresentationTime"
> - *optionally set* (if you know the values) "fNumTruncatedBytes" and
> "fDurationInMicroseconds".
>
> >         // Strange! I cannot use the pointer method.
>
> There's nothing 'strange' here.  Remember, You Have Complete Source
> Code.  If you read it (in particular, "FramedSource::getNextFrame()"),
> you'll see what's going on.
>
>
> 	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
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.688 / Virus Database: 449 - Release Date: 2004/05/18
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 2004/05/18



More information about the live-devel mailing list