Giter Club home page Giter Club logo

Comments (11)

kimvnhung avatar kimvnhung commented on August 14, 2024 1

It's empty frame...

image

log
image

from qtavplayer.

kimvnhung avatar kimvnhung commented on August 14, 2024 1

Oh, ok, It works fine now with QGraphicsVideoItem.
Thanks for your support

from qtavplayer.

kimvnhung avatar kimvnhung commented on August 14, 2024 1

#483

from qtavplayer.

valbok avatar valbok commented on August 14, 2024

Thanks for the report.

Does it mean that frame() returns nullptr there?

Could you test
https://github.com/valbok/QtAVPlayer/blob/master/src/QtAVPlayer/qavhwdevice_d3d11.cpp#L324

if (!frame().frame())
    return {};

from qtavplayer.

kimvnhung avatar kimvnhung commented on August 14, 2024

I tried your test but frame() is not nullptr,
The problem occurred on this line:
return QLatin1String(av_pix_fmt_desc_get(QAVVideoFrame::format())->name);
And I saw that QAVVideoFrame::format() return -1 at that.

I tried 2 simillar samples with QVideoWidget and QGraphicsVideoItem, It both contains a videoSink.
The sample with QVideoWidget worked fine, But the sample with QGraphicsVideoItem crashed on the line above after call to play()

from qtavplayer.

valbok avatar valbok commented on August 14, 2024

could you qDebug() << frame().frame()->format; ?

Is it -1?

from qtavplayer.

kimvnhung avatar kimvnhung commented on August 14, 2024

Yes, It prints -1, but with the QVideoWidget, It prints 172.
I think It has some difference between QVideoSink in QVideoWidget and in QGraphicsVideoItem. But I'm not sure

Note: I used the same rtsp link with both case

from qtavplayer.

valbok avatar valbok commented on August 14, 2024

Forgot to ask, static_cast<bool>(frame()) should be false there?

Meant that the frame is invalid and should be skipped

from qtavplayer.

kimvnhung avatar kimvnhung commented on August 14, 2024

Sorry, I dont know where is the "static_cast(frame())" you mentioned
I'm using Qt 6.6.2 which has a defined for handling

from qtavplayer.

valbok avatar valbok commented on August 14, 2024

meant to check like
if (!frame()) qDebug() <<"empty frame";

from qtavplayer.

valbok avatar valbok commented on August 14, 2024

so could you please just skip it?

if (!frame())
    return {};

And check if some correct video frames will be sent? Also could you provide std output? Maybe it could not find a codec...

from qtavplayer.

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.