rtsp media

a GstRtspServer.RTSPMedia contains the complete GStreamer pipeline to manage the streaming to the clients. The actual data transfer is done by the GstRtspServer.RTSPStream objects that are created and exposed by the GstRtspServer.RTSPMedia.

The GstRtspServer.RTSPMedia is usually created from a GstRtspServer.RTSPMediaFactory when the client does a DESCRIBE or SETUP of a resource.

A media is created with GstRtspServer.RTSPMedia.prototype.new that takes the element that will provide the streaming elements. For each of the streams, a new GstRtspServer.RTSPStream object needs to be made with the GstRtspServer.RTSPMedia.prototype.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 GstRtspServer.RTSPMedia.prototype.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 GstRtspServer.RTSPStream objects during the prepare phase. With GstRtspServer.RTSPMedia.prototype.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 GstRtspServer.RTSPSession.prototype.manage_media. See GstRtspServer.RTSPSession and GstRtspServer.RTSPSessionMedia.

The state of the media can be controlled with gst_rtsp_media_set_state (). Seeking can be done with GstRtspServer.RTSPMedia.prototype.seek, or GstRtspServer.RTSPMedia.prototype.seek_full or GstRtspServer.RTSPMedia.prototype.seek_trickmode for finer control of the seek.

With GstRtspServer.RTSPMedia.prototype.unprepare the pipeline is stopped and shut down. When GstRtspServer.RTSPMedia.prototype.set_eos_shutdown an EOS will be sent to the pipeline to cleanly shut down.

With GstRtspServer.RTSPMedia.prototype.set_shared, the media can be shared between multiple clients. With GstRtspServer.RTSPMedia.prototype.set_reusable you can control if the pipeline can be prepared again after an unprepare.

Last reviewed on 2013-07-11 (1.0.0)

GstRtspServer.RTSPMedia

GObject.Object
    ╰──GstRtspServer.RTSPMedia
        ╰──GstRtspServer.RTSPOnvifMedia

A class that contains the GStreamer element along with a list of GstRtspServer.RTSPStream objects that can produce data.

This object is usually created from a GstRtspServer.RTSPMediaFactory.

Members

parent (GObject.Object) –
No description available

Constructors

GstRtspServer.RTSPMedia.prototype.new

function GstRtspServer.RTSPMedia.prototype.new(element: Gst.Element): {
    // javascript wrapper for 'gst_rtsp_media_new'
}

Create a new GstRtspServer.RTSPMedia instance. element is the bin element that provides the different streams. The GstRtspServer.RTSPMedia object contains the element to produce RTP data for one or more related (audio/video/..) streams.

Ownership is taken of element.

Parameters:

element (Gst.Element)

a Gst.Element

Returns (GstRtspServer.RTSPMedia)

a new GstRtspServer.RTSPMedia object.


Methods

GstRtspServer.RTSPMedia.prototype.can_be_shared

function GstRtspServer.RTSPMedia.prototype.can_be_shared(): {
    // javascript wrapper for 'gst_rtsp_media_can_be_shared'
}

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 GstRtspServer.RTSPMedia.prototype.lock.

Returns (Number)

true if the media can be shared between clients.

Since : 1.24


GstRtspServer.RTSPMedia.prototype.collect_streams

function GstRtspServer.RTSPMedia.prototype.collect_streams(): {
    // javascript wrapper for 'gst_rtsp_media_collect_streams'
}

Find all payloader elements, they should be named pay%d in the element of media, and create GstRtspServer.RTSPStream 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 GstRtspServer.RTSPStream for them.


GstRtspServer.RTSPMedia.prototype.complete_pipeline

function GstRtspServer.RTSPMedia.prototype.complete_pipeline(transports: [ GstRtsp.RTSPTransport ]): {
    // javascript wrapper for 'gst_rtsp_media_complete_pipeline'
}

Add a receiver and sender parts to the pipeline based on the transport from SETUP.

Parameters:

transports ([ GstRtsp.RTSPTransport ])

a list of GstRtsp.RTSPTransport

Returns (Number)

true if the media pipeline has been sucessfully updated.

Since : 1.14


GstRtspServer.RTSPMedia.prototype.create_stream

function GstRtspServer.RTSPMedia.prototype.create_stream(payloader: Gst.Element, pad: Gst.Pad): {
    // javascript wrapper for 'gst_rtsp_media_create_stream'
}

Create a new stream in media that provides RTP data on pad. pad should be a pad of an element inside media->element.

Parameters:

payloader (Gst.Element)

a Gst.Element

pad (Gst.Pad)

a Gst.Pad

Returns (GstRtspServer.RTSPStream)

a new GstRtspServer.RTSPStream that remains valid for as long as media exists.


GstRtspServer.RTSPMedia.prototype.find_stream

function GstRtspServer.RTSPMedia.prototype.find_stream(control: String): {
    // javascript wrapper for 'gst_rtsp_media_find_stream'
}

Find a stream in media with control as the control uri.

Parameters:

control (String)

the control of the stream

Returns (GstRtspServer.RTSPStream)

the GstRtspServer.RTSPStream with control uri control or null when a stream with that control did not exist.


GstRtspServer.RTSPMedia.prototype.get_address_pool

function GstRtspServer.RTSPMedia.prototype.get_address_pool(): {
    // javascript wrapper for 'gst_rtsp_media_get_address_pool'
}

Get the GstRtspServer.RTSPAddressPool used as the address pool of media.


GstRtspServer.RTSPMedia.prototype.get_base_time

function GstRtspServer.RTSPMedia.prototype.get_base_time(): {
    // javascript wrapper for 'gst_rtsp_media_get_base_time'
}

Get the base_time that is used by the pipeline in media.

media must be prepared before this method returns a valid base_time.

Returns (Number)

the base_time used by media.


GstRtspServer.RTSPMedia.prototype.get_buffer_size

function GstRtspServer.RTSPMedia.prototype.get_buffer_size(): {
    // javascript wrapper for 'gst_rtsp_media_get_buffer_size'
}

Get the kernel UDP buffer size.

Returns (Number)

the kernel UDP buffer size.


GstRtspServer.RTSPMedia.prototype.get_clock

function GstRtspServer.RTSPMedia.prototype.get_clock(): {
    // javascript wrapper for 'gst_rtsp_media_get_clock'
}

Get the clock that is used by the pipeline in media.

media must be prepared before this method returns a valid clock object.

Returns (Gst.Clock)

the Gst.Clock used by media. unref after usage.


GstRtspServer.RTSPMedia.prototype.get_do_retransmission

function GstRtspServer.RTSPMedia.prototype.get_do_retransmission(): {
    // javascript wrapper for 'gst_rtsp_media_get_do_retransmission'
}

Parameters:

No description available
Returns (Number)

Whether retransmission requests will be sent

Since : 1.16


GstRtspServer.RTSPMedia.prototype.get_dscp_qos

function GstRtspServer.RTSPMedia.prototype.get_dscp_qos(): {
    // javascript wrapper for 'gst_rtsp_media_get_dscp_qos'
}

Get the configured DSCP QoS of attached media.

Returns (Number)

the DSCP QoS value of attached streams or -1 if disabled.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.get_element

function GstRtspServer.RTSPMedia.prototype.get_element(): {
    // javascript wrapper for 'gst_rtsp_media_get_element'
}

Get the element that was used when constructing media.

Returns (Gst.Element)

a Gst.Element. Unref after usage.


GstRtspServer.RTSPMedia.prototype.get_ensure_keyunit_on_start

function GstRtspServer.RTSPMedia.prototype.get_ensure_keyunit_on_start(): {
    // javascript wrapper for 'gst_rtsp_media_get_ensure_keyunit_on_start'
}

Get ensure-keyunit-on-start flag.

Returns (Number)

The ensure-keyunit-on-start flag.

Since : 1.24


GstRtspServer.RTSPMedia.prototype.get_ensure_keyunit_on_start_timeout

function GstRtspServer.RTSPMedia.prototype.get_ensure_keyunit_on_start_timeout(): {
    // javascript wrapper for 'gst_rtsp_media_get_ensure_keyunit_on_start_timeout'
}

Get ensure-keyunit-on-start-timeout time.

Returns (Number)

The ensure-keyunit-on-start-timeout time.

Since : 1.24


GstRtspServer.RTSPMedia.prototype.get_latency

function GstRtspServer.RTSPMedia.prototype.get_latency(): {
    // javascript wrapper for 'gst_rtsp_media_get_latency'
}

Get the latency that is used for receiving media.

Returns (Number)

latency in milliseconds


GstRtspServer.RTSPMedia.prototype.get_max_mcast_ttl

function GstRtspServer.RTSPMedia.prototype.get_max_mcast_ttl(): {
    // javascript wrapper for 'gst_rtsp_media_get_max_mcast_ttl'
}

Get the the maximum time-to-live value of outgoing multicast packets.

Returns (Number)

the maximum time-to-live value of outgoing multicast packets.

Since : 1.16


GstRtspServer.RTSPMedia.prototype.get_multicast_iface

function GstRtspServer.RTSPMedia.prototype.get_multicast_iface(): {
    // javascript wrapper for 'gst_rtsp_media_get_multicast_iface'
}

Get the multicast interface used for media.

Returns (String)

the multicast interface for media. GLib.prototype.free after usage.


GstRtspServer.RTSPMedia.prototype.get_permissions

function GstRtspServer.RTSPMedia.prototype.get_permissions(): {
    // javascript wrapper for 'gst_rtsp_media_get_permissions'
}

Get the permissions object from media.

a GstRtspServer.RTSPPermissions object, unref after usage.


GstRtspServer.RTSPMedia.prototype.get_profiles

function GstRtspServer.RTSPMedia.prototype.get_profiles(): {
    // javascript wrapper for 'gst_rtsp_media_get_profiles'
}

Get the allowed profiles of media.


GstRtspServer.RTSPMedia.prototype.get_protocols

function GstRtspServer.RTSPMedia.prototype.get_protocols(): {
    // javascript wrapper for 'gst_rtsp_media_get_protocols'
}

Get the allowed protocols of media.


GstRtspServer.RTSPMedia.prototype.get_publish_clock_mode

function GstRtspServer.RTSPMedia.prototype.get_publish_clock_mode(): {
    // javascript wrapper for 'gst_rtsp_media_get_publish_clock_mode'
}

