0

Ok so this question is actually in two parts.

I coded a video filter for VLC and I would like to add a control to the Video Effects panel on the OS X UI. So far I've been able to link my plugin the the UI by hijacking one of the existing controls, but this isn't ideal.

Now, if I open up the Xcode project (I'm running Xcode 6.3.1) and try to open the VideoEffect.xib file, I get the following error: XCode error message

I tried to google this but it sounds like the only alternative would be to play archaeologist and dig up an old copy of Xcode 3. Is there any other way to be able to open this file and edit it somehow? I tried to look at the XML code but if I started to change that I'd do more damage than good.

The second thing I'd like to do is sending back values from the effect module to the UI. At the moment (by hijacking one of the existing sliders), all I can do is read a value from the panel with

config_ChainParse(p_filter, FILTER_PREFIX, ppsz_filter_options, p_filter->p_cfg);
p_filter->p_sys->i_factor = var_CreateGetIntegerCommand(p_filter, FILTER_PREFIX "factor");

and then, inside the callback function:

p_sys->i_factor = VLC_CLIP( newval.i_int, 0, 255 );

However, I haven't been able to write back the value. I'd like the filter to set p_sys->i_factor to a random value at start. This works (using var_SetInteger()), but it isn't reflected in the position of the slider in the Video Effect panel. I suspect I need to hack a bit deeper for that. Any ideas?

Roberto
  • 267
  • 4
  • 10

1 Answers1

1

Regarding your first question with the xib-file. Consider downloading and using our forthcoming 3.0 code from git://git.videolan.org/vlc.git - it allows editing of said file without Xcode 3.

Regarding your second question, why would you want your video filter to interfere with the UI? This is not how the architecture of VLC works and there is no correct way to do it at this point. You would need to edit the core to do another global variable callback to ask the UI to reload the presented filter configuration. Perhaps, if you give details about what your filter does and what you want to achieve, we find a more supported way :)

feepk
  • 1,756
  • 1
  • 12
  • 14
  • Thanks for getting back to me. I won't go into detail of what the filter does, but I'm trying to run a preference experiment with it. A user would move a slider and set the filter to their preferred setting. However, to avoid introducing a bias, I'd like the slider to start from some random position, rather than '0'. Given the time constraints I have, I'll probably have to do that manually somehow. But thanks for the tip about VLC 3, I'll have a look at the code asap. – Roberto May 18 '15 at 10:29