rtsp media
a GstRTSPMedia contains the complete GStreamer pipeline to manage the streaming to the clients. The actual data transfer is done by the GstRTSPStream objects that are created and exposed by the GstRTSPMedia.
The GstRTSPMedia is usually created from a GstRTSPMediaFactory when the client does a DESCRIBE or SETUP of a resource.
A media is created with gst_rtsp_media_new that takes the element that will provide the streaming elements. For each of the streams, a new GstRTSPStream object needs to be made with the gst_rtsp_media_create_stream which takes the payloader element and the source pad that produces the RTP stream.
The pipeline of the media is set to PAUSED with gst_rtsp_media_prepare. The prepare method will add rtpbin and sinks and sources to send and receive RTP and RTCP packets from the clients. Each stream srcpad is connected to an input into the internal rtpbin.
It is also possible to dynamically create GstRTSPStream objects during the prepare phase. With gst_rtsp_media_get_status you can check the status of the prepare phase.
After the media is prepared, it is ready for streaming. It will usually be managed in a session with gst_rtsp_session_manage_media. See GstRTSPSession and GstRTSPSessionMedia.
The state of the media can be controlled with gst_rtsp_media_set_state (). Seeking can be done with gst_rtsp_media_seek, or gst_rtsp_media_seek_full or gst_rtsp_media_seek_trickmode for finer control of the seek.
With gst_rtsp_media_unprepare the pipeline is stopped and shut down. When gst_rtsp_media_set_eos_shutdown an EOS will be sent to the pipeline to cleanly shut down.
With gst_rtsp_media_set_shared, the media can be shared between multiple clients. With gst_rtsp_media_set_reusable you can control if the pipeline can be prepared again after an unprepare.
Last reviewed on 2013-07-11 (1.0.0)
GstRTSPMedia
GObject ╰──GstRTSPMedia ╰──GstRTSPOnvifMedia
A class that contains the GStreamer element along with a list of GstRTSPStream objects that can produce data.
This object is usually created from a GstRTSPMediaFactory.
Members
parent
(GObject)
–
Class structure
Constructors
gst_rtsp_media_new
GstRTSPMedia * gst_rtsp_media_new (GstElement * element)
Create a new GstRTSPMedia instance. element is the bin element that provides the different streams. The GstRTSPMedia object contains the element to produce RTP data for one or more related (audio/video/..) streams.
Ownership is taken of element.
Parameters:
element
(
[transfer: full])
–
a new GstRTSPMedia object.
Methods
gst_rtsp_media_can_be_shared
gboolean gst_rtsp_media_can_be_shared (GstRTSPMedia * media)
Check if the pipeline for media can be shared between multiple clients.
This checks if the media is shareable and whether it is either reusable or was never unprepared before.
The function must be called with gst_rtsp_media_lock.
Parameters:
media
–
TRUE if the media can be shared between clients.
Since : 1.24
gst_rtsp_media_collect_streams
gst_rtsp_media_collect_streams (GstRTSPMedia * media)
Find all payloader elements, they should be named pay%d in the element of media, and create GstRTSPStream for them.
Collect all dynamic elements, named dynpay%d, and add them to the list of dynamic elements.
Find all depayloader elements, they should be named depay%d in the element of media, and create GstRTSPStream for them.
Parameters:
media
–
gst_rtsp_media_complete_pipeline
gboolean gst_rtsp_media_complete_pipeline (GstRTSPMedia * media, GPtrArray * transports)
Add a receiver and sender parts to the pipeline based on the transport from SETUP.
TRUE if the media pipeline has been sucessfully updated.
Since : 1.14
gst_rtsp_media_create_stream
GstRTSPStream * gst_rtsp_media_create_stream (GstRTSPMedia * media, GstElement * payloader, GstPad * pad)
Create a new stream in media that provides RTP data on pad. pad should be a pad of an element inside media->element.
a new GstRTSPStream that remains valid for as long as media exists.
gst_rtsp_media_find_stream
GstRTSPStream * gst_rtsp_media_find_stream (GstRTSPMedia * media, const gchar * control)
Find a stream in media with control as the control uri.
the GstRTSPStream with control uri control or NULL when a stream with that control did not exist.
gst_rtsp_media_get_address_pool
GstRTSPAddressPool * gst_rtsp_media_get_address_pool (GstRTSPMedia * media)
Get the GstRTSPAddressPool used as the address pool of media.
Parameters:
media
–
the GstRTSPAddressPool of media. g_object_unref after usage.
gst_rtsp_media_get_base_time
GstClockTime gst_rtsp_media_get_base_time (GstRTSPMedia * media)
Get the base_time that is used by the pipeline in media.
media must be prepared before this method returns a valid base_time.
Parameters:
media
–
the base_time used by media.
gst_rtsp_media_get_buffer_size
guint gst_rtsp_media_get_buffer_size (GstRTSPMedia * media)
Get the kernel UDP buffer size.
Parameters:
media
–
the kernel UDP buffer size.
gst_rtsp_media_get_clock
GstClock * gst_rtsp_media_get_clock (GstRTSPMedia * media)
Get the clock that is used by the pipeline in media.
media must be prepared before this method returns a valid clock object.
Parameters:
media
–
the GstClock used by media. unref after usage.
gst_rtsp_media_get_do_retransmission
gboolean gst_rtsp_media_get_do_retransmission (GstRTSPMedia * media)
Parameters:
media
–
Whether retransmission requests will be sent
Since : 1.16
gst_rtsp_media_get_dscp_qos
gint gst_rtsp_media_get_dscp_qos (GstRTSPMedia * media)
Get the configured DSCP QoS of attached media.
Parameters:
media
–
the DSCP QoS value of attached streams or -1 if disabled.
Since : 1.18
gst_rtsp_media_get_element
GstElement * gst_rtsp_media_get_element (GstRTSPMedia * media)
Get the element that was used when constructing media.
Parameters:
media
–
a GstElement. Unref after usage.
gst_rtsp_media_get_ensure_keyunit_on_start
gboolean gst_rtsp_media_get_ensure_keyunit_on_start (GstRTSPMedia * media)
Get ensure-keyunit-on-start flag.
Parameters:
media
–
The ensure-keyunit-on-start flag.
Since : 1.24
gst_rtsp_media_get_ensure_keyunit_on_start_timeout
guint gst_rtsp_media_get_ensure_keyunit_on_start_timeout (GstRTSPMedia * media)
Get ensure-keyunit-on-start-timeout time.
Parameters:
media
–
The ensure-keyunit-on-start-timeout time.
Since : 1.24
gst_rtsp_media_get_latency
guint gst_rtsp_media_get_latency (GstRTSPMedia * media)
Get the latency that is used for receiving media.
Parameters:
media
–
latency in milliseconds
gst_rtsp_media_get_max_mcast_ttl
guint gst_rtsp_media_get_max_mcast_ttl (GstRTSPMedia * media)
Get the the maximum time-to-live value of outgoing multicast packets.
Parameters:
media
–
the maximum time-to-live value of outgoing multicast packets.
Since : 1.16
gst_rtsp_media_get_multicast_iface
gchar * gst_rtsp_media_get_multicast_iface (GstRTSPMedia * media)
Get the multicast interface used for media.
Parameters:
media
–
the multicast interface for media. g_free after usage.
gst_rtsp_media_get_permissions
GstRTSPPermissions * gst_rtsp_media_get_permissions (GstRTSPMedia * media)
Get the permissions object from media.
Parameters:
media
–
a GstRTSPPermissions object, unref after usage.
gst_rtsp_media_get_profiles
GstRTSPProfile gst_rtsp_media_get_profiles (GstRTSPMedia * media)
Get the allowed profiles of media.
Parameters:
media
–
gst_rtsp_media_get_protocols
GstRTSPLowerTrans gst_rtsp_media_get_protocols (GstRTSPMedia * media)
Get the allowed protocols of media.
Parameters:
media
–
gst_rtsp_media_get_publish_clock_mode
GstRTSPPublishClockMode gst_rtsp_media_get_publish_clock_mode (GstRTSPMedia * media)
Gets if and how the media clock should be published according to RFC7273.
Parameters:
media
–
The GstRTSPPublishClockMode
Since : 1.8
gst_rtsp_media_get_range_string
gchar * gst_rtsp_media_get_range_string (GstRTSPMedia * media, gboolean play, GstRTSPRangeUnit unit)
Get the current range as a string. media must be prepared with gst_rtsp_media_prepare ().
Parameters:
media
–
play
–
for the PLAY request
unit
–
the unit to use for the string
The range as a string, g_free after usage.
gst_rtsp_media_get_rate_control
gboolean gst_rtsp_media_get_rate_control (GstRTSPMedia * media)
Parameters:
media
–
whether media will follow the Rate-Control=no behaviour as specified in the ONVIF replay spec.
Since : 1.18
gst_rtsp_media_get_rates
gboolean gst_rtsp_media_get_rates (GstRTSPMedia * media, gdouble * rate, gdouble * applied_rate)
Get the rate and applied_rate of the current segment.
Parameters:
media
–
rate
(
[optional][out])
–
the rate of the current segment
applied_rate
(
[optional][out])
–
the applied_rate of the current segment
Since : 1.18
gst_rtsp_media_get_retransmission_time
GstClockTime gst_rtsp_media_get_retransmission_time (GstRTSPMedia * media)
Get the amount of time to store retransmission data.
Parameters:
media
–
the amount of time to store retransmission data.
gst_rtsp_media_get_status
GstRTSPMediaStatus gst_rtsp_media_get_status (GstRTSPMedia * media)
Get the status of media. When media is busy preparing, this function waits until media is prepared or in error.
Parameters:
media
–
the status of media.
gst_rtsp_media_get_stream
GstRTSPStream * gst_rtsp_media_get_stream (GstRTSPMedia * media, guint idx)
Retrieve the stream with index idx from media.
the GstRTSPStream at index idx or NULL when a stream with that index did not exist.
gst_rtsp_media_get_suspend_mode
GstRTSPSuspendMode gst_rtsp_media_get_suspend_mode (GstRTSPMedia * media)
Get how media will be suspended.
Parameters:
media
–
gst_rtsp_media_get_time_provider
GstNetTimeProvider * gst_rtsp_media_get_time_provider (GstRTSPMedia * media, const gchar * address, guint16 port)
Get the GstNetTimeProvider for the clock used by media. The time provider will listen on address and port for client time requests.
the GstNetTimeProvider of media.
gst_rtsp_media_get_transport_mode
GstRTSPTransportMode gst_rtsp_media_get_transport_mode (GstRTSPMedia * media)
Check if the pipeline for media can be used for PLAY or RECORD methods.
Parameters:
media
–
The transport mode.
gst_rtsp_media_handle_sdp
gboolean gst_rtsp_media_handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp)
Configure an SDP on media for receiving streams
TRUE on success.
gst_rtsp_media_has_completed_sender
gboolean gst_rtsp_media_has_completed_sender (GstRTSPMedia * media)
See gst_rtsp_stream_is_complete, gst_rtsp_stream_is_sender.
Parameters:
media
–
whether media has at least one complete sender stream.
Since : 1.18
gst_rtsp_media_is_bind_mcast_address
gboolean gst_rtsp_media_is_bind_mcast_address (GstRTSPMedia * media)
Check if multicast sockets are configured to be bound to multicast addresses.
Parameters:
media
–
TRUE if multicast sockets are configured to be bound to multicast addresses.
Since : 1.16
gst_rtsp_media_is_eos_shutdown
gboolean gst_rtsp_media_is_eos_shutdown (GstRTSPMedia * media)
Check if the pipeline for media will send an EOS down the pipeline before unpreparing.
Parameters:
media
–
TRUE if the media will send EOS before unpreparing.
gst_rtsp_media_is_receive_only
gboolean gst_rtsp_media_is_receive_only (GstRTSPMedia * media)
Parameters:
media
–
Since : 1.18
gst_rtsp_media_is_reusable
gboolean gst_rtsp_media_is_reusable (GstRTSPMedia * media)
Check if the pipeline for media can be reused after an unprepare.
Parameters:
media
–
TRUE if the media can be reused
gst_rtsp_media_is_shared
gboolean gst_rtsp_media_is_shared (GstRTSPMedia * media)
Check if the pipeline for media can be shared between multiple clients in theory. This simply returns the value set via gst_rtsp_media_set_shared.
To know if a media can be shared in practice, i.e. if it's shareable and either reusable or was never unprepared before, use gst_rtsp_media_can_be_shared.
Parameters:
media
–
TRUE if the media can be shared between clients.
gst_rtsp_media_is_stop_on_disconnect
gboolean gst_rtsp_media_is_stop_on_disconnect (GstRTSPMedia * media)
Check if the pipeline for media will be stopped when a client disconnects without sending TEARDOWN.
Parameters:
media
–
TRUE if the media will be stopped when a client disconnects without sending TEARDOWN.
gst_rtsp_media_is_time_provider
gboolean gst_rtsp_media_is_time_provider (GstRTSPMedia * media)
Check if media can provide a GstNetTimeProvider for its pipeline clock.
Use gst_rtsp_media_get_time_provider to get the network clock.
Parameters:
media
–
TRUE if media can provide a GstNetTimeProvider.
gst_rtsp_media_lock
gst_rtsp_media_lock (GstRTSPMedia * media)
Lock the entire media. This is needed by callers such as rtsp_client to protect the media when it is shared by many clients. The lock prevents that concurrent clients alters the shared media, while one client already is working with it. Typically the lock is taken in external RTSP API calls that uses shared media such as DESCRIBE, SETUP, ANNOUNCE, TEARDOWN, PLAY, PAUSE.
As best practice take the lock as soon as the function get hold of a shared media object. Release the lock right before the function returns.
Parameters:
media
–
Since : 1.18
gst_rtsp_media_n_streams
guint gst_rtsp_media_n_streams (GstRTSPMedia * media)
Get the number of streams in this media.
Parameters:
media
–
The number of streams.
gst_rtsp_media_prepare
gboolean gst_rtsp_media_prepare (GstRTSPMedia * media, GstRTSPThread * thread)
Prepare media for streaming. This function will create the objects to manage the streaming. A pipeline must have been set on media with gst_rtsp_media_take_pipeline.
It will preroll the pipeline and collect vital information about the streams such as the duration.
Parameters:
media
–
thread
(
[transfer: full][allow-none])
–
a GstRTSPThread to run the bus handler or NULL
TRUE on success.
gst_rtsp_media_seek
gboolean gst_rtsp_media_seek (GstRTSPMedia * media, GstRTSPTimeRange * range)
Seek the pipeline of media to range. media must be prepared with gst_rtsp_media_prepare.
TRUE on success.
gst_rtsp_media_seek_full
gboolean gst_rtsp_media_seek_full (GstRTSPMedia * media, GstRTSPTimeRange * range, GstSeekFlags flags)
Seek the pipeline of media to range with the given flags. media must be prepared with gst_rtsp_media_prepare.
TRUE on success.
Since : 1.18
gst_rtsp_media_seek_trickmode
gboolean gst_rtsp_media_seek_trickmode (GstRTSPMedia * media, GstRTSPTimeRange * range, GstSeekFlags flags, gdouble rate, GstClockTime trickmode_interval)
Seek the pipeline of media to range with the given flags and rate, and trickmode_interval. media must be prepared with gst_rtsp_media_prepare. In order to perform the seek operation, the pipeline must contain all needed transport parts (transport sinks).
Parameters:
media
–
range
(
[transfer: none])
–
flags
–
The minimal set of GstSeekFlags to use
rate
–
the rate to use in the seek
trickmode_interval
–
The trickmode interval to use for KEY_UNITS trick mode
TRUE on success.
Since : 1.18
gst_rtsp_media_seekable
GstClockTimeDiff gst_rtsp_media_seekable (GstRTSPMedia * media)
Check if the pipeline for media seek and up to what point in time, it can seek.
Parameters:
media
–
-1 if the stream is not seekable, 0 if seekable only to the beginning and > 0 to indicate the longest duration between any two random access points. G_MAXINT64 means any value is possible.
Since : 1.14
gst_rtsp_media_set_address_pool
gst_rtsp_media_set_address_pool (GstRTSPMedia * media, GstRTSPAddressPool * pool)
configure pool to be used as the address pool of media.
gst_rtsp_media_set_bind_mcast_address
gst_rtsp_media_set_bind_mcast_address (GstRTSPMedia * media, gboolean bind_mcast_addr)
Decide whether the multicast socket should be bound to a multicast address or INADDR_ANY.
Since : 1.16
gst_rtsp_media_set_buffer_size
gst_rtsp_media_set_buffer_size (GstRTSPMedia * media, guint size)
Set the kernel UDP buffer size.
gst_rtsp_media_set_clock
gst_rtsp_media_set_clock (GstRTSPMedia * media, GstClock * clock)
Configure the clock used for the media.
gst_rtsp_media_set_do_retransmission
gst_rtsp_media_set_do_retransmission (GstRTSPMedia * media, gboolean do_retransmission)
Set whether retransmission requests will be sent
Parameters:
media
–
do_retransmission
–
Since : 1.16
gst_rtsp_media_set_dscp_qos
gst_rtsp_media_set_dscp_qos (GstRTSPMedia * media, gint dscp_qos)
Configure the dscp qos of attached streams to dscp_qos.
Since : 1.18
gst_rtsp_media_set_ensure_keyunit_on_start
gst_rtsp_media_set_ensure_keyunit_on_start (GstRTSPMedia * media, gboolean ensure_keyunit_on_start)
Set whether or not a keyunit should be ensured when a client connects. It will also configure the streams to drop delta units to ensure that they start on a keyunit.
Note that this will only affect non-shared medias for now.
Since : 1.24
gst_rtsp_media_set_ensure_keyunit_on_start_timeout
gst_rtsp_media_set_ensure_keyunit_on_start_timeout (GstRTSPMedia * media, guint timeout)
Sets the maximum allowed time before the first keyunit is considered expired.
Note that this will only have an effect when ensure-keyunit-on-start is enabled.
Since : 1.24
gst_rtsp_media_set_eos_shutdown
gst_rtsp_media_set_eos_shutdown (GstRTSPMedia * media, gboolean eos_shutdown)
Set or unset if an EOS event will be sent to the pipeline for media before it is unprepared.
gst_rtsp_media_set_latency
gst_rtsp_media_set_latency (GstRTSPMedia * media, guint latency)
Configure the latency used for receiving media.
gst_rtsp_media_set_max_mcast_ttl
gboolean gst_rtsp_media_set_max_mcast_ttl (GstRTSPMedia * media, guint ttl)
Set the maximum time-to-live value of outgoing multicast packets.
TRUE if the requested ttl has been set successfully.
Since : 1.16
gst_rtsp_media_set_multicast_iface
gst_rtsp_media_set_multicast_iface (GstRTSPMedia * media, const gchar * multicast_iface)
configure multicast_iface to be used for media.
Parameters:
media
–
multicast_iface
(
[transfer: none][nullable])
–
a multicast interface name
gst_rtsp_media_set_permissions
gst_rtsp_media_set_permissions (GstRTSPMedia * media, GstRTSPPermissions * permissions)
Set permissions on media.
gst_rtsp_media_set_pipeline_state
gst_rtsp_media_set_pipeline_state (GstRTSPMedia * media, GstState state)
Set the state of the pipeline managed by media to state
gst_rtsp_media_set_profiles
gst_rtsp_media_set_profiles (GstRTSPMedia * media, GstRTSPProfile profiles)
Configure the allowed lower transport for media.
gst_rtsp_media_set_protocols
gst_rtsp_media_set_protocols (GstRTSPMedia * media, GstRTSPLowerTrans protocols)
Configure the allowed lower transport for media.
gst_rtsp_media_set_publish_clock_mode
gst_rtsp_media_set_publish_clock_mode (GstRTSPMedia * media, GstRTSPPublishClockMode mode)
Sets if and how the media clock should be published according to RFC7273.
Since : 1.8
gst_rtsp_media_set_rate_control
gst_rtsp_media_set_rate_control (GstRTSPMedia * media, gboolean enabled)
Define whether media will follow the Rate-Control=no behaviour as specified in the ONVIF replay spec.
Parameters:
media
–
enabled
–
Since : 1.18
gst_rtsp_media_set_retransmission_time
gst_rtsp_media_set_retransmission_time (GstRTSPMedia * media, GstClockTime time)
Set the amount of time to store retransmission packets.
gst_rtsp_media_set_reusable
gst_rtsp_media_set_reusable (GstRTSPMedia * media, gboolean reusable)
Set or unset if the pipeline for media can be reused after the pipeline has been unprepared.
gst_rtsp_media_set_shared
gst_rtsp_media_set_shared (GstRTSPMedia * media, gboolean shared)
Set or unset if the pipeline for media can be shared will multiple clients. When shared is TRUE, client requests for this media will share the media pipeline.
gst_rtsp_media_set_state
gboolean gst_rtsp_media_set_state (GstRTSPMedia * media, GstState state, GPtrArray * transports)
Set the state of media to state and for the transports in transports.
media must be prepared with gst_rtsp_media_prepare;
Parameters:
media
–
state
–
the target state of the media
transports
–
(transfer none) (element-type GstRtspServer.RTSPStreamTransport): a GPtrArray of GstRTSPStreamTransport pointers
TRUE on success.
gst_rtsp_media_set_stop_on_disconnect
gst_rtsp_media_set_stop_on_disconnect (GstRTSPMedia * media, gboolean stop_on_disconnect)
Set or unset if the pipeline for media should be stopped when a client disconnects without sending TEARDOWN.
gst_rtsp_media_set_suspend_mode
gst_rtsp_media_set_suspend_mode (GstRTSPMedia * media, GstRTSPSuspendMode mode)
Control how media will be suspended after the SDP has been generated and after a PAUSE request has been performed.
Media must be unprepared when setting the suspend mode.
gst_rtsp_media_set_transport_mode
gst_rtsp_media_set_transport_mode (GstRTSPMedia * media, GstRTSPTransportMode mode)
Sets if the media pipeline can work in PLAY or RECORD mode
gst_rtsp_media_setup_sdp
gboolean gst_rtsp_media_setup_sdp (GstRTSPMedia * media, GstSDPMessage * sdp, GstSDPInfo * info)
Add media specific info to sdp. info is used to configure the connection information in the SDP.
Parameters:
media
–
sdp
(
[transfer: none])
–
info
(
[transfer: none])
–
TRUE on success.
gst_rtsp_media_suspend
gboolean gst_rtsp_media_suspend (GstRTSPMedia * media)
Suspend media. The state of the pipeline managed by media is set to GST_STATE_NULL but all streams are kept. media can be prepared again with gst_rtsp_media_unsuspend
media must be prepared with gst_rtsp_media_prepare;
Parameters:
media
–
TRUE on success.
gst_rtsp_media_take_pipeline
gst_rtsp_media_take_pipeline (GstRTSPMedia * media, GstPipeline * pipeline)
Set pipeline as the GstPipeline for media. Ownership is taken of pipeline.
gst_rtsp_media_unlock
gst_rtsp_media_unlock (GstRTSPMedia * media)
Unlock the media.
Parameters:
media
–
Since : 1.18
gst_rtsp_media_unprepare
gboolean gst_rtsp_media_unprepare (GstRTSPMedia * media)
Unprepare media. After this call, the media should be prepared again before it can be used again. If the media is set to be non-reusable, a new instance must be created.
Parameters:
media
–
TRUE on success.
gst_rtsp_media_unsuspend
gboolean gst_rtsp_media_unsuspend (GstRTSPMedia * media)
Unsuspend media if it was in a suspended state. This method does nothing when the media was not in the suspended state.
Parameters:
media
–
TRUE on success.
gst_rtsp_media_use_time_provider
gst_rtsp_media_use_time_provider (GstRTSPMedia * media, gboolean time_provider)
Set media to provide a GstNetTimeProvider.
Signals
handle-message
gboolean handle_message_callback (GstRTSPMedia * self, GstMessage * message, gpointer user_data)
Will be emitted when a message appears on the pipeline bus.
Parameters:
self
–
message
–
user_data
–
a gboolean indicating if the call was successful or not.
Flags: Run Last
Since : 1.22
new-state
new_state_callback (GstRTSPMedia * self, gint object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
Flags: Run Last
new-stream
new_stream_callback (GstRTSPMedia * self, GstRTSPStream * object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
Flags: Run Last
prepared
prepared_callback (GstRTSPMedia * self, gpointer user_data)
Parameters:
self
–
user_data
–
Flags: Run Last
removed-stream
removed_stream_callback (GstRTSPMedia * self, GstRTSPStream * object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
Flags: Run Last
target-state
target_state_callback (GstRTSPMedia * self, gint object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
Flags: Run Last
unprepared
unprepared_callback (GstRTSPMedia * self, gpointer user_data)
Parameters:
self
–
user_data
–
Flags: Run Last
Properties
ensure-keyunit-on-start
“ensure-keyunit-on-start” gboolean
Whether or not a keyunit should be ensured when a client connects. It will also configure the streams to drop delta units to ensure that they start on a keyunit.
Note that this will only affect non-shared medias for now.
Flags : Read / Write
Since : 1.24
ensure-keyunit-on-start-timeout
“ensure-keyunit-on-start-timeout” guint
The maximum allowed time before the first keyunit is considered expired.
Note that this will only have an effect when ensure-keyunit-on-start is enabled.
Flags : Read / Write
Since : 1.24
Virtual Methods
convert_range
gboolean convert_range (GstRTSPMedia * media, GstRTSPTimeRange * range, GstRTSPRangeUnit unit)
convert a range to the given unit
Parameters:
media
–
range
–
unit
–
create_rtpbin
GstElement * create_rtpbin (GstRTSPMedia * media)
Parameters:
media
–
handle_message
gboolean handle_message (GstRTSPMedia * media, GstMessage * message)
handle a message
Parameters:
media
–
message
–
handle_sdp
gboolean handle_sdp (GstRTSPMedia * media, GstSDPMessage * sdp)
Parameters:
media
–
sdp
–
new_state
new_state (GstRTSPMedia * media, GstState state)
Parameters:
media
–
state
–
new_stream
new_stream (GstRTSPMedia * media, GstRTSPStream * stream)
Parameters:
media
–
stream
–
prepare
gboolean prepare (GstRTSPMedia * media, GstRTSPThread * thread)
the default implementation adds all elements and sets the pipeline's state to GST_STATE_PAUSED (or GST_STATE_PLAYING in case of NO_PREROLL elements).
Parameters:
media
–
thread
–
query_position
gboolean query_position (GstRTSPMedia * media, gint64 * position)
query the current position in the pipeline
Parameters:
media
–
position
–
query_stop
gboolean query_stop (GstRTSPMedia * media, gint64 * stop)
query when playback will stop
Parameters:
media
–
stop
–
removed_stream
removed_stream (GstRTSPMedia * media, GstRTSPStream * stream)
Parameters:
media
–
stream
–
setup_rtpbin
gboolean setup_rtpbin (GstRTSPMedia * media, GstElement * rtpbin)
Parameters:
media
–
rtpbin
–
setup_sdp
gboolean setup_sdp (GstRTSPMedia * media, GstSDPMessage * sdp, GstSDPInfo * info)
Parameters:
media
–
sdp
–
info
–
suspend
gboolean suspend (GstRTSPMedia * media)
the default implementation sets the pipeline's state to GST_STATE_NULL GST_STATE_PAUSED depending on the selected suspend mode.
Parameters:
media
–
target_state
target_state (GstRTSPMedia * media, GstState state)
Parameters:
media
–
state
–
unprepare
gboolean unprepare (GstRTSPMedia * media)
the default implementation sets the pipeline's state to GST_STATE_NULL and removes all elements.
Parameters:
media
–
unsuspend
gboolean unsuspend (GstRTSPMedia * media)
the default implementation reverts the suspend operation. The pipeline will be prerolled again if it's state was set to GST_STATE_NULL in suspend.
Parameters:
media
–
Function Macros
Enumerations
GstRTSPMediaStatus
The state of the media pipeline.
Members
GST_RTSP_MEDIA_STATUS_UNPREPARED
(0)
–
media pipeline not prerolled
GST_RTSP_MEDIA_STATUS_UNPREPARING
(1)
–
media pipeline is busy doing a clean shutdown.
GST_RTSP_MEDIA_STATUS_PREPARING
(2)
–
media pipeline is prerolling
GST_RTSP_MEDIA_STATUS_PREPARED
(3)
–
media pipeline is prerolled
GST_RTSP_MEDIA_STATUS_SUSPENDED
(4)
–
media is suspended
GST_RTSP_MEDIA_STATUS_ERROR
(5)
–
media pipeline is in error
GstRTSPPublishClockMode
Whether the clock and possibly RTP/clock offset should be published according to RFC7273.
Members
GST_RTSP_PUBLISH_CLOCK_MODE_NONE
(0)
–
Publish nothing
GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK
(1)
–
Publish the clock but not the offset
GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET
(2)
–
Publish the clock and offset
GstRTSPSuspendMode
The suspend mode of the media pipeline. A media pipeline is suspended right after creating the SDP and when the client performs a PAUSED request.
Members
GST_RTSP_SUSPEND_MODE_NONE
(0)
–
Media is not suspended
GST_RTSP_SUSPEND_MODE_PAUSE
(1)
–
Media is PAUSED in suspend
GST_RTSP_SUSPEND_MODE_RESET
(2)
–
The media is set to NULL when suspended
The results of the search are