Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Roku Guru

Re: What's ui_resolutions good for?

Wat?
It keeps getting quirkier and quirkier. So it is possible a Roku model can-do 1080p roScreen but it will lie to you about the actual display size (both GetDisplayMode() and GetDisplaySize() will) - unless "fhd" was manifested under "ui_resolutions".

I can imagine this is a backwards-compatibility concern. E.g. published app riding bareback
isModeSD = createObject("roDeviceInfo").GetDisplayMode() <> "720p"

But... documentation will have to explain THE HECK out of all these quirks. I am fairly well-versed in Roku SDK and i find it weird. Now imagine a complete novice face-planting in this garden...

Do at least the new functions GetSupportedGraphicsResolutions() and GetUIResolution() return 1080p - regardless of ui_resolutions presence or value, as long as the TV is in 1080? Since they are new and don't have to be be bugwards-compatible.
0 Kudos
bojancv
Visitor

Re: What's ui_resolutions good for?

+1 that all of this is really confusing for beginners.

I got a Roku Model 3800X, firmware 8.01 and really got confused with GetDisplayMode and GetDisplaySize returning "wrong" 720p values even though the Display Mode in the settings is 1080p and ui_resolutions is fhd.

And so the GetVideoMode does return 1080p, but what does this mean for my video streaming application? Should i stream a 1080p or 720p to the Video node in SceneGraph?

P.S. The latest Eclipse plugin doesnt event offer GetVideoMode() via autocomplete :), please update the docs in the plugin 😉 
0 Kudos
RokuNB
Roku Guru

Re: What's ui_resolutions good for?

"bojancv" wrote:
I got a Roku Model 3800X, firmware 8.01 and really got confused with GetDisplayMode and GetDisplaySize returning "wrong" 720p values even though the Display Mode in the settings is 1080p and ui_resolutions is fhd.

And so the GetVideoMode does return 1080p, but what does this mean for my video streaming application? Should i stream a 1080p or 720p to the Video node in SceneGraph?

On hardware level, the display signal output is composited by a graphics plane (where UI lives - widgets, images, grids) and video plane (where media plays) - those two can be in different resolution, depending on the model and settings. Specifically, on all non-4k players (#3800 is non-4k, 3810+ is 4k), the UI plane maxes at HD/720, where the video plane is at FHD/1080 if the display type is set to 1080p. 4k players "max" the UI plane at FHD/1080, even as the video plane is 4k/2160.

To this, GetDisplayMode() and GetDisplaySize() speak about the UI resolution (so you should get 720 on your #3800) and GetVideoMode() talks about video plane resolution.

Simple, right? Not so fast! Enter ui_resolutions manifestation - this is instruction that tells what screen resolution to emulate, what logical resolution to use. The idea is to spare developers the pain to develop the same scene 3 times, for 3 coordinate systems (SD, HD, FHD) - instead if you declare `ui_resolutions=hd`, in RSG app you only have to use 1280x720 coordinates (and HD assets) and it will scale these accordingly to the actual resolution on screen. This autoscaling does not apply to SDK1 (non-scene graph) components, incl. roScreen usde in games
0 Kudos
tim_beynart
Channel Surfer

Re: What's ui_resolutions good for?

I just finished writing an intro course to Roku:
https://github.com/learnroku/crash-course

This page attempts to explain ui_resolutions:
https://github.com/learnroku/crash-cour ... Lesson2.md
0 Kudos