[farsight2/master] Create bin from profile instead of blueprint if available
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:25:39 PST 2008
---
gst/fsrtpconference/fs-rtp-session.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index e3d7223..185250c 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -2337,12 +2337,39 @@ _create_codec_bin (const CodecAssociation *ca, const FsCodec *codec,
GstElement *current_element = NULL;
GstElement *previous_element = NULL;
gchar *direction_str = (is_send == TRUE) ? "send" : "receive";
+ gchar *profile = NULL;
+
+ if (is_send)
+ profile = ca->send_profile;
+ else
+ profile = ca->recv_profile;
if (is_send)
pipeline_factory = ca->blueprint->send_pipeline_factory;
else
pipeline_factory = ca->blueprint->receive_pipeline_factory;
+ if (profile)
+ {
+ GError *tmperror = NULL;
+
+ codec_bin = gst_parse_bin_from_description (profile, TRUE, &tmperror);
+
+ if (codec_bin)
+ {
+ GST_DEBUG ("creating %s codec bin for id %d, profile: %s",
+ direction_str, codec->id, profile);
+ gst_element_set_name (codec_bin, name);
+ return codec_bin;
+ }
+
+ if (!pipeline_factory)
+ {
+ g_propagate_error (error, tmperror);
+ return NULL;
+ }
+ }
+
if (!pipeline_factory)
{
g_set_error (error, FS_ERROR, FS_ERROR_UNKNOWN_CODEC,
--
1.5.6.5
More information about the farsight-commits
mailing list