base-call: allow updating audio settings from out of the call object
E.g. if we want the modem-level in-call state management to provide what audio settings are expected in all ongoing calls.
This commit is contained in:
@@ -177,8 +177,8 @@ mm_base_call_incoming_refresh (MMBaseCall *self)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Update audio settings */
|
/* Update audio settings */
|
||||||
|
|
||||||
static void
|
void
|
||||||
update_audio_settings (MMBaseCall *self,
|
mm_base_call_change_audio_settings (MMBaseCall *self,
|
||||||
MMPort *audio_port,
|
MMPort *audio_port,
|
||||||
MMCallAudioFormat *audio_format)
|
MMCallAudioFormat *audio_format)
|
||||||
{
|
{
|
||||||
@@ -249,7 +249,7 @@ start_setup_audio_channel_ready (MMBaseCall *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (audio_port || audio_format) {
|
if (audio_port || audio_format) {
|
||||||
update_audio_settings (self, audio_port, audio_format);
|
mm_base_call_change_audio_settings (self, audio_port, audio_format);
|
||||||
g_clear_object (&audio_port);
|
g_clear_object (&audio_port);
|
||||||
g_clear_object (&audio_format);
|
g_clear_object (&audio_format);
|
||||||
}
|
}
|
||||||
@@ -410,7 +410,7 @@ accept_setup_audio_channel_ready (MMBaseCall *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (audio_port || audio_format) {
|
if (audio_port || audio_format) {
|
||||||
update_audio_settings (self, audio_port, audio_format);
|
mm_base_call_change_audio_settings (self, audio_port, audio_format);
|
||||||
g_clear_object (&audio_port);
|
g_clear_object (&audio_port);
|
||||||
g_clear_object (&audio_format);
|
g_clear_object (&audio_format);
|
||||||
}
|
}
|
||||||
@@ -1001,7 +1001,7 @@ mm_base_call_change_state (MMBaseCall *self,
|
|||||||
}
|
}
|
||||||
if (MM_BASE_CALL_GET_CLASS (self)->cleanup_audio_channel) {
|
if (MM_BASE_CALL_GET_CLASS (self)->cleanup_audio_channel) {
|
||||||
mm_info ("cleaning up audio channel...");
|
mm_info ("cleaning up audio channel...");
|
||||||
update_audio_settings (self, NULL, NULL);
|
mm_base_call_change_audio_settings (self, NULL, NULL);
|
||||||
MM_BASE_CALL_GET_CLASS (self)->cleanup_audio_channel (self,
|
MM_BASE_CALL_GET_CLASS (self)->cleanup_audio_channel (self,
|
||||||
(GAsyncReadyCallback) cleanup_audio_channel_ready,
|
(GAsyncReadyCallback) cleanup_audio_channel_ready,
|
||||||
NULL);
|
NULL);
|
||||||
|
@@ -144,6 +144,10 @@ void mm_base_call_change_state (MMBaseCall *self,
|
|||||||
MMCallState new_state,
|
MMCallState new_state,
|
||||||
MMCallStateReason reason);
|
MMCallStateReason reason);
|
||||||
|
|
||||||
|
void mm_base_call_change_audio_settings (MMBaseCall *self,
|
||||||
|
MMPort *audio_port,
|
||||||
|
MMCallAudioFormat *audio_format);
|
||||||
|
|
||||||
void mm_base_call_received_dtmf (MMBaseCall *self,
|
void mm_base_call_received_dtmf (MMBaseCall *self,
|
||||||
const gchar *dtmf);
|
const gchar *dtmf);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user