Commit bc426099 authored by Rohit Yadav's avatar Rohit Yadav

Bugfix: 237, Detached Vout Display on Mac OS

parent 023a9818
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "PreviewWidget.h" #include "PreviewWidget.h"
#include "PreviewRuler.h" #include "PreviewRuler.h"
#include "RenderWidget.h"
#include "ui_PreviewWidget.h" #include "ui_PreviewWidget.h"
#include "ClipRenderer.h" #include "ClipRenderer.h"
#include "Clip.h" #include "Clip.h"
...@@ -78,6 +79,11 @@ PreviewWidget::setRenderer( GenericRenderer *renderer ) ...@@ -78,6 +79,11 @@ PreviewWidget::setRenderer( GenericRenderer *renderer )
m_renderer->setRenderWidget( m_ui->renderWidget ); 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( stopped() ), this, SLOT( videoStopped() ) );
connect( m_renderer, SIGNAL( paused() ), this, SLOT( videoPaused() ) ); connect( m_renderer, SIGNAL( paused() ), this, SLOT( videoPaused() ) );
connect( m_renderer, SIGNAL( playing() ), this, SLOT( videoPlaying() ) ); connect( m_renderer, SIGNAL( playing() ), this, SLOT( videoPlaying() ) );
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QWidget" name="renderWidget" native="true"> <widget class="RenderWidget" name="renderWidget" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -448,6 +448,12 @@ ...@@ -448,6 +448,12 @@
<extends>QLCDNumber</extends> <extends>QLCDNumber</extends>
<header>LCDTimecode.h</header> <header>LCDTimecode.h</header>
</customwidget> </customwidget>
<customwidget>
<class>RenderWidget</class>
<extends>QWidget</extends>
<header>RenderWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../../resources.qrc"/> <include location="../../../../resources.qrc"/>
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include "GenericRenderer.h" #include "GenericRenderer.h"
#include "VLCMediaPlayer.h" #include "VLCMediaPlayer.h"
#include "RenderWidget.h"
#include <QtGlobal>
GenericRenderer::GenericRenderer() : GenericRenderer::GenericRenderer() :
m_paused( false ) m_paused( false )
...@@ -38,7 +40,7 @@ GenericRenderer::~GenericRenderer() ...@@ -38,7 +40,7 @@ GenericRenderer::~GenericRenderer()
void void
GenericRenderer::setRenderWidget(QWidget *renderWidget) GenericRenderer::setRenderWidget(QWidget *renderWidget)
{ {
m_mediaPlayer->setDrawable( renderWidget->winId() ); m_mediaPlayer->setDrawable( (void *) static_cast< RenderWidget* >(renderWidget)->id() );
m_renderWidget = renderWidget; m_renderWidget = renderWidget;
} }
#endif #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