Commit e3a34f1a authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Use forward declaration for LibVLCpp::MediaPlayer

parent 003aed23
......@@ -88,6 +88,7 @@ SET(VLMC_SRCS
Metadata/MetaDataWorker.cpp
Project/ProjectManager.cpp
Renderer/ClipRenderer.cpp
Renderer/GenericRenderer.cpp
Renderer/WorkflowFileRenderer.cpp
Renderer/WorkflowRenderer.cpp
Tools/Pool.hpp
......
......@@ -22,6 +22,7 @@
#include "MetaDataManager.h"
#include "MetaDataWorker.h"
#include "VLCMediaPlayer.h"
#include <QtDebug>
#include <QQueue>
......
......@@ -23,13 +23,16 @@
#ifndef METADATAMANAGER_H
#define METADATAMANAGER_H
#include "VLCMediaPlayer.h"
#include "Singleton.hpp"
#include <QObject>
#include <QQueue>
class QMutex;
class Media;
namespace LibVLCpp
{
class MediaPlayer;
}
class MetaDataManager : public QObject, public Singleton<MetaDataManager>
{
......
......@@ -28,6 +28,7 @@
#include "MetaDataWorker.h"
#include "Library.h"
#include "SettingsManager.h"
#include "VLCMediaPlayer.h"
#include <QThreadPool>
#include <QRunnable>
......
......@@ -28,7 +28,10 @@
#include <QTemporaryFile>
#include <QLabel>
#include "Media.h"
#include "VLCMediaPlayer.h"
namespace LibVLCpp
{
class MediaPlayer;
}
class MetaDataWorker : public QObject
{
......
......@@ -28,6 +28,7 @@
#include "ClipRenderer.h"
#include "Media.h"
#include "MainWorkflow.h"
#include "VLCMediaPlayer.h"
ClipRenderer::ClipRenderer() :
GenericRenderer(),
......
......@@ -27,13 +27,13 @@ class Clip;
class Media;
class QUuid;
#include "GenericRenderer.h"
namespace LibVLCpp
{
class Media;
}
#include "GenericRenderer.h"
#include <QObject>
class ClipRenderer : public GenericRenderer
......
/*****************************************************************************
* GenericRenderer.cpp: Describe a common behavior for every renderers
*****************************************************************************
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Hugo Beauzee-Luyssen <hugo@vlmc.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "GenericRenderer.h"
#include "VLCMediaPlayer.h"
GenericRenderer::GenericRenderer() :
m_paused( false ),
m_isRendering( false )
{
m_mediaPlayer = new LibVLCpp::MediaPlayer();
}
GenericRenderer::~GenericRenderer()
{
delete m_mediaPlayer;
}
void
GenericRenderer::setRenderWidget(QWidget *renderWidget)
{
m_mediaPlayer->setDrawable( renderWidget->winId() );
m_renderWidget = renderWidget;
}
......@@ -27,12 +27,15 @@
#include <QWidget>
class QLabel;
#include "VLCMediaPlayer.h"
#include "MainWorkflow.h"
class Clip;
class Media;
class QUuid;
namespace LibVLCpp
{
class MediaPlayer;
}
/**
* \class Common base for every renderer.
......@@ -43,27 +46,15 @@ class GenericRenderer : public QObject
Q_DISABLE_COPY( GenericRenderer );
public:
explicit GenericRenderer() :
m_paused( false ),
m_isRendering( false )
{
m_mediaPlayer = new LibVLCpp::MediaPlayer();
}
virtual ~GenericRenderer()
{
delete m_mediaPlayer;
}
explicit GenericRenderer();
virtual ~GenericRenderer();
/**
* \brief Set the widget used for rendering the output.
* \param renderWidget The widget to use for render.
* \sa setPreviewLabel( QLabel* )
*/
void setRenderWidget( QWidget* renderWidget )
{
m_mediaPlayer->setDrawable( renderWidget->winId() );
m_renderWidget = renderWidget;
}
void setRenderWidget( QWidget* renderWidget );
/**
* \brief Play or pause the media.
*
......
......@@ -35,6 +35,7 @@
#include "AudioClipWorkflow.h"
#include "VLCMedia.h"
#include "Clip.h"
#include "VLCMediaPlayer.h"
quint8* WorkflowRenderer::silencedAudioBuffer = NULL;
......
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