Commit fd817a35 authored by Akhil K Gangadharan's avatar Akhil K Gangadharan

Remove capture related functions, move to core.cpp

parent 62a4c095
Pipeline #1439 passed with stage
in 15 minutes and 22 seconds
......@@ -142,12 +142,10 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
, m_editMarker(nullptr)
, m_forceSizeFactor(0)
, m_lastMonitorSceneType(MonitorSceneDefault)
, m_capture(new MediaCapture(this))
{
auto *layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
// Create container widget
m_glWidget = new QWidget;
auto *glayout = new QGridLayout(m_glWidget);
......@@ -1968,49 +1966,6 @@ void Monitor::slotSwitchRec(bool enable)
}
}
bool Monitor::startCapture(bool checkAudio, bool checkVideo, QUrl path, QString audioDevice)
{
<<<<<<< HEAD
m_capture = new MediaCapture(this);
=======
>>>>>>> Use std::unique_ptr for m_capture
m_capture->setOutputLocations(path, checkAudio, checkVideo);
m_capture->setAudioDevice(audioDevice);
if (checkAudio && checkVideo) {
m_capture->recordVideo();
} else if (checkAudio) {
m_capture->recordAudioOnly();
} else if (checkVideo) {
m_capture->recordVideoOnly();
}
return true;
}
bool Monitor::stopCapture(bool checkAudio, bool checkVideo)
{
if (m_capture) {
if (checkAudio && checkVideo) {
m_capture->pauseVideo();
} else if (checkAudio && !checkVideo) {
m_capture->pauseAudioOnly();
} else if (checkVideo && !checkAudio) {
m_capture->pauseVideoOnly();
}
slotOpenClip(nullptr);
}
// TODO remove else
return true;
}
QStringList Monitor::getAudioCaptureDevices()
{
return m_capture->getAudioDevices();
}
void Monitor::doKeyPressEvent(QKeyEvent *ev)
{
keyPressEvent(ev);
......@@ -2160,8 +2115,3 @@ void Monitor::setConsumerProperty(const QString &name, const QString &value)
{
m_glMonitor->setConsumerProperty(name, value);
}
void Monitor::setAudioCaptureVolume(int volume)
{
m_capture->setAudioVolume(volume);
}
\ No newline at end of file
......@@ -26,7 +26,6 @@
#include "gentime.h"
#include "scopes/sharedframe.h"
#include "timecodedisplay.h"
#include "capture/mediacapture.h"
#include <QDomElement>
#include <QElapsedTimer>
......@@ -135,8 +134,6 @@ public:
void switchDropFrames(bool drop);
void updateMonitorGamma();
void mute(bool, bool updateIconOnly = false) override;
bool startCapture(bool, bool, QUrl, QString);
bool stopCapture(bool, bool);
void reparent();
/** @brief Returns the action displaying record toolbar */
QAction *recAction();
......@@ -161,9 +158,6 @@ public:
void slotZoomOut();
/** @brief Set a property on the MLT consumer */
void setConsumerProperty(const QString &name, const QString &value);
std::unique_ptr<MediaCapture> m_capture;
QStringList getAudioCaptureDevices();
void setAudioCaptureVolume(int);
protected:
void mousePressEvent(QMouseEvent *event) override;
......@@ -202,7 +196,6 @@ private:
std::shared_ptr<Mlt::Producer> m_splitProducer;
int m_length;
bool m_dragStarted;
// TODO: Move capture stuff in own class
RecManager *m_recManager;
/** @brief The widget showing current time position **/
TimecodeDisplay *m_timePos;
......
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