[vlc-devel] [PATCH 1/3] core: add a variable type for 3D angles

Steve Lhomme robux4 at gmail.com
Tue Feb 28 09:25:47 CET 2017


On Mon, Feb 27, 2017 at 6:13 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le maanantaina 27. helmikuuta 2017, 17.35.27 EET Steve Lhomme a écrit :
>> yaw, pitch, roll
>> ---
>>  include/vlc_common.h    |  1 +
>>  include/vlc_variables.h | 28 ++++++++++++++++++++++++++++
>>  src/misc/variables.c    | 11 ++++++++++-
>>  3 files changed, 39 insertions(+), 1 deletion(-)
>
> 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 ? 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
rate.

> 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.
On the other hand I don't really see another mechanism to pass data to
the vout thread asynchronously.

> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list