Gets if and how the media clock should be published according to RFC7273.

The GstRTSPPublishClockMode

Since : 1.8


GstRtspServer.RTSPMedia.prototype.get_range_string

function GstRtspServer.RTSPMedia.prototype.get_range_string(play: Number, unit: GstRtsp.RTSPRangeUnit): {
    // javascript wrapper for 'gst_rtsp_media_get_range_string'
}

Get the current range as a string. media must be prepared with gst_rtsp_media_prepare ().

Parameters:

play (Number)

for the PLAY request

the unit to use for the string

Returns (String)

The range as a string, GLib.prototype.free after usage.


GstRtspServer.RTSPMedia.prototype.get_rate_control

function GstRtspServer.RTSPMedia.prototype.get_rate_control(): {
    // javascript wrapper for 'gst_rtsp_media_get_rate_control'
}

Parameters:

No description available
Returns (Number)

whether media will follow the Rate-Control=no behaviour as specified in the ONVIF replay spec.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.get_rates

function GstRtspServer.RTSPMedia.prototype.get_rates(): {
    // javascript wrapper for 'gst_rtsp_media_get_rates'
}

Get the rate and applied_rate of the current segment.

Returns a tuple made of:

(Number )

false if looking up the rate and applied rate failed. Otherwise true is returned and rate and applied_rate are set to the rate and applied_rate of the current segment.

rate (Number )

false if looking up the rate and applied rate failed. Otherwise true is returned and rate and applied_rate are set to the rate and applied_rate of the current segment.

applied_rate (Number )

false if looking up the rate and applied rate failed. Otherwise true is returned and rate and applied_rate are set to the rate and applied_rate of the current segment.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.get_retransmission_time

function GstRtspServer.RTSPMedia.prototype.get_retransmission_time(): {
    // javascript wrapper for 'gst_rtsp_media_get_retransmission_time'
}

Get the amount of time to store retransmission data.

Returns (Number)

the amount of time to store retransmission data.


GstRtspServer.RTSPMedia.prototype.get_status

function GstRtspServer.RTSPMedia.prototype.get_status(): {
    // javascript wrapper for 'gst_rtsp_media_get_status'
}

Get the status of media. When media is busy preparing, this function waits until media is prepared or in error.

the status of media.


GstRtspServer.RTSPMedia.prototype.get_stream

function GstRtspServer.RTSPMedia.prototype.get_stream(idx: Number): {
    // javascript wrapper for 'gst_rtsp_media_get_stream'
}

Retrieve the stream with index idx from media.

Parameters:

idx (Number)

the stream index

Returns (GstRtspServer.RTSPStream)

the GstRtspServer.RTSPStream at index idx or null when a stream with that index did not exist.


GstRtspServer.RTSPMedia.prototype.get_suspend_mode

function GstRtspServer.RTSPMedia.prototype.get_suspend_mode(): {
    // javascript wrapper for 'gst_rtsp_media_get_suspend_mode'
}

Get how media will be suspended.


GstRtspServer.RTSPMedia.prototype.get_time_provider

function GstRtspServer.RTSPMedia.prototype.get_time_provider(address: String, port: Number): {
    // javascript wrapper for 'gst_rtsp_media_get_time_provider'
}

Get the GstNet.NetTimeProvider for the clock used by media. The time provider will listen on address and port for client time requests.

Parameters:

address (String)

an address or null

port (Number)

a port or 0

Returns (GstNet.NetTimeProvider)

the GstNet.NetTimeProvider of media.


GstRtspServer.RTSPMedia.prototype.get_transport_mode

function GstRtspServer.RTSPMedia.prototype.get_transport_mode(): {
    // javascript wrapper for 'gst_rtsp_media_get_transport_mode'
}

Check if the pipeline for media can be used for PLAY or RECORD methods.

The transport mode.


GstRtspServer.RTSPMedia.prototype.handle_sdp

function GstRtspServer.RTSPMedia.prototype.handle_sdp(sdp: GstSdp.SDPMessage): {
    // javascript wrapper for 'gst_rtsp_media_handle_sdp'
}

Configure an SDP on media for receiving streams

Returns (Number)

TRUE on success.


GstRtspServer.RTSPMedia.prototype.has_completed_sender

function GstRtspServer.RTSPMedia.prototype.has_completed_sender(): {
    // javascript wrapper for 'gst_rtsp_media_has_completed_sender'
}

See GstRtspServer.RTSPStream.prototype.is_complete, GstRtspServer.RTSPStream.prototype.is_sender.

Parameters:

No description available
Returns (Number)

whether media has at least one complete sender stream.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.is_bind_mcast_address

function GstRtspServer.RTSPMedia.prototype.is_bind_mcast_address(): {
    // javascript wrapper for 'gst_rtsp_media_is_bind_mcast_address'
}

Check if multicast sockets are configured to be bound to multicast addresses.

Returns (Number)

true if multicast sockets are configured to be bound to multicast addresses.

Since : 1.16


GstRtspServer.RTSPMedia.prototype.is_eos_shutdown

function GstRtspServer.RTSPMedia.prototype.is_eos_shutdown(): {
    // javascript wrapper for 'gst_rtsp_media_is_eos_shutdown'
}

Check if the pipeline for media will send an EOS down the pipeline before unpreparing.

Returns (Number)

true if the media will send EOS before unpreparing.


GstRtspServer.RTSPMedia.prototype.is_receive_only

function GstRtspServer.RTSPMedia.prototype.is_receive_only(): {
    // javascript wrapper for 'gst_rtsp_media_is_receive_only'
}

Parameters:

No description available
Returns (Number)

true if media is receive-only, false otherwise.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.is_reusable

function GstRtspServer.RTSPMedia.prototype.is_reusable(): {
    // javascript wrapper for 'gst_rtsp_media_is_reusable'
}

Check if the pipeline for media can be reused after an unprepare.

Returns (Number)

true if the media can be reused


GstRtspServer.RTSPMedia.prototype.is_shared

function GstRtspServer.RTSPMedia.prototype.is_shared(): {
    // javascript wrapper for 'gst_rtsp_media_is_shared'
}

Check if the pipeline for media can be shared between multiple clients in theory. This simply returns the value set via GstRtspServer.RTSPMedia.prototype.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 GstRtspServer.RTSPMedia.prototype.can_be_shared.

Returns (Number)

true if the media can be shared between clients.


GstRtspServer.RTSPMedia.prototype.is_stop_on_disconnect

function GstRtspServer.RTSPMedia.prototype.is_stop_on_disconnect(): {
    // javascript wrapper for 'gst_rtsp_media_is_stop_on_disconnect'
}

Check if the pipeline for media will be stopped when a client disconnects without sending TEARDOWN.

Returns (Number)

true if the media will be stopped when a client disconnects without sending TEARDOWN.


GstRtspServer.RTSPMedia.prototype.is_time_provider

function GstRtspServer.RTSPMedia.prototype.is_time_provider(): {
    // javascript wrapper for 'gst_rtsp_media_is_time_provider'
}

Check if media can provide a GstNet.NetTimeProvider for its pipeline clock.

Use GstRtspServer.RTSPMedia.prototype.get_time_provider to get the network clock.

Returns (Number)

true if media can provide a GstNet.NetTimeProvider.


GstRtspServer.RTSPMedia.prototype.lock

function GstRtspServer.RTSPMedia.prototype.lock(): {
    // javascript wrapper for 'gst_rtsp_media_lock'
}

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.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.n_streams

function GstRtspServer.RTSPMedia.prototype.n_streams(): {
    // javascript wrapper for 'gst_rtsp_media_n_streams'
}

Get the number of streams in this media.

Returns (Number)

The number of streams.


GstRtspServer.RTSPMedia.prototype.prepare

function GstRtspServer.RTSPMedia.prototype.prepare(thread: GstRtspServer.RTSPThread): {
    // javascript wrapper for 'gst_rtsp_media_prepare'
}

Prepare media for streaming. This function will create the objects to manage the streaming. A pipeline must have been set on media with GstRtspServer.RTSPMedia.prototype.take_pipeline.

It will preroll the pipeline and collect vital information about the streams such as the duration.

Parameters:

a GstRtspServer.RTSPThread to run the bus handler or null

Returns (Number)

true on success.


GstRtspServer.RTSPMedia.prototype.seek

function GstRtspServer.RTSPMedia.prototype.seek(range: GstRtsp.RTSPTimeRange): {
    // javascript wrapper for 'gst_rtsp_media_seek'
}

Seek the pipeline of media to range. media must be prepared with GstRtspServer.RTSPMedia.prototype.prepare.

Returns (Number)

true on success.


GstRtspServer.RTSPMedia.prototype.seek_full

function GstRtspServer.RTSPMedia.prototype.seek_full(range: GstRtsp.RTSPTimeRange, flags: Gst.SeekFlags): {
    // javascript wrapper for 'gst_rtsp_media_seek_full'
}

Seek the pipeline of media to range with the given flags. media must be prepared with GstRtspServer.RTSPMedia.prototype.prepare.

Parameters:

flags (Gst.SeekFlags)

The minimal set of Gst.SeekFlags to use

Returns (Number)

true on success.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.seek_trickmode

function GstRtspServer.RTSPMedia.prototype.seek_trickmode(range: GstRtsp.RTSPTimeRange, flags: Gst.SeekFlags, rate: Number, trickmode_interval: Number): {
    // javascript wrapper for 'gst_rtsp_media_seek_trickmode'
}

Seek the pipeline of media to range with the given flags and rate, and trickmode_interval. media must be prepared with GstRtspServer.RTSPMedia.prototype.prepare. In order to perform the seek operation, the pipeline must contain all needed transport parts (transport sinks).

Parameters:

flags (Gst.SeekFlags)

The minimal set of Gst.SeekFlags to use

rate (Number)

the rate to use in the seek

trickmode_interval (Number)

The trickmode interval to use for KEY_UNITS trick mode

Returns (Number)

true on success.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.seekable

function GstRtspServer.RTSPMedia.prototype.seekable(): {
    // javascript wrapper for 'gst_rtsp_media_seekable'
}

Check if the pipeline for media seek and up to what point in time, it can seek.

Returns (Number)

-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. GLib.MAXINT64 means any value is possible.

Since : 1.14


GstRtspServer.RTSPMedia.prototype.set_address_pool

function GstRtspServer.RTSPMedia.prototype.set_address_pool(pool: GstRtspServer.RTSPAddressPool): {
    // javascript wrapper for 'gst_rtsp_media_set_address_pool'
}

configure pool to be used as the address pool of media.


GstRtspServer.RTSPMedia.prototype.set_bind_mcast_address

function GstRtspServer.RTSPMedia.prototype.set_bind_mcast_address(bind_mcast_addr: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_bind_mcast_address'
}

Decide whether the multicast socket should be bound to a multicast address or INADDR_ANY.

Parameters:

bind_mcast_addr (Number)

the new value

Since : 1.16


GstRtspServer.RTSPMedia.prototype.set_buffer_size

function GstRtspServer.RTSPMedia.prototype.set_buffer_size(size: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_buffer_size'
}

Set the kernel UDP buffer size.

Parameters:

size (Number)

the new value


GstRtspServer.RTSPMedia.prototype.set_clock

function GstRtspServer.RTSPMedia.prototype.set_clock(clock: Gst.Clock): {
    // javascript wrapper for 'gst_rtsp_media_set_clock'
}

Configure the clock used for the media.

Parameters:

clock (Gst.Clock)

Gst.Clock to be used


GstRtspServer.RTSPMedia.prototype.set_do_retransmission

function GstRtspServer.RTSPMedia.prototype.set_do_retransmission(do_retransmission: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_do_retransmission'
}

Set whether retransmission requests will be sent

Parameters:

No description available
do_retransmission (Number)
No description available

Since : 1.16


GstRtspServer.RTSPMedia.prototype.set_dscp_qos

function GstRtspServer.RTSPMedia.prototype.set_dscp_qos(dscp_qos: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_dscp_qos'
}

Configure the dscp qos of attached streams to dscp_qos.

Parameters:

dscp_qos (Number)

a new dscp qos value (0-63, or -1 to disable)

Since : 1.18


GstRtspServer.RTSPMedia.prototype.set_ensure_keyunit_on_start

