Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Table of Contents


The Device Info provides an interface to obtain attributes about the device.

Supported Interfaces

Supported Events

Description

These attributes are not changeable by the script, but may be queried to obtain values for the player. It is common for scripts to need access to the serial number and model info for negotiating with backend services.
This object is created with no parameters:

  • CreateObject("roDeviceInfo")

Example

On a particular system this generates:

 N1000
999.99E99999X
20E825000036

 

Review of Current SDK Functions on roDeviceInfo

FunctionDescription

GetDisplayType()

Returns the text corresponding to the button selection in the Player Info Settings/Display Type page. Either "HDTV", "4:3 standard", or "16:9 anamorphic"

GetDisplayMode()

Returns "720p" or "480i"

Notes: Returns CONF_VideoResolution ("480i", "480p", "720p") The implementation of this function currently returns the configured graphics layer resolution so we should extend it to return 1080p when the UI resolution is 1080p and the "ui_resolutions" manifest entry contains FHD as a supported resolution. Otherwise it should return 720p when the UI is in FHD mode for backwards compatibility.

If "sd" is not in the ui_resolutions manifest entry then this function returns 720p.

GetDisplaySize()

Returns an roAssociativeArray with keys "w" and "h" that contain the values for the screen width and height respectively. Example: { w:1280, h:720 }

Returns Framework::screenSize() which is currently either (720,480) or (1280,720). This should be updated in the same manner as GetDisplayMode().

GetDisplayAspectRatio()

Returns CONF_VideoAspectRatio.

roScreen

If it is created with no parameters, the screen will be single buffered, and its output resolution will match the current display resolution.

Given the additional manifest entry "ui_resolutions" we can honor the documentation for all cases where the current resolution is specified in the ui_resolutions list. If the current resolution is not in the list then the default size should be 720p.

roSlideShow

The roSlideShow API will not change. The original Stunning UI Feature Guide had a requirement that the Roku Media Player support 4K slideshows. The Roku Media Player application uses roSlideShow. Internally the roSlideShow component will use the video layer to display static 4K photos. The Qt/Graphics layer implementation of the roSlideShow will not change.

roStillImageLayer

This is a new component that exposes the ability to display still images on the video layer to the SDK. Initially it will only be made available to the mobile team so that they can use it to implement the "4K Photo Screensaver and Slideshow feature guide" (https://roku.box.com/s/e5qb2mlhandufx3cotfdazsg6is7ih4l). It will also only work on dallas and ftworth. Support for other platforms could be added in the future. If the component is not supported then trying to create one will return invalid.

The API consists of one function call (in addition to the standard Set/Get MessagePort):

ShowImage(url as string) - This will return immediately and asynchronously download/decode the image and display it on the video layer. When the image is displayed or an error occurs an event is sent to the MessagePort registered on the component indicating success or error. If ShowImage() is called before the previous image is shown then the previous image is cancelled and an aborted event is sent for that image.

roImageCanvas

The original feature guide said that "canvas type" components should be updated to support 1080p. This is a canvas type component. However it is implemented using Qt and it is also mostly deprecated by roScreen. I see no reason to update roImageCanvas to support 1080p. It should be fully deprecated.

NDK – R2D2

There are CreateScreen() methods on RoGraphics that take width and height and a default which takes no resolution. GetDisplayMode() can be used to figure out whether a 1080p screen can be created.

The manifest values aren't easily accessible when these APIs are in use so I don't believe we should change the default values depending on the manifest entries. The default should still be 1280x720 when no resolution is provided and the current resolution is > 720p.

NDK - DirectFB

See R2D2. The basics are the same.The default primary surface should be 1280x720 even when the main UI is in 1080p mode.

NDK – OpenGL

eglCreateWindowSurface is used to create a window surface:

EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, NativeWindowType native_window, EGLint const * attrib_list);

There is no platform independent way of requesting a size of the surface through this interface. The NativeWindowType is typically a platform specific type.

All current apps specify 0 for NativeWindow and get the default size.

New SDK Functions on roDeviceInfo

GetSupportedGraphicsResolutions()

Doc: Return the list of supported graphics resolutions as a list of roAssociative arrays. Each array has the following keys:

  • width
  • height
  • name - one of "SD","HD","FHD","UHD", etc.
  • ui - true of this is the current Roku UI resolution.
  • preferred - True if this is the preferred resolution. The idea being that we would document this as the resolution that is optimal for the current platform.

For now ui == preferred. One case in the future where ui may not be equal to preferred is if we release a product that fully supports 4K graphics resolutions but we don't update the Roku UI to 4K (right away or ever).

 

 

 

  • No labels