Jump to content

Relative size for PiP (Picture in Picture) window


pankov

Recommended Posts

As the title states is it possible to make the PiP window resize automatically with the main one. This will allow the PiP window to keep it's size proportional to the main one both in windowed and fullscreen modes because right now if the user sets the correct size for fulscreen mode the PiP might cover the whole picture in windowed mode which doesn't make any sense from usability point of view.

Link to comment
is it possible to make the PiP window resize automatically with the main one.

 

Yes. At least in theory. I wasn't sure how to do it (keep the PiP size or resize accordingly to the main video) and asked for it in the German beta thread. Only one user responded and voted for "keep", because PiP might get too small when switching from full screen to window mode. So we have a 1:1 draw now.

 

Offering both by option would yield quite complicated code, so I don't like this idea very much...

Link to comment

I do agree that PiP might get small but does it really make sense to keep it big so it covers the whole or most of the main window? After all we are talking about PiP - it's supposed to be smaller than the main video. It's not PaP (Picture and Picture) where they are equal or close to it.

 

I might be oversimplifying things but is it really so complicated to support both as an option?

As you currently have all the code for the relative positioning of the PiP window I think that adding the proportional size is just simple math and 4-5 rows of code.

As a Delphi developer myself I might even try to help and code it myself if you give me some pointers on how the current code is working ... a code snippet or something like a dummy function that shows the current behavior.

If you are interested just PM me and we can discuss it further.

Edited by pankov
Link to comment

The problem is not the resizing, but keeping the position relative to the main window. I think you will agree that it should be kept. Before 5.4 it wasn't, but I fixed it. It is an interesting mathematical problem how the new position can be calculated if the main video size changes, but the PiP size does not. We (me and my daughter studying computer science) spent some time discussing this topic... if you don't believe it, try to figure it out :)

 

The algorithm is different if the PiP size changes proportionally (in fact it gets easier), and the values stored in the setup.xml are different. Supporting both options results in a lot of case distinctions in the code, that make it more error-prone and less maintainable.

 

The difference between the idea how it should be and putting it into practice (particularly in the complicated DVBViewer Pro environment) is like the difference between making children and giving birth to them / having them, if you know what I mean :) The efforts required by the latter are generally underestimated.... it's not a thing that you do once, and then it's done. You have to live with that code for years, and every change may somehow interact with it.

Link to comment

And I hope you'll prefer my point of view, because the optimal size of a PiP doesn't change with the window size. It changes with the distance between screen and viewer(!). Besides of that I'm sure that a perfect sized PiP in a window will never automatically get the (relative) perfect size when you switch to fullscreen. So you'll have to correct it all the time or search for a compromise that never fits perfect. ;)

 

cismondo :wave:

Link to comment

It won't be changed in the upcoming DVBViewer Pro release. However, it's not fixed forever. If there are new aspects / opinions / ideas they will be considered. It also depends on how many people ask for a feature.

Link to comment

cismondo,

just out of curiosity, I'm not pushing for my point of view, can you explain a bit about your usecase?

Why would you like to have the PiP size fixed while you change the main window size like in going from fullscreen to some window?

When you say that the optimal size should depend on the distance between screen and viewer doesn't this also apply to the main video window? Why would you like to have a PiP window covering more and more of the main one?

 

I'm using PiP in windowed mode for like 1% of the cases vs. 99% in fullscreen so it's not a big concern for me - I just want to see if I'm missing something.

On the other hand I use windowed mode itself (with all UI hidden) very often while I'm working on something else and DVBViewer is just playing something in a small window (like 1/10th of whole screen area) in one of the corners of the monitor - something like the PiP concept itself but with the desktop/other apps as a main. In this case if I start DVBViewer PiP it'll be something like PiPiP

;)

Edited by pankov
Link to comment

After reading cismondo's post once more I got an idea - how about storing the windowed and fullscreen location and size separately?

This will make the code a lot simpler and at the same time it will cover the two use cases almost perfectly

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...