Skip to content
Snippets Groups Projects
Commit 2cc4c967 authored by Sébastien Blin's avatar Sébastien Blin Committed by Kateryna Kostiuk
Browse files

video: only define currentAVFrame if needed

Change-Id: I85652e59a39097303fbfc414b7391a34dec019a6
parent 8e954827
No related branches found
No related tags found
No related merge requests found
...@@ -134,10 +134,14 @@ public: ...@@ -134,10 +134,14 @@ public:
* @return current rendered frame * @return current rendered frame
*/ */
Frame currentFrame() const; Frame currentFrame() const;
#if defined(ENABLE_LIBWRAP) || (defined __APPLE__)
/** /**
* @return current avframe * @return current avframe
*/ */
std::unique_ptr<AVFrame, void(*)(AVFrame*)> currentAVFrame() const; std::unique_ptr<AVFrame, void(*)(AVFrame*)> currentAVFrame() const;
#endif
/** /**
* @return current size * @return current size
*/ */
......
...@@ -156,11 +156,13 @@ Renderer::currentFrame() const ...@@ -156,11 +156,13 @@ Renderer::currentFrame() const
return result; return result;
} }
#if defined(ENABLE_LIBWRAP) || (defined __APPLE__)
std::unique_ptr<AVFrame, void(*)(AVFrame*)> std::unique_ptr<AVFrame, void(*)(AVFrame*)>
Renderer::currentAVFrame() const Renderer::currentAVFrame() const
{ {
return pimpl_->renderer->currentAVFrame(); return pimpl_->renderer->currentAVFrame();
} }
#endif
QSize QSize
Renderer::size() const Renderer::size() const
......
...@@ -59,7 +59,6 @@ public: ...@@ -59,7 +59,6 @@ public:
int fps() const; int fps() const;
virtual Frame currentFrame() const override; virtual Frame currentFrame() const override;
virtual ColorSpace colorSpace () const override; virtual ColorSpace colorSpace () const override;
virtual std::unique_ptr<AVFrame, void(*)(AVFrame*)> currentAVFrame() const override;
//Setters //Setters
void setShmPath(const QString& path); void setShmPath(const QString& path);
......
...@@ -99,7 +99,9 @@ public: ...@@ -99,7 +99,9 @@ public:
virtual QSize size () const; virtual QSize size () const;
virtual QMutex* mutex () const; virtual QMutex* mutex () const;
virtual ColorSpace colorSpace () const = 0; virtual ColorSpace colorSpace () const = 0;
#if defined(ENABLE_LIBWRAP) || (defined __APPLE__)
virtual std::unique_ptr<AVFrame, void(*)(AVFrame*)> currentAVFrame() const = 0; virtual std::unique_ptr<AVFrame, void(*)(AVFrame*)> currentAVFrame() const = 0;
#endif
void setSize(const QSize& size) const; void setSize(const QSize& size) const;
Q_SIGNALS: Q_SIGNALS:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment