bool XinePlayerBackend::initialize(VideoWidget *videoWidget) { XineVideoLayerWidget *videoLayer = new XineVideoLayerWidget(0); videoWidget->setVideoLayer(videoLayer); if(!initializeXine(videoLayer->winId())) { finalizeXine(); qCritical() << "xine initialization failed!"; return false; } videoLayer->setVideoDriver(m_videoDriver); connect(videoLayer, SIGNAL(geometryChanged()), this, SLOT(onVideoLayerGeometryChanged())); return true; }
VideoWidget * XinePlayerBackend::initialize(QWidget *videoWidgetParent) { XineVideoLayerWidget *videoLayer = new XineVideoLayerWidget(0); VideoWidget *videoWidget = new VideoWidget(videoLayer, videoWidgetParent); if(!initializeXine(videoWidget->videoLayer()->winId())) { delete videoWidget; finalizeXine(); kError() << "xine initialization failed!"; return 0; } videoLayer->setVideoDriver(m_videoDriver); connect(videoLayer, SIGNAL(geometryChanged()), this, SLOT(onVideoLayerGeometryChanged())); return videoWidget; }