Commit graph

269 commits

Author SHA1 Message Date
Edward Hervey 0125d7525a parsebin: Expose streams of unknown type
This actually respects the existing `expose-all-streams` property by exposing
them and having them present in the stream collection (as streams of type
unknown).

Fixes #1179

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2309>
2022-04-27 16:24:55 +00:00
Edward Hervey 9e2bb037f0 playbin2: Remove dead code
blacklisted_mimes has been empty for ages. Remove the code "using" it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2306>
2022-04-27 13:13:17 +00:00
He Junyan f55b36e6aa videoscale: Fix the src video info error in transfer_colorimetry_from_input()
Pipeline such as:
gst-launch-1.0 -vf videotestsrc ! video/x-raw,format=NV12,colorimetry=\(string\)bt709 \
 ! videoscale ! video/x-raw,format=I420 ! fakesink
Always trigger a error:
ERROR             video-info video-info.c:556:gst_video_info_from_caps: no width property given

Because it is called before the fixate_size(), the src caps' resolution
may be absent or not fixed. That causes that the src video info can not
be created correctly and we can not inherit the colorimetry and chroma-site
from the input caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2289>
2022-04-26 14:17:50 +00:00
Guillaume Desmottes c0d7d5c2c8 videorate: fix assertion when pushing last and only buffer without duration
Fixing this pipeline:
  gst-launch-1.0 filesrc location=sample.png ! pngdec ! videorate ! fakesink

- videorate receives a single buffer with pts = 0, duration = invalid;
- then it receives eos triggering this buffer to be pushed downstream;
- the pushing code was assuming that a duration was set, which is
  impossible as we received a single buffer and no output framerate was
  set either. So the best we can do is to push the buffer without
  duration.

Fix #1177

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2296>
2022-04-26 13:43:56 +00:00
Sebastian Dröge 760b070db9 Revert "videorate: Update the base time on segment updates"
This reverts commit 75b4809ebc.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2254>
2022-04-22 23:05:57 +00:00
Sebastian Dröge 2599cf573a Revert "videorate: Only "close" the segment if it is discontinous"
This reverts commit 6f7922b4db.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2254>
2022-04-22 23:05:57 +00:00
Sebastian Dröge 98112a3ddc Revert "videorate: Drop incoming buffers that are outside of the segment"
This reverts commit 24fd80344d.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2186

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2254>
2022-04-22 23:05:57 +00:00
Mathieu Duponchelle 7988acad36 compositor: fix prepare_frame obscuring check
A pad without a buffer or with a GAP buffer cannot obscure a
pad below it. Ignore those when considering whether a pad should
be drawn.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/708>
2022-04-22 17:43:50 +00:00
Mathieu Duponchelle cc3a79d7f1 compositor: a pad without a frame can't obscure the background
Skip those when considering whether the background should be
drawn

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/708>
2022-04-22 17:43:50 +00:00
James Cowgill c8a24146c4 videoscale: Don't copy scaled metas
Returning TRUE from the `transform_meta` function tells
GstBaseTransform to copy the meta into the new buffer. If videoscale
has already transformed a meta by scaling it, it should always return
FALSE to avoid duplicating the meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1630>
2022-04-22 13:00:01 +00:00
Thibault Saunier cd7a91cef1 videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/898>
2022-04-20 17:09:20 -04:00
Thibault Saunier f3fd4d7e90 videoconvertscale: Don't claim we can support any kind of memory
Since d0133a2d11 "videoconvert: Allow
passthrough for ANY caps features" videoconvert will always claim that
it supports any kind of memory which is true in very specific case (when
it is running in passthrough mode). To get elements that autoplug
converters depending on the caps running in the pipeline (like
autovideoconvert), we need to have converters no lie about what they can
do when queried `accept_caps` or `query_caps`.

This still accepts any caps feature as before but it introduces
a restriction in the way we handle memory capsfeatures.

