Waylandsink 1.16.2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Waylandsink 1.16.2

horai
Dear all,

I have embedded multiple waylandsink overlays into GTK grid this way (the
eventbox should be responsible for catching mouse clicks as events):
for (int i = 0; i < numberOfRows; i++) {
        for (int j = 0; j < numberOfCols; j++) {
            if (counter <= numberOfStreams) {


                eventBox = gtk_event_box_new();
                gtk_widget_set_app_paintable(eventBox, TRUE);
                gtk_widget_set_double_buffered(eventBox, FALSE);
                gtk_widget_set_can_focus(eventBox, FALSE);
                gtk_widget_set_hexpand(eventBox, TRUE);
                gtk_widget_set_vexpand(eventBox, TRUE);
                streamDataArray->streamDataArray[counter].video_widget =
eventBox;
                g_print("widget: %d: %d\r\n", counter, eventBox);
               
g_signal_connect(streamDataArray->streamDataArray[counter].video_widget,
"draw", G_CALLBACK(video_widget_draw_cb), streamDataArray);
               
g_signal_connect(streamDataArray->streamDataArray[counter].video_widget,
"button_press_event", G_CALLBACK(hideWindow), streamDataArray);
                streamBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
                gtk_widget_set_can_focus(streamBox, FALSE);
                gtk_widget_set_hexpand(streamBox, TRUE);
                gtk_widget_set_vexpand(streamBox, TRUE);
                gtk_box_pack_start(GTK_BOX(streamBox),
GTK_WIDGET(streamDataArray->streamDataArray[counter].video_widget), TRUE,
TRUE, 0);
                gtk_grid_attach(grid, GTK_WIDGET(streamBox), i, j, 1, 1);
                counter++;

Upon click on the overlay I want to maximize single stream and hide all the
others via method hideWindow. This code works for 1.14.5 version of
Gstreamer, but does not work for 1.16.2.
We wanted to have fully native Wayland application.
Do you thing this could be a bug? Should I post code which enlights how the
waylandsink is tight to GTK?





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Waylandsink 1.16.2

Nicolas Dufresne-5


Le sam. 27 juin 2020 08 h 45, horai <[hidden email]> a écrit :
Dear all,

I have embedded multiple waylandsink overlays into GTK grid this way (the
eventbox should be responsible for catching mouse clicks as events):
for (int i = 0; i < numberOfRows; i++) {
        for (int j = 0; j < numberOfCols; j++) {
            if (counter <= numberOfStreams) {


                eventBox = gtk_event_box_new();
                gtk_widget_set_app_paintable(eventBox, TRUE);
                gtk_widget_set_double_buffered(eventBox, FALSE);
                gtk_widget_set_can_focus(eventBox, FALSE);
                gtk_widget_set_hexpand(eventBox, TRUE);
                gtk_widget_set_vexpand(eventBox, TRUE);
                streamDataArray->streamDataArray[counter].video_widget =
eventBox;
                g_print("widget: %d: %d\r\n", counter, eventBox);

g_signal_connect(streamDataArray->streamDataArray[counter].video_widget,
"draw", G_CALLBACK(video_widget_draw_cb), streamDataArray);

g_signal_connect(streamDataArray->streamDataArray[counter].video_widget,
"button_press_event", G_CALLBACK(hideWindow), streamDataArray);
                streamBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
                gtk_widget_set_can_focus(streamBox, FALSE);
                gtk_widget_set_hexpand(streamBox, TRUE);
                gtk_widget_set_vexpand(streamBox, TRUE);
                gtk_box_pack_start(GTK_BOX(streamBox),
GTK_WIDGET(streamDataArray->streamDataArray[counter].video_widget), TRUE,
TRUE, 0);
                gtk_grid_attach(grid, GTK_WIDGET(streamBox), i, j, 1, 1);
                counter++;

Upon click on the overlay I want to maximize single stream and hide all the
others via method hideWindow. This code works for 1.14.5 version of
Gstreamer, but does not work for 1.16.2.
We wanted to have fully native Wayland application.
Do you thing this could be a bug? Should I post code which enlights how the
waylandsink is tight to GTK?

Posting code is handy, but before that, could you explain how it fails ?






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Waylandsink 1.16.2

horai
Actually, it does not do anything.
I placed brakepoint on the first line of hideWindow method and it does not
step in to the method, seems like the mouse click event is not propagated
through eventBox.
The stream is running within the window, but left mouse button does not do
anything.
No I realized I experienced the same problem long ago, described here, seems
like it was necessary to resolve something more important, but anyway, it is
mentioned here:
http://gstreamer-devel.966125.n4.nabble.com/Explaining-Gstreamer-plugin-example-td4692177.html#a4692432



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Waylandsink 1.16.2

horai
Anyway, I also tried to embed stream overlay within a simple application
which is supposed to show stream in first line of a gtkGrid and is followed
by rows each containing gtkLabel and gtkDatabox aligned horizontally.
But when running:
gtk_widget_show_all()

The application crashes yielding:
setting window handle and size (1024 x 110)
                                           Gdk-Message: 19:43:29.156: Error
71 (Protocol error) dispatching to Wayland display.

When I replace both rows containing label and graph with single gtkButton.
I behaves properly.
I am enclosing all all source files.
graph.h <http://gstreamer-devel.966125.n4.nabble.com/file/t377705/graph.h>  
styles.css
<http://gstreamer-devel.966125.n4.nabble.com/file/t377705/styles.css>  
gstreamerHandler.c
<http://gstreamer-devel.966125.n4.nabble.com/file/t377705/gstreamerHandler.c>  
main.c <http://gstreamer-devel.966125.n4.nabble.com/file/t377705/main.c>  




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Waylandsink 1.16.2

horai
In reply to this post by horai
Just to note, without the stream, the application works correctly showing
labels and graphs in two rows.
Adding streams results in a crash, maybe I did something wrong, but when
graphs replaced by gtkButton, it works correctly, but why gtkDatabox (graph)
makes such a difference to gtkButton.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel