-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consume QAVFrame with QGraphicsVideoItem #482
Comments
Thanks for the report. Does it mean that Could you test if (!frame().frame())
return {}; |
I tried your test but frame() is not nullptr, I tried 2 simillar samples with QVideoWidget and QGraphicsVideoItem, It both contains a videoSink. |
could you qDebug() << frame().frame()->format; ? Is it -1? |
Yes, It prints -1, but with the QVideoWidget, It prints 172. Note: I used the same rtsp link with both case |
Forgot to ask, Meant that the frame is invalid and should be skipped |
Sorry, I dont know where is the "static_cast(frame())" you mentioned |
meant to check like |
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... |
Oh, ok, It works fine now with QGraphicsVideoItem. |
I tried widget_video sample and run successfully. But while I try to use QGraphicsVideoItem to show video inside a QGraphicsView, the app crashed.
This is the debug mode last point before crashing
1 QAVVideoFrame::formatName qavvideoframe.cpp 140 0x7ff7b1429978
2 VideoBuffer_D3D11::handle qavhwdevice_d3d11.cpp 325 0x7ff7b14c9fc2
3 QAVVideoFrame::handle qavvideoframe.cpp 123 0x7ff7b142990e
4 PlanarVideoBuffer::mapTextures qavvideoframe.cpp 312 0x7ff7b142f527
This is how I use QGraphicsVideoItem to show video
The text was updated successfully, but these errors were encountered: