How to locate the xoverlay of gstreamer to an area in some browser.

Giles Atkinson Giles.Atkinson at eu.citrix.com
Fri Dec 9 03:54:34 PST 2011


You do not say what OS you are using, which makes a difference.  Assuming Unix/Linux, it makes a difference whether your browser plugin uses XEMBED or Xt.  Assuming the more modern XEMBED, your code appears to be handing an internal browser window to ximagesink, which is not a good idea.

Probably the video output window should be a full-sized subwindow of a GtkPlug (or other XEMBED client window) which is a subwindow of the window from NPP_SetWindow().  If you are already using Gtk, the Mozilla Diamond-X example is worth studying (if not, it is very misleading!)

Giles

-----Original Message-----
From: gstreamer-devel-bounces+giles.atkinson=eu.citrix.com at lists.freedesktop.org [mailto:gstreamer-devel-bounces+giles.atkinson=eu.citrix.com at lists.freedesktop.org] On Behalf Of forestzhu
Sent: 09 December 2011 07:37
To: gstreamer-devel at lists.freedesktop.org
Subject: How to locate the xoverlay of gstreamer to an area in some browser.

I am working on a plugin for browser.
And I do meet trouble.
When I try to use the "gst_x_overlay_set_xwindow_id"  to locate the image to
the browser area, the plugin crashed.
I ever succeeded in embeding the gstreamer stream to normal gtkwindows in
this way.
How can I work it out?
Here is some steps of mine:   
-----------------------------
1)NPError NPP_SetWindow(NPP instance, NPWindow* window)
{
    ...
    PLUGIN_PLAYER *player = ((PDATA *)(instance->pdata))->player;
    if (0 == player->xid)
    {
        player->xid = (unsigned long ) window->window;
     }
    ... 
}

2)
void start_player(PLUGIN_PLAYER  *player)
{
...
player->video_sink = gst_element_factory_make ("ximagesink", "video-sink");
...
//in this space the player->xid is about 92274689 ,and then the plugin
crashed
gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(GST_ELEMENT(player->video_sink)),player->xid); 
...
gst_element_set_state(player->pipeline,GST_STATE_PLAYING);
g_main_loop_run(loop);
}

****HTML*****
embed src="file:///Videos/test1.mov" type="hvideo/mov" width="960"
height="540" id="pluginId"

`




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-locate-the-xoverlay-of-gstreamer-to-an-area-in-some-browser-tp4175712p4175712.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list