Skip to content

Commit

Permalink
Merge pull request #594 from ferdnyc/overrides-and-types
Browse files Browse the repository at this point in the history
Overrides and types
  • Loading branch information
ferdnyc committed Nov 27, 2020
2 parents aab6d1c + 9c1ca0c commit 9a91abc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Clip.h
Expand Up @@ -186,7 +186,7 @@ namespace openshot {
void AddEffect(openshot::EffectBase* effect);

/// Close the internal reader
void Close();
void Close() override;

/// Return the list of effects on the timeline
std::list<openshot::EffectBase*> Effects() { return effects; };
Expand All @@ -199,7 +199,7 @@ namespace openshot {
///
/// @returns A new openshot::Frame object
/// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline.
std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number);
std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override;

/// @brief Get an openshot::Frame object for a specific frame number of this timeline. The image size and number
/// of samples can be customized to match the Timeline, or any custom output. Extra samples will be moved to the
Expand Down
4 changes: 3 additions & 1 deletion src/ImageReader.h
Expand Up @@ -48,6 +48,8 @@

namespace openshot
{
// Forward decls
class CacheBase;

/**
* @brief This class uses the ImageMagick++ libraries, to open image files, and return
Expand Down Expand Up @@ -90,7 +92,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
CacheMemory* GetCache() override { return NULL; };
CacheBase* 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.
Expand Down
4 changes: 3 additions & 1 deletion src/QtHtmlReader.h
Expand Up @@ -49,6 +49,8 @@ class QImage;

namespace openshot
{
// Forward decls
class CacheBase;

/**
* @brief This class uses Qt libraries, to create frames with rendered HTML, and return
Expand Down Expand Up @@ -115,7 +117,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
openshot::CacheMemory* GetCache() override { return NULL; };
CacheBase* 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.
Expand Down
4 changes: 3 additions & 1 deletion src/QtImageReader.h
Expand Up @@ -42,6 +42,8 @@

namespace openshot
{
// Forward decl
class CacheBase;

/**
* @brief This class uses the Qt library, to open image files, and return
Expand Down Expand Up @@ -88,7 +90,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
CacheMemory* GetCache() override { return NULL; };
CacheBase* 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.
Expand Down
4 changes: 3 additions & 1 deletion src/QtTextReader.h
Expand Up @@ -49,6 +49,8 @@ class QImage;

namespace openshot
{
// Forward decls
class CacheBase;

/**
* @brief This class uses Qt libraries, to create frames with "Text", and return
Expand Down Expand Up @@ -126,7 +128,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
openshot::CacheMemory* GetCache() override { return NULL; };
CacheBase* 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.
Expand Down
2 changes: 1 addition & 1 deletion tests/ImageWriter_Tests.cpp
Expand Up @@ -85,7 +85,7 @@ TEST(Gif)
// Basic Reader state queries
CHECK_EQUAL("ImageReader", r1.Name());

CacheMemory* c = r1.GetCache();
CacheBase* c = r1.GetCache();
CHECK_EQUAL(true, c == nullptr);

CHECK_EQUAL(false, r1.IsOpen());
Expand Down

0 comments on commit 9a91abc

Please sign in to comment.