gst_x_overlay_expose ()??

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

gst_x_overlay_expose ()??

akaChella
Hi All,

I have created my own xwindow to play the video. I am facing refreshing problem when the video is paused and resumed.

I went through the API, of GstXOverlay and found that

To force a redrawing of the latest video frame the video sink element displayed on the Window. Indeed if the GstPipeline is in GST_STATE_PAUSED state, moving the Window around will damage its content. Application developers will want to handle the Expose events themselves and force the video sink element to refresh the Window's content.

Do i need to use gst_x_overlay_expose () command?? If so, how should i use it?
Reply | Threaded
Open this post in threaded view
|

Re: gst_x_overlay_expose ()??

Stefan Sauer
On 12/19/2011 07:48 AM, akaChella wrote:

> Hi All,
>
> I have created my own xwindow to play the video. I am facing refreshing
> problem when the video is paused and resumed.
>
> I went through the API, of GstXOverlay and found that
>
> To force a redrawing of the latest video frame the video sink element
> displayed on the Window. Indeed if the GstPipeline is in GST_STATE_PAUSED
> state, moving the Window around will damage its content. Application
> developers will want to handle the Expose events themselves and force the
> video sink element to refresh the Window's content.
>
> Do i need to use gst_x_overlay_expose () command?? If so, how should i use
> it?

Well let the element handle events or handle the events on your side.
What ever your application prefers.

Stefan

> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gst-x-overlay-expose-tp4213172p4213172.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: gst_x_overlay_expose ()??

akaChella
This post was updated on .
Hi,

Whenever we want to use the callback function for "expose-event" this is the syntax, say...

static gboolean expose_cb(GtkWidget* widget, GdkEventExpose* event, GstElement* videosink)
{
     gst_x_overlay_expose (GST_X_OVERLAY (videosink));

     return FALSE;
}

But i dont have a widget...!! I have drectly created an x window. So what should i pass in the place of widget?? When i passed the xwindow id, like this,

g_signal_connect(XWindow_id, "expose-event", G_CALLBACK(expose_event),videosink);

static gboolean expose_event(Window win, GdkEventExpose* event, GstElement* videosink)
{
     gst_x_overlay_expose (GST_X_OVERLAY (videosink));

     return FALSE;
}

it was throwing some error :( any idea??