Advertisement
MohammadAG

Untitled

Mar 20th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.77 KB | None | 0 0
  1. static void mafw_gst_renderer_worker_apply_xid(MafwGstRendererWorker *worker)
  2. {
  3.     /* Set sink to render on the provided XID if we have do have
  4.        a XID a valid video sink and we are rendeing video content */
  5.     if (worker->xid &&
  6.         worker->vsink &&
  7.         worker->media.has_visual_content)
  8.     {
  9.         g_debug ("Setting overlay, window id: %x",
  10.              (gint) worker->xid);
  11.         gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(worker->vsink),
  12.                          worker->xid);
  13.         /* Ask the gst to redraw the frame if we are paused */
  14.         /* TODO: in MTG this works only in non-fs -> fs way. */
  15.         if (worker->state == GST_STATE_PAUSED)
  16.         {
  17.             gst_x_overlay_expose(GST_X_OVERLAY(worker->vsink));
  18.         }
  19.     } else {
  20.         g_debug("Not setting overlay for window id: %x",
  21.             (gint) worker->xid);
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement