Sets our main struct and passes it to the parent class.
Get the main Gtk struct
the main Gtk struct as a void*
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Lets #GstBaseSrc sub-classes to know the memory @allocator used by the base class and its @params.
Get the number of bytes that @src will push out with each buffer.
Query if @src timestamps outgoing buffers based on the current running_time.
Get the current async behaviour of @src. See also gst_base_src_set_async().
Check if an element is in live mode.
Negotiates src pad caps with downstream elements. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if #GstBaseSrcClass.negotiate() fails.
Prepare a new seamless segment for emission downstream. This function must only be called by derived sub-classes, and only from the #GstBaseSrcClass::create function, as the stream-lock needs to be held.
Prepare a new segment for emission downstream. This function must only be called by derived sub-classes, and only from the #GstBaseSrcClass::create function, as the stream-lock needs to be held.
Query the source for the latency parameters. @live will be %TRUE when @src is configured as a live source. @min_latency and @max_latency will be set to the difference between the running time and the timestamp of the first buffer.
Configure async behaviour in @src, no state change will block. The open, close, start, stop, play and pause virtual methods will be executed in a different thread and are thus allowed to perform blocking operations. Any blocking operation should be unblocked with the unlock vmethod.
If @automatic_eos is %TRUE, @src will automatically go EOS if a buffer after the total size is returned. By default this is %TRUE but sources that can't return an authoritative size and only know that they're EOS when trying to read more should set this to %FALSE.
Set the number of bytes that @src will push out with each buffer. When @blocksize is set to -1, a default length will be used.
Set new caps on the basesrc source pad.
Configure @src to automatically timestamp outgoing buffers based on the current running_time of the pipeline. This property is mostly useful for live sources.
If not @dynamic, size is only updated when needed, such as when trying to read past current tracked size. Otherwise, size is checked for upon each read.
Sets the default format of the source. This will be the format used for sending SEGMENT events and for performing seeks.
If the element listens to a live source, @live should be set to %TRUE.
Complete an asynchronous start operation. When the subclass overrides the start method, it should call gst_base_src_start_complete() when the start operation completes either from the same thread or from an asynchronous helper thread.
Wait until the start operation completes.
Subclasses can call this from their create virtual method implementation to submit a buffer list to be pushed out later. This is useful in cases where the create function wants to produce multiple buffers to be pushed out in one go in form of a #GstBufferList, which can reduce overhead drastically, especially for packetised inputs (for data streams where the packetisation/chunking is not important it is usually more efficient to return larger buffers instead).
If the #GstBaseSrcClass.create() method performs its own synchronisation against the clock it must unblock when going from PLAYING to the PAUSED state and call this method before continuing to produce the remaining data.
This class is mostly useful for elements that cannot do random access, or at least very slowly. The source usually prefers to push out a fixed size buffer.
Subclasses usually operate in a format that is different from the default GST_FORMAT_BYTES format of #GstBaseSrc.
Classes extending this base class will usually be scheduled in a push based mode. If the peer accepts to operate without offsets and within the limits of the allowed block size, this class can operate in getrange based mode automatically. To make this possible, the subclass should implement and override the SCHEDULING query.
The subclass should extend the methods from the baseclass in addition to the ::create method.
Seeking, flushing, scheduling and sync is all handled by this base class.