Class: GstBase::DataQueue
- Inherits:
-
Object
- Object
- GstBase::DataQueue
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#current_level_bytes ⇒ Integer
Current-level-bytes.
- #current_level_bytes=(current_level_bytes) ⇒ Integer
-
#current_level_time ⇒ Integer
Current-level-time.
- #current_level_time=(current_level_time) ⇒ Integer
-
#current_level_visible ⇒ Integer
Current-level-visible.
- #current_level_visible=(current_level_visible) ⇒ Integer
-
#drop_head(type) ⇒ Boolean
Pop and unref the head-most Gst::MiniObject with the given #GType.
-
#flush ⇒ nil
Flushes all the contents of the queue.
-
#flushing=(flushing) ⇒ nil
Sets the queue to flushing state if flushing is true.
-
#get_level(level) ⇒ nil
Get the current level of the queue.
-
#initialize(checkfull, fullcallback, emptycallback, checkdata) ⇒ GstBase::DataQueue
constructor
Creates a new Gst::DataQueue.
-
#is_empty ⇒ Boolean
Queries if there are any items in the queue.
-
#is_full ⇒ Boolean
Queries if queue is full.
-
#limits_changed ⇒ nil
Inform the queue that the limits for the fullness check have changed and that any blocking gst_data_queue_push() should be unblocked to recheck the limits.
-
#peek(item) ⇒ Boolean
Retrieves the first item available on the queue without removing it.
-
#pop(item) ⇒ Boolean
Retrieves the first item available on the queue.
-
#push(item) ⇒ Boolean
Pushes a Gst::DataQueueItem (or a structure that begins with the same fields) on the queue.
-
#push_force(item) ⇒ Boolean
Pushes a Gst::DataQueueItem (or a structure that begins with the same fields) on the queue.
Constructor Details
#initialize(checkfull, fullcallback, emptycallback, checkdata) ⇒ GstBase::DataQueue
Creates a new Gst::DataQueue. If fullcallback or emptycallback are supplied, then the Gst::DataQueue will call the respective callback to signal full or empty condition. If the callbacks are NULL the Gst::DataQueue will instead emit 'full' and 'empty' signals. or not.
Instance Method Details
#current_level_bytes ⇒ Integer
Returns current-level-bytes.
#current_level_bytes=(current_level_bytes) ⇒ Integer
#current_level_time ⇒ Integer
Returns current-level-time.
#current_level_time=(current_level_time) ⇒ Integer
#current_level_visible ⇒ Integer
Returns current-level-visible.
#current_level_visible=(current_level_visible) ⇒ Integer
#drop_head(type) ⇒ Boolean
Pop and unref the head-most Gst::MiniObject with the given #GType.
#flush ⇒ nil
Flushes all the contents of the queue. Any call to #gst_data_queue_push and #gst_data_queue_pop will be released. MT safe.
#flushing=(flushing) ⇒ nil
Sets the queue to flushing state if flushing is true. If set to flushing state, any incoming data on the queue will be discarded. Any call currently blocking on #gst_data_queue_push or #gst_data_queue_pop will return straight away with a return value of false. While the queue is in flushing state, all calls to those two functions will return false.
MT Safe.
#get_level(level) ⇒ nil
Get the current level of the queue.
#is_empty ⇒ Boolean
Queries if there are any items in the queue. MT safe.
#is_full ⇒ Boolean
Queries if queue is full. This check will be done using the Gst::DataQueueCheckFullFunction registered with queue. MT safe.
#limits_changed ⇒ nil
Inform the queue that the limits for the fullness check have changed and that any blocking gst_data_queue_push() should be unblocked to recheck the limits.
#peek(item) ⇒ Boolean
Retrieves the first item available on the queue without removing it. If the queue is currently empty, the call will block until at least one item is available, OR the queue is set to the flushing state. MT safe.
#pop(item) ⇒ Boolean
Retrieves the first item available on the queue. If the queue is currently empty, the call will block until at least one item is available, OR the queue is set to the flushing state. MT safe.
#push(item) ⇒ Boolean
Pushes a Gst::DataQueueItem (or a structure that begins with the same fields) on the queue. If the queue is full, the call will block until space is available, OR the queue is set to flushing state. MT safe.
Note that this function has slightly different semantics than gst_pad_push() and gst_pad_push_event(): this function only takes ownership of item and the Gst::MiniObject contained in item if the push was successful. If false is returned, the caller is responsible for freeing item and its contents.
#push_force(item) ⇒ Boolean
Pushes a Gst::DataQueueItem (or a structure that begins with the same fields) on the queue. It ignores if the queue is full or not and forces the item to be pushed anyway. MT safe.
Note that this function has slightly different semantics than gst_pad_push() and gst_pad_push_event(): this function only takes ownership of item and the Gst::MiniObject contained in item if the push was successful. If false is returned, the caller is responsible for freeing item and its contents.