Commit graph

5101 commits

Author SHA1 Message Date
Stéphane Cerveau
a750bc8f23 playback: element_init returns void
no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
4f6af9e57a volume: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
b4905798bb videotestsrc: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
90f640d90d videoscale: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
328f7c0b48 videorate: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
aa230852ba videoconvert: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
a3875c7d02 overlaycomposition: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
4e9520ab34 encoding: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
0ae61fd48d compositor: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
a71bf2e3da adder: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
2cc37e706c audioconvert: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
5dcdc09077 gio: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
160ba7d0e9 app: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
f94d9f1cc5 audiomixer: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
520a682c7c tcp: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
3d3831656d rawparse: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Stéphane Cerveau
01d1bbd1da playback: remove useless ret test
Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
2021-03-10 20:06:20 +01:00
Mathieu Duponchelle
dd71f359be compositor: fix drawing of transparent background
When drawing the background multithreaded, y_start needs to be
scaled to obtain the correct byte offset from which to start
memsetting (yoffset).

Fixes #871

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1042>
2021-03-01 23:38:35 +00:00
Francisco Javier Velázquez-García
740ea66e73 videotestsrc.c: Correct left shift operator
Use the left shift operator '<<' instead of the mistakenly typed less
than operator '<'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1047>
2021-02-23 14:53:43 +01:00
Jeongki Kim
fd41fca7f3 audioresample: Respect buffer layout when drain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1045>
2021-02-22 15:36:53 +09:00
Jan Schmidt
ebad39b865 videoconvert: Only prefer upstream chroma-site with same subsampling.
If converting YUV formats with different chroma-subsampling, there's
probably no good reason to prefer the upstream chroma-siting so just use
the default for the output format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>
2021-02-19 09:45:07 +00:00
Jan Schmidt
eabb2c1802 videoconvert: Implement more sophisticated colorimetry caps transfer
Implement a more sophisticated transfer of colorimetry and
chroma-site fields to output caps when fixating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>
2021-02-19 09:45:07 +00:00
Jan Schmidt
98bdc76fa5 videoconvert: Forward colorimetry and chroma-site from upstream.
If downstream has expressed no preference for particular colorimetry
and chroma-site configuration, transfer them from the input caps.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/614

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>
2021-02-19 09:45:07 +00:00
Stéphane Cerveau
8bf7816790 decodebin3: change stream selection message owner
In order to select the streams on GST_MESSAGE_STREAM_COLLECTION,
the app needs to send the select-streams event
to the decodebin and not to the parsebin.

The message should be always owned by the decodebin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1014>
2021-02-19 08:01:57 +00:00
Tim-Philipp Müller
c7f1fd8320 uridecodebin3: make caps property work
The caps set on uridecodebin3 via the "caps" property
were never passed to the internal decodebin3, so did
absolutely nothing.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/837

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1034>
2021-02-16 22:58:22 +00:00
Thibault Saunier
a8fca8d040 encodebin: Add APIs to set element properties on encoding profiles
User often want to set encoder properties on encoding profiles,
this introduces a way to easily 'preset' properties when defining the
profile. This uses GstStructure to define those properties the same
way it is done in `splitmux` for example as it makes simple to handle.

This also defines a more complex structure type where we can map a set
of properties to set depending on the muxer/encoder factory that has
been picked by EncodeBin so it is quite flexible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>
2021-02-10 15:56:26 +00:00
Vivia Nikolaidou
b7b3ec6a6e videoscale: Support for alternate-field interlacing
Accept the negotiation, video-converter.c is aware of the half-height
already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>
2021-02-04 18:28:54 +02:00
Vivia Nikolaidou
ca4240bd03 videoconvert: Support for alternate-field interlacing
Treat the data just like normal data with half the height. Also treat it
as progressive when converting from/to I420 because it requires
different handling for chroma subsampling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>
2021-02-04 18:22:07 +02:00
Sebastian Dröge
23370ec429 typefindfunctions: Consider the number and types of atoms found in a row for suggesting a probability
If there are 3 or more known atoms in a row, it's likely that this is
actually MOV/MP4 even if we don't find any other known atoms. If 5 or
more are found then this is most certainly MOV/MP4 and we can return.

Also if a moov and mdat atom is found, this is definitely a MOV/MP4 file
and can be used as such, independent of anything else following the
mdat.

Fixes typefinding of various MOV files that have no `ftyp` atom but
otherwise a valid file structure followed by some garbage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1013>
2021-01-31 11:53:43 +02:00
Marijn Suijten
abb026ec6a gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
These parameters are incorrectly regarded as mutable in G-IR making them
"incompatible" with languages that are explicit about mutability like
Rust. In order to clean up the code and expected API there, update the
signatures here, right at the source (instead of overriding them in
Gir.toml and hoping for the best).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Thibault Saunier
dc969bf538 giosrc: Ensure that an error is posted when underlying file is deleted
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1001>
2021-01-08 09:31:30 +00:00
Thibault Saunier
5950fc1aae encodebasebin: Ensure that parsers are compatible with selected encoders
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/845

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/963>
2021-01-07 20:36:30 +00:00
Mathieu Duponchelle
e0a4d3ac4e compositor/blend.c: fix MT checker pattern
When filling the checker pattern from multiple threads, y_start
needs to be taken into account to determine the shade of the
current pixel.

Example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420 ! \
  queue ! compositor sink_0::xpos=200 ! video/x-raw, format=I420 ! videoconvert ! \
  xvimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
2020-12-29 22:48:08 +00:00
Mathieu Duponchelle
247f821826 compositor/blend.c: fix MT fill_checker for YUY2
The initial byte offset should be calculated from the stride,
not from the dest_add variable

Example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=YUY2 ! \
  queue ! compositor sink_0::xpos=200 ! video/x-raw, format=YUY2 ! xvimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
2020-12-29 22:48:08 +00:00
Mathieu Duponchelle
8ff5079e5e compositor/blend: fix blending of subsampled components
The correct way to determine the byte offset at a certain yoffset
in a subsampled component is to shift the yoffset by the component's
hsub

This fixes out-of-bounds memory accesses and visible artefacts,
example pipeline with the samples from #802:

gst-launch-1.0 compositor name=vmixer sink_1::xpos=1910 sink_1::ypos=1080 ! \
    videoconvert ! videorate ! xvimagesink \
  filesrc location=VID_20200723_203606.mp4 ! decodebin name=demux1 ! \
    queue ! videoflip method=vertical-flip ! vmixer. \
  filesrc location=bridgeoverstubbledwater.mp4 ! decodebin name=demux2 ! \
    queue ! vmixer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
2020-12-29 22:48:08 +00:00
Sebastian Dröge
15fb391401 decodebin3: When reconfiguring a slot make sure that the ghostpad is unlinked
This was only taken care of previously if there was a decoder before.
However if previously a decoder was not needed then the ghostpad
would've been linked directly to the slot's srcpad.

Reconfiguring the slot requires this to be undone so that linking can
happen normally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/985>
2020-12-24 11:44:27 +02:00
Sebastian Dröge
dcea0b3999 audiorate: Make buffer writable before changing its metadata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/977>
2020-12-15 13:16:31 +00:00
Edward Hervey
56e05f63f5 decodebin3: Release selection lock when pushing EOS
We can't keep the lock otherwise this would lock other actions. In order to keep
it safe, we grab a list of peer pads to send EOS to with the lock taken, then
send to the peer pads with the lock released.

Also make sure the selection lock is taken for another call to this function

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/847

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/971>
2020-12-11 18:36:30 +00:00
Edward Hervey
030ccaedb5 typefind: Fix debug category usage
Only register it in one place and use it everywhere from the header. Also make
sure it doesn't clash with the debug category from core.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/972>
2020-12-11 14:06:30 +01:00
Stéphane Cerveau
dff494977b typefindfunctions: allow per features registration
Split plugin into features including
typefind functions which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
817a533e47 pbtypes: allow per features registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
b6f8d0544c subparse: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.

More details here:
i
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
1e02717e83 playback: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Thibault Saunier
f1f966d987 giosrc: Add support for growing source files
Add a way for applications to specify that the underlying file is
growing which implies that the source won't EOS when reaching the end
of the file but instead start monitoring it and start reading it again
whenever a change is detected.

Also add a validate test to check the behavior

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/937>
2020-12-08 12:14:58 -03:00
Sebastian Dröge
831199a808 compositor: Don't crash in prepare_frame() if the pad was just removed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/950>
2020-12-01 13:13:58 +02:00
Thibault Saunier
db17502446 encodebin: Enhance algorithm to check if profiles can be plugged to muxer
In particular muxing sinks have specific set of sinkpads and we need
to handle that.
2020-11-30 15:44:53 -03:00
Thibault Saunier
174201059e encodebin: Ignore element classification when a muxer name specified
Instead of going through the list of known muxers go ahead and
instantiate the muxer specified as 'preset name' as this specifies
the exact element factory name to use.
2020-11-30 15:44:53 -03:00
Thibault Saunier
b68767ca06 encoding: Implement encodebin2 with an ON_REQUEST src pad
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/304
2020-11-30 15:44:53 -03:00
Thibault Saunier
5aa5faecf0 encodebin: Split implementation into a base class
Create EncodeBaseBin as a base class for the existing
encodebin to allow other implementations.

Co-authored with Jan Schmidt <jan@centricular.com>
2020-11-30 15:44:53 -03:00
Marijn Suijten
3ec795f613 audio: Move fill_silence into audio_format_info
With the function named gst_audio_format_fill_silence it would get
associated to the GstAudioFormat type in .gir which is incorrect and
confusing. See [1] for the discussion sparking this change.

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/630#note_694795

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/940>
2020-11-25 19:18:25 +01:00
Edward Hervey
0dc419197f decodebin3: Take into account decoder latency for interleave size
Some decoders might introduce quite large latencies, which would result in
multiqueue draining out on some streams. In order to avoid that, check the
latency of decoders and adjust the minimum interleave time of multiqueue
accordingly.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/800

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/931>
2020-11-20 09:43:50 +01:00
Edward Hervey
929d2bca09 decodebin3: Don't leak filter caps
Introduced by previous commit

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/934>
2020-11-19 14:36:19 +01:00
Edward Hervey
32a4953882 decodebin3: Properly handle caps query with no filter
There's no guarantee that upstream elements will do queries with specified
filter caps. If that's the case, just return GST_CAPS_ANY

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933>
2020-11-19 11:05:03 +01:00
Mathieu Duponchelle
fe20cac1a7 compositor: expose zero-size-is-unscaled property
When that property is left to its default, the width and height
property considers frames from input pads with width or height <= 0
should be left unscaled in that dimension.

Setting this property to FALSE changes that behaviour to < 0, as when
animating these properties, 0 should be a valid end value (eg. shrinking
an input stream until it disappears).

The default value of the width and height properties is set to -1, so that
the default behaviour stays consistent whether that new property is set
or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/923>
2020-11-13 14:33:54 +00:00
Thibault Saunier
d268c193ad videoaggregator: Guarantee that the output format is supported
In the case `videoaggregator` is set as allowing format conversions,
and as we convert only on the sinkpads, we should ensure that the
chosen format is usable by the subclass. This in turns implies
that the format is usable on the srcpad.

When doing conversion *any* format can be used on the sinkpads, and this
is the only way that we can avoid race conditions during renegotiations
so we can not change that fact, we just need to ensure that the chosen
intermediary format is usable, which was not actually ensured before
that patch.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/834

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/909>
2020-11-03 00:10:31 +00:00
Jan Alexander Steffens (heftig)
c4cdb6590e tcpserversink: Don't assume g_socket_get_remote_address succeeds
When the client disconnects immediately after connecting, the remote
address is no longer available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/908>
2020-10-30 14:01:51 +01:00
Seungha Yang
5aa831223d urisourcebin: Fix crash caused by use after free
OutputSlotInfo doesn't hold ref of queue, so gst_bin_remove()
will free the queue memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/888>
2020-10-22 11:42:37 +00:00
Seungha Yang
89c663616a decodebin3: Store stream-start event on output pad before exposing it
It's required for users to be able to figure out associated GstStream
object with a pad on pad-added callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/880>
2020-10-19 20:28:06 +09:00
Sebastian Dröge
3036521fb6 typefind/xdgmime: Validate mimetypes to be valid GstStructure names before using them
On macOS, for example, "text/*" can be returned as mimetype for
plaintext files but we don't allow '*' in structure names and this would
cause critical warnings.

It's a valid mimetype but not a valid structure name.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/616

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/875>
2020-10-17 10:42:49 +03:00
Seungha Yang
cea2bccfc6 videoconvert: Enhance debug message to be more human readable
Numerical representation of GstVideoFormat is not debugging
friendly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/822>
2020-10-14 19:12:51 +00:00
Seungha Yang
bcabdfb0f9 uridecodebin3: Forward upstream events to decodebin3 directly
Otherwise default handler will try to forward it to sink element
or srcpad which might not be available at that moment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/867>
2020-10-14 18:24:11 +00:00
François Laignel
40fde5fcad decodebin3: only force streams-selected seqnum after a select-streams
The initial streams-selected message might not match any select-streams,
in which case it is currently overriden with GST_SEQNUM_INVALID.

Related to:

- https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/601

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/860>
2020-10-10 18:00:04 +02:00
Jan Alexander Steffens (heftig)
c272a5e1a5 multihandlesink: Don't pass NULL caps to gst_caps_is_equal
Apparently the sinkpad caps can get cleared when shutting down the
pipeline while the sink is working, provoking a critical warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/842>
2020-10-08 21:55:38 +00:00
Jan Alexander Steffens (heftig)
aa89ae8beb audio: video: Fix in/outbuf confusion of transform_meta
There are three instances where in- and outbuf have been swapped. This
didn't affect the correctness of the libs *filter code, but the
videoscale implementation swapped the arguments of meta->transform_func.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/853>
2020-10-08 18:30:39 +02:00
Matthew Waters
0236fa8b9e compositor: fix YUY2/UYVY/VYUY blending
Don't overead memory.

Fixup for https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/755

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/823>
2020-09-21 23:51:31 +10:00
Matthew Waters
d7abf832af compositor: blend with multiple threads
Increases the throughput of compositing by using more CPU cycles across
multiple threads.  Simple cases (the output contains one pixel from at
most one input) can have up to a 70% increase in throughput.  Not so
simple cases are limited by the region with the most number of
composite operations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/755>
2020-09-14 14:00:58 +10:00
Thibault Saunier
8d645e1a69 encodebin: Be less restrictive on muxer caps when preset name is specified
This way the user can simply define its caps by only providing the
structure name which is what we do in the encoding profile
deserialization function for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/811>
2020-09-09 04:26:41 +00:00
Thibault Saunier
15fd339203 encodebin: Add vp8 and vp9 smart encoding support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/770>
2020-09-09 01:24:14 +00:00
Thibault Saunier
da160c57c8 encodebin: Fix refcount mishandling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/770>
2020-09-09 01:24:14 +00:00
Sebastian Dröge
91ec4e06d7 video: Rename gst_video_color_transfer_*() to gst_video_transfer_function_*() in new API
The type is called GstVideoTransferFunction so the function names should
match, otherwise gobject-introspection is keeping the functions as
global functions instead of methods on the type.

The same mistake was also made in lots of other APIs over the years, but
here we can at least fix it for 1.18 still.

Thanks to Marijn Suijten for noticing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/807>
2020-09-07 13:04:20 +03:00
Tim-Philipp Müller
4f12ce6213 videoscale: make local quark vars static
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/802>
2020-08-28 12:30:43 +01:00
Jan Schmidt
8cacd54e8f compositor: fix off-by-1 error in blending ARGB
Use a more naive blend formulation that avoids off-by-one errors
at the 0x00 and 0xff alpha endpoints.

    Fixes #810

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/796>
2020-08-26 13:10:09 +00:00
Sebastian Dröge
3edf390b4c videorate/videoscale/audioresample: Ensure that the caps returned from fixate_caps() are actually fixated
If there is some other field than the ones we care about left and not
fixated yet then basetransform will just error out. So instead just pass
the result through gst_caps_fixate() in the very end.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/799>
2020-08-26 09:10:29 +00:00
Sebastian Dröge
39dbbf1369 videoscale: Don't call NULL GstMeta transform function
It's optional and if it does not exist then no transformation is
possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/790>
2020-08-18 10:26:48 +03:00
Thibault Saunier
5ad727f9ee compositor: Frames where we introduce alpha can't obscure anything
When a pad has alpha != 1.0 it means that the resulting frames will
contain alpha and thus can't fully obscure with a lower zorder.

Also simplifies the other checks as blending with an OVER or on a
transparent is not a no-op as previously assumed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/764>
2020-07-31 15:52:14 -04:00
Thibault Saunier
1cead20777 encodebin: Fix and refactor smart encoding
It was not working properly and the implementation of the smartencoder
element was weird. This introduce a number of changes (which are all
in one single commit because they basically all work together and lead
to basically reimplementing the element):

* Make smartencoder a bin so that the reencoding chain of elements are
  inside of it instead of not having any parent. Those elements were not
  be visible when dumping the pipeline which was very confusing.
* Make encodebin create the right encoder with a capsfilter (and parser)
  to properly enforce the format specified by the user, and so that the
  encoder properties specified in the encoding profile are respected.
* Use `decodebin` to do the decoding instead of selecting a decoder
  ourself and not plug any parser etc...
* Ensure that negotiated format in the sinkpad of smart encoder is fixed
  through time when the user requested a non dynamic output
* Add a parser at the beginning of the smart encoder
* Handle errors when reencoding

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>
2020-07-22 16:01:25 +00:00
Thibault Saunier
d10929da7c streamsplitter: Forward STREAM_START to all branchs
Otherwise the branch that get selected later won't receive it ever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>
2020-07-22 16:01:25 +00:00
Thibault Saunier
871fa29639 streamsplitter/combiner: Drain encoder before switching branch
Otherwise we miht have frames queued in the encoder from the old branch
that do not get encoded/muxed when they should.

The implementation is a bit 'weird' but the rational and solution
is documented in the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>
2020-07-22 16:01:25 +00:00
Thibault Saunier
a31158012b encodebin: Rebuilt internal state when swicthing to avoid-reencoding
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>
2020-07-22 16:01:25 +00:00
Olivier Crête
cb6edaf6f8 videorate: Error out on streams with no way to guess framerate
This is better than going into an infinite loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/761>
2020-07-20 22:05:57 +00:00
Olivier Crête
90ff086a43 videorate: Assert on invalid result from internal code
Letting this through instead results in an infinite loop where
the exact same buffer gets pushed out ad infinitum.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/761>
2020-07-20 22:05:57 +00:00
Nicolas Dufresne
02c10e5bab rawvideoparse: Fix tiling support
When using tile format, the stride has a different meaning. It used
the MSB and LSB 16bits to encode respectively the width and height in
number of tiles.

This issue was introduce with commit e5b70d384c which was fixing
missing size recalculation when strides and offset is updated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753>
2020-07-14 17:33:31 +00:00
Edward Hervey
50be315a1a playback: Clarify flag usage for playbin3
Forcing software-decoder has no effect on playbin3 now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/738>
2020-07-07 15:53:23 +02:00
Edward Hervey
1e596cb33f Revert "playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS"
This reverts commit f4bcf8290b.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/738>
2020-07-07 15:53:23 +02:00
Edward Hervey
c9c93339fb decodebin3: Only override the selection if needed
Whenever a new collection is calculated, the internal `select_streams_seqnum`
variable is reset. This ensures that we reliably know whether a select-streams
event has been received for that new collection.

Use that to decide whether we should add previously un-selected streams or new
streams in the current selection

Fixes #784

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/733>
2020-07-07 10:45:41 +02:00
Tim-Philipp Müller
d5a677683e Update disted generated orc backup files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/734>
2020-07-04 14:01:56 +01:00
Tim-Philipp Müller
6bb3e01918 meson: add update-orc-dist target
Add target to update backup orc -dist.[ch] files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/734>
2020-07-04 14:01:56 +01:00
Vivia Nikolaidou
ad55d3ce9d video-converter: Make fast path work for equivalent transfer functions
For example, BT709, BT601, and BT2020_10 all have theoretically
different transfer functions, but the same function in practice. In
these cases, we should use the fast path for negotiating. Also,
BT2020_12 is essentially the same as the other three, just with one more
decimal point, so it gives the same result for fewer bits. This is now
also aliased to the former three.

Also make videoconvert do passthrough if the caps have equivalent
transfer functions but are otherwise matching.

As of the previous commit, we write the correct transfer function for
BT601, instead of the (functionally identical but different ISO code)
transfer function for BT709. Files created using GStreamer prior to that
commit write the wrong transfer function for BT601 and are, strictly
speaking, 2:4:5:4 instead. However, this commit takes care of
negotiation, so that conversions from/to the same transfer function are
done using the fast path.

Fixes #783

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/724>
2020-07-03 11:57:49 +03:00
Havard Graff
0826fb95b7 audio: video: Optimize by using cached quark for meta tag
Avoid taking the global quark lock for every single buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/295>
2020-06-27 09:23:10 +00:00
Thibault Saunier
e9d3e4d7ea doc: Fix link in tcp multi*sinks. 2020-06-23 14:52:21 -04:00
Mathieu Duponchelle
69d5428bfc docs: mark more types as plugin API 2020-06-23 14:52:20 -04:00
Sebastian Dröge
fddd7df2d3 Don't call gst_ghost_pad_construct() anymore
It's deprecated, unneeded and doesn't do anything anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/717>
2020-06-22 16:11:28 +00:00
Hosang Lee
5726a66fdb subparse: lower text buffer threshold
It is possible for subtitle files to have a string length less than 30.
WebVTT for example may contain only the 'WEBVTT' string in the file
without any cues.
As an example in hls streams, since WEBVTT files can be segmented
like video/audio, some subtitle segments may only contain just the
header string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/708>
2020-06-22 05:46:13 +00:00
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