Tim-Philipp Müller
deeef84d2c
videomixer: fix double unlock in segment seek segment code path
...
We only want to unlock if we push an event downstream and
jump to done_unlock label afterwards. We would also unlock
in case of a segment seek and then unlock again later, and
nothing good can come of that.
(This code looks a bit dodgy anyway though, shouldn't it
also bail out with FLOW_EOS here in case of a segment seek
scenario, just without the event?)
2014-07-04 20:26:46 +01:00
Vincent Penquerc'h
bbb1a8de1f
videomixer: reset QoS on segment event
...
https://bugzilla.gnome.org/show_bug.cgi?id=732540
2014-07-01 16:35:05 +01:00
Thibault Saunier
45b9ef1825
videomixer: Declare as Compositor in 'klass'
2014-06-26 17:49:23 +02:00
David Fernandez
4ed74d3ab0
videomixer2: Solve segmentation fault when src caps are configured
...
Change function pointers to NULL while holding the lock to avoid
race conditions
https://bugzilla.gnome.org/show_bug.cgi?id=701110
2014-06-25 16:44:38 +02:00
Tim-Philipp Müller
77badda6b9
videomixer: name collectpads object based on videomixer name
...
Makes it easier to track things in debug logs when there
are multiple mixers and muxers.
2014-04-16 21:40:45 +01:00
Tim-Philipp Müller
f8d15b1e56
videomixer: better logging of incoming events
...
The pad and parent names are already logged as part of logging
the object. Instead log the full event details.
2014-04-16 21:38:35 +01:00
Sebastian Dröge
74c23f0f4f
videomixer: Create hashtable only when we actually use it
...
In error cases we previously returned without freeing it.
2014-04-16 17:33:46 +02:00
Sebastian Dröge
d3a2b3c73a
videomixer: Chain up to the parent class' dispose function
2014-04-16 17:30:59 +02:00
Mathieu Duponchelle
6cf0f19c14
videomixer: Port to new collectpads API
...
See: https://bugzilla.gnome.org/show_bug.cgi?id=724705
2014-03-16 17:44:40 +01:00
Thiago Santos
373eceef7c
videomixer2: store video info with buffers to keep it in sync
...
Instead the queued buffer might have an old caps while the pad
is already storing the information for a new caps. Mixing those
while handling buffers will often lead to issues
https://bugzilla.gnome.org/show_bug.cgi?id=725948
2014-03-11 00:49:19 -03:00
Mathieu Duponchelle
532598e360
videomixer: explicitly fail when alpha information would have been lost.
2013-11-27 16:35:46 +01:00
MathieuDuponchelle
83f8ee1d41
videomixer2: Merge tag events to send them in collected.
...
Otherwise there were race conditions where we would send tags
on a flushing srcpad.
We have a test for that in GES, but this should be tested
systematically with harness in the future as I believe it
is useful for exactly that kind of cases.
https://bugzilla.gnome.org/show_bug.cgi?id=708165
2013-11-22 18:54:35 -03:00
Mathieu Duponchelle
3d780c5c6d
videomixer: Check if the pad needs reconfiguration in collected
...
https://bugzilla.gnome.org/show_bug.cgi?id=709384
2013-10-04 10:53:26 +02:00
Thibault Saunier
9f4a8ccdf4
videomixer: Do not check if caps are empty when they are NULL
...
In the case the caps are actually NULL, we should just concider it the
same way as empty caps in that case.
2013-09-11 14:33:31 -03:00
Mathieu Duponchelle
8db40a8c7f
videomixer: Add colorspace conversion
...
https://bugzilla.gnome.org/show_bug.cgi?id=704950
2013-09-10 10:37:23 +02:00
Mathieu Duponchelle
707e39fe7a
videomixer: Don't send reconfigure event when formats or PAR are different
...
It is racy with multiple pads.
https://bugzilla.gnome.org/show_bug.cgi?id=704950
2013-09-10 10:36:48 +02:00
Mathieu Duponchelle
8db3648544
videomixer: Bundle private copies of videoconvert code
...
Ideally, this would be part of libgstvideo.
Prefixes videoconvert symbols with videomixer_.
https://bugzilla.gnome.org/show_bug.cgi?id=704950
2013-09-10 10:36:30 +02:00
Mathieu Duponchelle
b68f419b6f
videomixer: Don't set EOS to FALSE when the collectpad *is* EOS
...
https://bugzilla.gnome.org/show_bug.cgi?id=707238
2013-09-04 11:09:04 +02:00
Mathieu Duponchelle
5d21f8f2e3
videomixer: don't send flush_stop twice.
...
If we get flush start and a seek we need to only send flush_stop once.
More info at #706441
2013-08-23 20:17:11 -04:00
Thibault Saunier
e47ffb203b
videomixer: Do not send flush_stop ourself after a flush_start
...
When we receive a flush_start, we should wait for the next flush_stop
and foward it, not create a flush_stop ourself.
2013-08-17 11:40:27 +02:00
Thibault Saunier
6c349d6ec3
videomixer: Send EOS if buf_end >= segment.stop
...
That means the whole segment is already played, and we are sure we
are EOS at that point.
Also handle segment seeks, and do not send EOS in that case.
2013-08-11 19:05:18 +02:00
Thibault Saunier
c5fa4666b7
videomixer: Make sure to send EOS if the buffer end time equals the segment end time
...
Otherwize EOS never gets sent in that particular case.
2013-08-06 12:21:33 +02:00
Mathieu Duponchelle
d67a671bfb
videomixer: use gst_util_uint64_scale*_round.
...
There could be a case where:
1) you do a new set_caps after buffers have been processed.
2) ts_offset gets set to a different value, eg 0.033333333
3) your pads get EOS, but the check dor that doesn't work
because you use ts_offset + a truncated value < segment.stop
4) so in the next collected, you end up comparing for example:
0.9999999999 > 1., which is false and means you don't send EOS.
Also adds scale_round in two other places where it potentially could
have caused problems.
2013-07-21 19:21:57 -04:00
Sebastian Dröge
3d0988f46f
videomixer: Fix handling of buffers without a duration
...
We'll have to pop buffer from collectpads and store it
internally only to get the timestamp of the next buffer.
If we continue to keep it in collectpads, no new buffer
to calculate the end time will ever arrive.
https://bugzilla.gnome.org/show_bug.cgi?id=703743
2013-07-09 12:42:17 +02:00
Sebastian Dröge
9e9d2ce098
videomixer: Fix negotiation with 0/1 framerates
...
https://bugzilla.gnome.org/show_bug.cgi?id=703743
2013-07-09 11:53:28 +02:00
Sebastian Dröge
01cc493944
Revert "videomixer: When all sinkpads are eos, update output segment stop and forward it"
...
This reverts commit 2d3910fc79
.
It's not solving any problem and instead causes code to fall apart.
https://bugzilla.gnome.org/show_bug.cgi?id=701519
2013-06-12 18:25:59 +02:00
Mathieu Duponchelle
6e23f1fec4
videomixer: check last end_time after conversion to running segment
...
The last end_time was saved after conversion, so the comparison
had to be made after conversion for it to make sense.
https://bugzilla.gnome.org/show_bug.cgi?id=701385
2013-06-11 21:03:35 +02:00
Mathieu Duponchelle
4243714301
videomixer: add mix->segment.start to output_end_time
...
When the segment start is not 0, this created a situation where
the output_end_time is inferior to output_start_time, and the duration
of the next buffer ended up underflowing.
https://bugzilla.gnome.org/show_bug.cgi?id=701385
2013-06-11 21:03:03 +02:00
Sebastian Dröge
e2e1d1a158
videomixer: Add FIXME comment about the DURATION query from adder
...
Currently the code just takes with maximum upstream duration, which
is wrong. It should be the maximum upstream duration in running time.
2013-05-30 23:56:38 +02:00
Mathieu Duponchelle
5223868caa
videomixer: Set a reference to mix->current_caps as the QUERY_CAPS result.
2013-05-30 15:36:48 -04:00
Nicolas Dufresne
cd30a81ee3
videomixer: Maintain z-order when new pad are added
...
https://bugzilla.gnome.org/show_bug.cgi?id=701109
2013-05-27 22:43:25 -04:00
Thibault Saunier
7a3df1ab31
videomixer: Always handle flush_stop_pending atomically
...
It is not protected with the COLLECT_PADS_STREAM_LOCK anymore
2013-05-25 12:20:08 -04:00
Thibault Saunier
608bd3e2db
videomixer: Do not take COLLECT_PADS_STREAM_LOCK when unnecessary
...
Collectpad takes the lock itself when receiving serialized events
and we should not take it for not serialized ones
2013-05-25 11:03:31 -04:00
Nicolas Dufresne
d8c5e31657
videomixer: Don't hold stream-lock while pushing non-serialized events
...
https://bugzilla.gnome.org/show_bug.cgi?id=700868
2013-05-23 09:20:04 -04:00
Nicolas Dufresne
a7e0f251ca
videomixer: Don't hold object lock while sending events
...
https://bugzilla.gnome.org/show_bug.cgi?id=700868
2013-05-23 09:20:04 -04:00
Thibault Saunier
18ef4f18d0
videomixer: Send a reconfigure event upstream if sinkpad caps are not usable
...
https://bugzilla.gnome.org/show_bug.cgi?id=684237
2013-05-21 12:15:36 -04:00
Mathieu Duponchelle
2d3910fc79
videomixer: When all sinkpads are eos, update output segment stop and forward it
...
https://bugzilla.gnome.org/show_bug.cgi?id=699793
2013-05-20 21:06:56 +02:00
Mathieu Duponchelle
521c9a7b5d
videomixer: Don't reset the output segment on flush stop
...
Only init it when getting from READY to PAUSED, and change it on seek events.
https://bugzilla.gnome.org/show_bug.cgi?id=699793
2013-05-20 21:03:03 +02:00
Thibault Saunier
86b106091c
videomixer: Send caps event from the streaming thread
...
This way we avoid races in caps negotiation and we make sure
that the caps are sent after stream-start.
https://bugzilla.gnome.org/show_bug.cgi?id=684237
2013-05-19 09:28:04 -04:00
Thibault Saunier
718f9004d0
videomixer: Do not send flush_stop when receiving a seek
...
There is no reason to send a flush-stop when receiving a seek event.
In the case of a flushing seek, we could eventually want to, but in
the code path were we check if the seek is "flushing", we have the
following comment that makes sense:
"we can't send FLUSH_STOP here since upstream could start pushing data
after we unlock mix->collect.
We set flush_stop_pending to TRUE instead and send FLUSH_STOP after
forwarding the seek upstream or from gst_videomixer_collected,
whichever happens first."
https://bugzilla.gnome.org/show_bug.cgi?id=684237
2013-05-19 09:28:04 -04:00
Thibault Saunier
85b6852deb
videomixer2: Protect flush_stop_pending with the collectpad stream lock
...
And make sure to expect a flush-stop after a flush-start
https://bugzilla.gnome.org/show_bug.cgi?id=684237
2013-05-19 09:28:04 -04:00
Sebastian Dröge
3110b7cc31
Revert "videomixer2: Take into account new segments"
...
This reverts commit 84ae670ab4
.
Actually this is not how it is supposed to work. videomixer
creates a [0,-1] segment and then puts frames of the different
streams there based on their running times in their own segments.
2013-05-09 16:26:19 +02:00
Mathieu Duponchelle
84ae670ab4
videomixer2: Take into account new segments
...
Also forward the event downstream on the next opportunity.
https://bugzilla.gnome.org/show_bug.cgi?id=699793
2013-05-09 16:18:54 +02:00
Sebastian Dröge
1588cda9a1
videomixer2: Send stream-start before caps event
...
https://bugzilla.gnome.org/show_bug.cgi?id=699895
2013-05-08 16:02:46 +02:00
Mathieu Duponchelle
6b153ce385
videomixer: send stream-start event.
2013-04-25 16:09:34 -03:00
Olivier Crête
24bb263d54
videomixer: Don't unref query, we don't own it
...
Fixes double-unref bug. Bug found by Youness Alaoui
2013-04-16 19:29:48 -04:00
Tim 'mithro' Ansell
3a5d17e852
videomixer2: avoid caps leak
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=693307
2013-02-07 11:40:35 +01:00
Matthew Waters
b9151a9c28
videomixer: fix eos timestamp check
...
fixes hang in videotestsrc num-buffers=20 ! videomixer ! fakesink
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692935
2013-01-31 16:45:38 +01:00
Tim-Philipp Müller
230cf41cc9
Fix FSF address
...
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Youness Alaoui
13328bc129
videomixer2: Fix race condition where a src setcaps is ignored
...
If both pads receive data at the same time, they will both get their
sink_setcaps called which will call the src_setcaps, but there is
a race condition where the second one might not be called.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=683842
2012-10-19 12:10:31 +02:00