[Gambas-user] Libmpv interest?
Bruce Steers
bsteers4 at gmail.com
Wed May 26 13:37:57 CEST 2021
On Wed, 26 May 2021, 02:20 Benoît Minisini, <g4mba5 at gmail.com> wrote:
> 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!
>
Doh!
Why oh why can it not just be easy? 😢
Hehe , only kidding.
Thanks for the explanation.
To be honest it does sound like over complicated with versions being a load
fail issue.
Could not a flag be supplied to extern load any (the available) version and
hope the programmer has catered for backward/forward compatibility?
And yes I had intended to put something in to check libmpv exists (or make
it a dependency)
Does anyone who knows how to make c/c++ components fancy knocking up a
libmpv component?
Theres only a few commands need exposing, control is all done via
command/option/property calls and can be left to the programmer.
C is just way beyond me.
Thank you
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210526/f93a188f/attachment.htm>
More information about the User
mailing list