-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
VideoPlayer: gapless playback on stream change #8886
Conversation
01acd86
to
90585ef
Compare
These commits have been in Milhouse builds for last couple of days. These are the changes in the first build with the regression: |
All feedback to those changes older than one day are obsolete because of recent changes. |
@popcornmix issues related to this PR may manifest themselves by rendering a black/green screen on stream change or not working renderer at all. |
I did re-pick the commits from this PR yesterday early evening. You can see the commits used in last night's build here: https://github.com/popcornmix/xbmc/commits/newclock5 Nothing obvious is broken on normal usage of MMAL. I think I have some samples with resolution changes in - I'll see if they are affected. |
Windows tests were done by @mapfau jenkins build this please |
addon build errors on Windows unrelated. |
VideoPlayer: gapless playback on stream change
Testing did apparently not include DVD menus... unfortunately since this PR they are broken. I used the SPONGEBOB https://www.dropbox.com/s/hquzbke1x6pvz4e/SPONGEBOB.zip?dl=0 and the TARZ https://www.dropbox.com/s/j22rlb9ur8e4n47/TARZ.zip?dl=0 examples. Problems include PINK stills (with DXVA rendering forced) and missing menu highlights. I am on a Jan 21 build and have reverted #8915, #8907, and #8886 (reverse chronological order of VideoPlayer changes). Before reverting, I have also tried the currently open #8935 but that didn't help... |
update and confirmation: I refined my analysis and narrowed it down to ONLY this PR (reverted with very minimal conflict resolution). |
why don't you try to debug and narrow it down further? |
2 things: time (may take a while) and while I can try you're obviously closer to the VideoPlayer code... Since I provided the examples that break, I thought that you may identify the issue really quickly. Anyway I'll take a look. |
TARZ and spongebob do work fine here on OSX (#8935) included EDIT: would you have the exact steps to reproduce? |
I reverted only the WinRenderer commit and that is already slightly better. Now the menus are "working" but I still get the stills as full-screen PINK (in TARZ example). |
works without any issues here. since sw decoding is equal on our systems, the issue is most likely in Windows renderer. @afedchin could you have a look? |
When I add #8935 the situation changes: sometimes the pink stills are gone (not always - seems random) and when that is the case, menu does not respond anymore - weird stuff |
The VideoRender thread seems to go away in some situations: There are stacktraces in my log folder each time there are artefacts or stills. |
@mapfau why you post this here? |
This is the stacktrace playing the sponge example with the version including 8868.
There is an access to an NULL buffer on WinRenderer.cpp:248 Above is bullshit, but the picture_buffer seems to be not OK and produces exceptions when reading from it. |
@mapfau your stack trace is related to converting DVDVideoPicture in WinRenderer for DXVA. If renderer receives a nullptr data then it crash. why it receives nullptr? |
Problem seems to be something with the decoder: VideoPlayerVideo: 295 (I'll try to make a hyperlink...) The picture seem NOT to be allocated but is passed to the renderer m_picture watch: |
@mapfau I cannot reproduce an issue with sponge sample. |
it seems to be cpu dependend - sometimes I have pink fullscreen, sometimes green, and sometimes the exception. There is a change in the DXVA decoder for the last frames - I'll deactivate it and try again. |
It already uses sw decoding, but you selected DXVA renderer in the settings. |
I don't see issues here on OSX and Linux. Note that a frame, once submitted to renderer, can be renderer as often as renderer wants to do. Regardless of DVP_FLAG_ALLOCATED. pics are refcounted and as long as renderer has a ref they have to be valid. |
@mapfau could you apply the change mentioned here? FernetMenta@29e3ed8#commitcomment-15597930 |
Moving ManageTextures(); from Line 221 into Update makes it better ( i can start the video without exception now). |
I still managed to get the exception with the move. |
@FernetMenta bug is float, sometimes winrenderer can not read picture->data[0] |
First-chance exception at 0x016A1FA6 in Kodi.exe: 0xC0000005: Access violation reading location 0x0AFEB000. |
all of us using sw decoding? |
I use sw decoding. no issue with hw decoder |
SW decoding indeed. Renderer doesn't matter (same with DXVA / PS and Software renderer). |
what happens if you disable deinterlacing? |
hey! that worked... setting deinterlacing to off does the trick |
thanks! now I have a pointer. videocodecffmpeg somehow must destruct the source DVP_FLAG_ALLOCATED indicates as save to copy from. |
this enables gapless video playback for decoders that are capable of drain and allow multiple instances.
credits to @mapfau who has been working with me on this.
@afedchin could you please check dxva if it needs adaption. Configure of renderer now works without an extra cycle
@popcornmix could you please check mmal