pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

Re: [Pharo-users] Personal wiki / information manager

JJ
Jupiter Jones
Sun, Jul 9, 2023 12:53 AM

The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]  without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to play video in Pharo?

Thanks in advance.

Cheers,

J

The stark silence answers my question :) So… I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) [1] https://github.com/badetitou/Pharo-LibVLC [2] https://github.com/pharo-spec/Spec-Gtk > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > Thanks in advance. > > Cheers, > > J
EL
Esteban Lorenzano
Sun, Jul 9, 2023 8:02 AM

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.
Esteban
On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:

The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:
Can anyone point to to some library, documentation or examples of how to play video in Pharo?
Thanks in advance.
Cheers,
J

Hi, Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. what is the process you are taking to install it? where are you trying it? I don't know the status of the VLC bindings. Esteban On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > The stark silence answers my question :) > > So… > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > [1] https://github.com/badetitou/Pharo-LibVLC > [2] https://github.com/pharo-spec/Spec-Gtk > > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > Thanks in advance. > > Cheers, > > J
JJ
Jupiter Jones
Sun, Jul 9, 2023 10:32 AM

Hi Esteban,

Thanks for your reply. I’m running on macOS so I think you’ve helped me identify the issue :)

The target is macOS and PiOS so I’ll give it a go on the pi. For now I can work on Linux until the Mac issue is resolved.

The process is to zeroconf pharo 11, then install spec-gtk based on the instructions on GitHub:
Metacello new
repository: 'github://pharo-spec/Spec-Gtk';
baseline: 'SpecGtk';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load
…then save and quit. Relaunching fails.

I’ll keep an eye out for the macOS fix.

Thanks again for your help.

Cheers,

J

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.

Esteban

On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:
The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]  without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to play video in Pharo?

Thanks in advance.

Cheers,

J

Hi Esteban, Thanks for your reply. I’m running on macOS so I think you’ve helped me identify the issue :) The target is macOS and PiOS so I’ll give it a go on the pi. For now I can work on Linux until the Mac issue is resolved. The process is to zeroconf pharo 11, then install spec-gtk based on the instructions on GitHub: Metacello new repository: 'github://pharo-spec/Spec-Gtk'; baseline: 'SpecGtk'; onConflict: [ :e | e useIncoming ]; onUpgrade: [ :e | e useIncoming ]; ignoreImage; load …then save and quit. Relaunching fails. I’ll keep an eye out for the macOS fix. Thanks again for your help. Cheers, J > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. > what is the process you are taking to install it? where are you trying it? > > I don't know the status of the VLC bindings. > > Esteban > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > The stark silence answers my question :) > > So… > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > [1] https://github.com/badetitou/Pharo-LibVLC > [2] https://github.com/pharo-spec/Spec-Gtk > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > Thanks in advance. > > Cheers, > > J
RW
Russ Whaley
Sun, Jul 9, 2023 7:06 PM

I can't help you with GTK as I'm one of the unfortunate Mac users.
However, I've used the Pharo-LibVLC extensively - although not for video,
so my experience may or may not be relevant for you.

One of the capabilities for Pharo that is sorely under-documented is FFI.
Yes, there is an FFI document, and no, it was not helpful to me when using
VLC.  Admittedly, I am notoriously dim-witted, however I was unable to
grasp how to set up a call-back for/from VLC.  Some of this has to do with
the poor VLC documentation... i.e. trying to find a method/memVar that lets
you know when a song has ended!  There are a couple of 'got'chas' in the
VLC package that locked me up dozens of times before I wrote work-arounds -
but the biggest issues I've encountered is not knowing what VLC is doing...
ie:

  • is it still playing? -I'd like to start the next song in MY playlist - so
    I can show which song is playing - I can't find a method in VLC that tells
    me this
  • where is it in the song (progress/time)? I'd like to show a progress bar
    for the song that is playing.
  • I'd like to know if another service in Pharo is currently using the
    library - as multiple calls also locks it up.
  • statuses are inconsistent - (playing, stopped, mute, etc.) - depending on
    when you ask.  If you ask whether VLC is muted - when a song is not
    playing, it might say yes or no (usually no).  But then the song plays and
    you get no sound... yup, it was muted.

Overall, Pharo-LibVLC is a great leg up in using VLC, but I had to put that
project on hold as I couldn't solve the issues above.

Let me know if you start working with Pharo-LibVLC in earnest - I'd love to
share experiences and see if we can help each other.

Thanks,
Russ

On Sun, Jul 9, 2023 at 4:02 AM Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there
is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.

Esteban

On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:

The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to
create a video widget/component. Does anyone with more in depth knowledge
of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]
without the image crashing on startup. I see someone has already logged
the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it
also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding
installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to
play video in Pharo?

Thanks in advance.

Cheers,

J

--
Russ Whaley
whaley.russ@gmail.com

I can't help you with GTK as I'm one of the unfortunate Mac users. However, I've used the Pharo-LibVLC extensively - although not for video, so my experience may or may not be relevant for you. One of the capabilities for Pharo that is sorely under-documented is FFI. Yes, there is an FFI document, and no, it was not helpful to me when using VLC. Admittedly, I am notoriously dim-witted, however I was unable to grasp how to set up a call-back for/from VLC. Some of this has to do with the poor VLC documentation... i.e. trying to find a method/memVar that lets you know when a song has ended! There are a couple of 'got'chas' in the VLC package that locked me up dozens of times before I wrote work-arounds - but the biggest issues I've encountered is not knowing what VLC is doing... ie: - is it still playing? -I'd like to start the next song in MY playlist - so I can show which song is playing - I can't find a method in VLC that tells me this - where is it in the song (progress/time)? I'd like to show a progress bar for the song that is playing. - I'd like to know if another service in Pharo is currently using the library - as multiple calls also locks it up. - statuses are inconsistent - (playing, stopped, mute, etc.) - depending on when you ask. If you ask whether VLC is muted - when a song is not playing, it might say yes or no (usually no). But then the song plays and you get no sound... yup, it was muted. Overall, Pharo-LibVLC is a great leg up in using VLC, but I had to put that project on hold as I couldn't solve the issues above. Let me know if you start working with Pharo-LibVLC in earnest - I'd love to share experiences and see if we can help each other. Thanks, Russ On Sun, Jul 9, 2023 at 4:02 AM Esteban Lorenzano <estebanlm@netc.eu> wrote: > Hi, > > Spec-Gtk should work without problems on P11, except on macs, where there > is a known problem. > what is the process you are taking to install it? where are you trying it? > > I don't know the status of the VLC bindings. > > Esteban > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > > The stark silence answers my question :) > > So… > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to > create a video widget/component. Does anyone with more in depth knowledge > of Spec2 and GTK foresee any obvious blocks? > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] > without the image crashing on startup. I see someone has already logged > the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it > also ate all the memory then crashed. > > Is there a Pharo version that will work with the Spec2 GTK+ binding > installed? Maybe I’m looking at this too early :) > > [1] https://github.com/badetitou/Pharo-LibVLC > [2] https://github.com/pharo-spec/Spec-Gtk > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to > play video in Pharo? > > Thanks in advance. > > Cheers, > > J > > -- Russ Whaley whaley.russ@gmail.com
JJ
Jupiter Jones
Mon, Jul 10, 2023 5:17 AM

Another step forward.

I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting.

Then, the little test window opened but looked like this:


Is there something else I’m missing?

Thanks for your advice.

Cheers,

Phil

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.

Esteban

On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:
The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]  without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to play video in Pharo?

Thanks in advance.

Cheers,

J

Another step forward. I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting. Then, the little test window opened but looked like this:  Is there something else I’m missing? Thanks for your advice. Cheers, Phil > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. > what is the process you are taking to install it? where are you trying it? > > I don't know the status of the VLC bindings. > > Esteban > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > The stark silence answers my question :) > > So… > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > [1] https://github.com/badetitou/Pharo-LibVLC > [2] https://github.com/pharo-spec/Spec-Gtk > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > Thanks in advance. > > Cheers, > > J
EL
Esteban Lorenzano
Mon, Jul 10, 2023 11:50 AM

Hi,

Heh, there were several problems around :)

  1. Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I updated them and now it should not be a problem (but you need to pull them again).
  2. I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented).
    You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui
  3. finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode).

Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better.
How to execute in worker thread:
pharo --worker MyImage.image --interactive

I updated the README on pharo-spec/Spec-Gtk to precise this points.
Cheers!
Esteban
On Jul 10 2023, at 7:17 am, Jupiter Jones jupiter.jones@mail.com wrote:

Another step forward.

I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting.

Then, the little test window opened but looked like this:

Is there something else I’m missing?

Thanks for your advice.

Cheers,

Phil

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:
Hi,
Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.
Esteban
On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:

The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:
Can anyone point to to some library, documentation or examples of how to play video in Pharo?
Thanks in advance.
Cheers,
J

Hi, Heh, there were several problems around :) 1) Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I updated them and now it should not be a problem (but you need to pull them again). 2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented). You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui 3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode). Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better. How to execute in worker thread: pharo --worker MyImage.image --interactive I updated the README on pharo-spec/Spec-Gtk to precise this points. Cheers! Esteban On Jul 10 2023, at 7:17 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > Another step forward. > > I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting. > > Then, the little test window opened but looked like this: > > > Is there something else I’m missing? > > Thanks for your advice. > > Cheers, > > Phil > > > > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. > > what is the process you are taking to install it? where are you trying it? > > > > I don't know the status of the VLC bindings. > > Esteban > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > > > The stark silence answers my question :) > > > > > > So… > > > > > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > > > > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > > > > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > > > > > [1] https://github.com/badetitou/Pharo-LibVLC > > > [2] https://github.com/pharo-spec/Spec-Gtk > > > > > > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > > > Thanks in advance. > > > > Cheers, > > > > J
D
ducasse
Tue, Jul 11, 2023 6:08 PM

https://github.com/OpenSmock/PharoGStreamer
OpenSmock/PharoGStreamer: A GStreamer binding for Pharo
github.com

On 10 Jul 2023, at 13:50, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Heh, there were several problems around :)

  1. Indeed, Ubuntu naming conventions were a problem for the gtk

bindings. I updated them and now it should not be a problem (but you need to pull them again).
2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented).
You need to use the VM we provide with Open Build Service:  https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui
3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode).
Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better.
How to execute in worker thread:
pharo --worker MyImage.image --interactive

I updated the README on pharo-spec/Spec-Gtk to precise this points.

Cheers!
Esteban
On Jul 10 2023, at 7:17 am, Jupiter Jones jupiter.jones@mail.com wrote:
Another step forward.

I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting.

Then, the little test window opened but looked like this:

Is there something else I’m missing?

Thanks for your advice.

Cheers,

Phil

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.

Esteban

On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:
The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]  without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to play video in Pharo?

Thanks in advance.

Cheers,

J

https://github.com/OpenSmock/PharoGStreamer OpenSmock/PharoGStreamer: A GStreamer binding for Pharo github.com > On 10 Jul 2023, at 13:50, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Heh, there were several problems around :) > > 1) Indeed, Ubuntu naming conventions were a problem for the gtk > bindings. I updated them and now it should not be a problem (but you need to pull them again). > 2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented). > You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui > 3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode). > Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better. > How to execute in worker thread: > pharo --worker MyImage.image --interactive > > I updated the README on pharo-spec/Spec-Gtk to precise this points. > > Cheers! > Esteban > On Jul 10 2023, at 7:17 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > Another step forward. > > I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting. > > Then, the little test window opened but looked like this: > > > Is there something else I’m missing? > > Thanks for your advice. > > Cheers, > > Phil > > > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. > what is the process you are taking to install it? where are you trying it? > > I don't know the status of the VLC bindings. > > Esteban > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > The stark silence answers my question :) > > So… > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > [1] https://github.com/badetitou/Pharo-LibVLC > [2] https://github.com/pharo-spec/Spec-Gtk > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > Thanks in advance. > > Cheers, > > J
JJ
Jupiter Jones
Tue, Jul 11, 2023 10:05 PM

Hi Estiban,

Thanks for that - works beautifully :)

The next challenge was to let VLC know the xid for the gtk window, but of course the one function that answers the xid for gtk appears to be in yet another library (gtk-x11) which, of course, has no binding for Pharo as yet :)

As I’m new to FFI (as is my offsider), this will take a bit of learning and fumbling, so if someone knows it’s going to be a fools errand (ie. this isn’t likely to resolve the link between VLC and gtk) please let me know.

Otherwise, we’ll dive in.

Cheers,

J

On 10 Jul 2023, at 9:50 pm, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Heh, there were several problems around :)

  1. Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I updated them and now it should not be a problem (but you need to pull them again).
  2. I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented).
    You need to use the VM we provide with Open Build Service:  https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui
  3. finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode).
    Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better.
    How to execute in worker thread:
    pharo --worker MyImage.image --interactive

I updated the README on pharo-spec/Spec-Gtk to precise this points.

Cheers!
Esteban
On Jul 10 2023, at 7:17 am, Jupiter Jones jupiter.jones@mail.com wrote:
Another step forward.

I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting.

Then, the little test window opened but looked like this:

Is there something else I’m missing?

Thanks for your advice.

Cheers,

Phil

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.

Esteban

On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:
The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]  without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to play video in Pharo?

Thanks in advance.

Cheers,

J

Hi Estiban, Thanks for that - works beautifully :) The next challenge was to let VLC know the xid for the gtk window, but of course the one function that answers the xid for gtk appears to be in yet another library (gtk-x11) which, of course, has no binding for Pharo as yet :) As I’m new to FFI (as is my offsider), this will take a bit of learning and fumbling, so if someone knows it’s going to be a fools errand (ie. this isn’t likely to resolve the link between VLC and gtk) please let me know. Otherwise, we’ll dive in. Cheers, J > On 10 Jul 2023, at 9:50 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Heh, there were several problems around :) > > 1) Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I updated them and now it should not be a problem (but you need to pull them again). > 2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented). > You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui > 3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode). > Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better. > How to execute in worker thread: > pharo --worker MyImage.image --interactive > > I updated the README on pharo-spec/Spec-Gtk to precise this points. > > Cheers! > Esteban > On Jul 10 2023, at 7:17 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > Another step forward. > > I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting. > > Then, the little test window opened but looked like this: > > > Is there something else I’m missing? > > Thanks for your advice. > > Cheers, > > Phil > > > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. > what is the process you are taking to install it? where are you trying it? > > I don't know the status of the VLC bindings. > > Esteban > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > The stark silence answers my question :) > > So… > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > [1] https://github.com/badetitou/Pharo-LibVLC > [2] https://github.com/pharo-spec/Spec-Gtk > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > Thanks in advance. > > Cheers, > > J
JJ
Jupiter Jones
Tue, Jul 11, 2023 10:34 PM

Hi Stéphane,

Thanks for your reply. I’ve been looking at GStreamer and it’s definitely another viable option. Do you know of any docs or examples of using it in Pharo. I tried a really simple test but get an error I don’t understand just yet.

I’ll put some time into FFI (and gstreamer) so I can ask more appropriate questions.

In any case, it looks like to link GStreamer with Gtk I’ll also need the xid :) So it’s back to working out how to achieve that.

Cheers,

J

On 12 Jul 2023, at 4:08 am, ducasse stepharo@netcourrier.com wrote:

https://github.com/OpenSmock/PharoGStreamer

On 10 Jul 2023, at 13:50, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Heh, there were several problems around :)

  1. Indeed, Ubuntu naming conventions were a problem for the gtk

bindings. I updated them and now it should not be a problem (but you need to pull them again).
2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented).
You need to use the VM we provide with Open Build Service:  https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui
3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode).
Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better.
How to execute in worker thread:
pharo --worker MyImage.image --interactive

I updated the README on pharo-spec/Spec-Gtk to precise this points.

Cheers!
Esteban
On Jul 10 2023, at 7:17 am, Jupiter Jones jupiter.jones@mail.com wrote:
Another step forward.

I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting.

Then, the little test window opened but looked like this:

Is there something else I’m missing?

Thanks for your advice.

Cheers,

Phil

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:

Hi,

Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.

Esteban

On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:
The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2]  without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun,  and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:

Can anyone point to to some library, documentation or examples of how to play video in Pharo?

Thanks in advance.

Cheers,

J

Hi Stéphane, Thanks for your reply. I’ve been looking at GStreamer and it’s definitely another viable option. Do you know of any docs or examples of using it in Pharo. I tried a really simple test but get an error I don’t understand just yet.  I’ll put some time into FFI (and gstreamer) so I can ask more appropriate questions. In any case, it looks like to link GStreamer with Gtk I’ll also need the xid :) So it’s back to working out how to achieve that. Cheers, J > On 12 Jul 2023, at 4:08 am, ducasse <stepharo@netcourrier.com> wrote: > > https://github.com/OpenSmock/PharoGStreamer > >> On 10 Jul 2023, at 13:50, Esteban Lorenzano <estebanlm@netc.eu> wrote: >> >> Hi, >> >> Heh, there were several problems around :) >> >> 1) Indeed, Ubuntu naming conventions were a problem for the gtk > > >> bindings. I updated them and now it should not be a problem (but you need to pull them again). >> 2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented). >> You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui >> 3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode). >> Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better. >> How to execute in worker thread: >> pharo --worker MyImage.image --interactive >> >> I updated the README on pharo-spec/Spec-Gtk to precise this points. >> >> Cheers! >> Esteban >> On Jul 10 2023, at 7:17 am, Jupiter Jones <jupiter.jones@mail.com> wrote: >> Another step forward. >> >> I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting. >> >> Then, the little test window opened but looked like this: >> >> >> Is there something else I’m missing? >> >> Thanks for your advice. >> >> Cheers, >> >> Phil >> >> >> On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: >> >> Hi, >> >> Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. >> what is the process you are taking to install it? where are you trying it? >> >> I don't know the status of the VLC bindings. >> >> Esteban >> >> On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: >> The stark silence answers my question :) >> >> So… >> >> I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? >> >> First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. >> >> Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) >> >> [1] https://github.com/badetitou/Pharo-LibVLC >> [2] https://github.com/pharo-spec/Spec-Gtk >> >> On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: >> >> Can anyone point to to some library, documentation or examples of how to play video in Pharo? >> >> Thanks in advance. >> >> Cheers, >> >> J >
EL
Esteban Lorenzano
Wed, Jul 12, 2023 8:59 AM

what is the xid? The x11 thingy?
in that case you will need to implement a method on GdkWindow (not GtkWindow):
https://docs.gtk.org/gdk3-x11/method.X11Window.get_xid.html
then you do something like:
GRunLoop defer: [ xid := myGtkWindow gdkWindow xid ].
but this is tied to the x11 system and linux is going out really fast of it (is being replaced by Wayland).
I can bet there has to be a better way to connect it to a window.

Esteban
On Jul 12 2023, at 12:05 am, Jupiter Jones jupiter.jones@mail.com wrote:

Hi Estiban,

Thanks for that - works beautifully :)

The next challenge was to let VLC know the xid for the gtk window, but of course the one function that answers the xid for gtk appears to be in yet another library (gtk-x11) which, of course, has no binding for Pharo as yet :)

As I’m new to FFI (as is my offsider), this will take a bit of learning and fumbling, so if someone knows it’s going to be a fools errand (ie. this isn’t likely to resolve the link between VLC and gtk) please let me know.

Otherwise, we’ll dive in.

Cheers,

J

On 10 Jul 2023, at 9:50 pm, Esteban Lorenzano estebanlm@netc.eu wrote:
Hi,
Heh, there were several problems around :)

  1. Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I updated them and now it should not be a problem (but you need to pull them again).
  2. I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented).
    You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui
  3. finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode).

Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better.
How to execute in worker thread:
pharo --worker MyImage.image --interactive

I updated the README on pharo-spec/Spec-Gtk to precise this points.
Cheers!
Esteban
On Jul 10 2023, at 7:17 am, Jupiter Jones jupiter.jones@mail.com wrote:

Another step forward.

I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting.

Then, the little test window opened but looked like this:

Is there something else I’m missing?

Thanks for your advice.

Cheers,

Phil

On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano estebanlm@netc.eu wrote:
Hi,
Spec-Gtk should work without problems on P11, except on macs, where there is a known problem.
what is the process you are taking to install it? where are you trying it?

I don't know the status of the VLC bindings.
Esteban
On Jul 9 2023, at 2:53 am, Jupiter Jones jupiter.jones@mail.com wrote:

The stark silence answers my question :)

So…

I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks?

First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed.

Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :)

[1] https://github.com/badetitou/Pharo-LibVLC
[2] https://github.com/pharo-spec/Spec-Gtk

On 3 Jul 2023, at 5:07 pm, Jupiter Jones jupiter.jones@mail.com wrote:
Can anyone point to to some library, documentation or examples of how to play video in Pharo?
Thanks in advance.
Cheers,
J

what is the xid? The x11 thingy? in that case you will need to implement a method on GdkWindow (not GtkWindow): https://docs.gtk.org/gdk3-x11/method.X11Window.get_xid.html then you do something like: GRunLoop defer: [ xid := myGtkWindow gdkWindow xid ]. but this is tied to the x11 system and linux is going out really fast of it (is being replaced by Wayland). I can bet there has to be a better way to connect it to a window. Esteban On Jul 12 2023, at 12:05 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > Hi Estiban, > > Thanks for that - works beautifully :) > > The next challenge was to let VLC know the xid for the gtk window, but of course the one function that answers the xid for gtk appears to be in yet another library (gtk-x11) which, of course, has no binding for Pharo as yet :) > > As I’m new to FFI (as is my offsider), this will take a bit of learning and fumbling, so if someone knows it’s going to be a fools errand (ie. this isn’t likely to resolve the link between VLC and gtk) please let me know. > > Otherwise, we’ll dive in. > > Cheers, > > J > > > On 10 Jul 2023, at 9:50 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > Hi, > > Heh, there were several problems around :) > > 1) Indeed, Ubuntu naming conventions were a problem for the gtk bindings. I updated them and now it should not be a problem (but you need to pull them again). > > 2) I assume you are using Pharo Launcher (or zeroconf directly). And this is a problem... PharoLauncher is a great idea, and for Windows is a mustbut in linux world it just does not matches the philosophy: There are many distrubutions and changes and is impossible to correctly distribute a VM with all dependencies without using the packaging they expect (we need to start thinking on distribute the VM as a flatpak, but that will take time to be implemented). > > You need to use the VM we provide with Open Build Service: https://software.opensuse.org//download.html?project=devel:languages:pharo:stable&package=pharo-ui > > 3) finally, this is not a real problem immediately, but a recommendation: Pharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. This is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk but any backend that you need to run on idle mode). > > > > Fortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other purposes. We highly recommend that you execute Pharo using a worker thread (future versions of Spec-Gtk will require this usage, and is definitively better. > > How to execute in worker thread: > > pharo --worker MyImage.image --interactive > > > > I updated the README on pharo-spec/Spec-Gtk to precise this points. > > Cheers! > > Esteban > > On Jul 10 2023, at 7:17 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > > > Another step forward. > > > > > > I created a new ubuntu 22 install, installed pharo 11 and installed spec-gtk. The first issue was the libraries are named: libgobject-2.0.so.0 and libpango-1.0.so.0 with the “.0” suffix. I created links to those with the names spec-gtk is expecting. > > > > > > Then, the little test window opened but looked like this: > > > > > > > > > Is there something else I’m missing? > > > > > > Thanks for your advice. > > > > > > Cheers, > > > > > > Phil > > > > > > > > > > On 9 Jul 2023, at 6:02 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote: > > > > Hi, > > > > Spec-Gtk should work without problems on P11, except on macs, where there is a known problem. > > > > what is the process you are taking to install it? where are you trying it? > > > > > > > > I don't know the status of the VLC bindings. > > > > Esteban > > > > On Jul 9 2023, at 2:53 am, Jupiter Jones <jupiter.jones@mail.com> wrote: > > > > > The stark silence answers my question :) > > > > > > > > > > So… > > > > > > > > > > I found a nice binding to VLC [1] and was thinking of using Spec2 GTK+ to create a video widget/component. Does anyone with more in depth knowledge of Spec2 and GTK foresee any obvious blocks? > > > > > > > > > > First block :) I can’t find a way to play with the Spec2 GTK+ binding [2] without the image crashing on startup. I see someone has already logged the issue in GitHub for 10 and 11, and I tried 12 just for fun, and it also ate all the memory then crashed. > > > > > > > > > > Is there a Pharo version that will work with the Spec2 GTK+ binding installed? Maybe I’m looking at this too early :) > > > > > > > > > > [1] https://github.com/badetitou/Pharo-LibVLC > > > > > [2] https://github.com/pharo-spec/Spec-Gtk > > > > > > > > > > > On 3 Jul 2023, at 5:07 pm, Jupiter Jones <jupiter.jones@mail.com> wrote: > > > > > > Can anyone point to to some library, documentation or examples of how to play video in Pharo? > > > > > > Thanks in advance. > > > > > > Cheers, > > > > > > J