diff --git a/include/ReaderBase.h b/include/ReaderBase.h index 6d68f729..e2d93841 100644 --- a/include/ReaderBase.h +++ b/include/ReaderBase.h @@ -111,16 +111,10 @@ namespace openshot openshot::ReaderInfo info; /// Parent clip object of this reader (which can be unparented and NULL) - inline openshot::ClipBase* GetParentClip() { return parent; }; - - /// Deprecated alias for GetParentClip() - inline openshot::ClipBase* GetClip() { return parent; }; + openshot::ClipBase* ParentClip(); /// Set parent clip object of this reader - inline void SetParentClip(openshot::ClipBase* clip) { parent = clip; }; - - /// Deprecated alias for SetParentClip() - inline void SetClip(openshot::ClipBase* clip) { parent = clip; }; + void ParentClip(openshot::ClipBase* new_clip); /// Close the reader (and any resources it was consuming) virtual void Close() = 0; diff --git a/src/Clip.cpp b/src/Clip.cpp index 7a874056..c74b4997 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -160,7 +160,7 @@ Clip::Clip(ReaderBase* new_reader) : resampler(NULL), reader(new_reader), alloca // Update duration and set parent if (reader) { End(reader->info.duration); - reader->SetParentClip(this); + reader->ParentClip(this); } } @@ -217,7 +217,7 @@ Clip::Clip(std::string path) : resampler(NULL), reader(NULL), allocated_reader(N // Update duration and set parent if (reader) { End(reader->info.duration); - reader->SetParentClip(this); + reader->ParentClip(this); allocated_reader = reader; // Init reader info struct and cache size init_reader_settings(); } @@ -246,7 +246,7 @@ void Clip::Reader(ReaderBase* new_reader) reader = new_reader; // set parent - reader->SetParentClip(this); + reader->ParentClip(this); // Init reader info struct and cache size init_reader_settings(); @@ -1062,7 +1062,7 @@ void Clip::SetJsonValue(const Json::Value root) { // mark as managed reader and set parent if (reader) { - reader->SetParentClip(this); + reader->ParentClip(this); allocated_reader = reader; } diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 2fedd955..3e2fa976 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -1271,7 +1271,7 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame) { int max_width = info.width; int max_height = info.height; - Clip *parent = (Clip *) GetParentClip(); + Clip *parent = (Clip *) ParentClip(); if (parent) { if (parent->ParentTimeline()) { // Set max width/height based on parent clip's timeline (if attached to a timeline) diff --git a/src/Frame.cpp b/src/Frame.cpp index 10333827..b4a8b2d4 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -221,7 +221,8 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G } // Create blank image - wave_image = std::make_shared(total_width, total_height, QImage::Format_RGBA8888_Premultiplied); + wave_image = std::make_shared( + total_width, total_height, QImage::Format_RGBA8888_Premultiplied); wave_image->fill(QColor(0,0,0,0)); // Load QPainter with wave_image device @@ -836,7 +837,8 @@ void Frame::AddImage(std::shared_ptr new_image, bool only_odd_lines) ret = true; } else if (new_image->format() != QImage::Format_RGBA8888_Premultiplied) { - new_image = std::make_shared(new_image->convertToFormat(QImage::Format_RGBA8888_Premultiplied)); + new_image = std::make_shared( + new_image->convertToFormat(QImage::Format_RGBA8888_Premultiplied)); } } if (ret) { diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 6ec600c4..93ec35f4 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -174,7 +174,7 @@ std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) int max_width = info.width; int max_height = info.height; - Clip* parent = (Clip*) GetParentClip(); + Clip* parent = (Clip*) ParentClip(); if (parent) { if (parent->ParentTimeline()) { // Set max width/height based on parent clip's timeline (if attached to a timeline)