Commit graph

5008 commits

Author SHA1 Message Date
Thibault Saunier 75065ab244 videotestsrc: Do not try to answer the duration query before negotiation
We have no idea at that moment and this code was trying to divide by 0!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/705>
2020-06-15 17:24:17 +00:00
Thibault Saunier 3354b3ebbb decodebin3: Lower error message to debug
Debugging leftover

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/699>
2020-06-11 16:39:23 -04:00
Thibault Saunier 7edbc3fd7d uridecodebin3: Let decodebin do its stream selection if no one answers
If no one answers our `select-stream` signal, uridecodebin3 should
behave the same way as `decodebin3` and let decodebin do its own stream
selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/666>
2020-06-08 12:54:05 -04:00
Thibault Saunier b41b87522f decodebin3: Avoid overriding explicit user selection
In case the user set a list of streams to select or answer explicitly
to all 'select-stream' event, we should respect his choice and not
try to add a stream per type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/666>
2020-06-08 12:54:05 -04:00
Seungha Yang 9c3cff287e playbin: Fix wrong AV element pair selection when rank is very large value
If user set very high rank to an element (e.g., integer max),
integer overflow can happen while multiplication operation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/690>
2020-06-06 20:22:28 +09:00
Mathieu Duponchelle cc516695b0 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:41:17 +02:00
Edward Hervey b087415757 uridecodebin: Dont link random pads
When linking source pads to decodebin, make sure we use the *specified* new
source pad and not some random one.

This avoids ending up with source pads being unlinked.

Main cause of random timeouts with rtsp change_state_intensive validate tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/687>
2020-06-05 09:06:05 +00:00
Mathieu Duponchelle e666c9ec04 plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-03 22:44:23 -04:00
Thibault Saunier 0c75ea0858 videorate: Update QoS events taking into account our rate
Otherwise there is a mismatch between the QoS values and what upstream
would expect, leading to too much buffer dropping in video decoders in
case rate < 1.0 or not enough buffer dropping in case rate > 1.0

Adding validate tests with and without decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/679>
2020-06-01 07:07:31 +00:00
Thibault Saunier 6499e2afa5 videorate: Fix changing rate property during playback
We need to take into account the base_ts to compute next_ts and it needs
to be updated on rate change.

This introduces `pending_rate` so that change rate is properly handled
in the streaming thread in a safe way.

Added tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/679>
2020-06-01 07:07:31 +00:00
Michael Gruner 9a94b4cbc1 videoscale: reorder code to avoid indent missmatches
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/548>
2020-05-29 00:44:07 +00:00
Michael Gruner c0ca12a3fb videoscale: transform size sensitive metas
Currently, videoscale just drops all metas that have other tags
besides video. However videoscale wont change the colorspace or
the orientation of the video so metas tagged as such may be
copied safely. Additionaly, given that videoscale will change
the frame size, we invoke the meta transform implementation
to give it the opportunity to scale accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/548>
2020-05-29 00:44:07 +00:00
uno20001 e945b3706c decodebin: only emit 'drained' signal when top chain is drained
Without this, decodebin emits 'drained' multiple times which then
causes (uri)playbin to emit 'about-to-finish' multiple times for
for file types.

Fixes #751

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/673>
2020-05-27 18:51:31 +00:00
Sebastian Dröge 44cd1c7a65 audioresample: Drain resampler on discontinuities
Otherwise we would lose the last few samples when resetting the
resampler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>
2020-05-27 17:06:08 +00:00
Sebastian Dröge bf0cffc474 audioresample: Drain resampler and reset timestamp tracking on stream-start event too
And also reset timestamp tracking on EOS events as more data might come
afterwards with a new stream-start event. This keeps the code the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>
2020-05-27 17:06:08 +00:00
Sebastian Dröge 6d423cbba2 audioresample: Drain the resampler and reset timestamp tracking on caps changes
Especially when changing the sample rate our timestamp tracking will be
completely off, but even otherwise we would usually lose the last few
samples if we don't drain here as the resampler gets reset if anything
but the sample rate changes.

This is usually not a problem as the first buffer after a caps event
usually has the discont flag set, but can cause problems if
 - the caps event is followed by a segment event, which then causes
   draining according to the new sample rate
 - the caps were changed because of rengotiation due to a reconfigure
   event and there is not discontinuity from upstream

In both cases we would output buffers with completely wrong timestamps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>
2020-05-27 17:06:08 +00:00
Thibault Saunier 97fe599c0f videorate: Fix buffer selection logic in reverse playback
Stop comparing all timestamps from buffers that are before the segment
with the segment.stop and compare with the actual end times.

Comparing to segment.stop for all the buffers that where before
the segment.stop was incorrect and leading to consuming wrong buffers
and not respecting segment.stop, this is now properly tested.

Expectations for `reverse.10_to_1fps.validatetest` have been fixed to
take that into account and comparing the checksums of the sinkpad and
srcpad expectations makes pretty clear how wrong that was.

(we can see in the expectations that videotestsrc outputs an extra
buffer with pts == segment.stop and this one is now properly dropped
by videorate as bec7f4ad5e aimed at
doing)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier 6e82eb28f3 videorate: Factor out a method for themax-duplication-time property
Sensibly simplifying gst_video_rate_transform_ip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier 39c321835b videorate: Use CLOCK_TIME_IS_VALID instead of checking CLOCK_TIME_NONE
Making it more consistency with the rest of the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier 086f3c05b9 videorate: Factor out a method to reset mode
Working on simplifying gst_video_rate_transform_ip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier dc47232d0d videorate: Do not push an extra buffer on EOS when we are done pushing already
There is no reason that when we have already pushed all the buffers in
a segment we push a new one on EOS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>
2020-05-26 15:35:00 -04:00
Thibault Saunier b46718b1a0 audiotestsrc: Fix the way we compute EOS in reverse playback
In reverse playback we were not taking into account the current buffer
samples to check if we had reached EOS which was leading to a buffer
with PTS = CLOCK_TIME_NONE containing too many frames followed by a
useless buffer with pts=0 duration=0, and a g_critical issue in
gst_object_sync_values.

Also add a validate based test case.
Without that patch this is how the expectation fails:

``` diff
--- log-asink-sink-expected       2020-05-22 23:22:42.654384579 -0400
+++ log-asink-sink-actual  2020-05-22 23:29:35.671586380 -0400
@@ -27,5 +27,6 @@
 buffer: pts=0:00:00.058820861, due=0:00:00.023219955, flags=discont
 buffer: pts=0:00:00.035600907, due=0:00:00.023219954, flags=discont
 buffer: pts=0:00:00.012380952, due=0:00:00.023219955, flags=discont
-buffer: pts=0:00:00.000000000, due=0:00:00.012380952, flags=discont
+buffer: due=0:00:00.012380953, flags=discont
+buffer: pts=0:00:00.000000000, flags=discont
 event eos: (no structure)
 ```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/667>
2020-05-25 08:19:02 +00:00
Thibault Saunier fc2810bada videorate: Fix buffer timestamp underflow in reverse playback
And fix reverse playback buffer duration computation as in reverse
playback, buffer duration is prev_buffer.pts - buffer.pts not pts -
next_pts (buffers are displayed from buffer.pts + buffer.duration for
a duration of buffers.duration).

This is now tested with the `validate.test.clock_sync.videorate.*`
tests in the default integration testsuite where we check the exact
data flow and the synchronization on the clock behaviour with a
TestClock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/646>
2020-05-06 16:50:01 +00:00
Thibault Saunier 9ce93abb29 videotestsrc: Fix buffer duration in reverse playback
In reverse playback, buffers have to be displayed at buffer.stop running
time, meaning:

    buffer.pts + buffer.duration = prev_buffer.pts
    =>
    buffer.duration = prev_buffer.pts - buffer.pts

We were setting buffer.duration = next_buffer.pts - buffer.pts which
is not correct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/646>
2020-05-06 16:50:01 +00:00
Vivia Nikolaidou e56b784171 tcpserversrc: Add stats property
Like in tcpclientsrc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/651>
2020-05-06 15:25:44 +03:00
Jan Schmidt 7e5368627e typefind: Consider MPEG-PS PSM to be a PES type
Include the Program Stream Map packet type 0xBC in the
set of packets we treat as PES. This fixes typefinding
on MPEG-PS streams with PSM, where the PSM would previously
be considered a loss-of-sync and cause the typefind
to require more data.
2020-04-10 22:47:04 +10:00
Philippe Normand e38070d157 uridecodebin3: Activate suburi playback item
The suburi playback item has to be activated after the main playback item so
that playsink can properly enable text rendering.

