Skip to content

Add a CoreELEC label registry and live DV/HDR info labels - #68

Open
matthane wants to merge 6 commits into
CoreELEC:aml-5.15.196-22.0from
matthane:ce-label-registry
Open

Add a CoreELEC label registry and live DV/HDR info labels#68
matthane wants to merge 6 commits into
CoreELEC:aml-5.15.196-22.0from
matthane:ce-label-registry

Conversation

@matthane

Copy link
Copy Markdown

Description

This adds a small label registry so that CoreELEC info labels can live in CE owned files instead of rows in the Kodi label tables. The existing CoreELEC labels are moved onto it (System.PathExist stays where it is since it is a parameterised boolean rather than a name lookup), and live Dolby Vision and HDR playback metadata is added through it as Player.Process labels.

Motivation and context

The goal here is to lower the maintenance cost of CE labels, not add to it. After this series the shared Kodi files would only carry two small hooks that rarely see upstream changes, and everything else would live in CE owned files that upstream merges don't touch, so future label work wouldn't need to touch the shared tables at all.

Since labels resolve by name, CE would no longer be bounded by the free id slots in Kodi's info label blocks, and the reserved Player.Process block would stop filling up. Upstream can grow its own tables without colliding with CE, and a rebase check script will catch any encroachment on the CE id ranges instead of relying on inspection.

The existing CE labels are moved off the shared tables in this same series, so the conflict area will shrink right away rather than only for new work. I moved System.BatteryLevel back to its upstream id with linuxver served from a CE id instead, which removes a permanent divergence. But, that commit can be dropped and I can easily adjust around it if CE team doesn't want to change that. Anything that comes later, HDR10+ or otherwise, would just be CE files plus a registration call.

How has this been tested?

On a Ugoos AM9 Pro (S905X5-J) running a CoreELEC 22 test build. Dolby Vision and HDR10 mkv, mp4 and m2ts playback with the labels polled over JSON-RPC and displayed by a diagnostic overlay add-on (available here: https://github.com/matthane/script.dvhdr.labels.diagnostic/releases/tag/v2.1.0), label values checked against dovi_tool output, the migrated amlogic labels and the System Info screen verified unchanged, and label timing verified against scene cuts, paused and playing.

What is the effect on users?

Skins and add-ons will be able to show live Dolby Vision and HDR metadata during playback. There should be no visible change otherwise.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change

CE features register label names and info providers from CE owned
files instead of adding rows to the upstream tables. Labels resolve
by name, so CE is no longer bounded by the free id slots in Kodi's
info label blocks. Providers append at the back of the provider list
so upstream answers first.
Restore the battery code to match upstream and serve linuxver from a
CE id instead. One less shared id to conflict when upstream touches
that block.
The existing CE labels move into the CE provider unchanged in name and
value, and their documentation moves to a CE owned dox page.
Header only helper with the metadata struct, the snapshot store, the
pts sequencer, the libdovi backed parsers and the label answers.
Read the RPU from the input packets before the bitstream converter can
strip or rewrite it, and publish each frame's values when the renderer
schedules that frame for display.
The 27 video.dovi and video.hdr labels register through the CE label
registry, with the brightness values as pq and nits pairs whose integer
forms match the label.
@Portisch

Copy link
Copy Markdown
Contributor

For the battery item:
Please complete revert 84b93f4 and then readd the Linux version like you reworked in this PR.

I will than drop the old commit completely afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants