diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2011-07-19 03:42:28 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2011-07-19 03:42:28 +0000 |
commit | cd283c8825c9a94400f27735acb1c9385e90ffc8 (patch) | |
tree | 56d5722310fa8957ce5d1ba7cbd137cf8802dcc7 /pjmedia/include/pjmedia/stream.h | |
parent | ed8f8d08abba9040f769e922aa0c1adbde86fbbc (diff) |
Re #1326: Initial code integration from branch 2.0-dev to trunk as "2.0-pre-alpha-svn".
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3664 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia/stream.h')
-rw-r--r-- | pjmedia/include/pjmedia/stream.h | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia/stream.h b/pjmedia/include/pjmedia/stream.h index 9e1976e9..aa8fa0bd 100644 --- a/pjmedia/include/pjmedia/stream.h +++ b/pjmedia/include/pjmedia/stream.h @@ -32,6 +32,7 @@ #include <pjmedia/port.h> #include <pjmedia/rtcp.h> #include <pjmedia/transport.h> +#include <pjmedia/vid_codec.h> #include <pj/sock.h> PJ_BEGIN_DECL @@ -87,7 +88,7 @@ typedef struct pjmedia_channel pjmedia_channel; * corresponds to one "m=" line in SDP session descriptor, and it has * its own RTP/RTCP socket pair. */ -struct pjmedia_stream_info +typedef struct pjmedia_stream_info { pjmedia_type type; /**< Media type (audio, video) */ pjmedia_tp_proto proto; /**< Transport protocol (RTP/AVP, etc.) */ @@ -133,14 +134,32 @@ struct pjmedia_stream_info (see #PJMEDIA_STREAM_ENABLE_KA) is enabled? */ #endif -}; +} pjmedia_stream_info; /** - * @see pjmedia_stream_info. + * This function will initialize the stream info based on information + * in both SDP session descriptors for the specified stream index. + * The remaining information will be taken from default codec parameters. + * If socket info array is specified, the socket will be copied to the + * session info as well. + * + * @param si Stream info structure to be initialized. + * @param pool Pool to allocate memory. + * @param endpt PJMEDIA endpoint instance. + * @param local Local SDP session descriptor. + * @param remote Remote SDP session descriptor. + * @param stream_idx Media stream index in the session descriptor. + * + * @return PJ_SUCCESS if stream info is successfully initialized. */ -typedef struct pjmedia_stream_info pjmedia_stream_info; - +PJ_DECL(pj_status_t) +pjmedia_stream_info_from_sdp( pjmedia_stream_info *si, + pj_pool_t *pool, + pjmedia_endpt *endpt, + const pjmedia_sdp_session *local, + const pjmedia_sdp_session *remote, + unsigned stream_idx); /** @@ -231,6 +250,17 @@ PJ_DECL(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream); /** + * Get the stream info. + * + * @param stream The media stream. + * @param info Stream info. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_stream_get_info( const pjmedia_stream *stream, + pjmedia_stream_info *info); + +/** * Get the stream statistics. See also * #pjmedia_stream_get_stat_jbuf() * @@ -371,6 +401,7 @@ pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream, int digit), void *user_data); + /** * @} */ |