Closed pincopallopino closed 10 years ago
Thanks, I'll try to fix it today.
I've checked your code, and don't see any flickering. What hardware do you have?
this is the full qml code: https://gist.github.com/pincopallopino/2b6c99783970dc0b779d
i'm on xubuntu 12.04 32 bit cpu: Intel® Core™ i5-2310 CPU @ 2.90GHz × 4 ram: 3,8 Gib and the graphic card: VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
if you want i can send you a video that show the flickering
I forgot you are on linux... and yes, several seconds of video will be useful.
how can i send it to you?
YouTube?
ok, thanks.
I don't see any flickering with your qml too. It seems I have to try on linux... But I could do it only on weekends.
You could try replace VlcVideoSurface with filled by some color rectangle, and check if flickering will gone. If it will, then problem definitely in qmlvlc...
i tried replacing the VlcVideoSurface with a rectangle and there is no flickering...
i had a similar problem some time ago... the issue was related with the updating of the bounding rect.. maybe it can help you
I thought a little about this issue, and decide restore support of QtMultimedia's video output for QmlVlc. I think it will be more stable solution than custom video surface implementation. And it allow use QmlVlc on mobile and other platforms which QtMultimedia supports. It will have one disadvantage - QtMultimedia does not supports video output from one source to multiple video surfaces.
But WebChimera will continue to use own video surface implementation for security reasons.
ok, tell me when you'll update the repository, i will try this solution
I'm almost finished, it will be available today or tomorrow.
I've updated demo. Try it please.
i've tried... now there is no flickering... but after 10-20 seconds it crashes... this is the backtrace:
~"#0 __memcpy_ssse3_rep () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S:191\n" ~"#1 0xb6a6a3a1 in plane_CopyPixels (p_dst=0xafa52444, p_src=0xafa52d04) at /usr/include/i386-linux-gnu/bits/string3.h:52\n" ~"#2 0xb6a6a469 in picture_CopyPixels (p_dst=0xafa523e8, p_src=0xafa52ca8) at misc/picture.c:334\n" ~"#3 0xb6a6a4ae in picture_Copy (p_dst=0xafa523e8, p_src=0xafa52ca8) at misc/picture.c:339\n" ~"#4 0xb6a4978c in ThreadDisplayRenderPicture (is_forced=false, vout=0x83f86d8) at video_output/video_output.c:994\n" ~"#5 ThreadDisplayPicture (vout=0x83f86d8, now=40, deadline=0xace8b2f8) at video_output/video_output.c:1125\n" ~"#6 0xb6a4ae3c in ThreadManage (interlacing=0xace8b2ec, deadline=0xace8b2f8, vout=0x83f86d8) at video_output/video_output.c:1136\n" ~"#7 Thread (object=0x83f86d8) at video_output/video_output.c:1569\n" ~"#8 0xb6d8dd4c in start_thread (arg=0xace8bb40) at pthread_create.c:308\n" ~"#9 0xb6bc9bae in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130\n"
Crash is better than flickering since it easier to fix. So it's event better. I'll look today. Thank you.
Which vlc version do you have? Crash is somewhere in vlc.
i have vlc 2.1.3.. it is the last version
i update the repository, now the problem is gone
Great, thanks! Now I should try fix flickering...
there is no flickering now
even with VlcVideoSurface?
sorry, i mean with VideoOutput there is no flickering.. if i use vlcvideosurface there is flickering
yea, and it should be fixed too...
VlcVideoSurface is fixed too ( by 4e604b6085 and ad7b9050e5 )
hi, the flickering is mostly disappeared, but sometimes i see it again, specially when there are multiple animations at the same time.. if i remove the streams the flickering disappear.. which could be the cause?
Do you see flickering when resize main window?
no, the window is full screen
I just want to say, I see rare flickering too (on xubuntu 12.04). Even when qml does not contains QmVlc items at all. And when I resize window by mouse I see very much flickering. Don't sure why this happens, maybe it's a problem with QQuickView background filling.
i make a video: https://www.youtube.com/watch?v=d8HcBz6kykg&feature=youtu.be
I see, it's annoying.
Maybe this will help: https://qt-project.org/forums/viewthread/23995 http://qt-project.org/doc/qt-5.0/qtquick/qquickwindow.html#setClearBeforeRendering http://qt-project.org/doc/qt-5.0/qtquick/qquickwindow.html#color-prop
i.e. try disable background cleanup:
view.setClearBeforeRendering(false);
or set cleanup color to black:
view.setColor( QColor( Qt::black ) );
btw, did you still use QtMultimedia's VideoOutput item?
no, now i'm using VlcVideoSurface.. btw i put "view.setClearBeforeRendering(false);" in the main.cpp and now the flickering is disappeared. thank you so much
But if use VideoOutput - is it flickering too ( without setClearBeforeRendering(false) )? Maybe VlcVideoSurface needs some more optimizations...
no no, the flickering happens also with videoOutput
if i start an animation like this one, the video starts flickering until the animation has not finished:
NumberAnimation { id: slide target: mVlcVideoSurface properties: "y" from: 500 to: 0 duration: 5000 }