| Top |
Properties
| gboolean | can-activate-pull | Read / Write / Construct |
| gboolean | can-activate-push | Read / Write / Construct |
| GstFakeSrcDataType | data | Read / Write |
| gint | datarate | Read / Write |
| gboolean | dump | Read / Write |
| GstFakeSrcFillType | filltype | Read / Write |
| GstFormat | format | Read / Write |
| gboolean | is-live | Read / Write / Construct |
| gchar * | last-message | Read |
| gint | parentsize | Read / Write |
| gchar * | pattern | Read / Write |
| gboolean | signal-handoffs | Read / Write |
| gboolean | silent | Read / Write |
| gint | sizemax | Read / Write |
| gint | sizemin | Read / Write |
| GstFakeSrcSizeType | sizetype | Read / Write |
| gboolean | sync | Read / Write |
Types and Values
| struct | GstFakeSrc |
| enum | GstFakeSrcDataType |
| enum | GstFakeSrcFillType |
| enum | GstFakeSrcOutputType |
| enum | GstFakeSrcSizeType |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseSrc ╰── GstFakeSrc
Description
The fakesrc element is a multipurpose element that can generate a wide range of buffers and can operate in various scheduling modes.
It is mostly used as a testing element, one trivial example for testing basic GStreamer core functionality is:
Example launch line
1 |
gst-launch-1.0 -v fakesrc num-buffers=5 ! fakesink |
This pipeline will push 5 empty buffers to the fakesink element and then sends an EOS.
Synopsis
Element Information
plugin |
coreelements |
author |
Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com> |
class |
Source |
Types and Values
enum GstFakeSrcOutputType
The different output types. Unused currently.
Property Details
The “can-activate-pull” property
“can-activate-pull” gboolean
Can activate in pull mode.
Flags: Read / Write / Construct
Default value: TRUE
The “can-activate-push” property
“can-activate-push” gboolean
Can activate in push mode.
Flags: Read / Write / Construct
Default value: TRUE
The “data” property
“data” GstFakeSrcDataType
Data allocation method.
Flags: Read / Write
Default value: Allocate data
The “datarate” property
“datarate” gint
Timestamps buffers with number of bytes per second (0 = none).
Flags: Read / Write
Allowed values: >= 0
Default value: 0
The “dump” property
“dump” gboolean
Dump buffer contents to stdout.
Flags: Read / Write
Default value: FALSE
The “filltype” property
“filltype” GstFakeSrcFillType
How to fill the buffer, if at all.
Flags: Read / Write
Default value: Fill buffers with zeros
The “format” property
“format” GstFormat
Set the format of the newsegment events to produce.
Flags: Read / Write
Default value: GST_FORMAT_BYTES
The “is-live” property
“is-live” gboolean
True if the element cannot produce data in PAUSED.
Flags: Read / Write / Construct
Default value: FALSE
The “last-message” property
“last-message” gchar *
The last status message.
Flags: Read
Default value: NULL
The “parentsize” property
“parentsize” gint
Size of parent buffer for sub-buffered allocation.
Flags: Read / Write
Allowed values: >= 0
Default value: 40960
The “pattern” property
“pattern” gchar *
Set the pattern (unused).
Flags: Read / Write
Default value: NULL
The “signal-handoffs” property
“signal-handoffs” gboolean
Send a signal before pushing the buffer.
Flags: Read / Write
Default value: FALSE
The “silent” property
“silent” gboolean
Don't produce last_message events.
Flags: Read / Write
Default value: TRUE
The “sizemax” property
“sizemax” gint
Maximum buffer size.
Flags: Read / Write
Allowed values: >= 0
Default value: 4096
The “sizemin” property
“sizemin” gint
Minimum buffer size.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
The “sizetype” property
“sizetype” GstFakeSrcSizeType
How to determine buffer sizes.
Flags: Read / Write
Default value: Send empty buffers
The “sync” property
“sync” gboolean
Sync to the clock to the datarate.
Flags: Read / Write
Default value: FALSE
Signal Details
The “handoff” signal
void user_function (GstFakeSrc *fakesrc, GstBuffer *buffer, GstPad *pad, gpointer user_data)
This signal gets emitted before sending the buffer.
Parameters
fakesrc |
the fakesrc instance |
|
buffer |
the buffer that will be pushed |
|
pad |
the pad that will sent it |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
