Commit bc426099 authored by Rohit Yadav's avatar Rohit Yadav

Bugfix: 237, Detached Vout Display on Mac OS

parent 023a9818
......@@ -23,6 +23,7 @@
#include "PreviewWidget.h"
#include "PreviewRuler.h"
#include "RenderWidget.h"
#include "ui_PreviewWidget.h"
#include "ClipRenderer.h"
#include "Clip.h"
......@@ -78,6 +79,11 @@ PreviewWidget::setRenderer( GenericRenderer *renderer )
m_renderer->setRenderWidget( m_ui->renderWidget );
#if defined ( Q_WS_MAC )
/* Releases the NSView in the RenderWidget*/
m_ui->renderWidget->release();
#endif
connect( m_renderer, SIGNAL( stopped() ), this, SLOT( videoStopped() ) );
connect( m_renderer, SIGNAL( paused() ), this, SLOT( videoPaused() ) );
connect( m_renderer, SIGNAL( playing() ), this, SLOT( videoPlaying() ) );
......
......@@ -33,7 +33,7 @@
<number>0</number>
</property>
<item>
<widget class="QWidget" name="renderWidget" native="true">
<widget class="RenderWidget" name="renderWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
......@@ -448,6 +448,12 @@
<extends>QLCDNumber</extends>
<header>LCDTimecode.h</header>
</customwidget>
<customwidget>
<class>RenderWidget</class>
<extends>QWidget</extends>
<header>RenderWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../../../../resources.qrc"/>
......
......@@ -22,6 +22,8 @@
#include "GenericRenderer.h"
#include "VLCMediaPlayer.h"
#include "RenderWidget.h"
#include <QtGlobal>
GenericRenderer::GenericRenderer() :
m_paused( false )
......@@ -38,7 +40,7 @@ GenericRenderer::~GenericRenderer()
void
GenericRenderer::setRenderWidget(QWidget *renderWidget)
{
m_mediaPlayer->setDrawable( renderWidget->winId() );
m_mediaPlayer->setDrawable( (void *) static_cast< RenderWidget* >(renderWidget)->id() );
m_renderWidget = renderWidget;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment