Your Digital Media Has Never Looked So Good

 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

What's ui_resolutions good for?

Mon Jan 18, 2016 5:33 am

Manifest file has new parameter, where supposedly ui_resolutions=fhd will specify my app wants to run in 1080 resolution. roScreen and ifDeviceInfo pages imply ui_resolutions will affect the screen resolution, however i always seem to get 720 back from roDeviceInfo, regardless if ui_resolutions is set and to what value.

di.GetDisplayMode()  = 720p
di.GetDisplaySize()  = {w:  1280    h:  720}
di.GetSupportedGraphicsResolutions()  =  [{width:  720    name: SD    preferred: false    height:  480    ui: false}, {width:  1280   name: HD    preferred: true     height:  720    ui: true}]
di.GetUIResolution()    {width:  1280   name: HD    height:  720}

Why ui_resolutions seems to have no effect? Why can't i even know that player is configured for 1080p?
Roku3, fw7.0, Settings > DisplayType=1080p. TV says video signal is 1080p/60Hz at all times.
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9232
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: What's ui_resolutions good for?

Mon Jan 18, 2016 10:07 am

ui_resolutions is used to tell SceneGraph which resolutions are supported by the components in your channel (http://sdkdocs.roku.com/display/sdkdoc/ ... Resolution). The device info functions tell you what the device supports, but I suspect they don't take into account SceneGraph, which is the only way to provide UI in 1080p resolution. As I'm sure you're aware, standard SDK screens are just upscaled from 720p, if you have the box set to 1080p, so technically the UI resolution is still 720p.

I'd be curious to know if roDeviceInfo returns different values if running within the SceneGraph context.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: What's ui_resolutions good for?

Mon Jan 18, 2016 1:06 pm

But if ui_resolutions was only for the graphical scenes (xmlGangBang, cf. McGangBang^) - why is it mentioned in roDeviceInfo and roScreen ? The former implies it is taken into account, the latter - that 1080 can be used to draw

Seems there is discrepancy between documentation and implementation?

(^) "when two all beef patties love the same chicken sandwich very much"
 
User avatar
RokuKC
Posts: 274
Joined: Wed Sep 10, 2014 10:44 am
Location: Roku HQ

Re: What's ui_resolutions good for?

Mon Jan 18, 2016 2:57 pm

Given that your call to GetSupportedGraphicsResolutions didn't include an fhd entry, you won't be able to use roScreen with FHD / 1080 resolution.

Do you have a Roku 4 to develop on? I would expect you to be able to use it there.

Using roScreen with FHD is independent of SceneGraph components, as you stated.
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: What's ui_resolutions good for?

Mon Jan 18, 2016 3:02 pm

RokuKC wrote:
Given that your call to GetSupportedGraphicsResolutions didn't include an fhd entry, you won't be able to use roScreen with FHD / 1080 resolution.

Do you have a Roku 4 to develop on? I would expect you to be able to use it there.

Using roScreen with FHD is independent of SceneGraph components, as you stated.

This makes me even more confused!

Provided i have set ui_resolutions=fhd ("fhd" only but "sd,hd,fhd" did not fare better),
  • Why doesn't roDeviceInfo in any way show that i can use 1080?
  • How would i know if i can use roScreen in 1080 or not?
  • Isn't roDeviceInfo that can tell me if Roku is connected to TV in 1080 mode?
  • Is "fhd" a Roku4 exclusive? (No, i don't have Roku4 to test it)
 
User avatar
RokuKC
Posts: 274
Joined: Wed Sep 10, 2014 10:44 am
Location: Roku HQ

Re: What's ui_resolutions good for?

Mon Jan 18, 2016 3:40 pm

EnTerr wrote:
  • Why doesn't roDeviceInfo in any way show that i can use 1080?
  • How would i know if i can use roScreen in 1080 or not?
  • Isn't roDeviceInfo that can tell me if Roku is connected to TV in 1080 mode?
  • Is "fhd" a Roku4 exclusive? (No, i don't have Roku4 to test it)


roDeviceInfo GetSupportedGraphicsResolutions is telling you that only SD and HD resolutions are supported on your Roku 3, and not FHD.

This applies to roScreen, and should indicate both the default and the maximum resolution supported.

Re. TV mode, have you looked at roDeviceInfo.GetVideoMode?

And yes, you can consider FHD exclusive to Roku 4, currently, to my knowledge.

I hope I'm not adding confusion, but I agree that it is a confusing area, and the doc folks have some work to do :wink:
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: What's ui_resolutions good for?

Mon Jan 18, 2016 5:07 pm

RokuKC wrote:
Re. TV mode, have you looked at roDeviceInfo.GetVideoMode?

Yes! "di.GetVideoMode()" gives me "1080p" indeed.

But this is kind of weird, isn't it? As in saying "to get the actual screen resolution, check GetVideoMode() (Do not ask GetDisplayMode(), have no faith in GetDisplaySize() )"

I have to admit my current attempts are beyond the scope of BrS SDK alone, as in i am trying to coax Marmalade into running in 1080 instead of 720 - and it's not cooperating, contrary to what the <censored> documentation says. So i figured maybe if i massage the manifest a little, that will help. And i presumed if ui_resolutions affects something, that will show in roDeviceInfo ...
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9232
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: What's ui_resolutions good for?

Tue Jan 19, 2016 12:57 am

EnTerr wrote:
But this is kind of weird, isn't it? As in saying "to get the actual screen resolution, check GetVideoMode() (Do not ask GetDisplayMode(), have no faith in GetDisplaySize() )"

Presumably, it's because GetDisplayMode() is referring to the graphics plane, while GetVideoMode() is referring to the video plane. If 1080p for graphics rendering is "exclusive" to Roku 4, that would explain why the results differ on your Roku 3 when set to 1080p. With that said, however, on my Roku 4, set to 1080p, GetDisplayMode() still returns 720p. Of course, the documentation still only lists 1280x720 as the max size for roScreen, so I guess 720p would be correct, if 1920x1080 is intentionally left undocumented for some reason (fwiw, I just tested it, and 1920x1080 does indeed work for roScreen on the Roku 4). Perhaps it's undocumented, because they haven't updated the GetDisplayMode() implementation, yet.. :P
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
 
User avatar
RokuKC
Posts: 274
Joined: Wed Sep 10, 2014 10:44 am
Location: Roku HQ

Re: What's ui_resolutions good for?

Tue Jan 19, 2016 10:46 am

TheEndless wrote:
...
With that said, however, on my Roku 4, set to 1080p, GetDisplayMode() still returns 720p.


Does your app manifest specify ui_resolutions with a list including fhd?
E.g. ui_resolutions=hd,fhd ?
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9232
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: What's ui_resolutions good for?

Tue Jan 19, 2016 11:58 am

RokuKC wrote:
TheEndless wrote:
...
With that said, however, on my Roku 4, set to 1080p, GetDisplayMode() still returns 720p.

Does your app manifest specify ui_resolutions with a list including fhd?
E.g. ui_resolutions=hd,fhd ?

Well played, sir... adding ui_resolutions results in a 1080p result on the Roku 4.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: What's ui_resolutions good for?

Tue Jan 19, 2016 3:34 pm

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.
 
bojancv
Posts: 3
Joined: Wed Nov 22, 2017 2:42 am

Re: What's ui_resolutions good for?

Wed Dec 06, 2017 9:12 am

+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 ;) 
 
User avatar
RokuNB
Posts: 306
Joined: Fri Mar 31, 2017 2:22 pm

Re: What's ui_resolutions good for?

Wed Dec 06, 2017 3:08 pm

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
 
tim_beynart
Posts: 181
Joined: Wed Jul 15, 2015 8:30 am

Re: What's ui_resolutions good for?

Thu Dec 07, 2017 10:53 am

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

Who is online

Users browsing this forum: No registered users and 6 guests