Skip to content

Latest commit

 

History

History
619 lines (470 loc) · 13.4 KB

DisplayInfoPlugin.md

File metadata and controls

619 lines (470 loc) · 13.4 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, methods and properties provided, as well as notifications sent.

Case Sensitivity

All identifiers on the interfaces 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

Methods

The following methods are provided by the DisplayInfo plugin:

ConnectionProperties interface methods:

Method Description
edid TV's Extended Display Identification Data

edid method

TV's Extended Display Identification Data.

Parameters

Name Type Description
params object
params.length integer

Result

Name Type Description
result object
result.length integer
result.data string

Example

Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "DisplayInfo.1.edid",
    "params": {
        "length": 0
    }
}

Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": {
        "length": 0,
        "data": ""
    }
}

Properties

The following properties are provided by the DisplayInfo plugin:

GraphicsProperties interface properties:

Property Description
totalgpuram RO Total GPU DRAM memory (in bytes)
freegpuram RO Free GPU DRAM memory (in bytes)
ConnectionProperties interface properties:
Property Description
isaudiopassthrough RO Current audio passthrough status on HDMI
connected RO Current HDMI connection status
width RO Horizontal resolution of TV
height RO Vertical resolution of TV
verticalfreq RO Vertical Frequency
hdcpprotection HDCP protocol used for transmission
portname RO Video output port on the STB used for connection to TV
HDRProperties interface properties:
Property Description
tvcapabilities RO HDR formats supported by TV
stbcapabilities RO HDR formats supported by STB
hdrsetting RO HDR format in use

totalgpuram property

Provides access to the total GPU DRAM memory (in bytes).

This property is read-only.

Value

Name Type Description
(property) integer Total GPU DRAM memory (in bytes)

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": 0
}

freegpuram property

Provides access to the free GPU DRAM memory (in bytes).

This property is read-only.

Value

Name Type Description
(property) integer Free GPU DRAM memory (in bytes)

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": 0
}

isaudiopassthrough property

Provides access to the current audio passthrough status on HDMI.

This property is read-only.

Value

Name Type Description
(property) boolean Current audio passthrough status on HDMI

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": false
}

connected property

Provides access to the current HDMI connection status.

This property is read-only.

Value

Name Type Description
(property) boolean Current HDMI connection status

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": false
}

width property

Provides access to the horizontal resolution of TV.

This property is read-only.

Value

Name Type Description
(property) integer Horizontal resolution of TV

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": 1280
}

height property

Provides access to the vertical resolution of TV.

This property is read-only.

Value

Name Type Description
(property) integer Vertical resolution of TV

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": 720
}

verticalfreq property

Provides access to the vertical Frequency.

This property is read-only.

Value

Name Type Description
(property) integer Vertical Frequency

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": 0
}

hdcpprotection property

Provides access to the HDCP protocol used for transmission.

Value

Name Type Description
(property) string HDCP protocol used for transmission (must be one of the following: HdcpUnencrypted, Hdcp1X, Hdcp2X)

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": "HdcpUnencrypted"
}

Set Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "DisplayInfo.1.hdcpprotection",
    "params": "HdcpUnencrypted"
}

Set Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": "null"
}

portname property

Provides access to the video output port on the STB used for connection to TV.

This property is read-only.

Value

Name Type Description
(property) string Video output port on the STB used for connection to TV

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": ""
}

tvcapabilities property

Provides access to the HDR formats supported by TV.

This property is read-only.

Value

Name Type Description
(property) array HDR formats supported by TV
(property)[#] string (must be one of the following: HdrOff, Hdr10, Hdr10Plus, HdrHlg, HdrDolbyvision, HdrTechnicolor)

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": [
        "HdrOff"
    ]
}

stbcapabilities property

Provides access to the HDR formats supported by STB.

This property is read-only.

Value

Name Type Description
(property) array HDR formats supported by STB
(property)[#] string (must be one of the following: HdrOff, Hdr10, Hdr10Plus, HdrHlg, HdrDolbyvision, HdrTechnicolor)

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": [
        "HdrOff"
    ]
}

hdrsetting property

Provides access to the HDR format in use.

This property is read-only.

Value

Name Type Description
(property) string HDR format in use (must be one of the following: HdrOff, Hdr10, Hdr10Plus, HdrHlg, HdrDolbyvision, HdrTechnicolor)

Example

Get Request

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

Get Response

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "result": "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:

ConnectionProperties interface events:

Event Description
updated

updated event

Parameters

Name Type Description
params object
params.event string (must be one of the following: PreResolutionChange, PostResolutionChange, HdmiChange, HdcpChange)

Example

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