Cleanup & further OSX fixes

parent 78616e7b
......@@ -19,7 +19,6 @@
#include "kdenlivesettings.h"
#include "definitions.h"
#include "monitor/videosurface.h"
#include <mlt++/Mlt.h>
......@@ -63,7 +62,7 @@ static void rec_consumer_frame_preview(mlt_consumer, MltDeviceCapture * self, ml
}
MltDeviceCapture::MltDeviceCapture(QString profile, VideoSurface *surface, QWidget *parent) :
MltDeviceCapture::MltDeviceCapture(QString profile, /*VideoSurface *surface, */QWidget *parent) :
AbstractRender(Kdenlive::RecordMonitor, parent),
doCapture(0),
processingImage(false),
......@@ -72,10 +71,8 @@ MltDeviceCapture::MltDeviceCapture(QString profile, VideoSurface *surface, QWidg
m_mltProfile(NULL),
m_showFrameEvent(NULL),
m_droppedFrames(0),
m_livePreview(KdenliveSettings::enable_recording_preview()),
m_winid((int) surface->winId())
m_livePreview(KdenliveSettings::enable_recording_preview())
{
m_captureDisplayWidget = surface;
analyseAudio = KdenliveSettings::monitor_audio();
if (profile.isEmpty())
profile = KdenliveSettings::current_profile();
......@@ -115,19 +112,11 @@ bool MltDeviceCapture::buildConsumer(const QString &profileName)
}
}
qputenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1");
if (m_winid == 0) {
// OpenGL monitor
m_mltConsumer = new Mlt::Consumer(*m_mltProfile, "sdl_audio");
m_mltConsumer->set("preview_off", 1);
m_mltConsumer->set("preview_format", mlt_image_rgb24);
m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) consumer_gl_frame_show);
} else {
m_mltConsumer = new Mlt::Consumer(*m_mltProfile, "sdl_preview");
m_mltConsumer->set("window_id", m_winid);
m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) rec_consumer_frame_preview);
}
// OpenGL monitor
m_mltConsumer = new Mlt::Consumer(*m_mltProfile, "sdl_audio");
m_mltConsumer->set("preview_off", 1);
m_mltConsumer->set("preview_format", mlt_image_rgb24);
m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) consumer_gl_frame_show);
//m_mltConsumer->set("resize", 1);
//m_mltConsumer->set("terminate_on_pause", 1);
m_mltConsumer->set("window_background", KdenliveSettings::window_background().name().toUtf8().constData());
......@@ -377,9 +366,7 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa
}
return false;
}
m_winid = (int) m_captureDisplayWidget->winId();
// Create multi consumer setup
Mlt::Properties *renderProps = new Mlt::Properties;
renderProps->set("mlt_service", "avformat");
......@@ -417,19 +404,13 @@ bool MltDeviceCapture::slotStartCapture(const QString &params, const QString &pa
}
qputenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1");
if (m_winid == 0) {
// OpenGL monitor
previewProps->set("mlt_service", "sdl_audio");
previewProps->set("preview_off", 1);
previewProps->set("preview_format", mlt_image_rgb24);
previewProps->set("terminate_on_pause", 0);
m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) consumer_gl_frame_show);
} else {
previewProps->set("mlt_service", "sdl_preview");
previewProps->set("window_id", m_winid);
previewProps->set("terminate_on_pause", 0);
//m_showFrameEvent = m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) rec_consumer_frame_preview);
}
//m_mltConsumer->set("resize", 1);
previewProps->set("window_background", KdenliveSettings::window_background().name().toUtf8().constData());
QString audioDevice = KdenliveSettings::audiodevicename();
......
......@@ -56,7 +56,7 @@ Q_OBJECT public:
/** @brief Build a MLT Renderer
* @param winid The parent widget identifier (required for SDL display). Set to 0 for OpenGL rendering
* @param profile The MLT profile used for the capture (default one will be used if empty). */
explicit MltDeviceCapture(QString profile, VideoSurface *surface, QWidget *parent = 0);
explicit MltDeviceCapture(QString profile, /*VideoSurface *surface,*/ QWidget *parent = 0);
/** @brief Destroy the MLT Renderer. */
~MltDeviceCapture();
......@@ -109,12 +109,6 @@ private:
/** @brief Count captured frames, used to display only one in ten images while capturing. */
int m_frameCount;
/** @brief The surface onto which the captured frames should be painted. */
VideoSurface *m_captureDisplayWidget;
/** @brief A human-readable description of this renderer. */
int m_winid;
void uyvy2rgb(unsigned char *yuv_buffer, int width, int height);
QString m_capturePath;
......
......@@ -18,6 +18,10 @@ the Free Software Foundation, either version 3 of the License, or
#include <locale>
#include <QDebug>
#ifdef Q_OS_MAC
#include <xlocale.h>
#endif
Core *Core::m_self = NULL;
......
......@@ -45,6 +45,9 @@
#include <QStandardPaths>
#include "locale.h"
#ifdef Q_OS_MAC
#include <xlocale.h>
#endif
// Render profiles roles
......
......@@ -39,6 +39,10 @@
#include <mlt++/Mlt.h>
#include <locale>
#ifdef Q_OS_MAC
#include <xlocale.h>
#endif
#include <QStandardPaths>
......
......@@ -65,7 +65,9 @@
#include <QStandardPaths>
#include "locale.h"
#ifdef Q_OS_MAC
#include <xlocale.h>
#endif
const double DOCUMENTVERSION = 0.90;
......@@ -1090,7 +1092,6 @@ const QString KdenliveDoc::description() const
bool KdenliveDoc::addClip(QDomElement elem, const QString &clipId, bool createClipItem)
{
qDebug()<<"*** KDENLIVE DOC ADD CLIP CMD * * * *";
const QString producerId = clipId.section('_', 0, 0);
elem.setAttribute("id", producerId);
pCore->bin()->createClip(elem);
......
......@@ -31,6 +31,10 @@
#include <klocalizedstring.h>
#ifdef Q_OS_MAC
#include <xlocale.h>
#endif
// static
void initEffects::refreshLumas()
{
......
......@@ -21,7 +21,6 @@
#define ABSTRACTMONITOR_H
#include "definitions.h"
#include "monitor/videosurface.h"
#include <stdint.h>
......
......@@ -39,7 +39,11 @@
#include <QFontInfo>
#include <QFile>
#include <QTextCursor>
#include <locale.h>
#ifdef Q_OS_MAC
#include <xlocale.h>
#endif
#include <QGraphicsEffect>
#include <QGraphicsBlurEffect>
......
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