mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
Added some chain/group
Original commit message from CVS: Added some chain/group Added more docs
This commit is contained in:
parent
5b5274daf2
commit
a82fd94231
1 changed files with 78 additions and 15 deletions
|
@ -93,6 +93,8 @@ DECOUPLED
|
||||||
* never loop-based
|
* never loop-based
|
||||||
* always acts like a chain-based sink for upstream elements
|
* always acts like a chain-based sink for upstream elements
|
||||||
* always acts like a get-based src for downstream elements
|
* always acts like a get-based src for downstream elements
|
||||||
|
* are not added to a group, but marked as an entry point in
|
||||||
|
case it acts as a src element
|
||||||
|
|
||||||
|
|
||||||
Connection types
|
Connection types
|
||||||
|
@ -136,9 +138,16 @@ A)
|
||||||
- get based source
|
- get based source
|
||||||
- chain based sink
|
- chain based sink
|
||||||
|
|
||||||
* src at start of chain and entry point
|
* one group
|
||||||
|
* src at start of group and entry point
|
||||||
* _get from src, push to sink
|
* _get from src, push to sink
|
||||||
|
|
||||||
|
(-group1---------------)
|
||||||
|
! !
|
||||||
|
! *fakesrc -> fakesink !
|
||||||
|
(----------------------)
|
||||||
|
|
||||||
|
|
||||||
B)
|
B)
|
||||||
|
|
||||||
src -> sink
|
src -> sink
|
||||||
|
@ -151,8 +160,14 @@ B)
|
||||||
- loop based source/filter
|
- loop based source/filter
|
||||||
- chain based sink/filter/decoupled
|
- chain based sink/filter/decoupled
|
||||||
|
|
||||||
* src/filter at start of chain and entry point
|
* one group
|
||||||
* loop on src, pushhandler set to chain function
|
* src/filter at start of group and entry point
|
||||||
|
* loop on src, chainhandler set to chain function
|
||||||
|
|
||||||
|
(-group1----------------)
|
||||||
|
! !
|
||||||
|
! %*fakesrc -> fakesink !
|
||||||
|
(-----------------------)
|
||||||
|
|
||||||
|
|
||||||
C)
|
C)
|
||||||
|
@ -165,9 +180,14 @@ C)
|
||||||
- get based source/decoupled
|
- get based source/decoupled
|
||||||
- loop based sink/filter
|
- loop based sink/filter
|
||||||
|
|
||||||
|
* one group
|
||||||
* loop based element is entry point
|
* loop based element is entry point
|
||||||
* loop on sink/filter, pullhandler set to _getfunction
|
* loop on sink/filter, gethandler set to getfunction
|
||||||
|
|
||||||
|
(-group1----------------)
|
||||||
|
! !
|
||||||
|
! fakesrc -> %*fakesink !
|
||||||
|
(-----------------------)
|
||||||
|
|
||||||
D)
|
D)
|
||||||
|
|
||||||
|
@ -178,8 +198,14 @@ D)
|
||||||
- chain based filter
|
- chain based filter
|
||||||
- chain based filter/sink/decoupled
|
- chain based filter/sink/decoupled
|
||||||
|
|
||||||
|
* one group is created to hold the two elements
|
||||||
* no entry point
|
* no entry point
|
||||||
* pushhandler set to peer chainfunction
|
* chainhandler set to peer chainfunction
|
||||||
|
|
||||||
|
(-group1----------------)
|
||||||
|
! !
|
||||||
|
! identity -> identity !
|
||||||
|
(-----------------------)
|
||||||
|
|
||||||
E)
|
E)
|
||||||
|
|
||||||
|
@ -189,8 +215,17 @@ E)
|
||||||
- chain based filter
|
- chain based filter
|
||||||
- loop based filter/sink
|
- loop based filter/sink
|
||||||
|
|
||||||
* entry point in chain of filter
|
* two groups
|
||||||
* pushhandler set to loop wrapper
|
* group is created for src element if needed
|
||||||
|
* chainhandler of loop based element set to loop wrapper, control is
|
||||||
|
handed to the peer group
|
||||||
|
* gethandler of loop based element set to get wrapper
|
||||||
|
|
||||||
|
(-group1---) (-group2------)
|
||||||
|
! ! ! !
|
||||||
|
! identity ---> %*identity !
|
||||||
|
(----------) (-------------)
|
||||||
|
|
||||||
|
|
||||||
F)
|
F)
|
||||||
|
|
||||||
|
@ -202,25 +237,41 @@ F)
|
||||||
- loop based filter/src
|
- loop based filter/src
|
||||||
- loop based filter/sink
|
- loop based filter/sink
|
||||||
|
|
||||||
* entry point in chain of filter/src
|
* two groups
|
||||||
* pushhandler set to loop wrapper
|
* two entry points
|
||||||
|
* chainhandler set to loop wrapper
|
||||||
|
* gethandler set to get wrapper
|
||||||
|
|
||||||
|
(-group1-----) (-group2------)
|
||||||
|
! ! ! !
|
||||||
|
! %*identity ---> %*identity !
|
||||||
|
(------------) (-------------)
|
||||||
|
|
||||||
|
|
||||||
Grouping
|
Grouping
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* a group has at most one loop based element
|
* a group has at most one loop based element
|
||||||
* elements in a group are sorted, src elements first
|
* elements in a group are sorted, src elements first (not mandatory)
|
||||||
* a group has one cothread
|
* a group has one cothread
|
||||||
|
* a group is created immediatly for loop based elements, all other elements
|
||||||
|
are added to a group when a pad connection is made
|
||||||
* get-based plugins are put in the same group as a peer loop based element
|
* get-based plugins are put in the same group as a peer loop based element
|
||||||
* chain based elements are put in the same group
|
* chain based elements are put in the same group as sink peer elements
|
||||||
* entry point in the group is:
|
* entry point in the group is:
|
||||||
- leftmost loopbased element
|
- loopbased element
|
||||||
- first src element if no loopbased elements exist in the group
|
- first src element if no loopbased element exists in the group
|
||||||
|
|
||||||
|
Result: you end up with a group of connected elements with either:
|
||||||
|
- a loop based plugin as the entry point
|
||||||
|
- a get based plugin as the entry point
|
||||||
|
|
||||||
|
Scheduling the group is a matter of starting the cothread and calling
|
||||||
|
the loop function or doing a _get/_push on a srcpad.
|
||||||
|
|
||||||
|
|
||||||
examples:
|
other examples of groups:
|
||||||
---------
|
-------------------------
|
||||||
|
|
||||||
% = loop based
|
% = loop based
|
||||||
* = entry point of group
|
* = entry point of group
|
||||||
|
@ -289,7 +340,19 @@ examples:
|
||||||
(------------------------------) (-----------------------------)
|
(------------------------------) (-----------------------------)
|
||||||
|
|
||||||
|
|
||||||
|
Chaining
|
||||||
|
--------
|
||||||
|
|
||||||
|
* groups that are connected end up in the same chain
|
||||||
|
* a group always belongs to a chain
|
||||||
|
* updating the chain is only needed when two groups are
|
||||||
|
connected with a connection of type E/F. for other
|
||||||
|
connection types, the group itself is updated.
|
||||||
|
* a chain is scheduled by scheduling a random group in the chain.
|
||||||
|
|
||||||
|
|
||||||
|
Wrapper functions
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue