Re: Gstreamer inside Gtkmm window



Il 07/05/2010 20:45, José Alburquerque ha scritto:
On Fri, 2010-05-07 at 17:25 +0200, Mattia Donna Bianco wrote:
Hi,
I'm trying to insert a gstreamer output inside a Gtk window. I managed
to do that but I would to reserve to the gstreamer output just a
portion of the entire window; in fact I associated the output with a
Gtk::DrawingArea, but when the video plays the video frame acquires
all the toplevel window area. How can I prevent that? I set the size
of the Gtk::DrawingArea with the  function
If the drawing area is not realized before setting the overlay ID, the
ID of the toplevel window could be used.  I think I experienced a
similar problem when creating the media player example that I referred
you to in your first post (yesterday).

The way the example handles this is that it connects to the drawing
area's "realize" signal[1] and then stores the drawing area's ID when it
is realized[2].  After, when it is time, it uses the stored ID to set
the overlay's ID[3].

[1]
http://git.gnome.org/browse/gstreamermm/tree/examples/media_player_gtkmm/player_window.cc#n82
[2]
http://git.gnome.org/browse/gstreamermm/tree/examples/media_player_gtkmm/player_window.cc#n115
[3]
http://git.gnome.org/browse/gstreamermm/tree/examples/media_player_gtkmm/player_window.cc#n126


I think you would have to do something similar with your code (ie.
connect to the drawing area's realize signal, store the ID of the area
when you receive the signal and then (when it is time to set the
overlay's ID), set the stored ID.

I've done all the things told me above, but the Gstreamer overlay continue to use all the window, not just the portion of the frame associated. I noticed that the function get_window() return the main window ID, so I think that is natural that Gstreamer occupies all the window. Is there some way to set a "subwindow" to a Gtk::Frame? Moreover, I found this page http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html#gst-x-overlay-set-render-rectangle but in the last distribution of winbuild this function is not available yet. There is a way around to obtain the same result. I know that is not the right mailing list to ask this but maybe someone can reply.
Thanks
Mattia


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]