Opened 12 years ago

Closed 10 years ago

Last modified 9 years ago

#10878 closed Patch - Bug Fix (fixed)

[PATCH] Fix PiP playback with Xv

Reported by: Lawrence Rust <lvr@…> Owned by: danielk
Priority: minor Milestone: 0.27.4
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords: PiP 'picture in picture' flicker
Cc: Ticket locked: no

Description

When using Xv-blit video output and trying to view two or more programs using PiP then the inset video often flickers or contains elements of 2 unrelated frames.

When displaying 'pictute in picture' (PiP), VideoOutput::ShowPIP composites the PiP windows onto the main video frame. To do so, it uses the player's GetCurrentFrame? method to obtain the most recently displayed PiP frame. However, MythPlayer::DisplayNormalFrames? immediately releases the last frame displayed back to the decoding queue. Consequently when GetCurrentFrame? calls GetLastShownFrame? to obtain that frame it may have been overwritten by the decoder thread.

This patch defers calling DoneDisplayingFrame? if the player is a PiP player so that future calls to GetLastShownFrame? return an intact frame.

This patch is for git master but is equally applicable to fixes 0.25 and 0.24

Attachments (1)

0001-mythplayer-Don-t-call-DoneDisplayingFrame-for-PiP-un.patch (2.0 KB) - added by Lawrence Rust <lvr@…> 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by Lawrence Rust <lvr@…>

comment:1 Changed 12 years ago by danielk

Owner: set to danielk
Status: newassigned

comment:2 Changed 10 years ago by davidriggleman@…

Are there any plans to integrate this into master? I'm seeing similar flickering in PiP and it sounds like it's related to this bug. It looks like the patch code fix would still work the same, at least in 0.27.

comment:3 Changed 10 years ago by JYA

Resolution: Fixed
Status: assignedclosed

issue isn't just with Xv, but also opengl and any software rendered output.

Thank you for the patch

Fixed in 49df62f1a76f0e617208e261a09f5f8a634b3ce9

comment:4 Changed 10 years ago by Lawrence Rust <lvr@…>

Resolution: Fixedfixed

In 4d7b305afc071addb06b566ac1d9fbadd431c741/mythtv:

Player: Don't call DoneDisplayingFrame? for PiP until next frame is ready

When displaying 'pictute in picture' (PiP), VideoOutput::ShowPIP
composites the PiP windows onto the main video frame. To do so, it uses
the player's GetCurrentFrame? method to obtain the most recently displayed
PiP frame. However, MythPlayer::DisplayNormalFrames? immediately releases
the last frame displayed back to the decoding queue. Consequently when
GetCurrentFrame? calls GetLastShownFrame? to obtain that frame it may have been
overwritten by the decoder thread.

This patch defers calling DoneDisplayingFrame? if the player is a PiP
player so that future calls to GetLastShownFrame? return an intact frame.

Fixes #10878

Signed-off-by: Lawrence Rust <lvr@…>
Signed-off-by: Jean-Yves Avenard <jyavenard@…>
(cherry picked from commit 49df62f1a76f0e617208e261a09f5f8a634b3ce9)

Conflicts:

mythtv/libs/libmythtv/mythplayer.cpp

comment:5 Changed 9 years ago by paulh

Milestone: unknown0.27.4
Note: See TracTickets for help on using tickets.