pactl: add format flag for JSON output

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/497>
This commit is contained in:
acheronfail 2021-06-06 18:25:08 +10:00 committed by PulseAudio Marge Bot
parent 1b96b49f65
commit 19adddee31
4 changed files with 1050 additions and 225 deletions

View file

@ -650,6 +650,16 @@ static pa_json_context_type_t json_encoder_context_pop(pa_json_encoder *encoder)
return type;
}
bool pa_json_encoder_is_empty(pa_json_encoder *encoder) {
pa_json_context_type_t type;
pa_assert(encoder);
pa_assert(encoder->context);
type = encoder->context->type;
return type == PA_JSON_CONTEXT_EMPTY;
}
pa_json_encoder *pa_json_encoder_new(void) {
pa_json_encoder *encoder;