[mythtv] Picture in Picture broken

Klaas de Waal klaas.de.waal at gmail.com
Sun Mar 8 16:27:39 UTC 2020


On Sun, 8 Mar 2020 at 09:51, Mark Kendall <mark.kendall at gmail.com> wrote:

> On Fri, 6 Mar 2020 at 14:10, Peter Bennett <pb.mythtv at gmail.com> wrote:
>
> > When I created the new avsync code I did not consider PIP. On my VDPAU
> > system, PIP was not working for many years, if I remember correctly I
> > would get major jerkiness in the main picture and the PIP would just
> > show wavy lines. It may have worked better with OpenGL at that time.
>
> So I have a few local fixes that get Pip up and running again
> (deinterlacing and av sync) - but I realised that the the PiP player
> now plays at whatever rate the main player is using. (e.g. playing a
> standard PAL recording as PiP while watching a 60fps video and the PiP
> plays at over twice the expected rate). I'm not entirely sure how the
> old av sync code dealt with that - but I'm assuming it is something to
> do with its 'predictive' nature. I don't know if it is possible to do
> the same with the new code.
>
> Furthermore, the deadlocks when switching PiP windows are nasty. May
> be a straightforward fix but I failed to track it down after several
> hours of testing. There are also problems with Picture By Picture -
> trying to create a PBP just exits playback.
>
> Unless anyone has some startling insight or time to work on it, I
> propose we disable PiP/PBP support in v31.
>
> Thoughts?
>
> Regards
> Mark
>
> PS.
>
> Looking at the code over the last day or so has just re-affirmed to me
> that it will be my next priority/target.
>
> For those interested, we currently have three main classes involved in
> playback TV, PlayerContext and MythPlayer. There is a huge amount of
> complexity baked into TV and PlayerContext (and at lower levels) that
> is purely driven by PiP/PBP support. Anyone who has ever worked on
> that code will know how much locking goes on - all for PiP. The
> PlayerContext class also largely exists purely to cater for PiP/PBP.
>
> I want to get to the stage where we have only the TV and MythPlayer
> classes.
>
> MythPlayer should be effectively standalone - i.e. give it a url, a
> window and tell it to play.
>
> All user interaction is then handled thought the TV class - it becomes
> the UI interface layer and handles any 'forced' changes of state for
> the player. It should then be a relatively simple task to wrap TV in a
> new 'PlayerWidget' that embeds seamlessly into the main UI.
>
> PiP/PBP would then be handled at the top level - i.e. just another widget.
>
> Having the player as a UI item also opens up all sorts of possibilities.
>
>
About who is going to fix this, I cannot even get my head around the Live
TV code so I am not the one to fix the PiP.
I think it that missing the PiP is not a show stopper for v31 as it also
does not really work in v30 as reported in the forum.
However, it is a cool feature and it would be great if it worked again.
With my thinking not being limited by knowledge, this is how I imagined
that it should work.
- main window video playback is leading for timing and frame rates,
deinterlacing etc
- PiP stream renders into memory only. If this cannot be done with
hardware, due to hardware being in use for the main window, then this is
software-only.
- synchronized with main window refresh the current pip picture is copied
into the main window
If you mix 50Hz and 60Hz streams then the PiP will be not a smooth as the
main window. This is for me a corner case and I think the PiP timing should
be ignored.
Again not limited by knowledge, I do see some similarity between the OSD
and the PiP. The OSD is painted on top of the main window so maybe this can
also be done with the PiP.
If this is being rewritten it might also be a good idea to cater for
audio-only, i.e. DVB radio broadcast, which has also been broken for years.

Klaas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200308/7e8a93d1/attachment.htm>


More information about the mythtv-dev mailing list