Page 1 of 1

NEW Player for Liveocode on Linux

Posted: Thu Feb 22, 2018 6:50 pm
by MaxV
Hi all,
I'd like to write a widget to substitute the player with mplayer (see https://www.mplayerhq.hu/design7/info.html )
Mplayer is cross platform, reads quite all formats and very easy to control (see https://www.mplayerhq.hu/DOCS/tech/slave.txt), and moreover on Linux the standard livecode player can't stop. :(

I started my work on https://github.com/angerangel/playerwidget

My problem is there is no guide on Livecode builder, so I still can't understand all canvas and text stuff at all.

Your valuable help would be for a complete guide on widgets or you can work/fork on github link and edit the lcb file. You can edit the lcb file directly from your browser.

Re: NEW Player for Liveocode on Linux

Posted: Fri Feb 23, 2018 4:29 pm
by [-hh]
There is no "shell" or "process" handling in LCB to reach a mplayer binary, except going back and forth to LC Script (but the 'places' where you can do this are changed with every LCB version).
You could try to use the source code of mplayer and FFI, see (esp. the links there):
http://forums.livecode.com/viewtopic.ph ... 10#p153310

Re: NEW Player for Liveocode on Linux

Posted: Sun Feb 25, 2018 10:42 pm
by livecodeali
My problem is there is no guide on Livecode builder, so I still can't understand all canvas and text stuff at all.
Hi Max, I'm currently trying to write a guide on writing lcb extensions (mainly to include various aspects of interfacing with native objects and libraries), but I can see the basic parts are currently pretty underrepresented in the extending livecode guide (the 'pink circle' example)

If there is anything in particular you would like me to not forget to include, please let me know.

Re: NEW Player for Liveocode on Linux

Posted: Tue Feb 27, 2018 2:21 am
by MaxV
I could do less or more the same task with a livecode group, but the benefits of widget are the properties in the property inspector, the other triggers that with a simple copy and paste of a livecode I could not achieve easily.
At the present my idea is to control mplayer to a file socket.
Mplayer can be locked to a windowID, so it's easy about resizing, this is my first attempt with standard livecode:
Schermata2.png
Schermata2.png (7.69 KiB) Viewed 5557 times
(the screnshot didn't get the frame)

Re: NEW Player for Liveocode on Linux

Posted: Tue Feb 27, 2018 4:29 am
by [-hh]
You could try to get info about methods from the source code of this app:
https://www.smplayer.info

It's done in Qt and open source.