Top |
gdouble | bandwidth | Read / Write |
RTPSession * | internal-session | Read |
guint | num-active-sources | Read |
guint | num-sources | Read |
gdouble | rtcp-fraction | Read / Write |
GstStructure * | sdes | Read / Write |
gint | rtcp-rr-bandwidth | Read / Write |
gint | rtcp-rs-bandwidth | Read / Write |
gboolean | use-pipeline-clock | Read / Write |
guint64 | rtcp-min-interval | Read / Write |
guint | probation | Read / Write |
GstStructure * | stats | Read |
GstRTPProfile | rtp-profile | Read / Write |
GstRtpNtpTimeSource | ntp-time-source | Read / Write |
guint | max-dropout-time | Read / Write |
guint | max-misorder-time | Read / Write |
gboolean | rtcp-sync-send-time | Read / Write |
void | clear-pt-map | Action |
void | on-bye-ssrc | Run Last |
void | on-bye-timeout | Run Last |
void | on-new-ssrc | Run Last |
void | on-sender-timeout | Run Last |
void | on-ssrc-active | Run Last |
void | on-ssrc-collision | Run Last |
void | on-ssrc-sdes | Run Last |
void | on-ssrc-validated | Run Last |
void | on-timeout | Run Last |
GstCaps* | request-pt-map | Run Last |
void | on-new-sender-ssrc | Run Last |
void | on-sender-ssrc-active | Run Last |
The RTP session manager models participants with unique SSRC in an RTP session. This session can be used to send and receive RTP and RTCP packets. Based on what REQUEST pads are requested from the session manager, specific functionality can be activated.
The session manager currently implements RFC 3550 including:
RTP packet validation based on consecutive sequence numbers.
Maintainance of the SSRC participant database.
Keeping per participant statistics based on received RTCP packets.
Scheduling of RR/SR RTCP packets.
Support for multiple sender SSRC.
The rtpsession will not demux packets based on SSRC or payload type, nor will it correct for packet reordering and jitter. Use GstRtpsSrcDemux, GstRtpPtDemux and GstRtpJitterBuffer in addition to GstRtpSession to perform these tasks. It is usually a good idea to use GstRtpBin, which combines all these features in one element.
To use GstRtpSession as an RTP receiver, request a recv_rtp_sink pad, which will automatically create recv_rtp_src pad. Data received on the recv_rtp_sink pad will be processed in the session and after being validated forwarded on the recv_rtp_src pad.
To also use GstRtpSession as an RTCP receiver, request a recv_rtcp_sink pad, which will automatically create a sync_src pad. Packets received on the RTCP pad will be used by the session manager to update the stats and database of the other participants. SR packets will be forwarded on the sync_src pad so that they can be used to perform inter-stream synchronisation when needed.
If you want the session manager to generate and send RTCP packets, request the send_rtcp_src pad. Packet pushed on this pad contain SR/RR RTCP reports that should be sent to all participants in the session.
To use GstRtpSession as a sender, request a send_rtp_sink pad, which will automatically create a send_rtp_src pad. The session manager will forward the packets on the send_rtp_src pad after updating its internal state.
The session manager needs the clock-rate of the payload types it is handling and will signal the “request-pt-map” signal when it needs such a mapping. One can clear the cached values with the “clear-pt-map” signal.
1 |
gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp, ..." ! .recv_rtp_sink rtpsession .recv_rtp_src ! rtptheoradepay ! theoradec ! xvimagesink |
1 2 3 |
gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp, ..." ! .recv_rtp_sink rtpsession name=session \ .recv_rtp_src ! rtptheoradepay ! theoradec ! xvimagesink \ udpsrc port=5001 caps="application/x-rtcp" ! session.recv_rtcp_sink |
1 |
gst-launch-1.0 videotestsrc ! theoraenc ! rtptheorapay ! .send_rtp_sink rtpsession .send_rtp_src ! udpsink port=5000 |
1 2 |
gst-launch-1.0 videotestsrc ! theoraenc ! rtptheorapay ! .send_rtp_sink rtpsession name=session .send_rtp_src \ ! udpsink port=5000 session.send_rtcp_src ! udpsink port=5001 |
gst_element_set_locked_state()
) the RTCP udpsink to the PLAYING state.
plugin |
rtpmanager |
author |
Wim Taymans <wim.taymans@gmail.com> |
class |
Filter/Network/RTP |
name |
recv_rtcp_sink |
direction |
sink |
presence |
request |
details |
application/x-rtcp |
name |
recv_rtp_sink |
direction |
sink |
presence |
request |
details |
application/x-rtp |
name |
send_rtp_sink |
direction |
sink |
presence |
request |
details |
application/x-rtp |
name |
recv_rtp_src |
direction |
source |
presence |
sometimes |
details |
application/x-rtp |
name |
send_rtp_src |
direction |
source |
presence |
sometimes |
details |
application/x-rtp |
name |
sync_src |
direction |
source |
presence |
sometimes |
details |
application/x-rtcp |
name |
send_rtcp_src |
direction |
source |
presence |
request |
details |
application/x-rtcp |
“bandwidth”
property “bandwidth” gdouble
The bandwidth of the session in bytes per second (0 for auto-discover).
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“internal-session”
property “internal-session” RTPSession *
The internal RTPSession object.
Flags: Read
“num-active-sources”
property “num-active-sources” guint
The number of active sources in the session.
Flags: Read
Default value: 0
“num-sources”
property “num-sources” guint
The number of sources in the session.
Flags: Read
Default value: 0
“rtcp-fraction”
property “rtcp-fraction” gdouble
The RTCP bandwidth of the session in bytes per second (or as a real fraction of the RTP bandwidth if < 1.0).
Flags: Read / Write
Allowed values: >= 0
Default value: 0.05
“rtcp-rr-bandwidth”
property “rtcp-rr-bandwidth” gint
The RTCP bandwidth used for receivers in bytes per second (-1 = default).
Flags: Read / Write
Allowed values: >= G_MAXULONG
Default value: -1
“rtcp-rs-bandwidth”
property “rtcp-rs-bandwidth” gint
The RTCP bandwidth used for senders in bytes per second (-1 = default).
Flags: Read / Write
Allowed values: >= G_MAXULONG
Default value: -1
“use-pipeline-clock”
property “use-pipeline-clock” gboolean
Use the pipeline running-time to set the NTP time in the RTCP SR messages (DEPRECATED: Use ntp-time-source property).
Flags: Read / Write
Default value: FALSE
“rtcp-min-interval”
property “rtcp-min-interval” guint64
Minimum interval between Regular RTCP packet (in ns).
Flags: Read / Write
Default value: 5000000000
“probation”
property “probation” guint
Consecutive packet sequence numbers to accept the source.
Flags: Read / Write
Default value: 2
“rtp-profile”
property “rtp-profile” GstRTPProfile
RTP profile to use.
Flags: Read / Write
Default value: GST_RTP_PROFILE_AVP
“ntp-time-source”
property “ntp-time-source” GstRtpNtpTimeSource
NTP time source for RTCP packets.
Flags: Read / Write
Default value: NTP time based on realtime clock
“max-dropout-time”
property “max-dropout-time” guint
The maximum time (milliseconds) of missing packets tolerated.
Flags: Read / Write
Default value: 60000
“max-misorder-time”
property “max-misorder-time” guint
The maximum time (milliseconds) of misordered packets tolerated.
Flags: Read / Write
Default value: 2000
“clear-pt-map”
signalvoid user_function (GstRtpSession *sess, gpointer user_data)
Clear the cached pt-maps requested with “request-pt-map”.
sess |
the object which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“on-bye-ssrc”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
Notify of an SSRC that became inactive because of a BYE packet.
sess |
the object which received the signal |
|
ssrc |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-bye-timeout”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
Notify of an SSRC that has timed out because of BYE
sess |
the object which received the signal |
|
ssrc |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-new-ssrc”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
Notify of a new SSRC that entered session
.
sess |
the object which received the signal |
|
ssrc |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-sender-timeout”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
Notify of a sender SSRC that has timed out and became a receiver
sess |
the object which received the signal |
|
ssrc |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-ssrc-active”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
Notify of a SSRC that is active, i.e., sending RTCP.
sess |
the object which received the signal |
|
ssrc |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-ssrc-collision”
signalvoid user_function (GstRtpSession *gstrtpsession, guint arg1, gpointer user_data)
Flags: Run Last
“on-ssrc-sdes”
signalvoid user_function (GstRtpSession *session, guint src, gpointer user_data)
Notify that a new SDES was received for SSRC.
session |
the object which received the signal |
|
src |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-ssrc-validated”
signalvoid user_function (GstRtpSession *gstrtpsession, guint arg1, gpointer user_data)
Flags: Run Last
“on-timeout”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
Notify of an SSRC that has timed out
sess |
the object which received the signal |
|
ssrc |
the SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“request-pt-map”
signalGstCaps* user_function (GstRtpSession *sess, guint pt, gpointer user_data)
Request the payload type as GstCaps for pt
.
sess |
the object which received the signal |
|
pt |
the pt |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“on-new-sender-ssrc”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
sess |
the object which received the signal |
|
ssrc |
the sender SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.8
“on-sender-ssrc-active”
signalvoid user_function (GstRtpSession *sess, guint ssrc, gpointer user_data)
sess |
the object which received the signal |
|
ssrc |
the sender SSRC |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.8