Skip to content
Snippets Groups Projects
Commit 8c9d20e2 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

directrenderer: follow jamid API changes

Follow changes from https://review.jami.net/c/jami-daemon/+/21262
Follow changes from https://review.jami.net/c/jami-daemon/+/21271

Change-Id: I61368a625aa4320c524b05f1df52f503d7932ec1
parent 0c88ebaf
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment