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 /farstream | |
parent | 4e4d73f86c19d2615992445b89b2622fb45ac7e9 (diff) | |
download | farstream-ac98be9a8a48f6f21babd2d5b41df0f5b85a3e42.tar.gz |
Add Application Media type
Diffstat (limited to 'farstream')
-rw-r--r-- | farstream/fs-codec.c | 7 | ||||
-rw-r--r-- | farstream/fs-codec.h | 4 | ||||
-rw-r--r-- | farstream/fs-rtp.c | 8 |
3 files changed, 18 insertions, 1 deletions
diff --git a/farstream/fs-codec.c b/farstream/fs-codec.c index e97b515b..dc2c399a 100644 --- a/farstream/fs-codec.c +++ b/farstream/fs-codec.c @@ -367,6 +367,11 @@ fs_codec_list_from_keyfile (const gchar *filename, GError **error) { media_type = FS_MEDIA_TYPE_VIDEO; } + else if ((next_tok - groups[i]) == 11 /* strlen ("application") */ && + !g_ascii_strncasecmp ("application", groups[i], 11)) + { + media_type = FS_MEDIA_TYPE_APPLICATION; + } else { GST_WARNING ("Invalid media type in codec name name %s", groups[i]); @@ -504,6 +509,8 @@ fs_media_type_to_string (FsMediaType media_type) return "audio"; } else if (media_type == FS_MEDIA_TYPE_VIDEO) { return "video"; + } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { + return "application"; } else { return NULL; } diff --git a/farstream/fs-codec.h b/farstream/fs-codec.h index 0cf448e6..24a361d4 100644 --- a/farstream/fs-codec.h +++ b/farstream/fs-codec.h @@ -46,6 +46,7 @@ typedef struct _FsFeedbackParameter FsFeedbackParameter; * FsMediaType: * @FS_MEDIA_TYPE_AUDIO: A media type that encodes audio. * @FS_MEDIA_TYPE_VIDEO: A media type that encodes video. + * @FS_MEDIA_TYPE_APPLICATION: A media type for application data. * @FS_MEDIA_TYPE_LAST: Largest valid #FsMediaType * * Enum used to signify the media type of a codec or stream. @@ -53,7 +54,8 @@ typedef struct _FsFeedbackParameter FsFeedbackParameter; typedef enum { FS_MEDIA_TYPE_AUDIO, FS_MEDIA_TYPE_VIDEO, - FS_MEDIA_TYPE_LAST = FS_MEDIA_TYPE_VIDEO + FS_MEDIA_TYPE_APPLICATION, + FS_MEDIA_TYPE_LAST = FS_MEDIA_TYPE_APPLICATION } FsMediaType; /** diff --git a/farstream/fs-rtp.c b/farstream/fs-rtp.c index c7311bcd..45622423 100644 --- a/farstream/fs-rtp.c +++ b/farstream/fs-rtp.c @@ -174,6 +174,7 @@ fs_rtp_header_extension_list_destroy (GList *extensions) #define RTP_HDREXT_PREFIX "rtp-hdrext:" #define RTP_HDREXT_AUDIO_PREFIX "audio:" #define RTP_HDREXT_VIDEO_PREFIX "video:" +#define RTP_HDREXT_APPLICATION_PREFIX "application:" /** * fs_rtp_header_extension_list_from_keyfile: @@ -264,6 +265,13 @@ fs_rtp_header_extension_list_from_keyfile (const gchar *filename, if (media_type != FS_MEDIA_TYPE_VIDEO) continue; } + else if (!g_ascii_strncasecmp (RTP_HDREXT_APPLICATION_PREFIX, + groups[i] + strlen (RTP_HDREXT_PREFIX), + strlen (RTP_HDREXT_APPLICATION_PREFIX))) + { + if (media_type != FS_MEDIA_TYPE_APPLICATION) + continue; + } else { continue; |