Refreshing video after a zoom/unzoom like process using GTK

Jack D jackstuff3 at gmail.com
Wed Mar 16 19:58:21 UTC 2016


Problem solved. It was much simpler than I imagined. Thank you very much,
Sebastian and Russel.

old code: (I have two videos but only including details for one to save
post length)

  vid_win1 = gtk_drawing_area_new ();
  gtk_widget_set_double_buffered (vid_win1, FALSE);
  g_signal_connect (vid_win1, "realize", G_CALLBACK (realize_cb),
data->pipe1);

new code:
// note: pipe1 is a playbin, vidwin1 is a GtkWidget
GstElement data.sink1 = gst_element_factory_make ("gtksink", "sink1");
g_object_get (data->sink1, "widget", &vid_win1, NULL);
g_object_set (data->pipe1, "video_sink", data->sink1, NULL);
gtk_widget_set_double_buffered (vid_win1, FALSE);

// No longer need call back to set up window overlay.
//  g_signal_connect (vid_win1, "realize", G_CALLBACK (realize_cb),
data->pipe1);


On Wed, Mar 16, 2016 at 9:26 AM, Sebastian Dröge <sebastian at centricular.com>
wrote:

> On Mi, 2016-03-16 at 09:16 -0700, Jack D wrote:
> > I don't require GtkDrawingArea but I was able to successfully output
> multiple videos using GtkDrawingArea.
> > I was trying to continue with something I know will work for me.  I
> guess I need to determine a different GtkBin
> > to use to output my videos. Do you have any suggestions?  More of a Gtk
> question, but is it possible to pack a
> > GTK_WINDOW_TOPLEVEL window into a horizontal box that will be packed
> into another GTK_WINDOW_TOPLEVEL
> > window? I will attempt this and see what happens.
>
> You could use the GtkWidget that gtksink/gtkglsink gives you *instead*
> of a GtkDrawingArea :) Just use it wherever you used the GtkDrawingArea
> before.
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160316/7d01000d/attachment.html>


More information about the gstreamer-devel mailing list