We keep previous behaviour in videoconvert and videoscale.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/898>
2022-04-20 17:03:21 -04:00
Thibault Saunier d11f13f476 Introduce the videocolorscale element
Now that videoconvert and videoscale's are both based on
GstVideoConverter and are using the exact same code, it makes much more
sense to have one element doing the two operation, and it can be
more efficient in some cases (one single path for both operations).

This removes the `videoscale` and `videoconvert` plugins but keeps the element
but makes them also do both operations (adding some APIs to each element).

There is a small change in API for the `videoscale:dither` property which
was previously a totally unused boolean, it is now an enum and is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/898>
2022-04-20 17:03:21 -04:00
Xavier Claessens b99ecc78ca Replace gst-i18n-*.h with gi18n-lib.h
GLib guarantees libintl is always present, using proxy-libintl as
last resort. There is no need to mock gettex API any more.

This fix static build on Windows because G_INTL_STATIC_COMPILATION must
be defined before including libintl.h, and glib does it for us as part
as including glib.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2028>
2022-04-19 18:01:06 +00:00
Guillaume Desmottes e482b995fb decodebin3: fix collection leak
get_merged_collection() returns an owned stream collection and was
leaked in the else block.

Fix leak when running:
GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7,leaks:6" gst-play-1.0 --use-playbin3 test.mkv

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/954>
2022-04-18 09:41:12 +03:00
hoonhee.lee 3d9f25d322 playbin3: fix missing lock when unknown stream type in pad-removed cb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2193>
2022-04-16 01:31:18 +00:00
Edward Hervey ed5db9bce7 decodebin3: Don't duplicate stream selections
Make sure that the requested stream selection isn't identical to the current
one. If that's the case, just carry on as usual.

This avoids multiple `streams-selected` posting ... when the selection didn't
change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2185>
2022-04-16 00:56:14 +00:00
Matthew Waters c2ac57f6c9 subparse: don't try to index string with -1
If the len of the string turns out to be 0, str[len - 1] resolved to
str[-1] which is not a good idea.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46543
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2147>
2022-04-10 10:57:08 +10:00
Xavier Claessens b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Sebastian Dröge 16ed0a6961 playbin/playbin3: Allow setting a NULL URI
The URI is already initialized to NULL at the beginning and GstPlayer
was assuming that it is possible to set to NULL at a later time too.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2090>
2022-04-01 10:25:23 +03:00
Enrique Ocaña González 2a30f1038a playsink: improve GL context sharing
Configure playsink tried element with the bus of the main pipeline.
That tried element can be a gl video sink, which would benefit from being
able to propagate context messages to the main pipeline and have other
internal pipeline elements configured with it. Having different elements
configured with the same GL context allows them to share buffers with
video/x-raw(memory:GLMemory) caps and achieving zero-copy.

Thanks to Alicia Boya García <aboya@igalia.com> for her work co-debugging
the issue and contributing to find a solution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2056>
2022-03-30 15:32:19 +00:00
Edward Hervey a6f213ad62 urisourcebin: When streams-aware, remove pads immediately
For the same reason we add them immediately

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey 8648182fd1 urisourcebin: Don't wait for pads content when streams-aware
If the adaptive demux is streams-aware it can add/remove pads at any point in
time without the need for no-more-pads or data blocking

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey 76d01f0d73 urisourcebin: Don't do buffering if source already does
Sources that can internally handle buffering shouldn't have yet-another
buffering element after it. This can be simply detected by checking if it can
answer a TIME BUFFERING query just after creation.

If that is the case, we can expose the element source pads directly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Edward Hervey 7eea928dd0 decodebin3: Handle upstream selection
Detect if upstream handles stream-selection, and if so bypass all stream
selection handling (streams are forwarded as-is).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1905>
2022-03-30 14:30:54 +00:00
Corentin Damman b351da5e83 rawvideoparse: set format from caps in gst_raw_video_parse_set_config_from_caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1970>
2022-03-27 15:50:07 +00:00
Vivienne Watermeier 6c2f6c3bd4 all: Use new navigation interface and API
Use and implement the new navigation interface in all relevant sink elements,
and use API functions everywhere instead of directy accessing the event structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Vivienne Watermeier 6fd7e7699d compositor: send translated navigation events to the relevant sink pads
Fixes #888

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1495>
2022-03-18 06:22:02 +00:00
Jan Schmidt 90426f5751 playbin3: Remove stale code
Remove now-unused get_stream_type_for_event() function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:02 +01:00
Edward Hervey 4a436b5c14 decodebin3: Reset parsebin when new caps arrive
Check if parsebin can handle the new caps, and if not reset it so that it can
reconfigure itself for the new stream format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:02 +01:00
Edward Hervey c658e29d09 decodebin3: Convert checks to assertions
"decodebin.input" is never resetted and should always be present, therefore make
it an assertion check

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:02 +01:00
Edward Hervey 9b94798d0b parsebin: Implement ACCEPT_CAPS handling
The default query handler would go through typefind, which by default accepts
any CAPS. But once configured, parsebin can't reconfigure itself, it should
therefore pass through the ACCEPT_CAPS query to the first element after
typefind (if any).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:02 +01:00
Jan Schmidt 52d9614d47 playbin3: Hold playbin lock on pad-added
Take the playbin lock when accessing the combiner
to add a new pad to link to. Fixes races against
streams-selected messages triggering reconfiguration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:02 +01:00
Jan Schmidt 9ebb4505db playbin3: Reconfigure on streams-selected message.
Don't reconfigure outputs when the select-streams
event is sent from the app, as the selection may
not take effect for some time. Instead, wait
for the pipeline to confirm the new set of
selected streams when it sends the message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:01 +01:00
Jan Schmidt 67dbe75703 playsink: Fix reconfiguration after removing text_sink
If we previously had subtitles coming in, the video
may be chained through a text overlay block. Before,
the code would end up trying to link pads that were
already linked and video would not get reconnected
properly.

To fix that, make sure that the candidate
pads are actually unlinked first. If a textoverlay
is present and no longer needed, it will be cleaned
up later in the reconfiguration sequence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1900>
2022-03-11 15:02:01 +01:00
Jan Schmidt ecfc93a018 playsink: Complete reconfiguration on pad release.
Requesting a new pad can start a reconfiguration cycle, where
playsink will block all input pads and wait for data on them
before doing internal reconfiguration. If a pad is released,
that reconfiguration might never trigger because it's now waiting
for a pad that doesn't exist any more.

In that case, complete the reconfiguration on pad release.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1180>
2022-03-11 13:09:30 +00:00
Edward Hervey b6303c46b7 subparse: Handle GAP events before buffers
Make sure we did initial negotiation and segment pushing if we get GAP events
before buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1903>
2022-03-09 23:58:07 +00:00
Jan Schmidt 17f11c2cda playbin3: Add lock to protect buffering messages
Fix a small race where a group can receive stream-start
and post a pending buffering message just as another
thread posts a different buffering message, causing them
to be received by the application out of order. In the
worst case, this leads the application receiving a
stale 99% buffering message and going back to buffering
right after the 100% buffering message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1840>
2022-03-08 16:56:16 +00:00
Hou Qi 89a5cae89b encodebasebin: Use GST_DEBUG instead of GST_ERROR when skipping muxer
_get_muxer() skips the muxers that do not satisfy the requirement and select
the desired one. It should not print error log, so use debug log instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1830>
2022-03-06 18:15:04 +00:00
Jan Schmidt cad9f8fb36 uridecodebin3: Remove dead variables
Leftover junk from original port

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1820>
2022-03-01 14:21:43 +00:00
Sebastian Dröge 3941eb7dbd audioconvert: Add dithering-threshold property
By default, no dithering is applied if the target bit depth is above 20
bits. This new property allows to apply dithering nonetheless in these
cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1730>
2022-02-25 19:32:28 +00:00
Seungha Yang 21dd2076f6 typefindfunctions: Fix WebVTT format detection
If WebVTT file consists of "WebVTT" header without body,
the file size can be smaller than 10 bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1359>
2022-02-11 13:48:45 +00:00
Jan Schmidt 1b22ffdfbd videotestsrc: Don't re-render every frame when it's not needed.
When the pattern being rendered by videotestsrc doesn't have motion,
cache a rendered buffer and output it repeatedly with updated
metadata.

