You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Overrides for derived-class methods
This commit is contained in:
@@ -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<openshot::Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<openshot::Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<openshot::Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<openshot::Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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<openshot::Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<openshot::Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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<Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<Frame> 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();
|
||||
|
||||
@@ -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<Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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<openshot::Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<openshot::Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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<Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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<openshot::Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<openshot::Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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<openshot::Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<openshot::Frame> 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -242,13 +242,13 @@ namespace openshot {
|
||||
std::list<Clip*> 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<EffectBase*> 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<Frame> GetFrame(int64_t requested_frame);
|
||||
std::shared_ptr<Frame> GetFrame(int64_t requested_frame) override;
|
||||
|
||||
// Curves for the viewport
|
||||
Keyframe viewport_scale; ///<Curve representing the scale of the viewport (0 to 100)
|
||||
@@ -269,16 +269,16 @@ namespace openshot {
|
||||
Color color; ///<Background color of timeline canvas
|
||||
|
||||
/// 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 "Timeline"; };
|
||||
std::string Name() override { return "Timeline"; };
|
||||
|
||||
/// 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
|
||||
|
||||
/// Set Max Image Size (used for performance optimization). Convenience function for setting
|
||||
/// Settings::Instance()->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.
|
||||
|
||||
Reference in New Issue
Block a user