diff options
Diffstat (limited to 'docs/design/part-element-source.txt')
-rw-r--r-- | docs/design/part-element-source.txt | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/docs/design/part-element-source.txt b/docs/design/part-element-source.txt index 46b6eb9359..fc7f13dd16 100644 --- a/docs/design/part-element-source.txt +++ b/docs/design/part-element-source.txt @@ -13,7 +13,7 @@ Typical source elements include: Live sources ------------- +~~~~~~~~~~~~ A source is said to be a live source when it has the following property: @@ -52,7 +52,7 @@ Let's look at some example sources. Source types ------------- +~~~~~~~~~~~~ A source element can operate in three ways: @@ -90,36 +90,36 @@ source's state change function is called. Source base classes -------------------- +~~~~~~~~~~~~~~~~~~~ GstBaseSrc: - This base class provides an implementation of a random access source and - is very well suited for file reader like sources. +This base class provides an implementation of a random access source and +is very well suited for file reader like sources. GstPushSrc: - Base class for block-based sources. 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. +Base class for block-based sources. 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. - Classes extending this base class will usually be scheduled in a push - based mode. It the peer accepts to operate without offsets and withing - the limits of the allowed block size, this class can operate in getrange - based mode automatically. +Classes extending this base class will usually be scheduled in a push +based mode. It the peer accepts to operate without offsets and withing +the limits of the allowed block size, this class can operate in getrange +based mode automatically. - The subclass should extend the methods from the baseclass in - addition to the create method. If the source is seekable, it - needs to override GstBaseSrc::event() in addition to - GstBaseSrc::is_seekable() in order to retrieve the seek offset, - which is the offset of the next buffer to be requested. +The subclass should extend the methods from the baseclass in +addition to the create method. If the source is seekable, it +needs to override GstBaseSrc::event() in addition to +GstBaseSrc::is_seekable() in order to retrieve the seek offset, +which is the offset of the next buffer to be requested. - Flushing, scheduling and sync is all handled by this base class. +Flushing, scheduling and sync is all handled by this base class. Timestamps ----------- +~~~~~~~~~~ A non-live source should timestamp the buffers it produces starting from 0. If it is not possible to timestamp every buffer (filesrc), the source is allowed to @@ -134,3 +134,4 @@ the pipeline, which is expressed as: With absolute_time the time obtained from the global pipeline with gst_clock_get_time() and base_time being the time of that clock when the pipeline was last set to PLAYING. + |