You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge pull request #224 from sparfenyuk/develop
Add virtual destructor for abstract classes
This commit is contained in:
@@ -114,6 +114,7 @@ namespace openshot {
|
||||
virtual void SetJson(string value) = 0; ///< Load JSON string into this object
|
||||
virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object
|
||||
virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object
|
||||
virtual ~CacheBase() = default;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ namespace openshot {
|
||||
/// of all properties at any time)
|
||||
virtual string PropertiesJSON(int64_t requested_frame) = 0;
|
||||
|
||||
virtual ~ClipBase() = default;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ namespace openshot
|
||||
|
||||
/// Set the order that this effect should be executed.
|
||||
void Order(int new_order) { order = new_order; }
|
||||
virtual ~EffectBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@ namespace openshot
|
||||
/// Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder)
|
||||
virtual void Volume(float new_volume) = 0;
|
||||
|
||||
virtual ~PlayerBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -152,6 +152,8 @@ namespace openshot
|
||||
|
||||
/// Open the reader (and start consuming resources, such as images or video files)
|
||||
virtual void Open() = 0;
|
||||
|
||||
virtual ~ReaderBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -119,6 +119,8 @@ namespace openshot
|
||||
|
||||
/// Open the writer (and start initializing streams)
|
||||
virtual void Open() = 0;
|
||||
|
||||
virtual ~WriterBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ AudioResampler::~AudioResampler()
|
||||
void AudioResampler::SetBuffer(AudioSampleBuffer *new_buffer, double sample_rate, double new_sample_rate)
|
||||
{
|
||||
if (sample_rate <= 0)
|
||||
sample_rate == 44100;
|
||||
sample_rate = 44100;
|
||||
if (new_sample_rate <= 0)
|
||||
new_sample_rate == 44100;
|
||||
new_sample_rate = 44100;
|
||||
|
||||
// Set the sample ratio (the ratio of sample rate change)
|
||||
source_ratio = sample_rate / new_sample_rate;
|
||||
|
||||
@@ -786,7 +786,7 @@ void Keyframe::ProcessSegment(int Segment, Point p1, Point p2) {
|
||||
// Add new value to the vector
|
||||
Coordinate new_coord(current_frame, current_value);
|
||||
|
||||
if (Segment == 0 || Segment > 0 && current_frame > p1.co.X)
|
||||
if (Segment == 0 || (Segment > 0 && current_frame > p1.co.X))
|
||||
// Add to "values" vector
|
||||
Values.push_back(new_coord);
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ std::shared_ptr<Frame> QtImageReader::GetFrame(int64_t requested_frame)
|
||||
}
|
||||
|
||||
// Scale image smaller (or use a previous scaled image)
|
||||
if (!cached_image || (cached_image && max_size.width() != max_width || max_size.height() != max_height)) {
|
||||
if (!cached_image || (max_size.width() != max_width || max_size.height() != max_height)) {
|
||||
#if USE_RESVG == 1
|
||||
// If defined and found in CMake, utilize the libresvg for parsing
|
||||
// SVG files and rasterizing them to QImages.
|
||||
|
||||
Reference in New Issue
Block a user