Fixes #451
2020-04-10 07:26:49 +00:00
Sebastian Dröge 6ea225ccb4 typefindfunctions: Fix otio typefinder to actually detect otio files
The string "\"OTIO_SCHEMA\":" is 14 characters and not 15. Checking for
15 characters would also check for the final '\0', which does not exist
in any otio file as the string is the key of a JSON map.
2020-04-06 15:23:27 +03:00
Sebastian Dröge fa91783833 typefindfunctions: Fix otio typefinder detecting anything with curly braces at the start
memcmp() returns 0 (aka FALSE) on match and a difference otherwise.

Previously the typefinder was matching on anything but otio files that
happened to have some curly braces in the beginning of the file.

Fixes a false positive with a MOV file.
2020-04-06 15:20:22 +03:00
Mathieu Duponchelle caca46e0e6 subparse: convert from pango-markup to utf8 ..
when downstream requires it
2020-03-27 15:27:06 +00:00
Seungha Yang bb8515671e videorate: Signalling reconfigure to upstream whenever updating downstream caps
Previously configured bufferpool can be expired/inactivate by the
updated caps. Therefore new reconfigure event should be signalled in order to
do allocation query dancing between upstream and downstream again.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/730
2020-03-23 18:50:10 +09:00
Niels De Graef 1c08a6088d volume: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef e5cc81a128 videotestsrc: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 1dd63e44b9 videoscale: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 761bb9b9ff videorate: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef f57be9dcc3 videoconvert: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 7a36730fb4 subparse: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 2daf748b61 rawparse: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 2917f9fb2d overlaycomposition: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 29b8a64b7e gio: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef d297c4447d encoding: Use G_DECLARE_FINAL_TYPE
Note that we didn't do it for encodebin, as it has a class struct. We
_could_ techincally use `G_DECLARE_DERIVABLE_TYPE()` for that one, but
that would mean also using a private struct, which is even more work for
no gain.
2020-03-16 15:47:58 +00:00
Niels De Graef b7d123f1bd adder: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 2b67ce5b5a audioconvert: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 1b683d5a76 audiomixer: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef a42f4be0eb audiorate: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef a1ef6a1179 audioresample: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef f91659ba92 audiotestsrc: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef 1b6a6cabf2 compositor: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Mathieu Duponchelle 0739fafd62 subparse: accept WebVTT timestamps without an hour component
https://www.w3.org/TR/webvtt1/#webvtt-timestamp

mm:ss,000 is a valid WebVTT timestamp
2020-03-11 05:44:23 +00:00
Sebastian Dröge d5ee11fb36 compositor: Create a square checkerboard for UYVY/YUY2/YVYU too
Previously the "squares" were twice as wide.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/732
2020-03-09 21:51:32 +00:00
Sebastian Dröge 0227d0ca60 compositor: Define a separate checker fill function for BGRx/RGBx than for xBGR/xRGB
Otherwise we'll create a cyan or yellow checkerboard.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/736
2020-03-09 21:51:32 +00:00
Vivia Nikolaidou d1c9972e94 tcpclientsrc: Fix compilation on FreeBSD
The members of the tcp_info struct are prefixed with a double
underscore, as reported in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/584#note_423487
2020-03-08 10:45:57 +00:00
Vivia Nikolaidou ea930a4bf8 tcpclientsrc: Expose connection stats as property
Unfortunately the OS takes care of bad connections for us, so we can't
get the stats in a platform-independent way. Count total bytes received
as well, platform-independently.
2020-02-28 14:17:34 +02:00
Dimitrios Katsaros e0a195b7bf decodebin3: Reset main group id on PAUSED->READY state change
The main_input stream-id would not get reset when going to READY state.
This would cause warnings when trying to reuse the same decodebin3, since
you would get a new STREAM_START event with a new stream-id, which would
collide with the now stale stream-id
2020-01-27 09:33:37 +00:00
Dimitrios Katsaros 36cada4542 decodebin3: Reduced logging level of messages
The logging is set to warning for a drain event, which is part of the
normal functionality of the parsebin.
2020-01-27 09:33:37 +00:00
Dimitrios Katsaros 19b7b248cc uridecodebin3: Fixed defauts not being set on initialization
The default values were not being set on element initialization. This
was a problem for buffer_duration and buffer_size since they would be
zero initialized, rather then being set to -1. This would cause the
underlaying queue2 element to have no limits and depending on the
streamed file, could cause queue2 to allocate massive amounts of memory.
2020-01-17 13:34:27 +01:00
Víctor Manuel Jáquez Leal f4bcf8290b playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
In decodebin3 and uridecodebin3 the `force-sw-decoders` boolean property is
added. In uridecodebin3 it is only a proxy property which will forward
the value to decodebin3.

When decodebin3 has `force-sw-decoders` disabled, it will filter out in its
decoder and decodable factories those elements within the 'Hardware'
class, at reconfiguring output stream.

playbin3 adds by default GST_PLAY_FLAG_FORCE_SW_DECODERS, and sets
`force-sw-decoders` property accordingly to its internal uridecodebin, also
filters out the 'Hardware' class decoder elements when caps
negotiation.
2020-01-09 12:28:32 +00:00
Víctor Manuel Jáquez Leal f3182a88b1 playbin2: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
Added `force-sw-decoders` boolean property in decodebin2 and
uridecodebin. By default the property is %FALSE and it bypass the new
code. Otherwise the factory list is filtered removing decoders
within 'Hardware' class.

uridecodebin sets the `force-sw-decoders` property in its internal
decodebin, and also filters out Hardware class in the
autoplug-factories default signal handler.

playbin2 adds by default GST_PLAY_FLAG_FORCE_SW_DECODERS it its flags
property, and depending on it playbin2 sets the `force-sw-decoders`
property on its internal uridecodebin, also filters out the Hardware
class decoding decoders at the autoplug-factories signal handler.
2020-01-09 12:28:32 +00:00
Víctor Manuel Jáquez Leal d50c71708a playback: add GST_PLAY_FLAG_FORCE_SW_DECODERS enum
This flag would be common either for playbin2 and playbin3.
2020-01-09 12:28:32 +00:00
Sebastian Dröge 1c147208cc compositor: memcpy() lines directly for alpha formats with SOURCE operator and alpha=1.0 2020-01-08 16:20:30 +02:00
Randy Li e85b856d30 rawvideoparse: allow setting the colorimetry
You can neither guess nor parse the colorimetry from the
input stream.

Signed-off-by: Randy Li <ayaka@soulik.info>
2020-01-08 02:34:17 +00:00
Sebastian Dröge 18ee5e57fd compositor: Alpha inputs with the SOURCE operator can be considered opaque
We don't have to look at each pixel's alpha component because we will
directly write it over the background.
2020-01-07 20:03:59 +02:00
Philippe Normand 0a515acfa8 playbin3: Propagate sink context
When the playsink's sink is activated its state is set to READY but it remains
unlinked. So, in order for decodebin3 to potentially reuse the context later on,
the whole playbin3 needs to have it internally stored.
2019-12-31 10:00:20 +00:00
Seungha Yang 539a703b0b playbin: Propagate sink context
Any contexts created by sink during activation need to be propagated
to whole elements of playbin.
2019-12-31 15:51:53 +09:00
Aaron Boxer 0fb2acab5b playbin: remove deprecated raw audio and raw video sink flags
These flags were deprecated in 2011 with commit
105da803ad

Removing these flags will simplify the logic in playbin.
2019-12-22 07:16:11 +00:00
Stéphane Cerveau 58e6f598f4 base: use of g_value_dup_string
Use helper method to get string from GValue.
2019-12-18 16:03:59 +01:00
Tim-Philipp Müller 006f8cea96 typefindfunctions: build gio xdgmime typefinder again
And add gio-typefinder option to disable it. HAVE_GIO
was never set, at least not in the Meson build.
2019-12-09 07:33:55 +00:00
Tim-Philipp Müller 64b6c4796a multifdsink: remove defunct include guarded by unused HAVE_FIONREAD_IN_SYS_FILIO
The configure check for this went away in 2012 in commit cd3eee.
2019-12-09 07:33:55 +00:00
Seungha Yang fab2d6d60c audiorate: Update next_offset per rate change
To support runtime audio samplerate change, re-calculate next target offset
per caps. Calculating the next buffer offset using the previous
offset seems to be tricky and rounding error prone.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/693
2019-11-18 08:56:21 +00:00
Seungha Yang b6bdff0c84 Revert "audiorate: accumulate offset by time diff"
This reverts commit 4fa850e3e6.

The commit would break an constant rate audio stream with gap.
2019-11-18 08:56:21 +00:00
Thibault Saunier 494ee67446 playbin: Handle error message with redirection indication
There are in the wild (mp4) streams that basically contain no tracks
but do have a redirect info[0], in which case, qtdemux won't be able
to expose any pad (there are no tracks) so can't post anything but
an error on the bus, as:
  - it can't send EOS downstream, it has no pad,
  - posting an EOS message will be useless as PAUSED state can't be
    reached and there is no sink in the pipeline meaning GstBin will
    simply ignore it

In that case, currently the application could try to handle that but it
is pretty complex as it will get the REDIRECT message on the bus at
which point it could set the URL but playbin will ignore it, as
it will only be for the next EOS, it thus need to set the pipeline to
NULL (READY won't do as it is already in READY at that point). And it
needs to figure out the following ERROR message on the bus needs to be
ignored, which is not really simple.

The approach here is to allow element to add details to the ERROR
message with a `redirect-location` field which elements like playbin handle
and use right away.

We could also use the element 'redirect' message in playbin, but the
issue with that approach is that the element will still emit the ERROR
message on the bus, leading to wrong behaviour. That can't be avoided
since in the case the app/parent pipeline is not handling the redirect
instruction, the ERROR message is necessary (and there is no way to
detect that the message has been "handled" from the element emitting the
redirect).

[0]: http://movietrailers.apple.com/movies/paramount/terminator-dark-fate/terminator-dark-fate-trailer-2_480p.mov
2019-11-07 12:22:02 +00:00
Aaron Boxer 5a2a1ea240 overlaycomposition: set sink pad to proxy allocation queries 2019-11-06 12:09:50 +00:00
Thibault Saunier a724f9ddfb encodebin: Ensure that a single segment is pushed into encoders
Following the [design document] encodebin needs to handle sources that
output multiple streams, for that purpose and to make it simpler,
we ensure that a single segment is outputted to the encoders by using
an `identity single-segment=true` at the beginning of streams chains.

Added API to enable or disable the use of that new feature.
Added support for the encoding profile parser for that new property,
keeping backward compatibility

[design document]: https://gstreamer.freedesktop.org/documentation/additional/design/encoding.html?gi-language=c#rendering-timelines
2019-11-05 18:03:09 +00:00
Jochen Henneberg 33acf73334 audioconvert: Fixed changing mix-matrix at runtime
Setting the property again after it had already been set ran
g_value_unset() but did not initialize it again to g_value_copy() failed
afterwards. Removed the unset as cleanup is done implicitely from
g_value_copy().

Changing the mix-matrix property did not trigger reconfiguration of the
caps, this has been added.

If the matrix is set to an empty matrix, instead of copying this the
matrix is simply disabled by setting mix_matrix_is_set (formerly
mix_matrix_was_set) to FALSE so the mix-matrix is ignored from now on.
2019-11-05 08:49:07 +01:00
Sebastian Dröge c363747251 videorate: Fix max-duplication-time handling
Previously this would've only set discont=TRUE and then for all future
buffers simply returned immediately.

Instead we also need to
  a) drain previous input until its buffer time
  b) update next_ts and base_ts accordingly for the gap
  c) actually store the new buffer after the gap so it can be used in
     the future and so the old buffer before the gap is gone

