diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2014-05-06 16:20:36 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2014-09-18 13:38:00 -0400 |
commit | ac98be9a8a48f6f21babd2d5b41df0f5b85a3e42 (patch) | |
tree | 5588066df6f12cf03593eb99c1372a3af39c6e6a /gst | |
parent | 4e4d73f86c19d2615992445b89b2622fb45ac7e9 (diff) | |
download | farstream-ac98be9a8a48f6f21babd2d5b41df0f5b85a3e42.tar.gz |
Add Application Media type
Diffstat (limited to 'gst')
-rw-r--r-- | gst/fsrawconference/fs-raw-session.c | 2 | ||||
-rw-r--r-- | gst/fsrtpconference/fs-rtp-codec-cache.c | 10 | ||||
-rw-r--r-- | gst/fsrtpconference/fs-rtp-discover-codecs.c | 11 | ||||
-rw-r--r-- | gst/fsrtpconference/fs-rtp-session.c | 2 |
4 files changed, 24 insertions, 1 deletions
diff --git a/gst/fsrawconference/fs-raw-session.c b/gst/fsrawconference/fs-raw-session.c index 63df4b03..898a2147 100644 --- a/gst/fsrawconference/fs-raw-session.c +++ b/gst/fsrawconference/fs-raw-session.c @@ -772,6 +772,8 @@ _create_transform_bin (FsRawSession *self, GError **error) else if (mtype == FS_MEDIA_TYPE_VIDEO) return gst_parse_bin_from_description_full ("videoconvert ! videoscale", TRUE, NULL, GST_PARSE_FLAG_NONE, error); + else if (mtype == FS_MEDIA_TYPE_APPLICATION) + return gst_element_factory_make ("identify", NULL); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "No transform bin for this media type"); diff --git a/gst/fsrtpconference/fs-rtp-codec-cache.c b/gst/fsrtpconference/fs-rtp-codec-cache.c index 30faf5a0..62aa2c0f 100644 --- a/gst/fsrtpconference/fs-rtp-codec-cache.c +++ b/gst/fsrtpconference/fs-rtp-codec-cache.c @@ -111,6 +111,12 @@ get_codecs_cache_path (FsMediaType media_type) { cache_path = g_build_filename (g_get_user_cache_dir (), "farstream", "codecs.video." HOST_CPU ".cache", NULL); } + } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { + cache_path = g_strdup (g_getenv ("FS_APPLICATION_CODECS_CACHE")); + if (cache_path == NULL) { + cache_path = g_build_filename (g_get_user_cache_dir (), "farstream", + "codecs.application." HOST_CPU ".cache", NULL); + } } else { GST_ERROR ("Unknown media type %d for cache loading", media_type); return NULL; @@ -293,6 +299,8 @@ load_codecs_cache (FsMediaType media_type) magic_media = 'A'; } else if (media_type == FS_MEDIA_TYPE_VIDEO) { magic_media = 'V'; + } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { + magic_media = 'P'; } else { GST_ERROR ("Invalid media type %d", media_type); return NULL; @@ -543,6 +551,8 @@ save_codecs_cache (FsMediaType media_type, GList *blueprints) magic[2] = 'A'; } else if (media_type == FS_MEDIA_TYPE_VIDEO) { magic[2] = 'V'; + } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { + magic[2] = 'P'; } /* version of the binary format */ diff --git a/gst/fsrtpconference/fs-rtp-discover-codecs.c b/gst/fsrtpconference/fs-rtp-discover-codecs.c index 88d5f2d9..ee755335 100644 --- a/gst/fsrtpconference/fs-rtp-discover-codecs.c +++ b/gst/fsrtpconference/fs-rtp-discover-codecs.c @@ -262,6 +262,11 @@ fs_rtp_blueprints_get (FsMediaType media_type, GError **error) caps = gst_caps_new_simple ("application/x-rtp", "media", G_TYPE_STRING, "video", NULL); } + else if (media_type == FS_MEDIA_TYPE_APPLICATION) + { + caps = gst_caps_new_simple ("application/x-rtp", + "media", G_TYPE_STRING, "application", NULL); + } else { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, @@ -605,7 +610,7 @@ parse_codec_cap_list (GList *list, FsMediaType media_type) GST_DEBUG ("skipping codec %s/%s, no encoding name specified" " (pt: %d clock_rate:%u", - media_type == FS_MEDIA_TYPE_AUDIO ? "audio" : "video", + fs_media_type_to_string (media_type), encoding_name ? encoding_name : "unknown", codec->id, codec->clock_rate); @@ -1409,6 +1414,10 @@ extract_field_data (GQuark field_id, { codec->media_type = FS_MEDIA_TYPE_VIDEO; } + else if (strcmp (tmp, "application") == 0) + { + codec->media_type = FS_MEDIA_TYPE_APPLICATION; + } } else if (0 == strcmp (field_name, "payload")) diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c index e092108c..6b529352 100644 --- a/gst/fsrtpconference/fs-rtp-session.c +++ b/gst/fsrtpconference/fs-rtp-session.c @@ -1107,6 +1107,8 @@ fs_rtp_session_constructed (GObject *object) self->priv->input_caps = gst_caps_new_empty_simple ("audio/x-raw"); else if (self->priv->media_type == FS_MEDIA_TYPE_VIDEO) self->priv->input_caps = gst_caps_new_empty_simple ("video/x-raw"); + else if (self->priv->media_type == FS_MEDIA_TYPE_APPLICATION) + self->priv->input_caps = gst_caps_new_any (); else g_assert_not_reached (); |