Example #1
0
gboolean gstGWorldSyncMessageCallback(GstBus* bus, GstMessage* message, gpointer data)
{
    ASSERT(GST_MESSAGE_TYPE(message) == GST_MESSAGE_ELEMENT);

    GStreamerGWorld* gstGWorld = static_cast<GStreamerGWorld*>(data);

    if (gst_structure_has_name(message->structure, "prepare-xwindow-id"))
        gstGWorld->setWindowOverlay(message);
    return TRUE;
}
Example #2
0
void GStreamerFullScreenVideoHandler::enterFullScreen()
{
    if (m_videoElement->platformMedia().type != WebCore::PlatformMedia::GStreamerGWorldType)
        return;

    GStreamerGWorld* gstreamerGWorld = m_videoElement->platformMedia().media.gstreamerGWorld;

    if (!gstreamerGWorld->enterFullscreen())
        return;

    m_fullScreenWidget = reinterpret_cast<FullScreenVideoWindow*>(gstreamerGWorld->platformVideoWindow()->window());
    m_fullScreenWidget->setVideoElement(m_videoElement);
    connect(m_fullScreenWidget, SIGNAL(closed()), this, SLOT(windowClosed()));
    m_fullScreenWidget->showFullScreen();
}
gboolean gstGWorldSyncMessageCallback(GstBus*, GstMessage* message, gpointer data)
{
    ASSERT(GST_MESSAGE_TYPE(message) == GST_MESSAGE_ELEMENT);

    GStreamerGWorld* gstGWorld = static_cast<GStreamerGWorld*>(data);
#ifndef GST_API_VERSION_1
    const GstStructure* structure = gst_message_get_structure(message);

    if (gst_structure_has_name(structure, "prepare-xwindow-id")
        || gst_structure_has_name(structure, "have-ns-view"))
        gstGWorld->setWindowOverlay(message);
#else
    if (gst_is_video_overlay_prepare_window_handle_message(message))
        gstGWorld->setWindowOverlay(message);
#endif
    return TRUE;
}