diff options
author | Dan Williams <dcbw@redhat.com> | 2017-02-06 20:53:39 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2018-10-16 17:09:21 +0000 |
commit | 627303a748cce7274b05a6861a1dc0c779d9263a (patch) | |
tree | 52acb186721f9c48ccf1c042e620a86a06a7265c /cli/mmcli-call.c | |
parent | 16162a5033593e017775eab640a3b9bf1b805c39 (diff) |
api/libmm-glib/cli: add AudioPort and AudioFormat properties to the Call object
Diffstat (limited to 'cli/mmcli-call.c')
-rw-r--r-- | cli/mmcli-call.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/mmcli-call.c b/cli/mmcli-call.c index 5991d073..09cf0871 100644 --- a/cli/mmcli-call.c +++ b/cli/mmcli-call.c @@ -145,6 +145,12 @@ mmcli_call_shutdown (void) static void print_call_info (MMCall *call) { + const gchar *audio_port; + MMCallAudioFormat *audio_format; + + audio_port = mm_call_get_audio_port (call); + audio_format = mm_call_peek_audio_format (call); + /* Not the best thing to do, as we may be doing _get() calls twice, but * easiest to maintain */ #undef VALIDATE @@ -161,6 +167,23 @@ print_call_info (MMCall *call) if (mm_call_get_state_reason(call) != MM_CALL_STATE_REASON_UNKNOWN) g_print (" | state reason: '%s'\n", mm_call_state_reason_get_string(mm_call_get_state_reason (call))); + + if (audio_port) + g_print (" | audio port: '%s'\n", VALIDATE (audio_port)); + + if (audio_format) { + guint rate = mm_call_audio_format_get_rate (audio_format); + gchar *rate_str = rate ? g_strdup_printf ("%u", rate) : NULL; + + g_print (" -------------------------\n" + " Audio Format | encoding: '%s'\n" + " | resolution: '%s'\n" + " | rate: '%s'\n", + VALIDATE (mm_call_audio_format_get_encoding (audio_format)), + VALIDATE (mm_call_audio_format_get_resolution (audio_format)), + VALIDATE (rate_str)); + g_free (rate_str); + } } static void |