mdk-sdk icon indicating copy to clipboard operation
mdk-sdk copied to clipboard

About SnapShot...

Open julitobatata opened this issue 4 years ago • 2 comments

I am trying to save some frames samples from a video without starting to play. How can I do that?

julitobatata avatar Aug 18 '21 22:08 julitobatata

Actually I can render to FBO in my Qt application without problems. But, when I try to take a snapshot the result is a black image. Do you have some example to show how can I do that?

julitobatata avatar Aug 19 '21 12:08 julitobatata

Do you have a minimal example?

The first snapshot will be omitted. You have to add a dummy snapshot.

    Player::SnapshotRequest req{};
    player.snapshot(&req, nullptr);
    player.snapshot(&req, [](Player::SnapshotRequest* r, double t){
        printf("snapshot.jpg\n");
        return "snapshot.jpg";
    });

wang-bin avatar Aug 24 '21 08:08 wang-bin