Commit graph

2040 commits

Author SHA1 Message Date
Thibault Saunier
82cbbf3b86 composition: Remove useless functions to add GSources and add debugging
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:10 +01:00
Mathieu Duponchelle
668331561b composition: Remove DONE fixme
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:10 +01:00
Thibault Saunier
d038e53db8 ghostpad: Do not try to be smarter than possible with seqnum
We can have several CAPS event comming at any time and thuse we will
need to rely on elements to handle their seqnum properly as we can not
do a safe guard at our level

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:10 +01:00
Mathieu Duponchelle
c256fd1486 composition: Keep our GSources in a list making their thread safe
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:10 +01:00
Thibault Saunier
c022765529 composition: Concider the last action as DONE when we get a CAPS or SEGMENT
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:10 +01:00
Mathieu Duponchelle
7976d55e56 composition: only forward our flush start / stops
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:10 +01:00
Thibault Saunier
2ee5bf26c1 ghostpad: remove useless debug
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:10 +01:00
Mathieu Duponchelle
c6cfed94da composition: cleanup and enhance debug
Bye Bye STRAM START you were a brave little debug we will miss you.

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:10 +01:00
Thibault Saunier
1dbf0b9146 composition: do not flush downstream when updating pipeline ourselves.
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:10 +01:00
Mathieu Duponchelle
b7265ecde2 composition: Set update to TRUE when updating the stack because of EOS
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:10 +01:00
Thibault Saunier
afc483b69d composition: Handle seeking current stack while PAUSED
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:10 +01:00
Mathieu Duponchelle
6869c58e28 composition: Add and enhance some debug
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
48bd4c3046 composition: Dot the newly created stacks
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
39a915883e gnlghostpad: Add some more debugging and fix mistakes in seqnum handling
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
b28c506121 composition: Factor out a function to seek the current stack
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
75a809cf75 composition: Set the seqnum only when receiving the actual seek event
Setting it before calling seek_handling is racy!

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
f6cb54c2ef composition: Set the real_eos_seqnum in a dedicated method
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
28bea48893 composition: Reset the real_eos_seqnum when reseting the composition
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
9759f801e5 composition: Release OBJECTS_LOCK when emiting the "commited"
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
913798ea3d composition: Use the private struct directly
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
96672825d5 gnloperation: Totally clear operations when removing emptying current_bin
Removing linked childre leads to weird behaviour, we want to make sure
that all elements are totally clean when they are out the current bin.

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
837ef2199f gnlghostpad: Do not forget to set output segment seqnum
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
9d8d077627 composition: Fix the build
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
123a940001 tests:composition: Fix some refcounts
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
eeb475db5b composition: Relink nodes *after* setting the seqnum
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
25a2c2387e gnlghostpad: Do not tolerate getting seeked when no target is set
This should not happen anymore

+ Do not set twice events seqnums

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
73677edf60 gnlghostpad: Add missing seqnum tweaking
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
d7e7b047d0 tests: Use compositor instead of videomixer
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
92105a17a5 composition: Handle the case were we get an EOS right after a segment
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
f0dbc0fcd6 composition: Make basic seeking working
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
ea055c8349 tests: Start fixing operation tests
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
988116fbae tests: Fix composition tests
We can not expect a seek event anymore as we are seeking in READY the elements
themselves

+remove actual sinks

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
054569cce7 composition: Implement the logic to PAUSE the task while executing actions
We need to wait for the pipeline update to be actually finished before we can start another
action. That means that we pause the task until one buffer from the new stack is
outputed.

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
6e476ddd24 composition: Do not forget to set expandables state to NULL when disposing
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
bd47c57d1a composition: Factor out a function to commit only the values
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
de9c348ae0 composition: Get the current position before actually commiting values on commit
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
eeb530e19d composition: Add a method that set the current bin to READY
We need to get the stream lock in some conditions, and thuse send
flush event in those cases.

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
c99642fe66 composition: Remove useless code
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:09 +01:00
Thibault Saunier
5efd167bf2 composition: Clear the old stack when removing children that where used
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:09 +01:00
Mathieu Duponchelle
e522427cb4 composition: Remove useless toplevel_seek argiment from activate_new_stack
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:08 +01:00
Thibault Saunier
7de8b9c16c composition: Rework the seqnum logic to avoid races when setting the new stack seqnum
When we were seeking the same stack without a logic that gurantees that we actually
saw the seek with the new seqnum set, we could have ended up with an EOS set with
the right seqnum even if it was actually not the case.

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:08 +01:00
Mathieu Duponchelle
7b55a91284 composition: Add/Remove children in the same order as they were called
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:08 +01:00
Thibault Saunier
5ec01408df composition: Remove useless flush_start argument from the stop_task method
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:08 +01:00
Mathieu Duponchelle
44e95d240a composition: Force setting children state to NULL rebfore unrefing them
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:08 +01:00
Thibault Saunier
f0c5f87284 compositition: Check last stack in the children thread
Avoiding to take the OBJECT_LOCK when recieving EOS. The computation is
based on the GstEvent.seqnum to make sure that the EOS we receive
corresponds to the right sequence.

In that patch we tweak seqnums so that they are correctly computed
avoiding to depend on all elements to do it properly as it might pretty
much not be the case!

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:08 +01:00
Mathieu Duponchelle
2e01715209 composition: Actiually set current_bin state even when not debugging
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:08 +01:00
Thibault Saunier
5df6986a81 composition: Set *all* children state when going back to READY and then NULL
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:08 +01:00
Mathieu Duponchelle
27d58a30af composition: Fix toplevel seek event refcounting
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:08 +01:00
Thibault Saunier
0e663da588 composition: Teach the composition to seek same stack
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
2014-10-31 11:58:08 +01:00
Thibault Saunier
c05898a169 composition: The ref the user gave us is our, and we give another to the bin when needed
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-31 11:58:08 +01:00