Commit graph

116313 commits

Author SHA1 Message Date
Tim-Philipp Müller
5e73738a35 subprojects: bump orc to 0.4.34
Has important fixes for Windows and macOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4866>
2023-06-15 10:14:55 +01:00
Elliot Chen
b9f3ce1f3d typefindhelper: avoid printing error log
some plugins such as wavparse may need find if type of media
contained in the given data and will print error log if there
is no matching factory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4859>
2023-06-14 14:45:35 +01:00
Tim-Philipp Müller
61bef370e0 asfmux: fix potentially unaligned write on 32-bit ARM
Fixes #2665

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4855>
2023-06-14 09:12:15 +01:00
Tim-Philipp Müller
20c109faf5 tests: rtpbin_buffer_list: fix possible unaligned read on 32-bit ARM
Fixes #2666

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4855>
2023-06-14 09:12:15 +01:00
ekwange
cccf28fec1 v4l2: Change to query only up to V4L2_CID_PRIVATE_BASE+V4L2_CID_MAX_CTRLS
Fix to prevent infinite querying.
There are devices that exceed V4L2_CID_PRIVATE_BASE+V4L2_CID_MAX_CTRLS
but do not return EINVAL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4851>
2023-06-13 20:02:18 +01:00
Haihua Hu
4ab685c2a3 glfilter: add parent meta to output buffer for input buffer
glfilter will unref input buffer after _transform() call immidiately,
but gpu may still reading input buffer for rendering because gl
api is executed async. Need hold reference for input buffer by
adding parent meta to output buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4846>
2023-06-13 12:34:57 +01:00
Xavier Claessens
b226b62ae3 opus: Fix crash when getting unexpected channel position
gst_opus_channel_names is a static array with only 13 items.
GstAudioChannelPosition have bigger values than that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4843>
2023-06-13 09:23:59 +01:00
Sebastian Dröge
06586fd92f ptp: Correctly parse clock ID from the commandline parameters in the helper
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2652

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4813>
2023-06-12 11:29:25 +00:00
William Manley
da06637e4e basetextoverlay: Fix typo in "text-y" property description
Looks like a copy and paste error.

Co-authored-by: Fabian Orccon <cfoch.fabian@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4827>
2023-06-10 23:48:39 +01:00
Kevin Song
e8f9bd1649 appsink: unref gstbuffer in prev sample early
Appsink will unref prev sample in dispose function. Which is later
when V4L2 video decoder link with appsink as V4L2 video decoder
will close V4L2 device fd during GST_STATE_CHANGE_READY_TO_NULL.
If the video buffer return to V4L2 video decoder after the decoder
closed V4L2 device fd, V4L2 can't release the video frame buffer
which allocated with MMAP mode as application can't call
VIDIOC_REQBUFS 0 to release the video frame buffer by V4L2 driver.
The memory of the video frame will leak.
Unref the gstbuffer in stop() function, so V4L2 video decoder
can received all video frame buffers and release it before close
V4L2 device fd.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4820>
2023-06-09 15:58:49 +01:00
Seungha Yang
cdc502f524 filesink: Fix buffered mode writing
Fixing miscalculated buffer index when a buffer holds multiple
memories and it's not aligned to the vector size 16

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4817>
2023-06-09 13:45:16 +01:00
Matthew Waters
2f2eef88cb gldownload: handle passthrough without a critical
With passthrough mode, gldownload/glbasefilter may not ever retrieve a
relevant GstGLContext as it doesn't actually query the surrounding
elements.  Guard against that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4800>
2023-06-08 19:46:56 +00:00
Jochen Henneberg
33e789e067 rtspsrc: Cleanup code for next pending command
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4799>
2023-06-08 07:22:59 +02:00
Jochen Henneberg
89ece711dd rtspsrc: Do not try send dropped get/set parameter
If the set_get_param_q has been emptied we have to reset the cached
pending command to CMD_LOOP as we will not have the request parameters
anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4799>
2023-06-08 07:22:59 +02:00
Seungha Yang
21b18cc905 tests: basesink: Add STREAM-START after EOS test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4797>
2023-06-07 18:08:33 +00:00
Seungha Yang
93264a5aa8 basesink: Clear EOS flag on STREAM-START event
EOS -> STREAM-START -> new data flow is valid scenario

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4797>
2023-06-07 18:08:33 +00:00
Sebastian Dröge
dd9e34b5e0 decklink: Implement Windows string conversion with common API between MinGW and MSVC
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>
2023-06-07 05:46:12 +00:00
Sebastian Dröge
04460bff0d decklink: Add some newlines in long defines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>
2023-06-07 05:46:12 +00:00
Maksym Khomenko
06587a61a1 decklink: Calculate string size before malloc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>
2023-06-07 05:46:12 +00:00
Sebastian Dröge
6ee351a1ac decklink: Use the macOS version of the SDK on macOS and not the Linux one
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>
2023-06-07 05:46:12 +00:00
Sebastian Dröge
13104117fa decklink: Free SDK strings after usage on Linux
While they're const char* they still need to be freed like on Windows
and macOS and would be leaked otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>
2023-06-07 05:46:12 +00:00
Sebastian Dröge
52e3d54bde decklink: Correctly handle SDK strings on macOS
They're CFStringRef* and not plain NUL-terminated char* C strings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>
2023-06-07 05:46:12 +00:00
Hou Qi
81a2f2d779 v4l2videodec: treat MPEG 1 format as MPEG 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4787>
2023-06-06 20:56:40 +02:00
Nirbheek Chauhan
f813a2813e meson: Support building qml6glsink on win32
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4762>
2023-06-06 16:43:13 +05:30
Nirbheek Chauhan
515fd66289 meson: Add more qt options and eliminate all automagic
The qt5 and qt6 plugins will now correctly error out if you enable the
option, and you can also now explicitly ensure that wayland, x11,
eglfs support is actually functional by enabling the options. It was
too easy to build non-functional support for these.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4776>
2023-06-06 13:38:23 +05:30
Nirbheek Chauhan
8a0ccb6d3f meson: Add build_rpath for qt5 plugin on macOS
Without this, the plugin cannot be loaded in a devenv because the
RPATH is not added to the plugin dylib. This RPATH will be stripped on
install, which is what we want.

When deploying apps, people are supposed to use `macdeployqt` to
create an AppBundle that bundles Qt for you and sets the RPATHs
correctly to point to that bundled Qt.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4776>
2023-06-06 13:38:19 +05:30
Nirbheek Chauhan
364a3001e2 docs: Use backticks to escape * in markdown
Otherwise it's interpreted as emphasis.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4763>
2023-06-02 23:42:41 +00:00
Nirbheek Chauhan
408c2d4a3e python: More functions can be called before gst_init()
Configuration of our debugging system is possible before init, and in
fact is necessary too, otherwise the settings won't apply to logging
that happens during init.

For instance, since you cannot register a log function before you call
init in python, there is no way for you to log errors during init to
whatever logging service your app uses.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4763>
2023-06-02 23:42:41 +00:00
Nirbheek Chauhan
796fc2a65f python: auto-pep8 whitespace issues in overrides
Needed because the next commit edits this file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4763>
2023-06-02 23:42:41 +00:00
Philippe Normand
a32a29231e integration-testsuites/media: Update to tip of medias 1.22 branch
This fixes the new media file that was added to git, instead of git-lfs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4761>
2023-06-02 14:22:50 +01:00
Piotr Brzeziński
f44a18ee97 pngdec: Fix 16bit RGB images display
Due to the alpha value being inserted with _BEFORE, we were ending up
with ARGB instead of RGBA, thus displaying completely wrong colours.
According to libpng's manual, "to add an opaque alpha channel, use filler=0xff
or 0xffff and PNG_FILLER_AFTER which will generate RGBA pixels".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4759>
2023-06-02 10:51:17 +01:00
Philippe Normand
da02436193 oggdemux: vp8: Detect keyframe packets
decodebin3 drops data on video streams until a keyframe or header is detected,
so for Ogg/VP8 we now need to correctly flag and signal keyframes downstream.
The first buffer pushed from each src pad also has the HEADER flag set.

Fixes playback of
https://github.com/web-platform-tests/wpt/raw/master/media/test.ogv in playbin3.

Fixes #1418

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4745>
2023-06-01 17:00:44 +00:00
Philippe Normand
781606c976 integration-testsuites: Update to medias subproject 1.22
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4745>
2023-06-01 17:00:44 +00:00
Guillaume Desmottes
ee6e97f7c4 streamsynchronizer: check reset-time when handling FLUSH_STOP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4755>
2023-06-01 11:15:00 +00:00
Guillaume Desmottes
dd6e889073 streamsynchronizer: reset eos on STREAM_START
self->eos was never reset after streamsynchronizer has sent EOS
(except on explicit flush or switching back to PAUSED).
As a result, synchronization was broken if new streams were pushed later
as gst_stream_synchronizer_wait() does not wait if self->eos is set.

Fix this by reseting self->eos on STREAM_START as that means a new
stream is being sent upstream and so a new EOS will follow later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4755>
2023-06-01 11:15:00 +00:00
Colin Kinloch
7faadfe882 waylandsink: Emit "map" signal boarder surface is ready
This allows gtkwaylandsink to queue a draw of its gtk widget at the
correct time, avoiding a race.

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4754>
2023-06-01 10:35:25 +01:00
Thibault Saunier
b51727e9fa ges: tests: Use assert_equals_int where it makes sense
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4743>
2023-05-31 12:13:48 +00:00
Thibault Saunier
7f925c1182 ges: launcher: Never put sinks in a GstPipeline
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4743>
2023-05-31 12:13:48 +00:00
Matthew Waters
08b4a943ff qt/glrenderer: don't attempt to use QWindow from non-Qt main thread
Use QObject::deleteLater() to schedule deletion in the main thread.

Remove the moveToThread of the QWindow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4744>
2023-05-31 11:20:04 +01:00
Jan Alexander Steffens (heftig)
cf05285b61 fdkaacdec: Support up to 5 rear channels
The `switch (n_rear)` supports up to 5 rear channels, but our channel
set only had space for 3. Size the set properly to fix this.

This didn't actually cause any memory unsafety as `PUSH_CHAN` would stop
incrementing `n_rear` if the channel set is already full.

Thanks to @alatiera for noticing this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4740>
2023-05-30 16:31:22 +01:00
Seungha Yang
3003f466ef video-blend: Fix linking error with C++
Add missing extern "C"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4735>
2023-05-30 01:17:36 +00:00
Michael Olbrich
9f169ffaf9 flvmux: use the correct timestamp to calculate wait times
Since c0bf793c05 ("flvmux: Set PTS based on
running time") the timestamp of the output buffer is already in running
time. So using that for 'srcpad->segment.position' does not work correctly
because gst_aggregator_simple_get_next_time() will convert it again with
gst_segment_to_running_time().
This means that the timestamp returned by
gst_aggregator_simple_get_next_time() may be incorrect. For example, if
flvmux is added to a already runinng pipeline then the timestamp is too
small and gst_aggregator_wait_and_check() returns immediately. As a result,
buffers may be muxed in the wrong order.

To fix this, use the PTS of the incoming buffer instead of the outgoing
buffer. Also add the duration as get_next_time() is supposed to return the
timestamp of the next buffer, not the current one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4734>
2023-05-30 00:52:01 +01:00
Michael Olbrich
c83f24b038 jpegdec: be stricter when detecting interlaced video
There are broken(?) mjpeg videos that are incorrectly detected as
interlaced. This happens because 'info.height > height' (e.g. 1088 > 1080).

In the interlaced case info.height is approximately 'height * 2' but not
exactly because height is a multiple of DCTSIZE. Make the check more
restrictive but take the rounding effect into account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4717>
2023-05-26 01:04:02 +01:00
Michael Olbrich
b4330c730b jpegdec: decode the correct number of lines for interlaced frames
For interlaced jpeg, gst_jpeg_dec_decode_direct() is called twice, once for each
field. In this case, stride[n] is plane_stride[n] * 2 to ensure that only every
other line is written. So the loop must stop at height / num_fields.

If the frame is really interlaced then continuing beyound this, is not harmful,
because jpeg_read_raw_data() will do nothing and return 0, so am info message is
printed.

However, if the frame is not actually interlaced, just misdetected as interlaced
then there is still data available from the second half of the frame. Now
line[0][j] is set to the scratch buffer. If the scratch buffer is not allocated
(because the height is a multiple of v_samp[0] * DCTSIZE) then the result is a
segfault due to a null-pointer dereference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4717>
2023-05-26 01:04:02 +01:00
Seungha Yang
d93f0a51c2 d3d11videosink: Fix error on pause and play
The show_frame() can be called without prepare() call on paused to
playing state change. Thus the prepared buffer should not be cleared
on show_frame()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4714>
2023-05-25 17:03:26 +01:00
He Junyan
cf3fdabb22 videometa: Only validate the alignment only when it contains some info
When the alignment contains nothing, all its fields are 0 and always
can be satisfied. So there is no need to validate it in this case.
And there are a lot of places just setting this alignment to default
all zero value, this validation generates lots of warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4704>
2023-05-25 00:07:13 +00:00
YURI FEDOSEEV
c8416a3b5c v4l2videoenc: support force keyframe event in v4l2 encoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4702>
2023-05-24 22:37:18 +00:00
Nicolas Beland
da11ea77c8 alsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4699>
2023-05-24 14:01:05 +01:00
Seungha Yang
f58f292f05 video: convertframe: Add D3D11 specific conversion path
Add d3d11 conversion path to make gst_video_convert_sample() work
for GstD3D11Memory.

Note that just adding "d3d11download" to the exisitng code is
suboptimal from GstD3D11 point of view because:
* d3d11convert element can support crop/colorspace-conversion/scale
  all at once while existing software pipeline needs intermediate steps
  for the conversion
* "Process everything on GPU then download it to CPU memory" would be likely
  faster than "download GPU memory to CPU then processing it on CPU"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4689>
2023-05-22 16:27:35 +01:00
Seungha Yang
c7d48d294e video: convertframe: Remove pointless const qualifier
const keyword for refcounted object does not very make sense
and unnecessary in this case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4689>
2023-05-22 16:27:35 +01:00