[webkit-gtk] how to retrive the valid window id for video render?

Winfred Zhou winfred.zhou at irdeto.com
Tue Nov 29 23:51:42 PST 2011


Hi,
For implement a private mediaplayer  instance, I need to retrieve the valid window id
for rendering the video stream.

In the file MediaPlayerPrivateAVP.cpp(the private mediaplayer implementation source file),
I try to use following code to retrieve the valid window id, but the video render can’t work fine:

   FrameView* frameview = m_player->frameView() ? m_player->frameView() : 0; (valid pointer)
    Frame* frame = frameview ? frameview->frame() : 0; (valid pointer)
    HostWindow* hostwindow = frameview ? frameview->hostWindow() : 0; (valid pointer)
    PlatformPageClient client = hostwindow? hostwindow->platformPageClient() : 0;(valid pointer)
#ifdef GDK_WINDOWING_X11
    m_videoWindowId = GDK_WINDOW_XID(gtk_widget_get_window(client)); (valid integer value)
#endif

Who could tell me how to retrieve the valid window(video display area) id for video rendering?

Thanks so much.

My test html is following:


<!doctype html>
<html lang="en">
        <head>
                    <meta charset="utf-8" />
                        <title>HTML5 Document</title>
                </head>
                <body>
                <p>
                <h1>html test</h1>
                        <video width="352" height="288" controls="controls" src="demo.ogv"></video>
                </p>

                </body>
        </html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20111130/c6b197b8/attachment.html>


More information about the webkit-gtk mailing list