Skip to content

Latest commit

 

History

History
173 lines (125 loc) · 5.65 KB

DisplayInfoPlugin.md

File metadata and controls

173 lines (125 loc) · 5.65 KB

Display Info Plugin

Version: 1.0

Status: ⚫⚫⚫

DisplayInfo plugin for Thunder framework.

Table of Contents

Introduction

Scope

This document describes purpose and functionality of the DisplayInfo plugin. It includes detailed specification of its configuration, properties provided and notifications sent.

Case Sensitivity

All identifiers on the interface described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.

Acronyms, Abbreviations and Terms

The table below provides and overview of acronyms used in this document and their definitions.

Acronym Description
API Application Programming Interface
HTTP Hypertext Transfer Protocol
JSON JavaScript Object Notation; a data interchange format
JSON-RPC A remote procedure call protocol encoded in JSON

The table below provides and overview of terms and abbreviations used in this document and their definitions.

Term Description
callsign The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique.

References

Ref ID Description
HTTP HTTP specification
JSON-RPC JSON-RPC 2.0 specification
JSON JSON specification
Thunder Thunder API Reference

Description

The DisplayInfo plugin allows retrieving of various display-related information.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].

Configuration

The table below lists configuration options of the plugin.

Name Type Description
callsign string Plugin instance name (default: DisplayInfo)
classname string Class name: DisplayInfo
locator string Library name: libWPEFrameworkDisplayInfo.so
autostart boolean Determines if the plugin is to be started automatically along with the framework

Properties

The following properties are provided by the DisplayInfo plugin:

DisplayInfo interface properties:

Property Description
displayinfo RO Display general information

displayinfo property

Provides access to the display general information.

This property is read-only.

Value

Name Type Description
(property) object Display general information
(property).totalgpuram number Total GPU DRAM memory (in bytes)
(property).freegpuram number Free GPU DRAM memory (in bytes)
(property).audiopassthrough boolean Audio Pass through is support for this device
(property).connected boolean HDMI display connection status
(property).width number Width of the connected HDMI display
(property).height number Height of the connected HDMI display
(property).hdcpprotection string HDCP Protection (must be one of the following: Unencrypted, HDCP1x, HDCP2x)
(property).hdrtype string HDR Type used (must be one of the following: HDROff, HDR10, HDR10Plus, HDRDolbyVision, HDRTechnicolor)

Example

Get Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "DisplayInfo.1.displayinfo"
}

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": {
        "totalgpuram": 381681664,
        "freegpuram": 358612992,
        "audiopassthrough": false,
        "connected": true,
        "width": 1280,
        "height": 720,
        "hdcpprotection": "HDCP1x",
        "hdrtype": "HDROff"
    }
}

Notifications

Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers.Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the DisplayInfo plugin:

DisplayInfo interface events:

Event Description
updated Notifies about a change/update in the connection

updated event

Notifies about a change/update in the connection.

Description

Register to this event to be notified about any change in the connection

Parameters

This event carries no parameters.

Example

{
    "jsonrpc": "2.0",
    "method": "client.events.1.updated"
}