Gst.Pad.prototype.create_stream_id

function create_stream_id(parent:Gst.Element, stream_id:String):String {
    // Gjs wrapper for gst_pad_create_stream_id()
}

Creates a stream-id for the source Gst.Pad pad by combining the upstream information with the optional stream_id of the stream of pad. pad must have a parent Gst.Element and which must have zero or one sinkpad. stream_id can only be null if the parent element of pad has only a single source pad.

This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead.

Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format %%03u instead of %%u.

parent

Parent Gst.Element of pad

stream_id

The stream-id

Returns

A stream-id for pad. GLib.free after usage.