PlayerInfo

Published: September 23, 2020
Edited: November 20, 2020

Player Info Plugin

Version: 1.0

Status:

PlayerInfo plugin for Thunder framework.

Table of Contents

Introduction

Scope

This document describes purpose and functionality of the PlayerInfo plugin. It includes detailed specification about its configuration, methods and properties provided, as well as notifications sent.

Case Sensitivity

All identifiers of 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 PlayerInfo plugin helps to get system supported Audio Video codecs.

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: PlayerInfo)
classname string Class name: PlayerInfo
locator string Library name: libWPEPlayerInfo.so
autostart boolean Determines if the plugin shall be started automatically along with the framework

Methods

The following methods are provided by the PlayerInfo plugin:

PlayerProperties interface methods:

Method Description
audiocodecs
videocodecs

audiocodecs method

Parameters

This method takes no parameters.

Result

Name Type Description
result array
result[#] string (must be one of the following: AudioUndefined, AudioAac, AudioAc3, AudioAc3Plus, AudioDts, AudioMpeg1, AudioMpeg2, AudioMpeg3, AudioMpeg4, AudioOpus, AudioVorbisOgg, AudioWav)

Example

Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.audiocodecs"
}

Response

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

videocodecs method

Parameters

This method takes no parameters.

Result

Name Type Description
result array
result[#] string (must be one of the following: VideoUndefined, VideoH263, VideoH264, VideoH265, VideoH26510, VideoMpeg, VideoVp8, VideoVp9, VideoVp10)

Example

Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.videocodecs"
}

Response

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

Properties

The following properties are provided by the PlayerInfo plugin:

PlayerProperties interface properties:

Property Description
resolution RO Current Video playback resolution
isaudioequivalenceenabled RO Checks Loudness Equivalence in platform

Dolby Output interface properties:

Property Description
dolby atmosmetadata RO Atmos capabilities of Sink
dolby soundmode RO Sound Mode - Mono/Stereo/Surround
dolby enableatmosoutput WO Enable Atmos Audio Output
dolby mode Dolby Mode

resolution property

Provides access to the current Video playback resolution.

This property is read-only.

Value

Name Type Description
(property) string Current Video playback resolution (must be one of the following: ResolutionUnknown, Resolution480I, Resolution480P, Resolution576I, Resolution576P, Resolution720P, Resolution1080I, Resolution1080P, Resolution2160P30, Resolution2160P60)

Example

Get Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.resolution"
}

Get Response

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

isaudioequivalenceenabled property

Provides access to the checks Loudness Equivalence in platform.

This property is read-only.

Value

Name Type Description
(property) boolean Checks Loudness Equivalence in platform

Example

Get Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.isaudioequivalenceenabled"
}

Get Response

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

dolby_atmosmetadata property

Provides access to the atmos capabilities of Sink.

This property is read-only.

Value

Name Type Description
(property) boolean Atmos capabilities of Sink

Example

Get Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.dolby_atmosmetadata"
}

Get Response

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

dolby_soundmode property

Provides access to the sound Mode - Mono/Stereo/Surround.

This property is read-only.

Value

Name Type Description
(property) string Sound Mode - Mono/Stereo/Surround (must be one of the following: Unknown, Mono, Stereo, Surround, Passthru)

Example

Get Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.dolby_soundmode"
}

Get Response

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

dolby_enableatmosoutput property

Provides access to the enable Atmos Audio Output.

This property is write-only.

Value

Name Type Description
(property) boolean Enable Atmos Audio Output

Example

Set Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.dolby_enableatmosoutput",
    "params": false
}

Set Response

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

dolby_mode property

Provides access to the dolby Mode.

Value

Name Type Description
(property) string Dolby Mode (must be one of the following: DigitalPcm, DigitalPlus, DigitalAc3, Auto, Ms12)

Example

Get Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.dolby_mode"
}

Get Response

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

Set Request

{
    "jsonrpc": "2.0",
    "id": 1234567890,
    "method": "PlayerInfo.1.dolby_mode",
    "params": "DigitalPcm"
}

Set Response

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

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 PlayerInfo plugin:

Dolby Output interface events:

Event Description
dolby audiomodechanged

dolby_audiomodechanged event

Parameters

Name Type Description
params object
params.mode string (must be one of the following: Unknown, Mono, Stereo, Surround, Passthru)
params.enabled boolean

Example

{
    "jsonrpc": "2.0",
    "method": "client.events.1.dolby_audiomodechanged",
    "params": {
        "mode": "Unknown",
        "enabled": false
    }
}
PHP Code Snippets Powered By : XYZScripts.com