don't use shared ptrs for project items
This commit is contained in:
@@ -203,7 +203,7 @@ QVector<DecoderPtr> ReceiveListOfAllDecoders()
|
||||
return decoders;
|
||||
}
|
||||
|
||||
FootagePtr Decoder::Probe(Project* project, const QString &filename, const QAtomicInt* cancelled)
|
||||
Footage* Decoder::Probe(Project* project, const QString &filename, const QAtomicInt* cancelled)
|
||||
{
|
||||
// Check for a valid filename
|
||||
if (filename.isEmpty()) {
|
||||
@@ -229,7 +229,7 @@ FootagePtr Decoder::Probe(Project* project, const QString &filename, const QAtom
|
||||
|
||||
DecoderPtr decoder = decoder_list.at(i);
|
||||
|
||||
FootagePtr footage = decoder->Probe(filename, cancelled);
|
||||
Footage* footage = decoder->Probe(filename, cancelled);
|
||||
|
||||
if (footage) {
|
||||
QFileInfo file_info(filename);
|
||||
|
||||
+2
-2
@@ -129,7 +129,7 @@ public:
|
||||
*
|
||||
* TRUE if a Decoder was successfully able to parse and probe this file. FALSE if not.
|
||||
*/
|
||||
static FootagePtr Probe(Project *project, const QString& filename, const QAtomicInt *cancelled);
|
||||
static Footage *Probe(Project *project, const QString& filename, const QAtomicInt *cancelled);
|
||||
|
||||
/**
|
||||
* @brief Generate a Footage object from a file
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
*
|
||||
* This function is re-entrant.
|
||||
*/
|
||||
virtual FootagePtr Probe(const QString& filename, const QAtomicInt* cancelled) const = 0;
|
||||
virtual Footage *Probe(const QString& filename, const QAtomicInt* cancelled) const = 0;
|
||||
|
||||
/**
|
||||
* @brief Closes media/deallocates memory
|
||||
|
||||
@@ -218,13 +218,13 @@ QString FFmpegDecoder::id()
|
||||
return QStringLiteral("ffmpeg");
|
||||
}
|
||||
|
||||
FootagePtr FFmpegDecoder::Probe(const QString& filename, const QAtomicInt* cancelled) const
|
||||
Footage *FFmpegDecoder::Probe(const QString& filename, const QAtomicInt* cancelled) const
|
||||
{
|
||||
// Variable for receiving errors from FFmpeg
|
||||
int error_code;
|
||||
|
||||
// Result to return
|
||||
FootagePtr footage = nullptr;
|
||||
Footage* footage = nullptr;
|
||||
|
||||
// Convert QString to a C string
|
||||
QByteArray ba = filename.toUtf8();
|
||||
@@ -444,7 +444,7 @@ FootagePtr FFmpegDecoder::Probe(const QString& filename, const QAtomicInt* cance
|
||||
|
||||
if (found_valid_streams) {
|
||||
// We actually have footage we can return instead of nullptr
|
||||
footage = std::make_shared<Footage>();
|
||||
footage = new Footage();
|
||||
|
||||
// Copy streams over
|
||||
foreach (StreamPtr stream, streams) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
virtual bool SupportsVideo() override{return true;}
|
||||
virtual bool SupportsAudio() override{return true;}
|
||||
|
||||
virtual FootagePtr Probe(const QString& filename, const QAtomicInt* cancelled) const override;
|
||||
virtual Footage* Probe(const QString& filename, const QAtomicInt* cancelled) const override;
|
||||
|
||||
protected:
|
||||
virtual bool OpenInternal() override;
|
||||
|
||||
@@ -51,7 +51,7 @@ QString OIIODecoder::id()
|
||||
return QStringLiteral("oiio");
|
||||
}
|
||||
|
||||
FootagePtr OIIODecoder::Probe(const QString& filename, const QAtomicInt* cancelled) const
|
||||
Footage *OIIODecoder::Probe(const QString& filename, const QAtomicInt* cancelled) const
|
||||
{
|
||||
Q_UNUSED(cancelled)
|
||||
|
||||
@@ -75,7 +75,7 @@ FootagePtr OIIODecoder::Probe(const QString& filename, const QAtomicInt* cancell
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FootagePtr footage = std::make_shared<Footage>();
|
||||
Footage* footage = new Footage();
|
||||
|
||||
VideoStreamPtr image_stream = std::make_shared<VideoStream>();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
|
||||
virtual bool SupportsVideo() override{return true;}
|
||||
|
||||
virtual FootagePtr Probe(const QString& filename, const QAtomicInt* cancelled) const override;
|
||||
virtual Footage* Probe(const QString& filename, const QAtomicInt* cancelled) const override;
|
||||
|
||||
protected:
|
||||
virtual bool OpenInternal() override;
|
||||
|
||||
Reference in New Issue
Block a user