summaryrefslogtreecommitdiff
path: root/src/core.h
diff options
context:
space:
mode:
authorLorenzo Mangani <lorenzo.mangani@gmail.com>2014-05-18 15:58:03 +0200
committerLorenzo Mangani <lorenzo.mangani@gmail.com>2014-05-18 15:58:03 +0200
commita047649785498f35e467b9d964b3f4b8a77b4b6f (patch)
tree3acaf4c5737431d539292f7d1a0c127d836d7d56 /src/core.h
parent009257e5139c1bc03f82883f9f6bf5f628923bbb (diff)
parentdd2e332a65af6dce2e540f27fdb2b815f4358574 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/core.h')
-rw-r--r--src/core.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/core.h b/src/core.h
index cf0a4b4..cdfaa8d 100644
--- a/src/core.h
+++ b/src/core.h
@@ -292,7 +292,6 @@ const struct sdp_format *sdp_media_format_cycle(struct sdp_media *m);
* Stream
*/
-struct stream;
struct rtp_header;
enum {STREAM_PRESZ = 4+12}; /* same as RTP_HEADER_SIZE */
@@ -301,6 +300,34 @@ typedef void (stream_rtp_h)(const struct rtp_header *hdr, struct mbuf *mb,
void *arg);
typedef void (stream_rtcp_h)(struct rtcp_msg *msg, void *arg);
+/** Defines a generic media stream */
+struct stream {
+ struct le le; /**< Linked list element */
+ struct config_avt cfg; /**< Stream configuration */
+ struct call *call; /**< Ref. to call object */
+ struct sdp_media *sdp; /**< SDP Media line */
+ struct rtp_sock *rtp; /**< RTP Socket */
+ struct rtpkeep *rtpkeep; /**< RTP Keepalive */
+ struct rtcp_stats rtcp_stats;/**< RTCP statistics */
+ struct jbuf *jbuf; /**< Jitter Buffer for incoming RTP */
+ struct mnat_media *mns; /**< Media NAT traversal state */
+ const struct menc *menc; /**< Media encryption module */
+ struct menc_sess *mencs; /**< Media encryption session state */
+ struct menc_media *mes; /**< Media Encryption media state */
+ struct metric metric_tx; /**< Metrics for transmit */
+ struct metric metric_rx; /**< Metrics for receiving */
+ char *cname; /**< RTCP Canonical end-point identifier */
+ uint32_t ssrc_rx; /**< Incoming syncronizing source */
+ uint32_t pseq; /**< Sequence number for incoming RTP */
+ int pt_enc; /**< Payload type for encoding */
+ bool rtcp; /**< Enable RTCP */
+ bool rtcp_mux; /**< RTP/RTCP multiplex supported by peer */
+ bool jbuf_started; /**< True if jitter-buffer was started */
+ stream_rtp_h *rtph; /**< Stream RTP handler */
+ stream_rtcp_h *rtcph; /**< Stream RTCP handler */
+ void *arg; /**< Handler argument */
+};
+
int stream_alloc(struct stream **sp, const struct config_avt *cfg,
struct call *call, struct sdp_session *sdp_sess,
const char *name, int label,