diff --git a/src/directrenderer.cpp b/src/directrenderer.cpp index 5889783a1f327eb1a563afc0b5aa9395c4d1d675..a207cf7657bf487672bf360d8d4b2f231829f10a 100644 --- a/src/directrenderer.cpp +++ b/src/directrenderer.cpp @@ -51,31 +51,30 @@ public: void configureTarget() { using namespace std::placeholders; - target.pull = std::bind(&Impl::pullCallback, this, _1); + target.pull = std::bind(&Impl::pullCallback, this); target.push = std::bind(&Impl::pushCallback, this, _1); }; - DRing::SinkTarget::FrameBufferPtr pullCallback(std::size_t bytes) + DRing::FrameBuffer pullCallback() { QMutexLocker lk(&mutex); if (!frameBufferPtr) { - frameBufferPtr.reset(new DRing::FrameBuffer); - frameBufferPtr->avframe.reset(av_frame_alloc()); + frameBufferPtr.reset(av_frame_alloc()); } // A response to this signal should be used to provide client // allocated buffer specs via the AVFrame structure. // Important: Subscription to this signal MUST be synchronous(Qt::DirectConnection). - Q_EMIT parent_->frameBufferRequested(frameBufferPtr->avframe.get()); + Q_EMIT parent_->frameBufferRequested(frameBufferPtr.get()); - if (frameBufferPtr->avframe->data[0] == nullptr) { + if (frameBufferPtr->data[0] == nullptr) { return nullptr; } return std::move(frameBufferPtr); }; - void pushCallback(DRing::SinkTarget::FrameBufferPtr buf) + void pushCallback(DRing::FrameBuffer buf) { { QMutexLocker lk(&mutex); @@ -91,7 +90,7 @@ private: public: DRing::SinkTarget target; QMutex mutex; - DRing::SinkTarget::FrameBufferPtr frameBufferPtr; + DRing::FrameBuffer frameBufferPtr; }; DirectRenderer::DirectRenderer(const QString& id, const QSize& res) diff --git a/src/qtwrapper/videomanager_wrap.h b/src/qtwrapper/videomanager_wrap.h index e86c63b564b8f3cd4f326e637da5496c42aac7e9..64f1a24bedf8c832a633e7a8e7d6ce9d7d19a169 100644 --- a/src/qtwrapper/videomanager_wrap.h +++ b/src/qtwrapper/videomanager_wrap.h @@ -151,15 +151,6 @@ public Q_SLOTS: // METHODS #endif } - void registerAVSinkTarget(const QString& sinkID, const DRing::AVSinkTarget& target) - { - Q_UNUSED(sinkID) - Q_UNUSED(target) -#ifdef ENABLE_VIDEO - DRing::registerAVSinkTarget(sinkID.toStdString(), target); -#endif - } - bool getDecodingAccelerated() { return DRing::getDecodingAccelerated(); } void setDecodingAccelerated(bool state) { DRing::setDecodingAccelerated(state); }