2005-07-29 11:29:52 +00:00
|
|
|
Ghostpads
|
|
|
|
---------
|
|
|
|
|
2010-11-01 13:32:43 +00:00
|
|
|
GhostPads are used to build complex compound elements out of
|
|
|
|
existing elements. They are used to expose internal element pads
|
|
|
|
on the complex element.
|
2005-07-29 11:29:52 +00:00
|
|
|
|
2010-11-01 13:32:43 +00:00
|
|
|
Some design requirements
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
- Must look like a real GstPad on both sides.
|
|
|
|
- target of Ghostpad must be changeable
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
- target can be initially NULL
|
2005-07-29 11:29:52 +00:00
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
* a GhostPad is implemented using a private GstProxyPad class:
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
GstProxyPad
|
|
|
|
(------------------)
|
|
|
|
| GstPad |
|
|
|
|
|------------------|
|
|
|
|
| GstPad *target |
|
|
|
|
(------------------)
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
| GstPad *internal |
|
|
|
|
(------------------)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
GstGhostPad
|
|
|
|
(------------------) -\
|
|
|
|
| GstPad | |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
|------------------| |
|
|
|
|
| GstPad *target | > GstProxyPad
|
|
|
|
|------------------| |
|
|
|
|
| GstPad *internal | |
|
2005-07-29 11:29:52 +00:00
|
|
|
|------------------| -/
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
| <private data> |
|
|
|
|
(------------------)
|
|
|
|
|
|
|
|
A GstGhostPad (X) is _always_ created together with a GstProxyPad (Y).
|
|
|
|
The internal pad pointers are set to point to the eachother. The
|
|
|
|
GstProxyPad pairs have opposite directions, the GstGhostPad has the same
|
|
|
|
direction as the (future) ghosted pad (target).
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(- X --------)
|
|
|
|
| |
|
|
|
|
| target * |
|
|
|
|
|------------|
|
|
|
|
| internal *----+
|
|
|
|
(------------) |
|
|
|
|
^ V
|
|
|
|
| (- Y --------)
|
|
|
|
| | |
|
|
|
|
| | target * |
|
|
|
|
| |------------|
|
|
|
|
+----* internal |
|
|
|
|
(------------)
|
|
|
|
|
2011-01-25 01:39:45 +00:00
|
|
|
Which we will abbreviate to:
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
|
|
|
|
(- X --------)
|
|
|
|
| |
|
|
|
|
| target *--------->//
|
|
|
|
(------------)
|
|
|
|
|
|
|
|
|
(- Y --------)
|
|
|
|
| target *----->//
|
|
|
|
(------------)
|
|
|
|
|
2007-02-20 18:02:50 +00:00
|
|
|
The GstGhostPad (X) is also set as the parent of the GstProxyPad (Y).
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
The target is a pointer to the internal pads peer. It is an optimisation to
|
|
|
|
quickly get to the peer of a ghostpad without having to dereference the
|
|
|
|
internal->peer.
|
|
|
|
|
2005-07-29 11:29:52 +00:00
|
|
|
Some use case follow with a description of how the datastructure
|
|
|
|
is modified.
|
|
|
|
|
|
|
|
|
|
|
|
* Creating a ghostpad with a target:
|
|
|
|
|
|
|
|
gst_ghost_pad_new (char *name, GstPad *target)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
1) create new GstGhostPad X + GstProxyPad Y
|
2005-07-29 11:29:52 +00:00
|
|
|
2) X name set to @name
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
3) X direction is the same as the target, Y is opposite.
|
|
|
|
4) the target of X is set to @target
|
|
|
|
5) Y is linked to @target
|
2005-07-29 11:29:52 +00:00
|
|
|
6) link/unlink and activate functions are set up
|
|
|
|
on GstGhostPad.
|
|
|
|
|
|
|
|
|
|
|
|
(--------------
|
2005-10-02 18:57:07 +00:00
|
|
|
(- X --------) |
|
2005-07-29 11:29:52 +00:00
|
|
|
| | |------)
|
|
|
|
| target *------------------> | sink |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(------------) -------> |------)
|
|
|
|
| / (--------------
|
|
|
|
(- Y --------) / (pad link)
|
|
|
|
//<-----* target |/
|
|
|
|
(------------)
|
|
|
|
|
2005-07-29 11:29:52 +00:00
|
|
|
- Automatically takes same direction as target.
|
|
|
|
- target is filled in automatically.
|
|
|
|
|
|
|
|
|
|
|
|
* Creating a ghostpad without a target
|
|
|
|
|
2005-11-22 11:48:58 +00:00
|
|
|
gst_ghost_pad_new_no_target (char *name, GstPadDirection dir)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
1) create new GstGhostPad X + GstProxyPad Y
|
2005-07-29 11:29:52 +00:00
|
|
|
2) X name set to @name
|
|
|
|
3) X direction is @dir
|
|
|
|
5) link/unlink and activate functions are set up
|
|
|
|
on GstGhostPad.
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(- X --------)
|
|
|
|
| |
|
|
|
|
| target *--------->//
|
|
|
|
(------------)
|
|
|
|
|
|
|
|
|
(- Y --------)
|
|
|
|
| target *----->//
|
|
|
|
(------------)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
- allows for setting the target later
|
|
|
|
|
|
|
|
|
|
|
|
* Setting target on an untargetted unlinked ghostpad
|
|
|
|
|
|
|
|
gst_ghost_pad_set_target (char *name, GstPad *newtarget)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(- X --------)
|
|
|
|
| |
|
|
|
|
| target *--------->//
|
|
|
|
(------------)
|
|
|
|
|
|
|
|
|
(- Y --------)
|
|
|
|
| target *----->//
|
|
|
|
(------------)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
1) assert direction of newtarget == X direction
|
|
|
|
2) target is set to newtarget
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
3) internal pad Y is linked to newtarget
|
2005-07-29 11:29:52 +00:00
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(--------------
|
|
|
|
(- X --------) |
|
|
|
|
| | |------)
|
|
|
|
| target *------------------> | sink |
|
|
|
|
(------------) -------> |------)
|
|
|
|
| / (--------------
|
|
|
|
(- Y --------) / (pad link)
|
|
|
|
//<-----* target |/
|
|
|
|
(------------)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
* Setting target on a targetted unlinked ghostpad
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
gst_ghost_pad_set_target (char *name, GstPad *newtarget)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(--------------
|
|
|
|
(- X --------) |
|
|
|
|
| | |-------)
|
|
|
|
| target *------------------> | sink1 |
|
|
|
|
(------------) -------> |-------)
|
|
|
|
| / (--------------
|
|
|
|
(- Y --------) / (pad link)
|
|
|
|
//<-----* target |/
|
|
|
|
(------------)
|
|
|
|
|
|
|
|
1) assert direction of newtarget (sink2) == X direction
|
|
|
|
2) unlink internal pad Y and oldtarget
|
|
|
|
3) target is set to newtarget (sink2)
|
|
|
|
4) internal pad Y is linked to newtarget
|
2005-07-29 11:29:52 +00:00
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(--------------
|
|
|
|
(- X --------) |
|
|
|
|
| | |-------)
|
|
|
|
| target *------------------> | sink2 |
|
|
|
|
(------------) -------> |-------)
|
|
|
|
| / (--------------
|
|
|
|
(- Y --------) / (pad link)
|
|
|
|
//<-----* target |/
|
|
|
|
(------------)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
* Linking a pad to an untargetted ghostpad:
|
|
|
|
|
|
|
|
gst_pad_link (src, X)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(- X --------)
|
|
|
|
| |
|
|
|
|
| target *--------->//
|
|
|
|
(------------)
|
|
|
|
|
|
|
|
|
(- Y --------)
|
|
|
|
| target *----->//
|
2005-07-29 11:29:52 +00:00
|
|
|
(------------)
|
|
|
|
-------)
|
|
|
|
|
|
|
|
|
(-----|
|
|
|
|
| src |
|
|
|
|
(-----|
|
|
|
|
-------)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
X is a sink GstGhostPad without a target. The internal GstProxyPad Y has
|
|
|
|
the same direction as the src pad (peer).
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
1) link function is called
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
a) Y direction is same as @src
|
|
|
|
b) Y target is set to @src
|
|
|
|
c) Y is activated in the same mode as X
|
|
|
|
d) core makes link from @src to X
|
2005-07-29 11:29:52 +00:00
|
|
|
|
2005-10-02 18:57:07 +00:00
|
|
|
|
|
|
|
(- X --------)
|
|
|
|
| |
|
2005-07-29 11:29:52 +00:00
|
|
|
| target *----->//
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
>(------------)
|
|
|
|
(real pad link) / |
|
|
|
|
/ (- Y ------)
|
|
|
|
/ -----* target |
|
|
|
|
-------) / / (----------)
|
|
|
|
| / /
|
|
|
|
(-----|/ /
|
|
|
|
| src |<----
|
|
|
|
(-----|
|
2005-07-29 11:29:52 +00:00
|
|
|
-------)
|
|
|
|
|
|
|
|
|
|
|
|
* Linking a pad to a targetted ghostpad:
|
|
|
|
|
|
|
|
gst_pad_link (src, X)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
(--------
|
|
|
|
(- X --------) |
|
|
|
|
| | |------)
|
|
|
|
| target *------------->| sink |
|
|
|
|
(------------) >|------)
|
|
|
|
| / (--------
|
|
|
|
| /
|
|
|
|
| /
|
|
|
|
-------) | / (real pad link)
|
|
|
|
| (- Y ------) /
|
|
|
|
(-----| | |/
|
|
|
|
| src | //<----* target |
|
|
|
|
(-----| (----------)
|
|
|
|
-------)
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
1) link function is called
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
a) Y direction is same as @src
|
|
|
|
b) Y target is set to @src
|
|
|
|
c) Y is activated in the same mode as X
|
|
|
|
d) core makes link from @src to X
|
2005-07-29 11:29:52 +00:00
|
|
|
|
|
|
|
(--------
|
2005-10-02 18:57:07 +00:00
|
|
|
(- X --------) |
|
2005-07-29 11:29:52 +00:00
|
|
|
| | |------)
|
|
|
|
| target *------------->| sink |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
>(------------) >|------)
|
|
|
|
(real pad link) / | / (--------
|
|
|
|
/ | /
|
2005-07-29 11:29:52 +00:00
|
|
|
/ | /
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
-------) / | / (real pad link)
|
2005-07-29 11:29:52 +00:00
|
|
|
| / (- Y ------) /
|
|
|
|
(-----|/ | |/
|
|
|
|
| src |<-------------* target |
|
|
|
|
(-----| (----------)
|
|
|
|
-------)
|
|
|
|
|
|
|
|
|
|
|
|
* Setting target on untargetted linked ghostpad:
|
|
|
|
|
|
|
|
gst_ghost_pad_set_target (char *name, GstPad *newtarget)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
|
2005-10-02 18:57:07 +00:00
|
|
|
(- X --------)
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
| |
|
|
|
|
| target *------>//
|
|
|
|
>(------------)
|
|
|
|
(real pad link) / |
|
|
|
|
/ |
|
2005-07-29 11:29:52 +00:00
|
|
|
/ |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
-------) / |
|
2005-07-29 11:29:52 +00:00
|
|
|
| / (- Y ------)
|
|
|
|
(-----|/ | |
|
|
|
|
| src |<-------------* target |
|
|
|
|
(-----| (----------)
|
|
|
|
-------)
|
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
1) assert direction of @newtarget == X direction
|
|
|
|
2) X target is set to @newtarget
|
|
|
|
3) Y is linked to @newtarget
|
2005-10-02 18:57:07 +00:00
|
|
|
|
2005-07-29 11:29:52 +00:00
|
|
|
(--------
|
2005-10-02 18:57:07 +00:00
|
|
|
(- X --------) |
|
2005-07-29 11:29:52 +00:00
|
|
|
| | |------)
|
|
|
|
| target *------------->| sink |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
>(------------) >|------)
|
|
|
|
(real pad link) / | / (--------
|
|
|
|
/ | /
|
2005-07-29 11:29:52 +00:00
|
|
|
/ | /
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
-------) / | / (real pad link)
|
2005-07-29 11:29:52 +00:00
|
|
|
| / (- Y ------) /
|
|
|
|
(-----|/ | |/
|
|
|
|
| src |<-------------* target |
|
|
|
|
(-----| (----------)
|
|
|
|
-------)
|
|
|
|
|
|
|
|
* Setting target on targetted linked ghostpad:
|
|
|
|
|
|
|
|
gst_ghost_pad_set_target (char *name, GstPad *newtarget)
|
|
|
|
|
|
|
|
(--------
|
2005-10-02 18:57:07 +00:00
|
|
|
(- X --------) |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
| | |-------)
|
|
|
|
| target *------------->| sink1 |
|
|
|
|
>(------------) >|-------)
|
|
|
|
(real pad link) / | / (--------
|
|
|
|
/ | /
|
2005-07-29 11:29:52 +00:00
|
|
|
/ | /
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
-------) / | / (real pad link)
|
2005-07-29 11:29:52 +00:00
|
|
|
| / (- Y ------) /
|
|
|
|
(-----|/ | |/
|
|
|
|
| src |<-------------* target |
|
|
|
|
(-----| (----------)
|
|
|
|
-------)
|
2005-10-02 18:57:07 +00:00
|
|
|
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
1) assert direction of @newtarget == X direction
|
2005-07-29 11:29:52 +00:00
|
|
|
2) Y and X target are unlinked
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
2) X target is set to @newtarget
|
|
|
|
3) Y is linked to @newtarget
|
2005-10-02 18:57:07 +00:00
|
|
|
|
2005-07-29 11:29:52 +00:00
|
|
|
(--------
|
2005-10-02 18:57:07 +00:00
|
|
|
(- X --------) |
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
| | |-------)
|
|
|
|
| target *------------->| sink2 |
|
|
|
|
>(------------) >|-------)
|
|
|
|
(real pad link) / | / (--------
|
|
|
|
/ | /
|
2005-07-29 11:29:52 +00:00
|
|
|
/ | /
|
docs/design/part-gstghostpad.txt: Update ascii art in documentation.
Original commit message from CVS:
* docs/design/part-gstghostpad.txt:
Update ascii art in documentation.
* gst/gstghostpad.c: (gst_proxy_pad_do_internal_link),
(gst_proxy_pad_set_target_unlocked), (gst_proxy_pad_init),
(gst_ghost_pad_parent_set), (gst_ghost_pad_parent_unset),
(gst_ghost_pad_internal_do_activate_push),
(gst_ghost_pad_internal_do_activate_pull),
(gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull),
(gst_ghost_pad_do_link), (gst_ghost_pad_do_unlink),
(gst_ghost_pad_dispose), (gst_ghost_pad_new_full),
(gst_ghost_pad_set_target):
Small cleanups and leak fixes.
Remove some checks now that the internal pad is never NULL.
Fix the case where linking pads without a target would create nasty
criticals. Fixes #341029.
Don't assign a GstPadLinkReturn to a gboolean and mess up the return
value of _set_target().
* tests/check/gst/gstghostpad.c: (GST_START_TEST),
(gst_ghost_pad_suite):
Some more tests for creating and linking untargeted ghostpads.
2006-08-31 15:19:44 +00:00
|
|
|
-------) / | / (real pad link)
|
2005-07-29 11:29:52 +00:00
|
|
|
| / (- Y ------) /
|
|
|
|
(-----|/ | |/
|
|
|
|
| src |<-------------* target |
|
|
|
|
(-----| (----------)
|
|
|
|
-------)
|
|
|
|
|
2005-10-02 18:57:07 +00:00
|
|
|
|
|
|
|
Activation
|
2010-11-01 13:32:43 +00:00
|
|
|
~~~~~~~~~~
|
2005-10-02 18:57:07 +00:00
|
|
|
|
|
|
|
Sometimes ghost pads should proxy activation functions. This thingie
|
|
|
|
attempts to explain how it should work in the different cases.
|
|
|
|
|
2010-11-01 13:32:43 +00:00
|
|
|
+---+ +----+ +----+ +----+
|
|
|
|
| A +-----+ B | | C |-------+ D |
|
|
|
|
+---+ +---=+ +=---+ +----+
|
|
|
|
+--=-----------------------------=-+
|
|
|
|
| +=---+ +----+ +----+ +---=+ |
|
|
|
|
| | a +---+ b ==== c +--+ d | |
|
|
|
|
| +----+ +----+ +----+ +----+ |
|
|
|
|
| |
|
|
|
|
+----------------------------------+
|
|
|
|
state change goes from right to left
|
|
|
|
<-----------------------------------------------------------
|
2005-10-02 18:57:07 +00:00
|
|
|
|
|
|
|
All of the labeled boxes are pads. The dashes (---) show pad links, and
|
|
|
|
the double-lines (===) are internal connections. The box around a, b, c,
|
|
|
|
and d is a bin. B and C are ghost pads, and a and d are proxy pads. The
|
|
|
|
arrow represents the direction of a state change algorithm. Not counting
|
|
|
|
the bin, there are three elements involved here -- the parent of D, the
|
|
|
|
parent of A, and the parent of b and c.
|
|
|
|
|
|
|
|
Now, in the state change from READY to PAUSED, assuming the pipeline
|
|
|
|
does not have a live source, all of the pads will end up activated at
|
|
|
|
the end. There are 4 possible activation modes:
|
|
|
|
|
2010-11-01 13:32:43 +00:00
|
|
|
1) AD and ab in PUSH, cd and CD in PUSH
|
|
|
|
2) AD and ab in PUSH, cd and CD in PULL
|
|
|
|
3) AD and ab in PULL, cd and CD in PUSH
|
|
|
|
4) AD and ab in PULL, cd and CD in PULL
|
2005-10-02 18:57:07 +00:00
|
|
|
|
|
|
|
When activating (1), the state change algorithm will first visit the
|
|
|
|
parent of D and activate D in push mode. Then it visits the bin. The bin
|
|
|
|
will first change the state of its child before activating its pads.
|
|
|
|
That means c will be activated in push mode. [*] At this point, d and C
|
|
|
|
should also be active in push mode, because it could be that activating
|
|
|
|
c in push mode starts a thread, which starts pushing to pads which
|
|
|
|
aren't ready yet. Then b is activated in push mode. Then, the bin
|
|
|
|
activates C in push mode, which should already be in push mode, so
|
|
|
|
nothing is done. It then activates B in push mode, which activates b in
|
|
|
|
push mode, but it's already there, then activates a in push mode as
|
|
|
|
well. The order of activating a and b does not matter in this case.
|
|
|
|
Then, finally, the state change algorithm moves to the parent of A,
|
|
|
|
activates A in push mode, and dataflow begins.
|
|
|
|
|
|
|
|
[*] Not yet implemented.
|
|
|
|
|
|
|
|
Activation mode (2) is implausible, so we can ignore it for now. That
|
|
|
|
leaves us with the rest.
|
|
|
|
|
|
|
|
(3) is the same as (1) until you get to activating b. Activating b will
|
|
|
|
proxy directly to activating a, which will activate B and A as well.
|
|
|
|
Then when the state change algorithm gets to B and A it sees that they
|
|
|
|
are already active, so it ignores them.
|
|
|
|
|
|
|
|
Similarly in (4), activating D will cause the activation of all of the
|
|
|
|
rest of the pads, in this order: C d c b a B A. Then when the state
|
|
|
|
change gets to the other elements they are already active, and in fact
|
2011-09-07 11:14:38 +00:00
|
|
|
data flow is already occurring.
|
2005-10-02 18:57:07 +00:00
|
|
|
|
|
|
|
So, from these scenarios, we can distill how ghost pad activation
|
|
|
|
functions should work:
|
|
|
|
|
|
|
|
Ghost source pads (e.g. C):
|
|
|
|
push:
|
|
|
|
called by: element state change handler
|
|
|
|
behavior: just return TRUE
|
|
|
|
pull:
|
|
|
|
called by: peer's activatepull
|
|
|
|
behavior: change the internal pad, which proxies to its peer e.g. C
|
|
|
|
changes d which changes c.
|
|
|
|
|
|
|
|
Internal sink pads (e.g. d):
|
|
|
|
push:
|
|
|
|
called by: nobody (doesn't seem possible)
|
|
|
|
behavior: n/a
|
|
|
|
pull:
|
|
|
|
called by: ghost pad
|
|
|
|
behavior: proxy to peer first
|
|
|
|
|
|
|
|
Internal src pads (e.g. a):
|
|
|
|
push:
|
|
|
|
called by: ghost pad
|
|
|
|
behavior: activate peer in push mode
|
|
|
|
pull:
|
|
|
|
called by: peer's activatepull
|
|
|
|
behavior: proxy to ghost pad, which proxies to its peer (e.g. a
|
|
|
|
calls B which calls A)
|
|
|
|
|
|
|
|
Ghost sink pads (e.g. B):
|
|
|
|
push:
|
|
|
|
called by: element state change handler
|
|
|
|
behavior: change the internal pad, which proxies to peer (e.g. B
|
|
|
|
changes a which changes b)
|
|
|
|
pull:
|
|
|
|
called by: internal pad
|
|
|
|
behavior: proxy to peer
|
2005-10-02 23:20:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
It doesn't really make sense to have activation functions on proxy pads
|
|
|
|
that aren't part of a ghost pad arrangement.
|