@@ -43,9 +43,12 @@
|
||||
#include <QSettings>
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "core/shared_ptr.h"
|
||||
#include "core/signalchecker.h"
|
||||
#include "transcoder.h"
|
||||
|
||||
using std::make_shared;
|
||||
|
||||
int Transcoder::JobFinishedEvent::sEventType = -1;
|
||||
|
||||
TranscoderPreset::TranscoderPreset(const Song::FileType filetype, const QString &name, const QString &extension, const QString &codec_mimetype, const QString &muxer_mimetype)
|
||||
@@ -418,7 +421,7 @@ void Transcoder::JobState::ReportError(GstMessage *msg) const {
|
||||
|
||||
bool Transcoder::StartJob(const Job &job) {
|
||||
|
||||
std::shared_ptr<JobState> state = std::make_shared<JobState>(job, this);
|
||||
SharedPtr<JobState> state = make_shared<JobState>(job, this);
|
||||
|
||||
emit LogLine(tr("Starting %1").arg(QDir::toNativeSeparators(job.input)));
|
||||
|
||||
@@ -529,7 +532,7 @@ void Transcoder::Cancel() {
|
||||
// Stop the running ones
|
||||
JobStateList::iterator it = current_jobs_.begin();
|
||||
while (it != current_jobs_.end()) {
|
||||
std::shared_ptr<JobState> state(*it);
|
||||
SharedPtr<JobState> state(*it);
|
||||
|
||||
// Remove event handlers from the gstreamer pipeline, so they don't get called after the pipeline is shutting down
|
||||
gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(state->pipeline_)), nullptr, nullptr, nullptr);
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <memory>
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <gst/gst.h>
|
||||
@@ -37,6 +36,7 @@
|
||||
#include <QString>
|
||||
#include <QEvent>
|
||||
|
||||
#include "core/shared_ptr.h"
|
||||
#include "core/song.h"
|
||||
|
||||
struct TranscoderPreset {
|
||||
@@ -140,7 +140,7 @@ class Transcoder : public QObject {
|
||||
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage *msg, gpointer data);
|
||||
|
||||
private:
|
||||
using JobStateList = QList<std::shared_ptr<JobState>>;
|
||||
using JobStateList = QList<SharedPtr<JobState>>;
|
||||
|
||||
int max_threads_;
|
||||
QList<Job> queued_jobs_;
|
||||
|
||||
Reference in New Issue
Block a user