function GstRtspServer.RTSPMedia.prototype.set_ensure_keyunit_on_start(ensure_keyunit_on_start: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_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.

Parameters:

ensure_keyunit_on_start (Number)

the new value

Since : 1.24


GstRtspServer.RTSPMedia.prototype.set_ensure_keyunit_on_start_timeout

function GstRtspServer.RTSPMedia.prototype.set_ensure_keyunit_on_start_timeout(timeout: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_ensure_keyunit_on_start_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.

Parameters:

timeout (Number)

the new value

Since : 1.24


GstRtspServer.RTSPMedia.prototype.set_eos_shutdown

function GstRtspServer.RTSPMedia.prototype.set_eos_shutdown(eos_shutdown: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_eos_shutdown'
}

Set or unset if an EOS event will be sent to the pipeline for media before it is unprepared.

Parameters:

eos_shutdown (Number)

the new value


GstRtspServer.RTSPMedia.prototype.set_latency

function GstRtspServer.RTSPMedia.prototype.set_latency(latency: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_latency'
}

Configure the latency used for receiving media.

Parameters:

latency (Number)

latency in milliseconds


GstRtspServer.RTSPMedia.prototype.set_max_mcast_ttl

function GstRtspServer.RTSPMedia.prototype.set_max_mcast_ttl(ttl: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_max_mcast_ttl'
}

Set the maximum time-to-live value of outgoing multicast packets.

Parameters:

ttl (Number)

the new multicast ttl value

Returns (Number)

true if the requested ttl has been set successfully.

Since : 1.16


GstRtspServer.RTSPMedia.prototype.set_multicast_iface

function GstRtspServer.RTSPMedia.prototype.set_multicast_iface(multicast_iface: String): {
    // javascript wrapper for 'gst_rtsp_media_set_multicast_iface'
}

configure multicast_iface to be used for media.

Parameters:

multicast_iface (String)

a multicast interface name


GstRtspServer.RTSPMedia.prototype.set_permissions

function GstRtspServer.RTSPMedia.prototype.set_permissions(permissions: GstRtspServer.RTSPPermissions): {
    // javascript wrapper for 'gst_rtsp_media_set_permissions'
}

Set permissions on media.


GstRtspServer.RTSPMedia.prototype.set_pipeline_state

function GstRtspServer.RTSPMedia.prototype.set_pipeline_state(state: Gst.State): {
    // javascript wrapper for 'gst_rtsp_media_set_pipeline_state'
}

Set the state of the pipeline managed by media to state

Parameters:

state (Gst.State)

the target state of the pipeline


GstRtspServer.RTSPMedia.prototype.set_profiles

function GstRtspServer.RTSPMedia.prototype.set_profiles(profiles: GstRtsp.RTSPProfile): {
    // javascript wrapper for 'gst_rtsp_media_set_profiles'
}

Configure the allowed lower transport for media.

Parameters:

profiles (GstRtsp.RTSPProfile)

the new flags


GstRtspServer.RTSPMedia.prototype.set_protocols

function GstRtspServer.RTSPMedia.prototype.set_protocols(protocols: GstRtsp.RTSPLowerTrans): {
    // javascript wrapper for 'gst_rtsp_media_set_protocols'
}

Configure the allowed lower transport for media.

Parameters:

protocols (GstRtsp.RTSPLowerTrans)

the new flags


GstRtspServer.RTSPMedia.prototype.set_publish_clock_mode

function GstRtspServer.RTSPMedia.prototype.set_publish_clock_mode(mode: GstRtspServer.RTSPPublishClockMode): {
    // javascript wrapper for 'gst_rtsp_media_set_publish_clock_mode'
}

Sets if and how the media clock should be published according to RFC7273.

Parameters:

the clock publish mode

Since : 1.8


GstRtspServer.RTSPMedia.prototype.set_rate_control

function GstRtspServer.RTSPMedia.prototype.set_rate_control(enabled: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_rate_control'
}

Define whether media will follow the Rate-Control=no behaviour as specified in the ONVIF replay spec.

Parameters:

No description available
enabled (Number)
No description available

Since : 1.18


GstRtspServer.RTSPMedia.prototype.set_retransmission_time

function GstRtspServer.RTSPMedia.prototype.set_retransmission_time(time: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_retransmission_time'
}

Set the amount of time to store retransmission packets.

Parameters:

time (Number)

the new value


GstRtspServer.RTSPMedia.prototype.set_reusable

function GstRtspServer.RTSPMedia.prototype.set_reusable(reusable: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_reusable'
}

Set or unset if the pipeline for media can be reused after the pipeline has been unprepared.

Parameters:

reusable (Number)

the new value


GstRtspServer.RTSPMedia.prototype.set_shared

function GstRtspServer.RTSPMedia.prototype.set_shared(shared: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_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.

Parameters:

shared (Number)

the new value


GstRtspServer.RTSPMedia.prototype.set_state

function GstRtspServer.RTSPMedia.prototype.set_state(state: Gst.State, transports: [ GstRtspServer.RTSPStreamTransport ]): {
    // javascript wrapper for 'gst_rtsp_media_set_state'
}

Set the state of media to state and for the transports in transports.

media must be prepared with GstRtspServer.RTSPMedia.prototype.prepare;

Parameters:

state (Gst.State)

the target state of the media

transports ([ GstRtspServer.RTSPStreamTransport ])

(transfer none) (element-type GstRtspServer.RTSPStreamTransport): a GPtrArray (not introspectable) of GstRtspServer.RTSPStreamTransport pointers

Returns (Number)

true on success.


GstRtspServer.RTSPMedia.prototype.set_stop_on_disconnect

function GstRtspServer.RTSPMedia.prototype.set_stop_on_disconnect(stop_on_disconnect: Number): {
    // javascript wrapper for 'gst_rtsp_media_set_stop_on_disconnect'
}

Set or unset if the pipeline for media should be stopped when a client disconnects without sending TEARDOWN.

Parameters:

stop_on_disconnect (Number)

the new value


GstRtspServer.RTSPMedia.prototype.set_suspend_mode

function GstRtspServer.RTSPMedia.prototype.set_suspend_mode(mode: GstRtspServer.RTSPSuspendMode): {
    // javascript wrapper for 'gst_rtsp_media_set_suspend_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.


GstRtspServer.RTSPMedia.prototype.set_transport_mode

function GstRtspServer.RTSPMedia.prototype.set_transport_mode(mode: GstRtspServer.RTSPTransportMode): {
    // javascript wrapper for 'gst_rtsp_media_set_transport_mode'
}

Sets if the media pipeline can work in PLAY or RECORD mode

Parameters:

the new value


GstRtspServer.RTSPMedia.prototype.setup_sdp

function GstRtspServer.RTSPMedia.prototype.setup_sdp(sdp: GstSdp.SDPMessage, info: GstRtspServer.SDPInfo): {
    // javascript wrapper for 'gst_rtsp_media_setup_sdp'
}

Add media specific info to sdp. info is used to configure the connection information in the SDP.

Returns (Number)

TRUE on success.


GstRtspServer.RTSPMedia.prototype.suspend

function GstRtspServer.RTSPMedia.prototype.suspend(): {
    // javascript wrapper for 'gst_rtsp_media_suspend'
}

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 GstRtspServer.RTSPMedia.prototype.unsuspend

media must be prepared with GstRtspServer.RTSPMedia.prototype.prepare;

Returns (Number)

true on success.


GstRtspServer.RTSPMedia.prototype.take_pipeline

function GstRtspServer.RTSPMedia.prototype.take_pipeline(pipeline: Gst.Pipeline): {
    // javascript wrapper for 'gst_rtsp_media_take_pipeline'
}

Set pipeline as the Gst.Pipeline for media. Ownership is taken of pipeline.

Parameters:

pipeline (Gst.Pipeline)

a Gst.Pipeline


GstRtspServer.RTSPMedia.prototype.unlock

function GstRtspServer.RTSPMedia.prototype.unlock(): {
    // javascript wrapper for 'gst_rtsp_media_unlock'
}

Unlock the media.

Since : 1.18


GstRtspServer.RTSPMedia.prototype.unprepare

function GstRtspServer.RTSPMedia.prototype.unprepare(): {
    // javascript wrapper for 'gst_rtsp_media_unprepare'
}

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.

Returns (Number)

true on success.


GstRtspServer.RTSPMedia.prototype.unsuspend

function GstRtspServer.RTSPMedia.prototype.unsuspend(): {
    // javascript wrapper for 'gst_rtsp_media_unsuspend'
}

Unsuspend media if it was in a suspended state. This method does nothing when the media was not in the suspended state.

Returns (Number)

true on success.


GstRtspServer.RTSPMedia.prototype.use_time_provider

function GstRtspServer.RTSPMedia.prototype.use_time_provider(time_provider: Number): {
    // javascript wrapper for 'gst_rtsp_media_use_time_provider'
}

Set media to provide a GstNet.NetTimeProvider.

Parameters:

time_provider (Number)

if a GstNet.NetTimeProvider should be used


Signals

handle-message

function handle_message_callback(self: GstRtspServer.RTSPMedia, message: Gst.Message, user_data: Object): {
    // javascript callback for the 'handle-message' signal
}

Will be emitted when a message appears on the pipeline bus.

Parameters:

No description available
message (Gst.Message)

a Gst.Message

user_data (Object)
No description available
Returns (Number)

a Number indicating if the call was successful or not.

Flags: Run Last

Since : 1.22


new-state

function new_state_callback(self: GstRtspServer.RTSPMedia, object: Number, user_data: Object): {
    // javascript callback for the 'new-state' signal
}

Parameters:

No description available
object (Number)
No description available
user_data (Object)
No description available

Flags: Run Last


new-stream

function new_stream_callback(self: GstRtspServer.RTSPMedia, object: GstRtspServer.RTSPStream, user_data: Object): {
    // javascript callback for the 'new-stream' signal
}

Parameters:

No description available
No description available
user_data (Object)
No description available

Flags: Run Last


prepared

function prepared_callback(self: GstRtspServer.RTSPMedia, user_data: Object): {
    // javascript callback for the 'prepared' signal
}

Parameters:

No description available
user_data (Object)
No description available

Flags: Run Last


removed-stream

function removed_stream_callback(self: GstRtspServer.RTSPMedia, object: GstRtspServer.RTSPStream, user_data: Object): {
    // javascript callback for the 'removed-stream' signal
}

Parameters:

No description available
No description available
user_data (Object)
No description available

Flags: Run Last


target-state

function target_state_callback(self: GstRtspServer.RTSPMedia, object: Number, user_data: Object): {
    // javascript callback for the 'target-state' signal
}

Parameters:

No description available
object (Number)
No description available
user_data (Object)
No description available

Flags: Run Last


unprepared

function unprepared_callback(self: GstRtspServer.RTSPMedia, user_data: Object): {
    // javascript callback for the 'unprepared' signal
}

Parameters:

No description available
user_data (Object)
No description available

Flags: Run Last


Properties

bind-mcast-address

“bind-mcast-address” Number

Flags : Read / Write


buffer-size

“buffer-size” Number

Flags : Read / Write


clock

“clock” Gst.Clock

Flags : Read / Write


dscp-qos

“dscp-qos” Number

Flags : Read / Write


element

“element” Gst.Element

Flags : Read / Write / Construct Only


ensure-keyunit-on-start

“ensure-keyunit-on-start” Number

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” Number

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


eos-shutdown

“eos-shutdown” Number

Flags : Read / Write


latency

“latency” Number

Flags : Read / Write


max-mcast-ttl

“max-mcast-ttl” Number

Flags : Read / Write


profiles

“profiles” GstRtsp.RTSPProfile

Flags : Read / Write


protocols

“protocols” GstRtsp.RTSPLowerTrans

Flags : Read / Write


reusable

“reusable” Number

Flags : Read / Write


shared

“shared” Number

Flags : Read / Write


stop-on-disconnect

“stop-on-disconnect” Number

Flags : Read / Write


suspend-mode

“suspend-mode” GstRtspServer.RTSPSuspendMode

Flags : Read / Write


time-provider

“time-provider” Number

Flags : Read / Write


transport-mode

“transport-mode” GstRtspServer.RTSPTransportMode

Flags : Read / Write


Virtual Methods

vfunc_convert_range

function vfunc_convert_range(media: GstRtspServer.RTSPMedia, range: GstRtsp.RTSPTimeRange, unit: GstRtsp.RTSPRangeUnit): {
    // javascript implementation of the 'convert_range' virtual method
}

convert a range to the given unit

Parameters:

No description available
range (GstRtsp.RTSPTimeRange)
No description available
No description available
Returns (Number)
No description available

vfunc_handle_message

function vfunc_handle_message(media: GstRtspServer.RTSPMedia, message: Gst.Message): {
    // javascript implementation of the 'handle_message' virtual method
}

handle a message

Parameters:

No description available
message (Gst.Message)
No description available
Returns (Number)
No description available

vfunc_handle_sdp

function vfunc_handle_sdp(media: GstRtspServer.RTSPMedia, sdp: GstSdp.SDPMessage): {
    // javascript implementation of the 'handle_sdp' virtual method
}

Parameters:

No description available
sdp (GstSdp.SDPMessage)
No description available
Returns (Number)
No description available

vfunc_new_state

function vfunc_new_state(media: GstRtspServer.RTSPMedia, state: Gst.State): {
    // javascript implementation of the 'new_state' virtual method
}

Parameters:

No description available
state (Gst.State)
No description available

vfunc_new_stream

function vfunc_new_stream(media: GstRtspServer.RTSPMedia, stream: GstRtspServer.RTSPStream): {
    // javascript implementation of the 'new_stream' virtual method
}

Parameters:

No description available
No description available

vfunc_prepare

function vfunc_prepare(media: GstRtspServer.RTSPMedia, thread: GstRtspServer.RTSPThread): {
    // javascript implementation of the 'prepare' virtual method
}

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:

No description available
No description available
Returns (Number)
No description available

vfunc_prepared

function vfunc_prepared(media: GstRtspServer.RTSPMedia): {
    // javascript implementation of the 'prepared' virtual method
}

Parameters:

No description available

vfunc_query_position

function vfunc_query_position(media: GstRtspServer.RTSPMedia, position: Number): {
    // javascript implementation of the 'query_position' virtual method
}

query the current position in the pipeline

Parameters:

No description available
position (Number)
No description available
Returns (Number)
No description available

vfunc_query_stop

function vfunc_query_stop(media: GstRtspServer.RTSPMedia, stop: Number): {
    // javascript implementation of the 'query_stop' virtual method
}

query when playback will stop

Parameters:

No description available
stop (Number)
No description available
Returns (Number)
No description available

vfunc_removed_stream

function vfunc_removed_stream(media: GstRtspServer.RTSPMedia, stream: GstRtspServer.RTSPStream): {
    // javascript implementation of the 'removed_stream' virtual method
}

Parameters:

No description available
No description available

vfunc_setup_rtpbin

function vfunc_setup_rtpbin(media: GstRtspServer.RTSPMedia, rtpbin: Gst.Element): {
    // javascript implementation of the 'setup_rtpbin' virtual method
}

Parameters:

No description available
rtpbin (Gst.Element)
No description available
Returns (Number)
No description available

vfunc_setup_sdp

function vfunc_setup_sdp(media: GstRtspServer.RTSPMedia, sdp: GstSdp.SDPMessage, info: GstRtspServer.SDPInfo): {
    // javascript implementation of the 'setup_sdp' virtual method
}

Parameters:

No description available
sdp (GstSdp.SDPMessage)
No description available
No description available
Returns (Number)
No description available

vfunc_suspend

function vfunc_suspend(media: GstRtspServer.RTSPMedia): {
    // javascript implementation of the 'suspend' virtual method
}

the default implementation sets the pipeline's state to GST_STATE_NULL GST_STATE_PAUSED depending on the selected suspend mode.

Parameters:

No description available
Returns (Number)
No description available

vfunc_target_state

function vfunc_target_state(media: GstRtspServer.RTSPMedia, state: Gst.State): {
    // javascript implementation of the 'target_state' virtual method
}

Parameters:

No description available
state (Gst.State)
No description available

vfunc_unprepare

function vfunc_unprepare(media: GstRtspServer.RTSPMedia): {
    // javascript implementation of the 'unprepare' virtual method
}

the default implementation sets the pipeline's state to GST_STATE_NULL and removes all elements.

Parameters:

No description available
Returns (Number)
No description available

vfunc_unprepared

function vfunc_unprepared(media: GstRtspServer.RTSPMedia): {
    // javascript implementation of the 'unprepared' virtual method
}

Parameters:

No description available

vfunc_unsuspend

function vfunc_unsuspend(media: GstRtspServer.RTSPMedia): {
    // javascript implementation of the 'unsuspend' virtual method
}

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:

No description available
Returns (Number)
No description available

Function Macros

Enumerations

GstRtspServer.RTSPMediaStatus

The state of the media pipeline.

Members
GstRtspServer.RTSPMediaStatus.UNPREPARED (0) –

media pipeline not prerolled

GstRtspServer.RTSPMediaStatus.UNPREPARING (1) –

media pipeline is busy doing a clean shutdown.

GstRtspServer.RTSPMediaStatus.PREPARING (2) –

media pipeline is prerolling

GstRtspServer.RTSPMediaStatus.PREPARED (3) –

media pipeline is prerolled

GstRtspServer.RTSPMediaStatus.SUSPENDED (4) –

media is suspended

GstRtspServer.RTSPMediaStatus.ERROR (5) –

media pipeline is in error


GstRtspServer.RTSPPublishClockMode

Whether the clock and possibly RTP/clock offset should be published according to RFC7273.

Members
GstRtspServer.RTSPPublishClockMode.NONE (0) –

Publish nothing

GstRtspServer.RTSPPublishClockMode.CLOCK (1) –

Publish the clock but not the offset

GstRtspServer.RTSPPublishClockMode.CLOCK_AND_OFFSET (2) –

Publish the clock and offset


GstRtspServer.RTSPSuspendMode

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
GstRtspServer.RTSPSuspendMode.NONE (0) –

Media is not suspended

GstRtspServer.RTSPSuspendMode.PAUSE (1) –

Media is PAUSED in suspend

GstRtspServer.RTSPSuspendMode.RESET (2) –

The media is set to NULL when suspended


GstRtspServer.RTSPTransportMode

The supported modes of the media.

Members
GstRtspServer.RTSPTransportMode.PLAY (1) –

Transport supports PLAY mode

GstRtspServer.RTSPTransportMode.RECORD (2) –

Transport supports RECORD mode


The results of the search are