Also update the unit test accordingly so that it actually tests for this
behaviour. Previously it only tested that after the gap we got no output
at all.
2019-11-04 19:01:10 +00:00
Seungha Yang dc274ea9ca compositor: Add support for VUYA format
Reversed order of AYUV format. Most of core methods are prepared
already.
2019-11-04 14:50:28 +00:00
Tim-Philipp Müller 289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Edward Hervey 2409f4f360 base: Avoid usage of deprecated API
GTimeval and related functions are now deprecated in glib.
Replacement APIs have been present since 2.26
2019-10-11 06:17:39 +00:00
Charlie Turner 96c6f581ae streamsynchronizer: avoid pad destruction races.
Due to the use of {set/get}-element_private methods being used to store
the GstSyncStream in the src and sink pads, and the racey nature of pad
destruction, there are numerous ways we can be bitten by race conditions
in the stream synchronizer. Fix that by tying the pads toghether with
references.
2019-09-24 20:09:09 +00:00
Seungha Yang 41bad88d6d streamsplitter: Drop duplicated force-key-unit events
Forward force-key-unit event only once for the corresponding sequence number.
2019-09-05 22:48:23 +09:00
Seungha Yang 9af8516873 streamcombiner: Forward upstream force-key-unit events to all sinkpads
streamcombiner element forwards a upstream event only to one sinkpad.
When the streamcombiner is used with encodebin, the sinkpad
corresponding to pass-through path is configured before that of encoder,
and therefore streamcombiner forwards upstream events only to
the firstly configured one (i.e., pass-through path).
2019-09-05 22:47:13 +09:00
Thibault Saunier 909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Niels De Graef 0314b482f3 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-08-27 07:31:57 +02:00
Sebastian Dröge 6cc32a39e7 typefindfunctions: Check for NULL return of gst_type_find_peek() instead of segfaulting in otio typefinder
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/329#note_194943
2019-07-23 13:54:24 +03:00
Thibault Saunier 0fe151dfde typefind: Add typefind functions for fcpxml, xmel and otio file formats 2019-07-22 14:24:14 +00:00
Thibault Saunier 6d49814932 Revert "typefind: Hold off making suggestions too early for MPEG based formats"
This reverts commit 36319169d0
2019-07-10 21:57:13 +00:00
Thomas Bluemel 36319169d0 typefind: Hold off making suggestions too early for MPEG based formats
By suggesting possible detection too early, it's possible that
the wrong format is detected. Hold off making suggestions until one
of the following conditions is met:
* Probability > GST_TYPE_FIND_LIKELY
* At least MPEG_MIN_PROBE_LENGTH bytes have been examined
* EOS, in which case the best guess wins

Fixes #628
2019-07-09 20:34:01 -06:00
Tim-Philipp Müller ff0f659ca5 compositor: fix compiler warning due to c99-ism 2019-06-24 09:44:29 +00:00
Song Bing 3aa1437ae4 playsink: Set ts-offset to text sink.
Find right text sink to set the ts-offset.
2019-06-18 06:14:28 +00:00
Nirbheek Chauhan abd80b6561 compositor: Copy frames as-is when possible
The blend functions for alpha formats need to do more work than just
doing a memcpy, so we can do a memcpy when we know that a blend is not
actually needed.

1080p AYUV ! compositor background=transparent ! fakesink - 56% faster

Specifically, when we don't draw the background and the first pad we
draw completely covers the output frame, we can just copy it as-is.
The rest of the pads (if any) will get composited on top normally.
2019-06-14 02:50:51 +05:30
Nirbheek Chauhan bb1650cfda compositor: Sprinkle some const in prototypes
These helper functions don't edit the rectangles passed in.
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan ba4484c6a0 compositor: Skip background if transparent and obscured
If the background is transparent and obscured by a pad that may or may
not have alpha, we can still skip drawing it entirely

AYUV 1080p ! compositor background=transparent ! fakesink - 75% faster
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan ba20aec539 compositor: Skip the background when not visible
We don't need to waste time drawing the background when one of the
pads completely covers the output and there's no alpha on the pad or
in the video format. Speedups:

I420 1080p ! compositor ! fakesink - 72% faster
I420 1080p ! compositor background=black ! fakesink - 45% faster
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan 65615a841d compositor: Don't log per-frame under GST_INFO 2019-06-13 20:31:50 +05:30
Nirbheek Chauhan ecec30c1ca compositor: Factor-out rectangle-obscuring check
We're going to use this for checking if one of the pads obscures the
background.
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan a3462a2c6d compositor: Add some comments, remove outdated ones 2019-06-13 20:31:50 +05:30
Nirbheek Chauhan cf3287dba4 compositor: Remove unused function argument 2019-06-13 20:31:50 +05:30
Mathieu Duponchelle d98835fdef doc: remove xml from comments 2019-05-30 01:12:59 +02:00
Thibault Saunier 1d2994ce64 overlaycompositor: Show the full example instead of a stripped down version 2019-05-29 14:41:10 -04:00
Nicolas Dufresne 48124379d5 doc: Add gstoverlaycomposition to the plugins list 2019-05-29 11:11:12 +01:00