mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45:31 +00:00
sip: media-pipeline: Allow new pipeline without codec set
This commit is contained in:
parent
29742a5f8d
commit
f3a6c15e6a
1 changed files with 10 additions and 3 deletions
|
@ -784,10 +784,12 @@ calls_sip_media_pipeline_new (MediaCodecInfo *codec)
|
||||||
pipeline = g_initable_new (CALLS_TYPE_SIP_MEDIA_PIPELINE, NULL, &error,
|
pipeline = g_initable_new (CALLS_TYPE_SIP_MEDIA_PIPELINE, NULL, &error,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (pipeline)
|
if (pipeline) {
|
||||||
g_object_set (pipeline, "codec", codec, NULL);
|
if (codec)
|
||||||
else
|
g_object_set (pipeline, "codec", codec, NULL);
|
||||||
|
} else {
|
||||||
g_warning ("Media pipeline could not be initialized: %s", error->message);
|
g_warning ("Media pipeline could not be initialized: %s", error->message);
|
||||||
|
}
|
||||||
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
@ -901,6 +903,11 @@ calls_sip_media_pipeline_start (CallsSipMediaPipeline *self)
|
||||||
GSocket *socket;
|
GSocket *socket;
|
||||||
g_return_if_fail (CALLS_IS_SIP_MEDIA_PIPELINE (self));
|
g_return_if_fail (CALLS_IS_SIP_MEDIA_PIPELINE (self));
|
||||||
|
|
||||||
|
if (!self->codec) {
|
||||||
|
g_warning ("Codec not set for this pipeline. Cannot start");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
g_debug ("Starting media pipeline");
|
g_debug ("Starting media pipeline");
|
||||||
self->is_running = TRUE;
|
self->is_running = TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue