Commit graph

113705 commits

Author SHA1 Message Date
Sebastian Dröge
30afe21cd1 interlace: Add some more debug output to the getcaps function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2337>
2022-04-30 00:57:22 +01:00
Edward Hervey
cd64a16a99 mpegts: Handle "empty" PMT gracefully
Some streams have 2 PMT sections in a single TS packet. The first one is "valid"
but doesn't contain/define any streams. That causes an unrecoverable issue when
we try to activate the 2nd (valid) PMT.

Instead of doing that, pre-emptively refuse to process PMT without any streams
present within. We still do post that section on the bus to inform applications.

Fixes #1181

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2327>
2022-04-28 14:27:31 +00:00
Philippe Normand
bfd0475e59 videodecoder: release stream lock after handling gap events
The stream lock is taken before handling gap events but was not released in all
possible runtime situations. This issue was introduced in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1274

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2326>
2022-04-28 13:57:10 +00:00
Matthew Waters
105b0772c1 subparse: don't deref a potentially NULL variable
If the html SAMI data is malformed, then retrieving the attribute name
may fail.  We then cannot retrieve the attribute value.

Fixes: https://oss-fuzz.com/testcase-detail/4700130671984640
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2325>
2022-04-28 13:26:48 +00:00
Seungha Yang
d953d4de90 nvvp9sldec: Increase DPB size to cover render delay
This should've included in the previous MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/987
already, but missed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2324>
2022-04-28 12:55:48 +00:00
Edward Hervey
c950ba14a3 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/2323>
2022-04-28 12:21:37 +00:00
dongil.park
087ebb9f4d wavparse: Unset DISCONT buffer flag for divided into multiple buffers in push mode
In push mode (streaming), if the received chunk buffer size from _chain is bigger
than output buffer size, the flags of the divided-buffers are propagated to the
DISCONT flag from first received chunk buffer. This unexpected buffers contained DISCONT
flags are abnormally transformed when changing the sampling rate by audioresample element.
So unset unnecessary DISCONT flag before pad_push().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2322>
2022-04-28 11:45:10 +00:00
Mathieu Duponchelle
6b6ea3c1a6 rtpbasepayload: always store input buffer meta before negotiation
The decision to store the input buffer depends on whether extensions
are to be added to the output buffer, I assume as an optimization.

This creates an issue for subclasses that call negotiate(), where
header_exts is actually populated, from their handle_buffer()
implementation: at chain time, no header extension has been negotiated
yet, which means that we don't add extensions to the first batch of
buffers that comes out.

Keep track of whether negotiate has been called (this is different
from the negotiated field) and always store the input buffer until
then. This fixes the issue while largely preserving the optimization.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2321>
2022-04-28 10:58:37 +00:00
Guillaume Desmottes
69b205613f 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/2320>
2022-04-28 11:16:40 +01:00
He Junyan
b8462b0624 va: dec: Use gst_buffer_pool_config_set_va_alignment() to set alignment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2301>
2022-04-26 14:44:45 +01:00
He Junyan
62fcd93a93 va: pool: Replace all tabs with spaces in header file.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2301>
2022-04-26 14:44:33 +01:00
He Junyan
e834627396 va: pool: Delete the GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
The va pool is used for GPU side surface/image, its alignment should
not be changed arbitrarily by others. So we decide not to expose the
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT flag anymore.
Instead, user can call gst_buffer_pool_config_set_va_alignment() to
set its surface/image alignment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2301>
2022-04-26 14:42:12 +01:00
He Junyan
f35bd6c8bb va: pool: Add set_va_alignment() API.
We want to use gst_buffer_pool_config_set_va_alignment() to replace
gst_buffer_pool_config_get_video_alignment(). The later one is specific
for GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT option.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2301>
2022-04-26 14:41:59 +01:00
He Junyan
74918ab9ea av1parse: Fix a latent memory leak in colorimetry setting.
Also delete the useless "have_cinfo" judgement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2297>
2022-04-26 11:05:05 +01:00
He Junyan
f39a473f42 av1parse: Correct the meaning of color_range flag.
According to spec:
color range equal to 0 shall be referred to as the studio swing
representation and color range equal to 1 shall be referred to as
the full swing representation.

The current status is just the opposite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2297>
2022-04-26 11:05:05 +01:00
Sebastian Dröge
27d15a5c0b 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/2255>
2022-04-23 13:11:56 +00:00
Sebastian Dröge
18cce87096 Revert "videorate: Add test for segment update"
This reverts commit a76f38b2c7.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2255>
2022-04-23 13:11:56 +00:00
Sebastian Dröge
f643c2fe4b 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/2255>
2022-04-23 13:11:56 +00:00
Sebastian Dröge
30272e2c86 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/2255>
2022-04-23 13:11:56 +00:00
Sebastian Dröge
78e22ac1ff Revert "videorate: Add unit test for closing a segment and opening a separate one"
This reverts commit 98f2a84a28.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2255>
2022-04-23 13:11:56 +00:00
Mathieu Duponchelle
bf620723c1 rtpredenc: quieten warning about ignoring header extensions
Turn it into a FIXME, and only log once

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2281>
2022-04-23 13:27:55 +01:00
Stéphane Cerveau
0d4621d208 rvsg: fix cairo include
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2280>
2022-04-23 11:03:35 +01:00
Pierre Bourré
c8850b17ae rtspclientsink: fix possible shutdown deadlock collect_streams()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2278>
2022-04-22 20:22:04 +01:00
Hou Qi
0ea41bac13 v4l2videodec: copy colorimetry values to output_state caps
This is to avoid transcoding negotiation fail between v4l2h265dec
and v4l2h264enc caused by colorimetry mismatch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2220>
2022-04-21 11:09:26 +00:00
Sangchul Lee
c88a68c411 webrtcbin: Avoid access of freed memory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2258>
2022-04-21 10:34:31 +00:00
Tim-Philipp Müller
a1100bf559 vaapi: fix up package-origin in meson_options.txt
Follow-up to !2243

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2260>
2022-04-21 10:54:50 +01:00
Camilo Celis Guzman
18a66bd887 meson_options: declare glib and gobject checks at top level
This makes it easier to specify this features for all subprojects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2243>
2022-04-20 10:03:16 +00:00
Wonchul Lee
7d862e0f5e dashsink: Unlock when failed to get content
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2246>
2022-04-20 09:20:35 +01:00
Camilo Celis Guzman
3eb5d66938 gstav1parse: fixup various possible logical errors
Found via an analyzed build for Clang. Specifically we had:

gstav1parse.c[1850,11] in gst_av1_parse_detect_stream_format: Logic error: The left operand of '==' is a garbage value
gstav1parse.c[1606,11] in gst_av1_parse_handle_to_small_and_equal_align: Logic error: The left operand of '==' is a garbage value

Also a couple of false-positives:

gstav1parse.c[1398,24] in gst_av1_parse_handle_one_obu: Logic error: Branch condition evaluates to a garbage value
gstav1parse.c[1440,37] in gst_av1_parse_handle_one_obu: Logic error: The left operand of '-' is a garbage value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2240>
2022-04-19 17:33:49 +01:00
Nirbheek Chauhan
f67d875936 meson: Add -Wl,-rpath,${libdir} on macOS
We made the gstreamer installation prefix relocatable by picking up
plugins relative to the location of libgstreamer-1.0.dylib, similar to
how it's done for Windows:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1627

This had a lot of side-effects:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1051
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/363
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/371
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/362

A partial fix for the cerbero side of these was:

https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/807

However, this relied on the consumers knowing that they need to add
`LC_RPATH` entries to the libdir of the prefix. This is done
automatically by build systems like Meson, but not by others, such as
Autotools, CMake, Cargo, XCode, etc. For those, we need to add the
RPATH entries to the gstreamer-1.0.pc file.

This also has the side-effect of fixing the loading of gstreamer rust
plugins on macOS:

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2237>
2022-04-19 13:23:02 +00:00
Jan Schmidt
cf61b8aa3b playbin3: Remove stale code
Remove now-unused get_stream_type_for_event() function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2236>
2022-04-19 13:28:38 +01:00
Jan Schmidt
45a709cf43 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/2236>
2022-04-19 13:25:25 +01:00
Jan Schmidt
5e3864159b 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/2236>
2022-04-19 13:25:25 +01:00
Jan Schmidt
7f377898f7 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/2236>
2022-04-19 13:25:25 +01:00
Tulio Beloqui
a5bf3fb89b gstdevicemonitor: added cleanup of signal handlers and hidden providers list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2221>
2022-04-18 18:18:08 +01:00
Guillaume Desmottes
7aa763cab7 libav: fix frame leak on negotiation error
The function owns a reference on the frame. Drop it if negotiation
failed as we are already doing for the other error cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2217>
2022-04-18 10:50:35 +01:00
Guillaume Desmottes
86e46e6c83 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/2216>
2022-04-18 09:44:18 +01:00
Fabrice Fontaine
60eca23bef gst-python: fix build on systems without C++ compiler
Fix the following build failure on systems without C++ compiler:

The following exception(s) were encountered:
Running "/home/autobuild/autobuild/instance-0/output-1/host/bin/i686-buildroot-linux-gnu-g++ --version" gave "[Errno 2] No such file or directory: '/home/autobuild/autobuild/instance-0/output-1/host/bin/i686-buildroot-linux-gnu-g++'"

Fixes:
 - http://autobuild.buildroot.org/results/eebf65036f79d21d347714d62afecd0108393308

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2214>
2022-04-18 00:09:27 +01:00
Guillaume Desmottes
75c350283e gstleaks: fix pthread_atfork return value check
pthread_atfork() returns 0 on success.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2210>
2022-04-17 01:57:55 +01:00
hoonhee.lee
abf1bfdb9d playbin3: fix missing lock when unknown stream type in pad-removed cb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2209>
2022-04-17 01:19:53 +01:00
Edward Hervey
b5b8f0ed22 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/2208>
2022-04-17 00:35:38 +01:00
Sebastian Dröge
f342618329 x264enc: Don't try to fixate ANY allowed caps
Instead fall back to the template caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2207>
2022-04-16 23:46:39 +01:00
Sebastian Dröge
497b3da14d rtpbasepayload: Don't write header extensions if there's no corresponding input buffer for the packet
The GstRTPHeaderExtension API requires the input buffer to exist.

This can happen if the output packet is generated e.g. from a caps or
tags event like in the case for rtpgstpay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2205>
2022-04-16 19:59:52 +01:00
Seungha Yang
3b5f1406f3 win32: Enable high-resolution timer for MinGW build
timeapi.h is missing in our MinGW toolchain. Include mmsystem.h
header instead, which defines struct and APIs in case of our MinGW
toolchain. Note that in case of native Windows10 SDK (MSVC build),
mmsystem.h will include timeapi.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2167>
2022-04-16 10:00:04 +00:00
Tim-Philipp Müller
abd4846aaf appsrc: fix annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2189>
2022-04-16 09:00:13 +00:00
Edward Hervey
e4b9f6e6d8 tsdemux: Fix AC-4 detection
This regression was introduced by
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1102
and has been present since 1.18

* Stream Type 0x06 is defined in the base mpeg-ts specification as Private PES
Packets. Determining the content should be solely based on descriptors found
within the PMT.
* This was abused in that commit by defining a "bluray-only" stream type for AC4
: `ST_BD_AUDIO_AC4`
* This should be entirely handled in the regular private pes handling further
down in the code

Fixes #1154

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2176>
2022-04-14 14:53:40 +00:00
Havard Graff
9a4804fd3f qtdemux: fix leak of channel_mapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2184>
2022-04-14 12:58:11 +01:00
Sebastian Dröge
d0306802b6 ptpclock: Fix wrong condition order from last commit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2173>
2022-04-13 16:37:21 +01:00
Marc Leeman
5c346c13db gst-rtsp-server: minor spelling fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2172>
2022-04-13 16:06:22 +01:00
Sebastian Dröge
35b68d6622 ptpclock: Allow at least 100ms delay between Sync/Follow_Up and Delay_Req/Delay_Resp messages
It doesn't matter for measurement purposes whether receiving them takes
a while and various PTP servers are not prioritizing to send them,
causing them to be dropped unnecessarily and preventing proper
synchronization with such servers.

This is especially a problem if the RTTs in the network are very low
compared to the additional delay imposed by the server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2168>
2022-04-12 23:20:31 +01:00