GstAppSrc
The appsrc element can be used by applications to insert data into a GStreamer pipeline. Unlike most GStreamer elements, appsrc provides external API functions.
appsrc can be used by linking with the libgstapp library to access the methods directly or by using the appsrc action signals.
Before operating appsrc, the caps property must be set to fixed caps describing the format of the data that will be pushed with appsrc. An exception to this is when pushing buffers with unknown caps, in which case no caps should be set. This is typically true of file-like sources that push raw byte buffers. If you don't want to explicitly set the caps, you can use gst_app_src_push_sample. This method gets the caps associated with the sample and sets them on the appsrc replacing any previously set caps (if different from sample's caps).
The main way of handing data to the appsrc element is by calling the gst_app_src_push_buffer method or by emitting the push-buffer action signal. This will put the buffer onto a queue from which appsrc will read from in its streaming thread. It is important to note that data transport will not happen from the thread that performed the push-buffer call.
The "max-bytes" property controls how much data can be queued in appsrc before appsrc considers the queue full. A filled internal queue will always signal the "enough-data" signal, which signals the application that it should stop pushing data into appsrc. The "block" property will cause appsrc to block the push-buffer method until free data becomes available again.
When the internal queue is running out of data, the "need-data" signal is emitted, which signals the application that it should start pushing more data into appsrc.
In addition to the "need-data" and "enough-data" signals, appsrc can emit the "seek-data" signal when the "stream-mode" property is set to "seekable" or "random-access". The signal argument will contain the new desired position in the stream expressed in the unit set with the "format" property. After receiving the seek-data signal, the application should push-buffers from the new position.
These signals allow the application to operate the appsrc in two different ways:
The push mode, in which the application repeatedly calls the push-buffer/push-sample method with a new buffer/sample. Optionally, the queue size in the appsrc can be controlled with the enough-data and need-data signals by respectively stopping/starting the push-buffer/push-sample calls. This is a typical mode of operation for the stream-type "stream" and "seekable". Use this mode when implementing various network protocols or hardware devices.
The pull mode, in which the need-data signal triggers the next push-buffer call. This mode is typically used in the "random-access" stream-type. Use this mode for file access or other randomly accessible sources. In this mode, a buffer of exactly the amount of bytes given by the need-data signal should be pushed into appsrc.
In all modes, the size property on appsrc should contain the total stream size in bytes. Setting this property is mandatory in the random-access mode. For the stream and seekable modes, setting this property is optional but recommended.
When the application has finished pushing data into appsrc, it should call gst_app_src_end_of_stream or emit the end-of-stream action signal. After this call, no more buffers can be pushed into appsrc until a flushing seek occurs or the state of the appsrc has gone through READY.
GstAppSrc
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstAppSrc
Members
basesrc
(GstBaseSrc)
–
Class structure
GstAppSrc
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstAppSrc
Members
basesrc
(GstBaseSrc)
–
GstAppSrc
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstAppSrc
Members
basesrc
(GstBaseSrc)
–
Methods
gst_app_src_end_of_stream
GstFlowReturn gst_app_src_end_of_stream (GstAppSrc * appsrc)
Indicates to the appsrc element that the last buffer queued in the element is the last buffer of the stream.
Parameters:
appsrc
–
GST_FLOW_OK when the EOS was successfully queued. GST_FLOW_FLUSHING when appsrc is not PAUSED or PLAYING.
GstApp.AppSrc.prototype.end_of_stream
function GstApp.AppSrc.prototype.end_of_stream(): {
// javascript wrapper for 'gst_app_src_end_of_stream'
}
Indicates to the appsrc element that the last buffer queued in the element is the last buffer of the stream.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
Gst.FlowReturn.OK when the EOS was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING.
GstApp.AppSrc.end_of_stream
def GstApp.AppSrc.end_of_stream (self):
#python wrapper for 'gst_app_src_end_of_stream'
Indicates to the appsrc element that the last buffer queued in the element is the last buffer of the stream.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
Gst.FlowReturn.OK when the EOS was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING.
gst_app_src_get_caps
GstCaps * gst_app_src_get_caps (GstAppSrc * appsrc)
Get the configured caps on appsrc.
Parameters:
appsrc
–
the GstCaps produced by the source. gst_caps_unref after usage.
GstApp.AppSrc.prototype.get_caps
function GstApp.AppSrc.prototype.get_caps(): {
// javascript wrapper for 'gst_app_src_get_caps'
}
Get the configured caps on appsrc.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the Gst.Caps produced by the source. gst_caps_unref (not introspectable) after usage.
GstApp.AppSrc.get_caps
def GstApp.AppSrc.get_caps (self):
#python wrapper for 'gst_app_src_get_caps'
Get the configured caps on appsrc.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the Gst.Caps produced by the source. gst_caps_unref (not introspectable) after usage.
gst_app_src_get_current_level_bytes
guint64 gst_app_src_get_current_level_bytes (GstAppSrc * appsrc)
Get the number of currently queued bytes inside appsrc.
Parameters:
appsrc
–
The number of currently queued bytes.
Since : 1.2
GstApp.AppSrc.prototype.get_current_level_bytes
function GstApp.AppSrc.prototype.get_current_level_bytes(): {
// javascript wrapper for 'gst_app_src_get_current_level_bytes'
}
Get the number of currently queued bytes inside appsrc.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
The number of currently queued bytes.
Since : 1.2
GstApp.AppSrc.get_current_level_bytes
def GstApp.AppSrc.get_current_level_bytes (self):
#python wrapper for 'gst_app_src_get_current_level_bytes'
Get the number of currently queued bytes inside appsrc.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
The number of currently queued bytes.
Since : 1.2
gst_app_src_get_duration
GstClockTime gst_app_src_get_duration (GstAppSrc * appsrc)
Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is not known.
Parameters:
appsrc
–
the duration of the stream previously set with gst_app_src_set_duration;
Since : 1.10
GstApp.AppSrc.prototype.get_duration
function GstApp.AppSrc.prototype.get_duration(): {
// javascript wrapper for 'gst_app_src_get_duration'
}
Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is not known.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the duration of the stream previously set with GstApp.AppSrc.prototype.set_duration;
Since : 1.10
GstApp.AppSrc.get_duration
def GstApp.AppSrc.get_duration (self):
#python wrapper for 'gst_app_src_get_duration'
Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is not known.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the duration of the stream previously set with GstApp.AppSrc.set_duration;
Since : 1.10
gst_app_src_get_emit_signals
gboolean gst_app_src_get_emit_signals (GstAppSrc * appsrc)
Check if appsrc will emit the "new-preroll" and "new-buffer" signals.
Parameters:
appsrc
–
TRUE if appsrc is emitting the "new-preroll" and "new-buffer" signals.
GstApp.AppSrc.prototype.get_emit_signals
function GstApp.AppSrc.prototype.get_emit_signals(): {
// javascript wrapper for 'gst_app_src_get_emit_signals'
}
Check if appsrc will emit the "new-preroll" and "new-buffer" signals.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
GstApp.AppSrc.get_emit_signals
def GstApp.AppSrc.get_emit_signals (self):
#python wrapper for 'gst_app_src_get_emit_signals'
Check if appsrc will emit the "new-preroll" and "new-buffer" signals.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
gst_app_src_get_latency
gst_app_src_get_latency (GstAppSrc * appsrc, guint64 * min, guint64 * max)
Retrieve the min and max latencies in min and max respectively.
GstApp.AppSrc.prototype.get_latency
function GstApp.AppSrc.prototype.get_latency(): {
// javascript wrapper for 'gst_app_src_get_latency'
}
Retrieve the min and max latencies in min and max respectively.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
GstApp.AppSrc.get_latency
def GstApp.AppSrc.get_latency (self):
#python wrapper for 'gst_app_src_get_latency'
Retrieve the min and max latencies in min and max respectively.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
gst_app_src_get_max_bytes
guint64 gst_app_src_get_max_bytes (GstAppSrc * appsrc)
Get the maximum amount of bytes that can be queued in appsrc.
Parameters:
appsrc
–
The maximum amount of bytes that can be queued.
GstApp.AppSrc.prototype.get_max_bytes
function GstApp.AppSrc.prototype.get_max_bytes(): {
// javascript wrapper for 'gst_app_src_get_max_bytes'
}
Get the maximum amount of bytes that can be queued in appsrc.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
The maximum amount of bytes that can be queued.
GstApp.AppSrc.get_max_bytes
def GstApp.AppSrc.get_max_bytes (self):
#python wrapper for 'gst_app_src_get_max_bytes'
Get the maximum amount of bytes that can be queued in appsrc.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
The maximum amount of bytes that can be queued.
gst_app_src_get_size
gint64 gst_app_src_get_size (GstAppSrc * appsrc)
Get the size of the stream in bytes. A value of -1 means that the size is not known.
Parameters:
appsrc
–
the size of the stream previously set with gst_app_src_set_size;
GstApp.AppSrc.prototype.get_size
function GstApp.AppSrc.prototype.get_size(): {
// javascript wrapper for 'gst_app_src_get_size'
}
Get the size of the stream in bytes. A value of -1 means that the size is not known.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the size of the stream previously set with GstApp.AppSrc.prototype.set_size;
GstApp.AppSrc.get_size
def GstApp.AppSrc.get_size (self):
#python wrapper for 'gst_app_src_get_size'
Get the size of the stream in bytes. A value of -1 means that the size is not known.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the size of the stream previously set with GstApp.AppSrc.set_size;
gst_app_src_get_stream_type
GstAppStreamType gst_app_src_get_stream_type (GstAppSrc * appsrc)
Get the stream type. Control the stream type of appsrc with gst_app_src_set_stream_type.
Parameters:
appsrc
–
the stream type.
GstApp.AppSrc.prototype.get_stream_type
function GstApp.AppSrc.prototype.get_stream_type(): {
// javascript wrapper for 'gst_app_src_get_stream_type'
}
Get the stream type. Control the stream type of appsrc with GstApp.AppSrc.prototype.set_stream_type.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the stream type.
GstApp.AppSrc.get_stream_type
def GstApp.AppSrc.get_stream_type (self):
#python wrapper for 'gst_app_src_get_stream_type'
Get the stream type. Control the stream type of appsrc with GstApp.AppSrc.set_stream_type.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
the stream type.
gst_app_src_push_buffer
GstFlowReturn gst_app_src_push_buffer (GstAppSrc * appsrc, GstBuffer * buffer)
Adds a buffer to the queue of buffers that the appsrc element will push to its source pad. This function takes ownership of the buffer.
When the block property is TRUE, this function can block until free space becomes available in the queue.
GST_FLOW_OK when the buffer was successfully queued. GST_FLOW_FLUSHING when appsrc is not PAUSED or PLAYING. GST_FLOW_EOS when EOS occurred.
GstApp.AppSrc.prototype.push_buffer
function GstApp.AppSrc.prototype.push_buffer(buffer: Gst.Buffer): {
// javascript wrapper for 'gst_app_src_push_buffer'
}
Adds a buffer to the queue of buffers that the appsrc element will push to its source pad. This function takes ownership of the buffer.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Gst.FlowReturn.OK when the buffer was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING. Gst.FlowReturn.EOS when EOS occurred.
GstApp.AppSrc.push_buffer
def GstApp.AppSrc.push_buffer (self, buffer):
#python wrapper for 'gst_app_src_push_buffer'
Adds a buffer to the queue of buffers that the appsrc element will push to its source pad. This function takes ownership of the buffer.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Gst.FlowReturn.OK when the buffer was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING. Gst.FlowReturn.EOS when EOS occurred.
gst_app_src_push_buffer_list
GstFlowReturn gst_app_src_push_buffer_list (GstAppSrc * appsrc, GstBufferList * buffer_list)
Adds a buffer list to the queue of buffers and buffer lists that the appsrc element will push to its source pad. This function takes ownership of buffer_list.
When the block property is TRUE, this function can block until free space becomes available in the queue.
GST_FLOW_OK when the buffer list was successfully queued. GST_FLOW_FLUSHING when appsrc is not PAUSED or PLAYING. GST_FLOW_EOS when EOS occurred.
Since : 1.14
GstApp.AppSrc.prototype.push_buffer_list
function GstApp.AppSrc.prototype.push_buffer_list(buffer_list: Gst.BufferList): {
// javascript wrapper for 'gst_app_src_push_buffer_list'
}
Adds a buffer list to the queue of buffers and buffer lists that the appsrc element will push to its source pad. This function takes ownership of buffer_list.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Gst.FlowReturn.OK when the buffer list was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING. Gst.FlowReturn.EOS when EOS occurred.
Since : 1.14
GstApp.AppSrc.push_buffer_list
def GstApp.AppSrc.push_buffer_list (self, buffer_list):
#python wrapper for 'gst_app_src_push_buffer_list'
Adds a buffer list to the queue of buffers and buffer lists that the appsrc element will push to its source pad. This function takes ownership of buffer_list.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Gst.FlowReturn.OK when the buffer list was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING. Gst.FlowReturn.EOS when EOS occurred.
Since : 1.14
gst_app_src_push_sample
GstFlowReturn gst_app_src_push_sample (GstAppSrc * appsrc, GstSample * sample)
Extract a buffer from the provided sample and adds it to the queue of buffers that the appsrc element will push to its source pad. Any previous caps that were set on appsrc will be replaced by the caps associated with the sample if not equal.
This function does not take ownership of the sample so the sample needs to be unreffed after calling this function.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Parameters:
appsrc
–
sample
(
[transfer: none]
)
–
a GstSample from which buffer and caps may be extracted
GST_FLOW_OK when the buffer was successfully queued. GST_FLOW_FLUSHING when appsrc is not PAUSED or PLAYING. GST_FLOW_EOS when EOS occurred.
Since : 1.6
GstApp.AppSrc.prototype.push_sample
function GstApp.AppSrc.prototype.push_sample(sample: Gst.Sample): {
// javascript wrapper for 'gst_app_src_push_sample'
}
Extract a buffer from the provided sample and adds it to the queue of buffers that the appsrc element will push to its source pad. Any previous caps that were set on appsrc will be replaced by the caps associated with the sample if not equal.
This function does not take ownership of the sample so the sample needs to be unreffed after calling this function.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
sample
(
Gst.Sample
)
–
a Gst.Sample from which buffer and caps may be extracted
Gst.FlowReturn.OK when the buffer was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING. Gst.FlowReturn.EOS when EOS occurred.
Since : 1.6
GstApp.AppSrc.push_sample
def GstApp.AppSrc.push_sample (self, sample):
#python wrapper for 'gst_app_src_push_sample'
Extract a buffer from the provided sample and adds it to the queue of buffers that the appsrc element will push to its source pad. Any previous caps that were set on appsrc will be replaced by the caps associated with the sample if not equal.
This function does not take ownership of the sample so the sample needs to be unreffed after calling this function.
When the block property is TRUE, this function can block until free space becomes available in the queue.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
sample
(
Gst.Sample
)
–
a Gst.Sample from which buffer and caps may be extracted
Gst.FlowReturn.OK when the buffer was successfully queued. Gst.FlowReturn.FLUSHING when appsrc is not PAUSED or PLAYING. Gst.FlowReturn.EOS when EOS occurred.
Since : 1.6
gst_app_src_set_callbacks
gst_app_src_set_callbacks (GstAppSrc * appsrc, GstAppSrcCallbacks * callbacks, gpointer user_data, GDestroyNotify notify)
Set callbacks which will be executed when data is needed, enough data has been collected or when a seek should be performed. This is an alternative to using the signals, it has lower overhead and is thus less expensive, but also less flexible.
If callbacks are installed, no signals will be emitted for performance reasons.
Before 1.16.3 it was not possible to change the callbacks in a thread-safe way.
Parameters:
appsrc
–
callbacks
–
the callbacks
user_data
–
a user_data argument for the callbacks
notify
–
a destroy notify function
gst_app_src_set_caps
gst_app_src_set_caps (GstAppSrc * appsrc, const GstCaps * caps)
Set the capabilities on the appsrc element. This function takes a copy of the caps structure. After calling this method, the source will only produce caps that match caps. caps must be fixed and the caps on the buffers must match the caps or left NULL.
GstApp.AppSrc.prototype.set_caps
function GstApp.AppSrc.prototype.set_caps(caps: Gst.Caps): {
// javascript wrapper for 'gst_app_src_set_caps'
}
Set the capabilities on the appsrc element. This function takes a copy of the caps structure. After calling this method, the source will only produce caps that match caps. caps must be fixed and the caps on the buffers must match the caps or left NULL.
GstApp.AppSrc.set_caps
def GstApp.AppSrc.set_caps (self, caps):
#python wrapper for 'gst_app_src_set_caps'
Set the capabilities on the appsrc element. This function takes a copy of the caps structure. After calling this method, the source will only produce caps that match caps. caps must be fixed and the caps on the buffers must match the caps or left NULL.
gst_app_src_set_duration
gst_app_src_set_duration (GstAppSrc * appsrc, GstClockTime duration)
Set the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is not known.
Since : 1.10
GstApp.AppSrc.prototype.set_duration
function GstApp.AppSrc.prototype.set_duration(duration: Number): {
// javascript wrapper for 'gst_app_src_set_duration'
}
Set the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is not known.
Since : 1.10
GstApp.AppSrc.set_duration
def GstApp.AppSrc.set_duration (self, duration):
#python wrapper for 'gst_app_src_set_duration'
Set the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is not known.
Since : 1.10
gst_app_src_set_emit_signals
gst_app_src_set_emit_signals (GstAppSrc * appsrc, gboolean emit)
Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
GstApp.AppSrc.prototype.set_emit_signals
function GstApp.AppSrc.prototype.set_emit_signals(emit: Number): {
// javascript wrapper for 'gst_app_src_set_emit_signals'
}
Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
GstApp.AppSrc.set_emit_signals
def GstApp.AppSrc.set_emit_signals (self, emit):
#python wrapper for 'gst_app_src_set_emit_signals'
Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
gst_app_src_set_latency
gst_app_src_set_latency (GstAppSrc * appsrc, guint64 min, guint64 max)
Configure the min and max latency in src. If min is set to -1, the default latency calculations for pseudo-live sources will be used.
GstApp.AppSrc.prototype.set_latency
function GstApp.AppSrc.prototype.set_latency(min: Number, max: Number): {
// javascript wrapper for 'gst_app_src_set_latency'
}
Configure the min and max latency in src. If min is set to -1, the default latency calculations for pseudo-live sources will be used.
Parameters:
appsrc
(
GstApp.AppSrc
)
–
min
(
Number
)
–
the min latency
max
(
Number
)
–
the max latency
GstApp.AppSrc.set_latency
def GstApp.AppSrc.set_latency (self, min, max):
#python wrapper for 'gst_app_src_set_latency'
Configure the min and max latency in src. If min is set to -1, the default latency calculations for pseudo-live sources will be used.
gst_app_src_set_max_bytes
gst_app_src_set_max_bytes (GstAppSrc * appsrc, guint64 max)
Set the maximum amount of bytes that can be queued in appsrc. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.
GstApp.AppSrc.prototype.set_max_bytes
function GstApp.AppSrc.prototype.set_max_bytes(max: Number): {
// javascript wrapper for 'gst_app_src_set_max_bytes'
}
Set the maximum amount of bytes that can be queued in appsrc. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.
GstApp.AppSrc.set_max_bytes
def GstApp.AppSrc.set_max_bytes (self, max):
#python wrapper for 'gst_app_src_set_max_bytes'
Set the maximum amount of bytes that can be queued in appsrc. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.
gst_app_src_set_size
gst_app_src_set_size (GstAppSrc * appsrc, gint64 size)
Set the size of the stream in bytes. A value of -1 means that the size is not known.
GstApp.AppSrc.prototype.set_size
function GstApp.AppSrc.prototype.set_size(size: Number): {
// javascript wrapper for 'gst_app_src_set_size'
}
Set the size of the stream in bytes. A value of -1 means that the size is not known.
GstApp.AppSrc.set_size
def GstApp.AppSrc.set_size (self, size):
#python wrapper for 'gst_app_src_set_size'
Set the size of the stream in bytes. A value of -1 means that the size is not known.
gst_app_src_set_stream_type
gst_app_src_set_stream_type (GstAppSrc * appsrc, GstAppStreamType type)
Set the stream type on appsrc. For seekable streams, the "seek" signal must be connected to.
A stream_type stream
GstApp.AppSrc.prototype.set_stream_type
function GstApp.AppSrc.prototype.set_stream_type(type: GstApp.AppStreamType): {
// javascript wrapper for 'gst_app_src_set_stream_type'
}
Set the stream type on appsrc. For seekable streams, the "seek" signal must be connected to.
A stream_type stream
GstApp.AppSrc.set_stream_type
def GstApp.AppSrc.set_stream_type (self, type):
#python wrapper for 'gst_app_src_set_stream_type'
Set the stream type on appsrc. For seekable streams, the "seek" signal must be connected to.
A stream_type stream
Signals
end-of-stream
GstFlowReturn * end_of_stream_callback (GstAppSrc * self, gpointer user_data)
Parameters:
self
–
user_data
–
end-of-stream
function end_of_stream_callback(self: GstApp.AppSrc, user_data: Object): {
// javascript callback for the 'end-of-stream' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
user_data
(
Object
)
–
end-of-stream
def end_of_stream_callback (self, *user_data):
#python callback for the 'end-of-stream' signal
Parameters:
self
(
GstApp.AppSrc
)
–
user_data
(
variadic
)
–
enough-data
enough_data_callback (GstAppSrc * self, gpointer user_data)
Parameters:
self
–
user_data
–
Flags: Run Last
enough-data
function enough_data_callback(self: GstApp.AppSrc, user_data: Object): {
// javascript callback for the 'enough-data' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
user_data
(
Object
)
–
Flags: Run Last
enough-data
def enough_data_callback (self, *user_data):
#python callback for the 'enough-data' signal
Parameters:
self
(
GstApp.AppSrc
)
–
user_data
(
variadic
)
–
Flags: Run Last
need-data
need_data_callback (GstAppSrc * self, guint object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
Flags: Run Last
need-data
function need_data_callback(self: GstApp.AppSrc, object: Number, user_data: Object): {
// javascript callback for the 'need-data' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Number
)
–
user_data
(
Object
)
–
Flags: Run Last
need-data
def need_data_callback (self, object, *user_data):
#python callback for the 'need-data' signal
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
int
)
–
user_data
(
variadic
)
–
Flags: Run Last
push-buffer
GstFlowReturn * push_buffer_callback (GstAppSrc * self, GstBuffer * object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
push-buffer
function push_buffer_callback(self: GstApp.AppSrc, object: Gst.Buffer, user_data: Object): {
// javascript callback for the 'push-buffer' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Gst.Buffer
)
–
user_data
(
Object
)
–
push-buffer
def push_buffer_callback (self, object, *user_data):
#python callback for the 'push-buffer' signal
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Gst.Buffer
)
–
user_data
(
variadic
)
–
push-buffer-list
GstFlowReturn * push_buffer_list_callback (GstAppSrc * self, GstBufferList * object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
push-buffer-list
function push_buffer_list_callback(self: GstApp.AppSrc, object: Gst.BufferList, user_data: Object): {
// javascript callback for the 'push-buffer-list' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Gst.BufferList
)
–
user_data
(
Object
)
–
push-buffer-list
def push_buffer_list_callback (self, object, *user_data):
#python callback for the 'push-buffer-list' signal
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Gst.BufferList
)
–
user_data
(
variadic
)
–
push-sample
GstFlowReturn * push_sample_callback (GstAppSrc * self, GstSample * object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
push-sample
function push_sample_callback(self: GstApp.AppSrc, object: Gst.Sample, user_data: Object): {
// javascript callback for the 'push-sample' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Gst.Sample
)
–
user_data
(
Object
)
–
push-sample
def push_sample_callback (self, object, *user_data):
#python callback for the 'push-sample' signal
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Gst.Sample
)
–
user_data
(
variadic
)
–
seek-data
gboolean seek_data_callback (GstAppSrc * self, guint64 object, gpointer user_data)
Parameters:
self
–
object
–
user_data
–
Flags: Run Last
seek-data
function seek_data_callback(self: GstApp.AppSrc, object: Number, user_data: Object): {
// javascript callback for the 'seek-data' signal
}
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
Number
)
–
user_data
(
Object
)
–
Flags: Run Last
seek-data
def seek_data_callback (self, object, *user_data):
#python callback for the 'seek-data' signal
Parameters:
self
(
GstApp.AppSrc
)
–
object
(
int
)
–
user_data
(
variadic
)
–
Flags: Run Last
Properties
block
“block” gboolean
When max-bytes are queued and after the enough-data signal has been emitted, block any further push-buffer calls until the amount of queued bytes drops below the max-bytes limit.
Flags : Read / Write
block
“block” Number
When max-bytes are queued and after the enough-data signal has been emitted, block any further push-buffer calls until the amount of queued bytes drops below the max-bytes limit.
Flags : Read / Write
block
“self.props.block” bool
When max-bytes are queued and after the enough-data signal has been emitted, block any further push-buffer calls until the amount of queued bytes drops below the max-bytes limit.
Flags : Read / Write
caps
“caps” GstCaps *
The GstCaps that will negotiated downstream and will be put on outgoing buffers.
Flags : Read / Write
caps
“caps” Gst.Caps
The GstCaps that will negotiated downstream and will be put on outgoing buffers.
Flags : Read / Write
caps
“self.props.caps” Gst.Caps
The GstCaps that will negotiated downstream and will be put on outgoing buffers.
Flags : Read / Write
current-level-bytes
“current-level-bytes” guint64
The number of currently queued bytes inside appsrc.
Flags : Read
current-level-bytes
“current-level-bytes” Number
The number of currently queued bytes inside appsrc.
Flags : Read
current_level_bytes
“self.props.current_level_bytes” int
The number of currently queued bytes inside appsrc.
Flags : Read
duration
“duration” guint64
The total duration in nanoseconds of the data stream. If the total duration is known, it is recommended to configure it with this property.
Flags : Read / Write
duration
“duration” Number
The total duration in nanoseconds of the data stream. If the total duration is known, it is recommended to configure it with this property.
Flags : Read / Write
duration
“self.props.duration” int
The total duration in nanoseconds of the data stream. If the total duration is known, it is recommended to configure it with this property.
Flags : Read / Write
emit-signals
“emit-signals” gboolean
Make appsrc emit the "need-data", "enough-data" and "seek-data" signals. This option is by default enabled for backwards compatibility reasons but can disabled when needed because signal emission is expensive.
Flags : Read / Write
emit-signals
“emit-signals” Number
Make appsrc emit the "need-data", "enough-data" and "seek-data" signals. This option is by default enabled for backwards compatibility reasons but can disabled when needed because signal emission is expensive.
Flags : Read / Write
emit_signals
“self.props.emit_signals” bool
Make appsrc emit the "need-data", "enough-data" and "seek-data" signals. This option is by default enabled for backwards compatibility reasons but can disabled when needed because signal emission is expensive.
Flags : Read / Write
format
“format” GstFormat *
The format to use for segment events. When the source is producing timestamped buffers this property should be set to GST_FORMAT_TIME.
Flags : Read / Write
format
“format” Gst.Format
The format to use for segment events. When the source is producing timestamped buffers this property should be set to GST_FORMAT_TIME.
Flags : Read / Write
format
“self.props.format” Gst.Format
The format to use for segment events. When the source is producing timestamped buffers this property should be set to GST_FORMAT_TIME.
Flags : Read / Write
handle-segment-change
“handle-segment-change” gboolean
When enabled, appsrc will check GstSegment in GstSample which was pushed via gst_app_src_push_sample or "push-sample" signal action. If a GstSegment is changed, corresponding segment event will be followed by next data flow.
FIXME: currently only GST_FORMAT_TIME format is supported and therefore GstAppSrc::format should be time. However, possibly GstAppSrc can support other formats.
Flags : Read / Write
handle-segment-change
“handle-segment-change” Number
When enabled, appsrc will check GstSegment in GstSample which was pushed via GstApp.AppSrc.prototype.push_sample or "push-sample" signal action. If a GstSegment is changed, corresponding segment event will be followed by next data flow.
FIXME: currently only GST_FORMAT_TIME format is supported and therefore GstAppSrc::format should be time. However, possibly GstApp.AppSrc can support other formats.
Flags : Read / Write
handle_segment_change
“self.props.handle_segment_change” bool
When enabled, appsrc will check GstSegment in GstSample which was pushed via GstApp.AppSrc.push_sample or "push-sample" signal action. If a GstSegment is changed, corresponding segment event will be followed by next data flow.
FIXME: currently only GST_FORMAT_TIME format is supported and therefore GstAppSrc::format should be time. However, possibly GstApp.AppSrc can support other formats.
Flags : Read / Write
is-live
“is-live” gboolean
Instruct the source to behave like a live source. This includes that it will only push out buffers in the PLAYING state.
Flags : Read / Write
is-live
“is-live” Number
Instruct the source to behave like a live source. This includes that it will only push out buffers in the PLAYING state.
Flags : Read / Write
is_live
“self.props.is_live” bool
Instruct the source to behave like a live source. This includes that it will only push out buffers in the PLAYING state.
Flags : Read / Write
max-bytes
“max-bytes” guint64
The maximum amount of bytes that can be queued internally. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.
Flags : Read / Write
max-bytes
“max-bytes” Number
The maximum amount of bytes that can be queued internally. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.
Flags : Read / Write
max_bytes
“self.props.max_bytes” int
The maximum amount of bytes that can be queued internally. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.
Flags : Read / Write
min-latency
“min-latency” gint64
The minimum latency of the source. A value of -1 will use the default latency calculations of GstBaseSrc.
Flags : Read / Write
min-latency
“min-latency” Number
The minimum latency of the source. A value of -1 will use the default latency calculations of GstBase.BaseSrc.
Flags : Read / Write
min_latency
“self.props.min_latency” int
The minimum latency of the source. A value of -1 will use the default latency calculations of GstBase.BaseSrc.
Flags : Read / Write
min-percent
“min-percent” guint
Make appsrc emit the "need-data" signal when the amount of bytes in the queue drops below this percentage of max-bytes.
Flags : Read / Write
min-percent
“min-percent” Number
Make appsrc emit the "need-data" signal when the amount of bytes in the queue drops below this percentage of max-bytes.
Flags : Read / Write
min_percent
“self.props.min_percent” int
Make appsrc emit the "need-data" signal when the amount of bytes in the queue drops below this percentage of max-bytes.
Flags : Read / Write
size
“size” gint64
The total size in bytes of the data stream. If the total size is known, it is recommended to configure it with this property.
Flags : Read / Write
size
“size” Number
The total size in bytes of the data stream. If the total size is known, it is recommended to configure it with this property.
Flags : Read / Write
size
“self.props.size” int
The total size in bytes of the data stream. If the total size is known, it is recommended to configure it with this property.
Flags : Read / Write
stream-type
“stream-type” GstAppStreamType *
The type of stream that this source is producing. For seekable streams the application should connect to the seek-data signal.
Flags : Read / Write
stream-type
“stream-type” GstApp.AppStreamType
The type of stream that this source is producing. For seekable streams the application should connect to the seek-data signal.
Flags : Read / Write
stream_type
“self.props.stream_type” GstApp.AppStreamType
The type of stream that this source is producing. For seekable streams the application should connect to the seek-data signal.
Flags : Read / Write
Virtual Methods
end_of_stream
GstFlowReturn end_of_stream (GstAppSrc * appsrc)
Parameters:
appsrc
–
end_of_stream
function end_of_stream(appsrc: GstApp.AppSrc): {
// javascript implementation of the 'end_of_stream' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
end_of_stream
def end_of_stream (appsrc):
#python implementation of the 'end_of_stream' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
enough_data
function enough_data(appsrc: GstApp.AppSrc): {
// javascript implementation of the 'enough_data' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
enough_data
def enough_data (appsrc):
#python implementation of the 'enough_data' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
need_data
need_data (GstAppSrc * appsrc, guint length)
Parameters:
appsrc
–
length
–
need_data
function need_data(appsrc: GstApp.AppSrc, length: Number): {
// javascript implementation of the 'need_data' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
length
(
Number
)
–
need_data
def need_data (appsrc, length):
#python implementation of the 'need_data' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
length
(
int
)
–
push_buffer
GstFlowReturn push_buffer (GstAppSrc * appsrc, GstBuffer * buffer)
Parameters:
appsrc
–
buffer
–
push_buffer
function push_buffer(appsrc: GstApp.AppSrc, buffer: Gst.Buffer): {
// javascript implementation of the 'push_buffer' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
buffer
(
Gst.Buffer
)
–
push_buffer
def push_buffer (appsrc, buffer):
#python implementation of the 'push_buffer' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
buffer
(
Gst.Buffer
)
–
push_buffer_list
GstFlowReturn push_buffer_list (GstAppSrc * appsrc, GstBufferList * buffer_list)
Parameters:
appsrc
–
buffer_list
–
push_buffer_list
function push_buffer_list(appsrc: GstApp.AppSrc, buffer_list: Gst.BufferList): {
// javascript implementation of the 'push_buffer_list' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
buffer_list
(
Gst.BufferList
)
–
push_buffer_list
def push_buffer_list (appsrc, buffer_list):
#python implementation of the 'push_buffer_list' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
buffer_list
(
Gst.BufferList
)
–
push_sample
GstFlowReturn push_sample (GstAppSrc * appsrc, GstSample * sample)
Parameters:
appsrc
–
sample
–
push_sample
function push_sample(appsrc: GstApp.AppSrc, sample: Gst.Sample): {
// javascript implementation of the 'push_sample' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
sample
(
Gst.Sample
)
–
push_sample
def push_sample (appsrc, sample):
#python implementation of the 'push_sample' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
sample
(
Gst.Sample
)
–
seek_data
gboolean seek_data (GstAppSrc * appsrc, guint64 offset)
Parameters:
appsrc
–
offset
–
seek_data
function seek_data(appsrc: GstApp.AppSrc, offset: Number): {
// javascript implementation of the 'seek_data' virtual method
}
Parameters:
appsrc
(
GstApp.AppSrc
)
–
offset
(
Number
)
–
seek_data
def seek_data (appsrc, offset):
#python implementation of the 'seek_data' virtual method
Parameters:
appsrc
(
GstApp.AppSrc
)
–
offset
(
int
)
–
GstAppSrcCallbacks
A set of callbacks that can be installed on the appsrc with gst_app_src_set_callbacks.
Function Macros
GST_APP_SRC_CAST
#define GST_APP_SRC_CAST(obj) \ ((GstAppSrc*)(obj))
Enumerations
GstAppStreamType
The stream type.
Members
GST_APP_STREAM_TYPE_STREAM
(0)
–
No seeking is supported in the stream, such as a live stream.
GST_APP_STREAM_TYPE_SEEKABLE
(1)
–
The stream is seekable but seeking might not be very fast, such as data from a webserver.
GST_APP_STREAM_TYPE_RANDOM_ACCESS
(2)
–
The stream is seekable and seeking is fast, such as in a local file.
GstApp.AppStreamType
The stream type.
Members
GstApp.AppStreamType.STREAM
(0)
–
No seeking is supported in the stream, such as a live stream.
GstApp.AppStreamType.SEEKABLE
(1)
–
The stream is seekable but seeking might not be very fast, such as data from a webserver.
GstApp.AppStreamType.RANDOM_ACCESS
(2)
–
The stream is seekable and seeking is fast, such as in a local file.
GstApp.AppStreamType
The stream type.
Members
GstApp.AppStreamType.STREAM
(0)
–
No seeking is supported in the stream, such as a live stream.
GstApp.AppStreamType.SEEKABLE
(1)
–
The stream is seekable but seeking might not be very fast, such as data from a webserver.
GstApp.AppStreamType.RANDOM_ACCESS
(2)
–
The stream is seekable and seeking is fast, such as in a local file.
Constants
GST_TYPE_APP_SRC
#define GST_TYPE_APP_SRC \ (gst_app_src_get_type())
The results of the search are