Output API
Version: 1.0.0
Status:
Output interface for Thunder framework.
(Defined with Dolby::IOutput in IDolby.h)
Table of Contents
Introduction
Scope
This document describes purpose and functionality of the Output interface (version 1.0.0). It includes detailed specification about its properties provided and 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
Output JSON-RPC interface.
This interface uses legacy
lowercase
naming convention. With the next major release the naming convention will change tocamelCase
.
Properties
The following properties are provided by the Output interface:
Dolby Output interface properties:
Property | R/W | Description |
---|---|---|
dolbyatmossupported / dolby_atmosmetadata | read-only | Atmos capabilities of Sink |
dolbysoundmode / dolby_soundmode | read-only | Sound Mode - Mono/Stereo/Surround |
dolbyatmosoutput / dolby_enableatmosoutput | write-only | Enable Atmos Audio Output |
dolbymode / dolby_mode | read/write | Dolby Mode |
dolbyatmossupported property
Provides access to the atmos capabilities of Sink.
This property is read-only.
dolby_atmosmetadata
is an alternative name for this property. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | boolean | mandatory | Atmos capabilities of Sink |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.dolbyatmossupported"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": false
}
dolbysoundmode property
Provides access to the sound Mode - Mono/Stereo/Surround.
This property is read-only.
dolby_soundmode
is an alternative name for this property. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | Sound Mode - Mono/Stereo/Surround (must be one of the following: Dolbydigital, Dolbydigitalplus, Mono, Passthru, SoundmodeAuto, Stereo, Surround, Unknown) |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.dolbysoundmode"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "Mono"
}
dolbyatmosoutput property
Provides access to the enable Atmos Audio Output.
This property is write-only.
dolby_enableatmosoutput
is an alternative name for this property. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | boolean | mandatory | Enable/Disable |
Example
Set Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.dolbyatmosoutput",
"params": false
}
Set Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "null"
}
dolbymode property
Provides access to the dolby Mode.
dolby_mode
is an alternative name for this property. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.
Value
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | Dolby mode type (must be one of the following: Auto, DigitalAc3, DigitalPassthrough, DigitalPcm, DigitalPlus, Ms12) |
Name | Type | M/O | Description |
---|---|---|---|
(property) | string | mandatory | Dolby mode type (must be one of the following: Auto, DigitalAc3, DigitalPassthrough, DigitalPcm, DigitalPlus, Ms12) |
Example
Get Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.dolbymode"
}
Get Response
{
"jsonrpc": "2.0",
"id": 42,
"result": "DigitalPlus"
}
Set Request
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.dolbymode",
"params": "DigitalPlus"
}
Set Response
{
"jsonrpc": "2.0",
"id": 42,
"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 Output interface:
Dolby Output interface events:
Notification | Description |
---|---|
soundmodechanged / dolby_audiomodechanged | Signal audio mode change |
soundmodechanged notification
Signal audio mode change.
dolby_audiomodechanged
is an alternative name for this notification. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.
Notification Parameters
Name | Type | M/O | Description |
---|---|---|---|
params | object | mandatory | ... |
params.mode | string | mandatory | Changed Mode (must be one of the following: Dolbydigital, Dolbydigitalplus, Mono, Passthru, SoundmodeAuto, Stereo, Surround, Unknown) |
params.enabled | boolean | mandatory | Enabled/Disabled |
Example
Registration
{
"jsonrpc": "2.0",
"id": 42,
"method": "<callsign>.1.register",
"params": {
"event": "soundmodechanged",
"id": "myid"
}
}
Notification
{
"jsonrpc": "2.0",
"method": "myid.soundmodechanged",
"params": {
"mode": "Mono",
"enabled": false
}
}
The client ID parameter is passed within the notification designator, i.e.
<client-id>.soundmodechanged
.