Skip to content

Commit

Permalink
Use QSharedPointer for GstEnginePipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Jan 5, 2025
1 parent 7afae70 commit 6e7aaed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/engine/gstengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
#include "gstbufferconsumer.h"

using namespace Qt::Literals::StringLiterals;
using std::make_shared;

#ifdef __clang__
# pragma clang diagnostic push
Expand Down Expand Up @@ -897,7 +896,7 @@ void GstEngine::StopTimers() {

GstEnginePipelinePtr GstEngine::CreatePipeline() {

GstEnginePipelinePtr pipeline = make_shared<GstEnginePipeline>();
GstEnginePipelinePtr pipeline = GstEnginePipelinePtr(new GstEnginePipeline);
pipeline->set_output_device(output_, device_);
pipeline->set_exclusive_mode(exclusive_mode_);
pipeline->set_volume_enabled(volume_control_);
Expand Down
3 changes: 2 additions & 1 deletion src/engine/gstenginepipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <QVariant>
#include <QString>
#include <QUrl>
#include <QSharedPointer>

#include "includes/shared_ptr.h"
#include "includes/mutex_protected.h"
Expand Down Expand Up @@ -374,6 +375,6 @@ class GstEnginePipeline : public QObject {
mutex_protected<int> set_state_async_in_progress_;
};

using GstEnginePipelinePtr = SharedPtr<GstEnginePipeline>;
using GstEnginePipelinePtr = QSharedPointer<GstEnginePipeline>;

#endif // GSTENGINEPIPELINE_H

0 comments on commit 6e7aaed

Please sign in to comment.