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

forestzhu forest0823 at 126.com
Thu Dec 8 23:37:07 PST 2011


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.


More information about the gstreamer-devel mailing list