[vlc-devel] [PATCH 1/3] core: add a variable type for 3D angles
robux4 at gmail.com
Thu Mar 2 08:54:42 CET 2017
On Tue, Feb 28, 2017 at 9:16 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le tiistaina 28. helmikuuta 2017, 9.25.47 EET Steve Lhomme a écrit :
>> > This is really three floating point values. If you care about atomicity,
>> > you really shouldn´t be using variables in any case given the design
>> > limitations in event handling. If you don´t, then you can use three
>> > variables.
>> It depends what you mean by atomicity. If you mean that all 3 values
>> are updated at the same time, yes this is important. Just like it is
>> when you move the mouse, you don't want your window(video) to go up
>> and then sideways.
>> What kind of limitations are we talking about ?
> AFAICT, there is no generic race-free way to keep track of a variable. In
> particular, there are no ways to atomically get the current value and install
> a callback.
> There may be tricks that work in some constrained scenarii.
>> The order wouldn't matter too much as it's relative values. If you can write
>> a value, then another value overwriting the previous one would be a problem.
>> The sensor data may not come in the UI thread and at high refresh
>> > And generally, please no more VLC variable base types. We need to draw a
>> > line somewhere.
>> I agree that 3 floats in a union is having an impact on all the rest.
> Well, thing is, variables are a convenient programming "shortcut" insofar as
> they are automatically visible to Lua scripts (and previously Laurent's RPN
> a.k.a. FenrirPHP), the skin engine and have wrappers in Qt.
> But that only works if you use an existing variable type on an existing
> object. If you create a new type, your work gets worse rather than better.
>> On the other hand I don't really see another mechanism to pass data to
>> the vout thread asynchronously.
> vout_ChangeAspectRatio() ?
OK, but I was wrong in my comment. It needs to be passed to the input
thread. The position may alter both audio and video outputs. It may
also triggers adaptive streaming changes. My patchset was also missing
the additions in hotkeys.c (the naming is less and less meaningful)
that receive the changes and send them to the input.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel