So SDL 2 has function:
SDL_Window * SDL_CreateWindowFrom(const void *data);
which ends up calling:
X11_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
but this code path just never worked for the purpose of attaching
video display to a Gtk widget X11 window. Everything initialized and
run well on MLT and SDL2 on the consumer I created, but no video got
displayed ever.
On Sat, Jun 24, 2023 at 3:49 PM Janne Liljeblad
<janne.liljeb...@gmail.com> wrote:
>
> Flowblade uses MLT SDL 1.2 functions. Below is how Flowblade displays video.
>
> # Create consumer and set params
> self.consumer = mlt.Consumer(self.profile, "sdl")
>
> I've several times tried to create a SDL 2 video consumer for MLT that
> displays video on top of Gtk.VBox widget Flowblade uses toi display
> video, no dice.
>
> On Sat, Jun 24, 2023 at 3:42 PM Patrick Matthäi <patr...@linux-dev.org> wrote:
> >
> > Hey
> > But it is flowblade itself using SDL 1.2 or using the mlt SDL 1.2 functions?
> >
> > Am 24.06.2023 14:15 schrieb Janne Liljeblad <janne.liljeb...@gmail.com>:
> >
> > Flowblade needs SDL 1.2 for video display and there is no clear path
> > forward for replacement known to me.
> >
> > The problem is the piece of code in SDL 1.2 below. That functionality
> > has not worked SDL 2.0 when I have tried to get it to display video.
> > SDL 2 only allows creating new windows for video display, not display
> > video on top of some X11 window that is connected to the widget
> > Flowblade uses to show video.
> >
> > ---
> > static int X11_CreateWindow(_THIS, SDL_Surface *screen,
> > int w, int h, int bpp, Uint32 flags)
> > {
> > int i, depth;
> > Visual *vis;
> > int vis_change;
> > Uint32 Amask;
> >
> > /* If a window is already present, destroy it and start fresh */
> > if ( SDL_Window ) {
> > X11_DestroyWindow(this, screen);
> > switch_waiting = 0; /* Prevent jump back to now-meaningless state. */
> > }
> >
> > /* See if we have been given a window id */
> > if ( SDL_windowid ) {
> > SDL_Window = SDL_strtol(SDL_windowid, NULL, 0);
> > } else {
> > SDL_Window = 0;
> > }
> > ...
> > ---
> >
> > this is from SDL-1.2/src/video/x11/SDL_x11video.c
> >
> > I don't think this is ever going to work in SDL2 because Wayland does
> > not have window ids for widgets. For Flowblade it is best to keep SDL
> > 1.2 to display video for X11 and find another solution for Wayland.
> >
> > Janne
> >
> >
> > _______________________________________________
> > Mlt-devel mailing list
> > Mlt-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mlt-devel
> >
> >
_______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel