From f354850984e1a6dc64ecc33524129de1a8a5b080 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 15 Apr 2020 21:44:17 -0400 Subject: [PATCH 1/2] Effects: Mark overridden methods accordingly --- include/effects/Bars.h | 6 +++--- include/effects/Blur.h | 6 +++--- include/effects/Brightness.h | 6 +++--- include/effects/ChromaKey.h | 6 +++--- include/effects/ColorShift.h | 6 +++--- include/effects/Crop.h | 6 +++--- include/effects/Deinterlace.h | 6 +++--- include/effects/Hue.h | 6 +++--- include/effects/Mask.h | 6 +++--- include/effects/Negate.h | 6 +++--- include/effects/Pixelate.h | 6 +++--- include/effects/Saturation.h | 6 +++--- include/effects/Shift.h | 6 +++--- include/effects/Wave.h | 6 +++--- 14 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/effects/Bars.h b/include/effects/Bars.h index fa9df6f80..7c92255aa 100644 --- a/include/effects/Bars.h +++ b/include/effects/Bars.h @@ -86,13 +86,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Blur.h b/include/effects/Blur.h index c254b8cde..60a0cd085 100644 --- a/include/effects/Blur.h +++ b/include/effects/Blur.h @@ -98,13 +98,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Brightness.h b/include/effects/Brightness.h index 69f2cf343..5f25b94a0 100644 --- a/include/effects/Brightness.h +++ b/include/effects/Brightness.h @@ -86,13 +86,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/ChromaKey.h b/include/effects/ChromaKey.h index dbc81e9cf..fcc8c3b1f 100644 --- a/include/effects/ChromaKey.h +++ b/include/effects/ChromaKey.h @@ -83,13 +83,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object // Get all properties for a specific frame std::string PropertiesJSON(int64_t requested_frame) const override; diff --git a/include/effects/ColorShift.h b/include/effects/ColorShift.h index ada2acd68..4ef56dc68 100644 --- a/include/effects/ColorShift.h +++ b/include/effects/ColorShift.h @@ -90,13 +90,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Crop.h b/include/effects/Crop.h index 2d4a2b2ee..f5ba07f24 100644 --- a/include/effects/Crop.h +++ b/include/effects/Crop.h @@ -85,13 +85,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Deinterlace.h b/include/effects/Deinterlace.h index eff7b2fe7..97c778538 100644 --- a/include/effects/Deinterlace.h +++ b/include/effects/Deinterlace.h @@ -79,13 +79,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object // Get all properties for a specific frame std::string PropertiesJSON(int64_t requested_frame) const override; diff --git a/include/effects/Hue.h b/include/effects/Hue.h index 9d86d5c2b..833bf087b 100644 --- a/include/effects/Hue.h +++ b/include/effects/Hue.h @@ -76,13 +76,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Mask.h b/include/effects/Mask.h index 390ffa361..8156b8436 100644 --- a/include/effects/Mask.h +++ b/include/effects/Mask.h @@ -98,13 +98,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Negate.h b/include/effects/Negate.h index 6206a6607..c691a86c1 100644 --- a/include/effects/Negate.h +++ b/include/effects/Negate.h @@ -67,13 +67,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object // Get all properties for a specific frame std::string PropertiesJSON(int64_t requested_frame) const override; diff --git a/include/effects/Pixelate.h b/include/effects/Pixelate.h index 9348ce863..4cdd440f2 100644 --- a/include/effects/Pixelate.h +++ b/include/effects/Pixelate.h @@ -85,13 +85,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Saturation.h b/include/effects/Saturation.h index e8d0d9409..f272305f9 100644 --- a/include/effects/Saturation.h +++ b/include/effects/Saturation.h @@ -83,13 +83,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Shift.h b/include/effects/Shift.h index 765da7555..7a7efbea4 100644 --- a/include/effects/Shift.h +++ b/include/effects/Shift.h @@ -79,13 +79,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/effects/Wave.h b/include/effects/Wave.h index ad516bde3..d4759c24e 100644 --- a/include/effects/Wave.h +++ b/include/effects/Wave.h @@ -85,13 +85,13 @@ namespace openshot /// @returns The modified openshot::Frame object /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. - std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number); + std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) From f62f2bac6bf96aa6c22d079eee932eb0d8f89c7e Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 15 Apr 2020 21:45:04 -0400 Subject: [PATCH 2/2] Overrides for derived-class methods --- include/ChunkReader.h | 16 ++++++++-------- include/Clip.h | 4 ++-- include/DummyReader.h | 16 ++++++++-------- include/FFmpegReader.h | 16 ++++++++-------- include/FrameMapper.h | 16 ++++++++-------- include/ImageReader.h | 18 +++++++++--------- include/QtHtmlReader.h | 16 ++++++++-------- include/QtImageReader.h | 16 ++++++++-------- include/QtTextReader.h | 16 ++++++++-------- include/TextReader.h | 16 ++++++++-------- include/Timeline.h | 16 ++++++++-------- 11 files changed, 83 insertions(+), 83 deletions(-) diff --git a/include/ChunkReader.h b/include/ChunkReader.h index 4d72c31da..cd7cd67f1 100644 --- a/include/ChunkReader.h +++ b/include/ChunkReader.h @@ -132,7 +132,7 @@ namespace openshot ChunkReader(std::string path, ChunkVersion chunk_version); /// Close the reader - void Close(); + void Close() override; /// @brief Get the chunk size (number of frames to write in each chunk) /// @returns The number of frames in this chunk @@ -143,27 +143,27 @@ namespace openshot void SetChunkSize(int64_t new_size) { chunk_size = new_size; }; /// Get the cache object used by this reader (always return NULL for this reader) - openshot::CacheMemory* GetCache() { return NULL; }; + openshot::CacheMemory* GetCache() override { return NULL; }; /// @brief Get an openshot::Frame object for a specific frame number of this reader. /// @returns The requested frame (containing the image and audio) /// @param requested_frame The frame number you want to retrieve - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "ChunkReader"; }; + std::string Name() override { return "ChunkReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open the reader. This is required before you can access frames or data from the reader. - void Open(); + void Open() override; }; } diff --git a/include/Clip.h b/include/Clip.h index 68d4622a1..1f4cd3859 100644 --- a/include/Clip.h +++ b/include/Clip.h @@ -192,9 +192,9 @@ namespace openshot { /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Get all properties for a specific frame (perfect for a UI to display the current state /// of all properties at any time) diff --git a/include/DummyReader.h b/include/DummyReader.h index fd17bed1c..4c935103c 100644 --- a/include/DummyReader.h +++ b/include/DummyReader.h @@ -68,32 +68,32 @@ namespace openshot virtual ~DummyReader(); /// Close File - void Close(); + void Close() override; /// Get the cache object used by this reader (always returns NULL for this reader) - CacheMemory* GetCache() { return NULL; }; + CacheMemory* GetCache() override { return NULL; }; /// Get an openshot::Frame object for a specific frame number of this reader. All numbers /// return the same Frame, since they all share the same image data. /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "DummyReader"; }; + std::string Name() override { return "DummyReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open File - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/FFmpegReader.h b/include/FFmpegReader.h index e9cee5793..ec0829652 100644 --- a/include/FFmpegReader.h +++ b/include/FFmpegReader.h @@ -246,31 +246,31 @@ namespace openshot { virtual ~FFmpegReader(); /// Close File - void Close(); + void Close() override; /// Get the cache object used by this reader - CacheMemory *GetCache() { return &final_cache; }; + CacheMemory *GetCache() override { return &final_cache; }; /// Get a shared pointer to a openshot::Frame object for a specific frame number of this reader. /// /// @returns The requested frame of video /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "FFmpegReader"; }; + std::string Name() override { return "FFmpegReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open File - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/FrameMapper.h b/include/FrameMapper.h index 8be4ec1bd..c98d7b719 100644 --- a/include/FrameMapper.h +++ b/include/FrameMapper.h @@ -176,13 +176,13 @@ namespace openshot void ChangeMapping(Fraction target_fps, PulldownType pulldown, int target_sample_rate, int target_channels, ChannelLayout target_channel_layout); /// Close the openshot::FrameMapper and internal reader - void Close(); + void Close() override; /// Get a frame based on the target frame rate and the new frame number of a frame MappedFrame GetMappedFrame(int64_t TargetFrameNumber); /// Get the cache object used by this reader - CacheMemory* GetCache() { return &final_cache; }; + CacheMemory* GetCache() override { return &final_cache; }; /// @brief This method is required for all derived classes of ReaderBase, and return the /// openshot::Frame object, which contains the image and audio information for that @@ -190,22 +190,22 @@ namespace openshot /// /// @returns The requested frame of video /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen(); + bool IsOpen() override; /// Return the type name of the class - std::string Name() { return "FrameMapper"; }; + std::string Name() override { return "FrameMapper"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open the internal reader - void Open(); + void Open() override; /// Print all of the original frames and which new frames they map to void PrintMapping(); diff --git a/include/ImageReader.h b/include/ImageReader.h index bb19dd3dc..5aafcc8f7 100644 --- a/include/ImageReader.h +++ b/include/ImageReader.h @@ -87,32 +87,32 @@ namespace openshot ImageReader(std::string path, bool inspect_reader); /// Close File - void Close(); + void Close() override; /// Get the cache object used by this reader (always returns NULL for this object) - CacheMemory* GetCache() { return NULL; }; + CacheMemory* GetCache() override { return NULL; }; /// Get an openshot::Frame object for a specific frame number of this reader. All numbers /// return the same Frame, since they all share the same image data. /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "ImageReader"; }; + std::string Name() override { return "ImageReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object - Json::Value JsonValue() const; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object + Json::Value JsonValue() const override; ///< Generate Json::Value for this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open File - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/QtHtmlReader.h b/include/QtHtmlReader.h index d7052d494..3d426afb0 100644 --- a/include/QtHtmlReader.h +++ b/include/QtHtmlReader.h @@ -112,32 +112,32 @@ namespace openshot QtHtmlReader(int width, int height, int x_offset, int y_offset, GravityType gravity, std::string html, std::string css, std::string background_color); /// Close Reader - void Close(); + void Close() override; /// Get the cache object used by this reader (always returns NULL for this object) - openshot::CacheMemory* GetCache() { return NULL; }; + openshot::CacheMemory* GetCache() override { return NULL; }; /// Get an openshot::Frame object for a specific frame number of this reader. All numbers /// return the same Frame, since they all share the same image data. /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "QtHtmlReader"; }; + std::string Name() override { return "QtHtmlReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open Reader - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/QtImageReader.h b/include/QtImageReader.h index 3e456e394..3848065a1 100644 --- a/include/QtImageReader.h +++ b/include/QtImageReader.h @@ -85,32 +85,32 @@ namespace openshot virtual ~QtImageReader(); /// Close File - void Close(); + void Close() override; /// Get the cache object used by this reader (always returns NULL for this object) - CacheMemory* GetCache() { return NULL; }; + CacheMemory* GetCache() override { return NULL; }; /// Get an openshot::Frame object for a specific frame number of this reader. All numbers /// return the same Frame, since they all share the same image data. /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "QtImageReader"; }; + std::string Name() override { return "QtImageReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open File - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/QtTextReader.h b/include/QtTextReader.h index d226e920c..2fd203ad4 100644 --- a/include/QtTextReader.h +++ b/include/QtTextReader.h @@ -123,32 +123,32 @@ namespace openshot void SetTextBackgroundColor(std::string color); /// Close Reader - void Close(); + void Close() override; /// Get the cache object used by this reader (always returns NULL for this object) - openshot::CacheMemory* GetCache() { return NULL; }; + openshot::CacheMemory* GetCache() override { return NULL; }; /// Get an openshot::Frame object for a specific frame number of this reader. All numbers /// return the same Frame, since they all share the same image data. /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "QtTextReader"; }; + std::string Name() override { return "QtTextReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open Reader - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/TextReader.h b/include/TextReader.h index b6dbf5cd0..b5488f5fe 100644 --- a/include/TextReader.h +++ b/include/TextReader.h @@ -123,32 +123,32 @@ namespace openshot void SetTextBackgroundColor(std::string color); /// Close Reader - void Close(); + void Close() override; /// Get the cache object used by this reader (always returns NULL for this object) - openshot::CacheMemory* GetCache() { return NULL; }; + openshot::CacheMemory* GetCache() override { return NULL; }; /// Get an openshot::Frame object for a specific frame number of this reader. All numbers /// return the same Frame, since they all share the same image data. /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; /// Determine if reader is open or closed - bool IsOpen() { return is_open; }; + bool IsOpen() override { return is_open; }; /// Return the type name of the class - std::string Name() { return "TextReader"; }; + std::string Name() override { return "TextReader"; }; /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object - void SetJson(const std::string value); ///< Load JSON string into this object + void SetJson(const std::string value) override; ///< Load JSON string into this object Json::Value JsonValue() const override; ///< Generate Json::Value for this object - void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object + void SetJsonValue(const Json::Value root) override; ///< Load Json::Value into this object /// Open Reader - which is called by the constructor automatically - void Open(); + void Open() override; }; } diff --git a/include/Timeline.h b/include/Timeline.h index 56a895866..932b04acf 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -242,13 +242,13 @@ namespace openshot { std::list Clips() { return clips; }; /// Close the timeline reader (and any resources it was consuming) - void Close(); + void Close() override; /// Return the list of effects on the timeline std::list Effects() { return effects; }; /// Get the cache object used by this reader - CacheBase* GetCache() { return final_cache; }; + CacheBase* GetCache() override { return final_cache; }; /// Set the cache object used by this reader. You must now manage the lifecycle /// of this cache object though (Timeline will not delete it for you). @@ -258,7 +258,7 @@ namespace openshot { /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame); + std::shared_ptr GetFrame(int64_t requested_frame) override; // Curves for the viewport Keyframe viewport_scale; ///MAX_WIDTH and Settings::Instance()->MAX_HEIGHT. @@ -291,7 +291,7 @@ namespace openshot { void ApplyJsonDiff(std::string value); /// Open the reader (and start consuming resources) - void Open(); + void Open() override; /// @brief Remove an openshot::Clip from the timeline /// @param clip Remove an openshot::Clip from the timeline.