player/command: Added ability to scale overlay.
Added display width/height to overlay-add command to allow overlay to be scaled on display. Useful when a fullscreen overlay is rendered at a lower resolution than the osd-width/height for performance reasons.
@jeeb May I ask if this can be merged? It's a "small" addition that can be very useful in some scenarios. Here => https://forums.plex.tv/t/hdr-metadata-passthrough-plex-htpc-for-windows/794358/63 is described how it is used in one case. Thanks!
Commit message needs fixing and it'd be nice if you provided a simple example script to test this.
Sorry for the delay getting back to this. I've been distracted by some other things. I was also thinking I could first address an off-by-one pixel that a user mentioned in the above linked thread but I may not get to that as soon as I hoped.
I'm not sure what is wrong with the commit message. Could you be more specific? I'm happy to change it but I'm not sure what it should be changed to.
Per the example script, is there some place I should be looking for something similar to pattern against?
I'm not sure what is wrong with the commit message. Could you be more specific? I'm happy to change it but I'm not sure what it should be changed to.
Try re-pushing the branch, we now have a lint step in CI which will point out things that don't match contribute.md.
Per the example script, is there some place I should be looking for something similar to pattern against?
To be clear I'm not requesting such a script to be added to the repo, no need for that. Just make up a few lines that enable me to easily test the change and put them in a comment here.
Again, sorry for leaving this for so long. I meant to get back to this sooner but other things kept getting in the way.
Just make up a few lines that enable me to easily test the change and put them in a comment here.
This changes overlay-add which currently has the args: overlay-add <id> <x> <y> <file> <offset> <fmt> <w> <h> <stride>. So, an example of the current usage with file being raw image data (BGRA 32-bits per pixel with the alpha premultiplied) that is 128x128 pixels displayed at location 32x32
overlay-add 0 32 32 file 0 bgra 128 128 512
I added 2 arguments to this so the above command which are optional. So the above command should operate the same both before and after my commit. An example of using the functionality my commit adds which scales the overlay to double the size of the image is:
overlay-add 0 32 32 file 0 bgra 128 128 512 256 256
If you need me to post an example of such a file, let me know and I can do so. However, the file I would have for the overlay would have different arguments (we use it only displaying at 0x0 and the resolution is 1920x1080 and scaled to 3840x2160 and of course the stride is different)
Thanks, I could verify that it works correctly.
Can you just fix the commit message? I think the "a" is meant to be "add".
Can you just fix the commit message? I think the "a" is meant to be "add".
🤦 Yeah, it was meant to be add. Corrected.
~~Thank you!~~
@sfan5 @gbooker Have you tested this at all? Contrary to the documentation, dw and dh are not optional.
[thumbfast] Command overlay-add: required argument dw not set.
Have you tested this at all?
At all, yes. That the argument is actually optional, no.
edit: fixed in 2193893