Incorrect video mode info shown when viewing HDMI IN live (T4)

Issue #410 resolved
prl created an issue

When viewing HDMI IN live on a T4, the video mode information in the bottom right or the infobar shows the information for the last broadcast channel viewed (and is empty if the UI starts with HDMI IN as the startup channel).

The problem is in two parts:

  • The only iPlayableService events issued in live TV by the HDMI IN service are evStart and evStop, and ServiceInfo does not register an interest in either for VideoInfo (evStart would be appropriate), so the video info is never updated by HDMI IN in the current code.

  • ServiceInfo VideoInfo gets its data from files in /proc/stb/vmpeg/0/. These files remain with the data from the last live broadcast service viewed when the live TV is switched to HDMI IN. So even if ServiceInfo is getting appropriate event notifications, it will still show incorrect video info for HDMI IN.

There is currently no API to interrogate the video info for HDMI IN.

Two solutions were proposed in the Beyonwiz forum:

  • That the video information should be blank for HDMI IN; or

  • That the video information for HDMI IN should be the output mode of the HDMI IN decoder (which is set to the current T4 video output settings).

Both solutions need a fix to the eServiceHDMI::getInfoString(iServiceInformation.sServiceref) part of bug #430 so that ServiceInfo can determine that the current service is HDMI IN.

There doesn't appear to be complete output video mode information in the files in /proc/stb/video, in particular, there is no comprehensive access to the frame rate.

The frame rate for video modes can mostly be extracted by inverting the Components.AVSwitch.AVSwitch.rates table, but there are some inconsistencies in that data in rates["PC"].

    "1280x720": {60: "1280x720"},
    "1280x720 multi": {50: "1280x720_50", 60: "1280x720"},
    "1920x1080": {60: "1920x1080"},
    "1920x1080 multi": {50: "1920x1080", 60: "1920x1080_50"},  # This looks wrong
    "1280x1024": {60: "1280x1024"},
    "1366x768": {60: "1366x768"},
    "1366x768 multi": {50: "1366x768", 60: "1366x768_50"},  # This looks wrong

The entries

1920x1080 multi": {50: "1920x1080", 60: "1920x1080_50"}

and

"1366x768 multi": {50: "1366x768", 60: "1366x768_50"}

appear inconsistent and look as though they should be

1920x1080 multi": {50: "1920x1080_50", 60: "1920x1080"}

and

"1366x768 multi": {50: "1366x768_50", 60: "1366x768"}

respectively for consistency between the frame rate embedded in the name and the numerical rate that indexes them, and for consistency with the entries in

"1280x720 multi": {50: "1280x720_50", 60: "1280x720"}

Because the Beyonwiz T4 doesn't support currently the "PC" video modes, this can be handled by removing duplicate entries in the mapping between video mode string and frame rate when AVSwitch.rates is inverted (e.g. it would notionally have entries for both "1366x768": 60 and "1366x768": 60).

These could be displayed with video rate "?", but that should never appear on a Beyonwiz T4. On other devices, "?" would appear for those video resolutions, but would be automatically corrected if the inconsistencies were removed.

Replication instructions

On a Beyonwiz T4, connect a HDMI video source to HDMI IN. Select a service with a different video resolution from both the HDMI input resolution and the T4 video output resolution.

Then, using the channel list, select HDMI IN as the input service.

The video resolution displayed in the infobar remains at that of the last broadcast service viewed.

Leaving the selected live service as HDMI IN, reboot the T4. When it restarts, leave the live TV service as HDMI IN, and examine the infobar. The video resolution will be blank.

Comments (5)

  1. Peter Urbanec

    Fix bug #410: Incorrect video mode info shown when viewing HDMI IN live (T4)

    In [ServiceInfo] check whether the current service is HDMI IN and return an empty string for VideoInfo if it is.

    Also added idServiceHDMIIn serviceref type to eServiceReference (lib/service/iservice.h).

    → <<cset 1eb2f31ff148>>

  2. Peter Urbanec

    Fix bug #410: Incorrect video mode info shown when viewing HDMI IN live (T4) - second try

    In [ServiceInfo] check whether the current service is HDMI IN and return an empty string for VideoInfo if it is.

    Return appropriate values for ServiceInfo data in other cases where the current serviice is HDMI IN.

    Also added idServiceHDMIIn serviceref type to eServiceReference (lib/service/iservice.h).

    Restore code in eServiceHDMI::getInfoString(int w) to return the serviceref string that was introduced in commit bd0e4d0 and removed when commit 7173655 reversed commit 1eb2f31.

    Replaced some if statements with if expressions.

    → <<cset 527ed8dfb47e>>

  3. Log in to comment