FrameRateConverter icon indicating copy to clipboard operation
FrameRateConverter copied to clipboard

[WIP] Started porting to Linux + Meson

Open adworacz opened this issue 2 years ago • 4 comments

This is still a work in progress. Fixes #5

There are a few errors around concerning non-const lvalues, rvalues, wrt certain constructor calls.

References (meson build examples):

  1. https://github.com/Irrational-Encoding-Wizardry/descale/blob/master/meson.build
  2. https://github.com/vapoursynth/vivtc/blob/master/meson.build

TODO:

  1. Fix non-const lvalue / rvalue errors.
  2. Get vapoursynth build working.
  3. Get avisynth+ build working.
  4. Support cross-compilation for windows support.

Current issues I'm encountering, in part because of my limited knowledge of c++:

Build failing due to non-const lvalue

../Src/VapourSynth/ContinuousMaskVpy.cpp: In constructor ‘ContinuousMaskVpy::ContinuousMaskVpy(const VSMap*, VSMap*, VSNodeRef*, VSCore*, const VSAPI*, int, int)’:
../Src/VapourSynth/ContinuousMaskVpy.cpp:16:53: error: cannot bind non-const lvalue reference of type ‘ICommonEnvironment&’ to an rvalue of type ‘ICommonEnvironment’
   16 |         ContinuousMaskBase(new VpyVideo(node, api), VpyEnvironment(PluginName, api, core, out), _radius, _thr)
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../Src/VapourSynth/ContinuousMaskVpy.h:3:
../Src/VapourSynth/../Common/ContinuousMaskBase.h:20:70: note:   initializing argument 2 of ‘ContinuousMaskBase::ContinuousMaskBase(ICommonVideo*, ICommonEnvironment&, int, int)’
   20 |         ContinuousMaskBase(ICommonVideo* _child, ICommonEnvironment& _env, int _radius, int _thr);
      |                                                  ~~~~~~~~~~~~~~~~~~~~^~~~

Avisynth builds

I've been focused on the Vapoursynth components and haven't turned on Avisynth building just yet. Not sure what monsters lie there.

adworacz avatar Sep 13 '22 23:09 adworacz

Great!

lvalue vs rvalue

lvalue reference of type ‘ICommonEnvironment&’ to an rvalue of type ‘ICommonEnvironment’

ICommonEnvironment has & (reference to object) whereas the right one doesn't (direct object)

Looking really quick, are you sure that replacing VpyFilter::Init with override syntax is going to work? These are the methods called by VapourSynth engine so it needs to be exactly what it expects.

mysteryx93 avatar Sep 19 '22 22:09 mysteryx93

Time line? Keep up the good work!

RosensRauk avatar Sep 27 '22 22:09 RosensRauk

Sorry, been traveling for a few weeks now.

My question is how to I turn the raw object into a reference inline? It’s part of a constructor, so I can’t pass it in using a variable reference.

And I’ll look into the override thing. I did it as it seemed like a best practice since the methods are intended to override the base implementation.

adworacz avatar Sep 28 '22 21:09 adworacz

those methods aren't about best-practices; it's about having the exact syntax that is expected by an engine written in a different language so that it can be called. About the other error; is that due to a necessary change to make it cross-platform, or an error you introduced yourself? You can always roll-back changes.

mysteryx93 avatar Sep 28 '22 22:09 mysteryx93