[Lazarus] TMPlayerControl

Andrew Haines andrewd207 at aol.com
Mon Jan 12 05:37:19 CET 2015


On 01/11/2015 09:57 PM, Michael Thompson wrote:
> G'day,
>
> On 11 January 2015 at 11:44, Andrew Haines <andrewd207 at aol.com 
> <mailto:andrewd207 at aol.com>> wrote:
> > I played with this for a few minutes and came up with this:
> > MPlayerControl1.OnPlaying has to be assigned for
> > MPlayerControl1.Position to work.
>
> Oh.  Yes, I see...   That was by design - it never occurred to me that 
> someone would want to retrieve the .Position without having .OnPlaying 
> hooked up.
>

>
> Given the current architecture, what I *can't* do is obtain the 
> position when the user requests it.  I can either constantly query the 
> position (which is what I currently do when FOnPlaying is assigned) or 
> never ask for position.
>
> As I see it, we've got 3 options:
>
> 1.  Maintain current code
> 2.  Always request Position from mplayer
> 3.  Add an Options Flag.  Only request Position if either 
> optRequestPosition or FOnPLaying assigned.
>
> Now you've raised the issue, I'm not in favour of 1.  2 will introduce 
> overheads - but as we've seen when FOnPlaying is assigned, those 
> overheads aren't excessive.  3 preserves my original caution, but 
> perhaps that's unwarranted.

I'm not really sure it's an issue. My test was very minimal to create a 
fullscreen workaround. I imagine most programs would assign OnPlaying.

>
> Now that there's a few items on the TODO list, let me know which you 
> prefer: 2) or 3) and I'll make the changes.
>
I prefer 2.
3 seems over-engineered. :)

> I'll get the .FullScreen property in at the same time (but sorry 
> Pierre:  I completely lack the knowledge or time to investigate 
> mplayer working with GL)
>
> Many thanks for the feedback
>
:)

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150111/264294f8/attachment-0003.html>


More information about the Lazarus mailing list