mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 04:15:32 +00:00
sip: media-pipeline: Check codec availability before setup
This commit is contained in:
parent
02e271b04a
commit
29742a5f8d
1 changed files with 6 additions and 2 deletions
|
@ -279,7 +279,6 @@ send_pipeline_setup_codecs (CallsSipMediaPipeline *self,
|
|||
g_assert (CALLS_IS_SIP_MEDIA_PIPELINE (self));
|
||||
g_assert (codec);
|
||||
|
||||
/* TODO check if codec is available */
|
||||
MAKE_ELEMENT (encoder, codec->gst_encoder_name, "encoder");
|
||||
MAKE_ELEMENT (payloader, codec->gst_payloader_name, "payloader");
|
||||
|
||||
|
@ -458,7 +457,6 @@ recv_pipeline_setup_codecs (CallsSipMediaPipeline *self,
|
|||
g_assert (CALLS_IS_SIP_MEDIA_PIPELINE (self));
|
||||
g_assert (codec);
|
||||
|
||||
/* TODO check if codec is available */
|
||||
MAKE_ELEMENT (decoder, codec->gst_decoder_name, "decoder");
|
||||
MAKE_ELEMENT (depayloader, codec->gst_depayloader_name, "depayloader");
|
||||
|
||||
|
@ -812,6 +810,12 @@ calls_sip_media_pipeline_set_codec (CallsSipMediaPipeline *self,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!media_codec_available_in_gst (codec)) {
|
||||
g_warning ("Cannot setup pipeline with codec '%s' because it's not available in GStreamer",
|
||||
codec->name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!recv_pipeline_setup_codecs (self, codec, &error)) {
|
||||
g_warning ("Error trying to setup codec for receive pipeline: %s",
|
||||
error->message);
|
||||
|
|
Loading…
Reference in a new issue