Based on a patch by Edward Hervey <edward@centricular.com>

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1293>
2022-02-09 14:03:01 +00:00
Vivia Nikolaidou 64ac6a1d16 audiotestsrc: Produce a default channel mask if possible
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/957

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1560>
2022-01-24 14:05:50 +00:00
Mathieu Duponchelle 8983696e39 decodebin2: raise multiqueue max-size-bytes
The earlier size of 2 MB was set back in 2009, it doesn't
seem unreasonable to raise it to 8 MB these days. The use
case at hand is matroskademux containing both a video stream
with a very low amount of compression but no decoding latency,
and a H265 stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1538>
2022-01-21 00:09:03 +00:00
Seungha Yang e37bbc054e compositor: Always draw if all input buffers are GAP
Otherwise output buffers will contain random scene
(previously rendered or arbitrary initial values) since we don't
draw onto output buffer at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1498>
2022-01-13 21:29:15 +00:00
Seungha Yang d5f5a1c25f uridecodebin: Fix critical warnings
Don't pass non-GstObject object to there.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1519>
2022-01-13 18:01:57 +00:00
Nirbheek Chauhan 945fd11907 audio: Add logging that was useful in figuring out the last commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1461>
2022-01-08 05:15:30 +00:00
Mark Nauwelaerts 41fe17adda uridecodebin: use non-floating object as signal argument
... as was the case with source-setup signal until change of order
in commit 52bca104e4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1457>
2021-12-19 18:27:50 +01:00
Thomas Klausner 0b0bc5956d tcp: fix build on Solaris
Add missing header.

From Claes Nästén via http://gnats.netbsd.org/56509

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1364>
2021-11-19 00:07:42 +00:00
Víctor Manuel Jáquez Leal 6d7dc93a45 uridecodebin3: Nullify current item after all play items are freed.
There's a potential race condition with this sort of pipelines on
certain systems (depends on the processing load):

GST_DEBUG_DUMP_DOT_DIR=/tmp \
gst-launch-1.0 uridecodebin3 uri=file://stream.mp4 ! glupload ! \
glimagesink --gst-debug=*:4

Right after the pipeline passes from PAUSED to READY, bin_to_dot_file
dumps uridecodebin3 properties, but current uri and suburi might be
already freed, causing a potential use-after-freed.

This patch makes NULL the current item right after all the play items
are freed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1353>
2021-11-16 13:25:02 +01:00
Jan Schmidt 78df7ae771 decodebin3: Only unblock for GAP events and buffers.
An alternate fix for
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1239
and https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1236
that makes it clear the intent is to only unblock on a GAP event, and
not any others.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1260>
2021-10-27 22:53:49 +11:00
Guillaume Desmottes 1d833eba60 parsebin: fix critical when sorting pads
If the pad does not have a current caps, get_pad() returns the query
caps which can be ANY. In such case the caps does not have any structure
resulting in a critical warning when calling gst_caps_get_structure().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1254>
2021-10-26 16:25:32 +00:00
Sebastian Dröge 23a06f7a31 typefindfunctions: Use memcmp() instead of a strange macro around strncmp()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:43 +00:00
Sebastian Dröge 37a744889c typefindfunctions: Add various CMAF brands to the MP4 typefinder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:42 +00:00
Sebastian Dröge 041bc2652b typefindfunctions: Refactor ftyp brands checking
Store known brands in arrays and add a helper function to check them.

Also add all the `iso3` to `isob` ISO brands and the `hlsf` ISO
fragmented brand.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:42 +00:00
Sebastian Dröge 66aef5ef46 typefindfunctions: Add various other boxes to the list of known top-level MP4 boxes
styp, udta, sidx, ssix, prft, mfra, pdin and meta are in the ISOBMFF
spec and emsg in the CMAF spec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1234>
2021-10-25 09:17:42 +00:00
Guillaume Desmottes 47445980a9 streamsynchronizer: set running time offset on events
It's cleaner and more generic than overriding the qos events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1210>
2021-10-20 14:27:58 +00:00
Tim-Philipp Müller 5660743bbf subparse: don't use g_warning() for malformed input
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Mathieu Duponchelle c3d878e990 audio/video aggregator: make use of new aggregator inactive pad API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/867>
2021-10-18 22:34:11 +00:00
Thibault Saunier 156f2543ca smartencoder: Force reencoding of vp9 for profiles can't support
If the input file is in a profile we won't be able to output (1 or 3 in BGR
format), simply reencode everything for now.

Once we add support for that case we can remove that code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:11:08 -03:00
Thibault Saunier e9fdfade61 smartencoder: Always plug a vp9parse when encoding vp9
This way we know that all relevant fields about video format are
added and we avoid renegotiation issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:11:08 -03:00
Thibault Saunier 32d36d0e89 smartencoder: Fix renegotiating when reencoding parts of the stream with vpx
In the encoded streams we might not have all the information about the
raw video stream, but when reencoding they end up being specified, even
if those are default values.

As vp8 decoders always output frames in some YUV color space we can
ensure that when upstream doesn't specify any value in its caps we
use the default one which is what we end up doing when decoding/reencoding
anyway, so this way downstream (matroskamux in that case) doesn't need
to be able to renegotiate (which it doesn't).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1062>
2021-10-18 10:10:24 -03:00
Matthew Waters 42597181e2 playbin2/3: autoplug/caps: don't expand caps to ANY
Retrieving the pad template caps from a ghost pad returns ANY which when
merged with any other caps will return ANY.  ANY is not very specific
and may cause suboptimal code paths in e.g. decoders that assume the
lowest common denominator when presented with ANY caps.

Fixes negotiating dma-buf with vaapidecodebin between glupload in the
video sink element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1144>
2021-10-14 17:04:26 +11:00
Jan Schmidt 71c3141672 uridecodebin3/urisourcebin: Reusability fixes
Improvements to uridecodebin3 and urisourcebin so that they are
reusable across a PAUSED->READY->PAUSED transition.

Disconnect and release decodebin3 request pads when urisourcebin
removes src pads.

In urisourcebin, make sure to remove src pads that are exposed
directly (raw pads and static typefind srcpads) when
cleaning up.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1100>
2021-10-10 11:55:19 +00:00
Jan Schmidt e06ac494b8 playbin3: Always register 'playbin3' element.
If the USE_PLAYBIN3=1 env var is set, we want to replace
playbin with playbin3, but separate to that, we always
want to register the 'playbin3' element so that applications
which explicitly use playbin3 work regardless of the env var.

This fixes `USE_PLAYBIN3=1 gst-validate-launcher`, for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1102>
2021-10-10 07:28:17 +00:00
Jan Schmidt 33ad1cdc5e playbin3: Avoid group deactivation deadlock.
Change locking around group deactivation to avoid deadlocks
when shutting down exactly as a buffering message arrives.

The PLAYBIN3_LOCK now protects the active field of the
source group. Everything else is still protected by the
source-group-lock.

Also properly protect group switching operations with
the PLAYBIN3_LOCK everywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1049>
2021-10-08 15:49:41 +00:00
Stéphane Cerveau 84b357dd5f typefindfunctions: differentiate h265 from h264
in some cases, the algo gives the same probability
to h264 and h265 for h26x stream resulting in a h265
stream detected as a h264.
if sps/pps/vps detected, increase the probabilty.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/957>
2021-10-02 10:03:21 +00:00
Thibault Saunier 2fd28195ca Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00