[gst-devel] Maybe gst_x_overlay_set_render_rectangle has bug?

Hecate_Eos xflxmin17 at 163.com
Wed Jun 30 14:52:52 CEST 2010


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.
The following is the code :
static gboolean cb_process_events(GstBus *bus,
                                  GstMessage *message,
                                  player_t *player)
{
    switch(GST_MESSAGE_TYPE(message))
    {
        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,
                                           player->win->allocation.width,
                                           player->win->allocation.height -
VIDEO_AREA_TITLEBAR_HEIGHT);
              }
              break;
        default:
             break;
    }

    return TRUE;
}
/*
player_t
{
     GstElement *cntl;/* this is a pipeline*/
     GktWidget *win; /*this is for video output*/
}
*/
I don't know whether  you can understand me. My English needs improve.
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Maybe-gst-x-overlay-set-render-rectangle-has-bug-tp2272715p2272715.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list