[Gambas-user] Libmpv interest?

Benoît Minisini g4mba5 at gmail.com
Wed May 26 03:19:51 CEST 2021


Le 26/05/2021 à 02:22, Bruce Steers a écrit :
> 
> 
> On Wed, 26 May 2021 at 00:12, Benoît Minisini <g4mba5 at gmail.com 
> <mailto:g4mba5 at gmail.com>> wrote:
> 
>     Le 26/05/2021 à 01:07, Bruce Steers a écrit :
>      > Hey Ben would there be interest in adding (I could give it a go) an
>      > MpvView to gb.form.media ?
>      >
>      > I've only just got into it but it looks like very minimal code 
>     could
>      > open the libmpv command / option / properties up to the
>     programmer and
>      > enable a whole lot of functionality via a very small and basic class
>      > file that by default could have the same functions/properties of
>      > MediaView but then a whole lot more.
>      >
>      > The reason behind me using mpv in the first place and not
>     MediaView is
>      > mpv plays more video formats for me than gstreamer , yes probably my
>      > config but still there are many other benefits of mpv.
>      >
>      > If only gtk3 would behave itself.
>      >
>      > Thanks for any consideration.
>      >
>      > BruceS
>      >
>      >
>      >
>      > ----[ http://gambaswiki.org/wiki/doc/netiquette
>     <http://gambaswiki.org/wiki/doc/netiquette> ]----
>      >
> 
>     You have to create a component in C/C++ on its own, because you are
>     depending on a specific shared binary library.
> 
>     -- 
>     Benoît Minisini
> 
>     ----[ http://gambaswiki.org/wiki/doc/netiquette
>     <http://gambaswiki.org/wiki/doc/netiquette> ]----
> 
> 
> Dang , that's well beyond my ability.
> For someone like you who knows what they are doing with gambas C 
> components i should imagine it would be very simple as there's not 
> really much to do with the API, just a few functions then let the 
> programmer do the rest, it's a completely foreign language to me though.
> 
> Maybe for now i'll just refine my gambas usercontrol and pop it on the farm.
> Cheers anyway :)
> Wishing well
> BruceS
> 

You cannot put a library name like "libmpv" directly in a EXTERN 
definition and expect it to work on all system (for example, I have to 
write "libmpv:1").

You have to write a normal component in C/C++, because you have to 
detect which library is installed on the system, you have to use the 
C/C++ header files (so that the compiler can call the library functions 
correctly), and later that component must have its own binary package 
with its own dependency on "libmpv".

Maybe if the Gambas interpreter had a way to detect shared libraries at 
runtime, telling which version it detects, you could write a program 
that adapt to it, and then writing an error message like "you must 
install libmpv" if you do not detect it. But at the moment, no way.

Sorry for that!

-- 
Benoît Minisini


More information about the User mailing list