Git Product home page Git Product logo

Comments (5)

yoreland avatar yoreland commented on August 18, 2024

For local blur, you may need to process it from "onRenderVideoFrame".

Just a question, for your project, do you check if your blur is take effect. But just can't push the blurred bitmap back to SDK?

from api-examples.

Jack29913 avatar Jack29913 commented on August 18, 2024

onRenderVideoFrame is for remote frame, it even has uid. Its not for local blur. Also we use onCaptureVideoFrame in old sdk and it works just fine.

Yes blurred data can't be pushed back to new SDK, that's the problem. In old SDK when you change data array's content it changes the frame itself.

from api-examples.

yoreland avatar yoreland commented on August 18, 2024

It has been fix on dev/3.4.0 branch.

you could find below code for correction:

void writebackVideoFrame(VideoFrame &videoFrame, void *byteBuffer)
{
    if (byteBuffer == nullptr)
    {
        return;
    }

    int width = videoFrame.width;
    int height = videoFrame.height;
    size_t widthAndHeight = (size_t) videoFrame.yStride * height;

    memcpy(videoFrame.yBuffer, byteBuffer, widthAndHeight);
    memcpy(videoFrame.uBuffer, (uint8_t *) byteBuffer + widthAndHeight, widthAndHeight / 4);
    memcpy(videoFrame.vBuffer, (uint8_t *) byteBuffer + widthAndHeight * 5 / 4,
           widthAndHeight / 4);
}

from api-examples.

Jack29913 avatar Jack29913 commented on August 18, 2024

okay that solved it, thank you. when will this pushed to master branch?

from api-examples.

yoreland avatar yoreland commented on August 18, 2024

suppose early next week

from api-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.