summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-10-25 22:31:33 +0000
committerJoshua Colp <jcolp@digium.com>2017-10-30 17:10:03 -0500
commit4c535f5c30f7271f89d236f98fdfba101d73ff34 (patch)
tree6d867aa49526eadf221b08bb4d1542b4c22a1f4e /include
parentbe5b7b2076a577c2a994e752b152c5242fb29ce7 (diff)
core / pjsip: Add support for grouping streams together.
In WebRTC streams (or media tracks in their world) can be grouped together using the mslabel. This informs the browser that each should be synchronized with each other. This change extends the stream API so this information can be stored with streams. The PJSIP support has been extended to use the mslabel to determine grouped streams and store this association on the streams. Finally when creating the SDP the group information is used to cause each media stream to use the same mslabel. ASTERISK-27379 Change-Id: Id6299aa031efe46254edbdc7973c534d54d641ad
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_pjsip_session.h2
-rw-r--r--include/asterisk/stream.h21
2 files changed, 23 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index b7a22b937..a0fc9650e 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -111,6 +111,8 @@ struct ast_sip_session_media {
char label[AST_UUID_STR_LEN];
/*! \brief The underlying session has been changed in some fashion */
unsigned int changed;
+ /*! \brief Remote media stream label */
+ char *remote_mslabel;
};
/*!
diff --git a/include/asterisk/stream.h b/include/asterisk/stream.h
index 2c1053a7b..c2d5a8877 100644
--- a/include/asterisk/stream.h
+++ b/include/asterisk/stream.h
@@ -476,4 +476,25 @@ struct ast_stream *ast_stream_topology_get_first_stream_by_type(
void ast_stream_topology_map(const struct ast_stream_topology *topology,
struct ast_vector_int *types, struct ast_vector_int *v0, struct ast_vector_int *v1);
+/*!
+ * \brief Get the stream group that a stream is part of
+ *
+ * \param stream The stream
+ *
+ * \return the numerical stream group (-1 if not in a group)
+ *
+ * \since 15.2.0
+ */
+int ast_stream_get_group(const struct ast_stream *stream);
+
+/*!
+ * \brief Set the stream group for a stream
+ *
+ * \param stream The stream
+ * \param group The group the stream is part of
+ *
+ * \since 15.2.0
+ */
+void ast_stream_set_group(struct ast_stream *stream, int group);
+
#endif /* _AST_STREAM_H */