mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 04:42:58 -05:00
[misc/player] Introduce output ability to announce supported formats
Also introduce default output format and selected device format, should the user want another format. As part of this, change enum player_format in player.h to enum media_format in misc.h so that it is akin to struct media_quality. Modify json API to support this.
This commit is contained in:
@@ -342,6 +342,7 @@ GET /api/outputs
|
||||
| needs_auth_key | boolean | `true` if output requires an authorization key (device verification) |
|
||||
| volume | integer | Volume in percent (0 - 100) |
|
||||
| format | string | Stream format |
|
||||
| supported_formats | array | Array of formats supported by output |
|
||||
|
||||
**Example**
|
||||
|
||||
@@ -361,7 +362,8 @@ curl -X GET "http://localhost:3689/api/outputs"
|
||||
"requires_auth": false,
|
||||
"needs_auth_key": false,
|
||||
"volume": 0,
|
||||
"format": "alac"
|
||||
"format": "alac",
|
||||
"supported_formats": [ "alac" ]
|
||||
},
|
||||
{
|
||||
"id": "0",
|
||||
@@ -372,7 +374,8 @@ curl -X GET "http://localhost:3689/api/outputs"
|
||||
"requires_auth": false,
|
||||
"needs_auth_key": false,
|
||||
"volume": 19,
|
||||
"format": "pcm"
|
||||
"format": "pcm",
|
||||
"supported_formats": [ "pcm" ]
|
||||
},
|
||||
{
|
||||
"id": "100",
|
||||
@@ -383,7 +386,8 @@ curl -X GET "http://localhost:3689/api/outputs"
|
||||
"requires_auth": false,
|
||||
"needs_auth_key": false,
|
||||
"volume": 0,
|
||||
"format": "pcm"
|
||||
"format": "pcm",
|
||||
"supported_formats": [ "pcm" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -453,6 +457,7 @@ curl -X GET "http://localhost:3689/api/outputs/0"
|
||||
"needs_auth_key": false,
|
||||
"volume": 3
|
||||
"format": "pcm",
|
||||
"supported_formats": [ "pcm" ]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user