[gst-devel] Maybe gst_x_overlay_set_render_rectangle has bug?

Stefan Kost ensonic at hora-obscura.de
Mon Jul 5 10:21:52 CEST 2010


hi,

On 30.06.2010 04:06, ÁõÐËÃñ wrote:
> I use gst_x_overlay_set_render_rectangle to resize my video rectangle,
> because I want to draw a title bar for my video in the
> GtkDrawingArea's top section.
> I dynamicly create the pipeline and drawing area.The first time, I can
> get the right result, xoverlay can be resized. But, when I create
> another, it can't work.I can't change the render rectangle.It returns
> false.

Are you sure that your 2nd video display is using xvimagesink as well
(check with xvinfo that you have multimple xvideo ports).
gst_x_overlay_set_render_rectangle() will return FALSE if the videosink
does not support arbitrary rectangles. Anyway if you have a static
title, I'd suggest to use the UI toolkit (e.g. GTK) to make a vbox and
pack the title + the drawable into it. that works with all videosinks.

Stefan

> The following is the code :
> static gboolean cb_process_events(GstBus *bus,
> GstMessage *message,
> player_t *player)
> {
> switch(GST_MESSAGE_TYPE(message))
> &nbs p; {
> case GST_MESSAGE_EOS:
> case GST_MESSAGE_ERROR:
> // delete_player(player);
> break;
> case GST_MESSAGE_ELEMENT:
> if(gst_structure_has_name(message->structure, "prepare-xwindow-id") &&
> player->cntl != NULL)
> {
> GstXOverlay *xoverlay = NULL;
> xoverlay = GST_X_OVERLAY (GST_MESSAGE_SRC (message));
> ; gulong xid = GDK_WINDOW_XID (player->win->window);
> gst_x_overlay_set_xwindow_id(xoverlay, xid);
> gst_x_overlay_set_render_rectangle(xoverlay,
> 0,
> VIDEO_AREA_TITLEBAR_HEIGHT,
> &nbs p; player->win->allocation.width,
> player->win->allocation.height - VIDEO_AREA_TITLEBAR_HEIGHT);
> }
> break;
> default:
> break;
> }
>
> return TRUE;
> }
> /*
> player_t
> {
> GstElement *cntl;/* this is a pip eline*/
> GktWidget *win; /*this is for video output*/
> }
> */
> I don't know whether you can understand me. My English needs improve.
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>   





More information about the gstreamer-devel mailing list