Commit graph

117200 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
af7b5023bd gl: replace _drm_direct_fourcc_from_info()
.. with gst_video_dma_drm_fourcc_from_format()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4680>
2023-05-30 20:09:27 +00:00
Víctor Manuel Jáquez Leal
7eed950caa gl: add a method to get DMA formats and modifiers
By calling the internal function gst_gl_context_egl_fetch_dma_formats() the an
array of structures holding a DMA fourcc format and its modifiers (another array of
structure holing modifier and if it's external only) will be stored.

Users would call gst_gl_context_egl_get_format_modifiers() to get the array of
modifiers of a specific DMA fourcc format.

Co-authored-by: He Junyan <junyan.he@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4680>
2023-05-30 20:09:27 +00:00
Jan Alexander Steffens (heftig)
4008b872bb 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/4712>
2023-05-30 14:18:08 +02:00
Hyung Song
d68a7fbd94 aacparse: parse GASpecificConfig for channels
Some media have valid channel information in GASpecificConfig which is
not yet implemented in gstaacparse. Parse data according to ISO/IEC
14496-3 just enough to get channels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4720>
2023-05-30 09:09:16 +00:00
Guillaume Desmottes
0fd3c28620 flvmux: push metadata on caps change
The metdata contains tags but also caps dependent info such as the
resolution and the framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4730>
2023-05-30 09:35:43 +02:00
Guillaume Desmottes
3ae2904f3d flvmux: rename 'new_tags' to 'new_metadata'
The metadata contains more than just tags: resolution, framerate, etc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4730>
2023-05-30 08:27:18 +02:00
Guillaume Desmottes
853fad001e flvmux: add some logs when input is changing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4730>
2023-05-30 08:27:18 +02:00
Tim-Philipp Müller
0cd1a57b0e orc: update subproject wrap to 0.4.34
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4736>
2023-05-30 01:21:20 +00:00
Tim-Philipp Müller
81174152aa gst-python: add proper README and delete useless placeholder files
Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/54

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4693>
2023-05-29 23:46:49 +00:00
Seungha Yang
5a68831d74 video-blend: Fix linking error with C++
Add missing extern "C"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4727>
2023-05-29 16:32:50 +00:00
Michael Olbrich
2197cdc289 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/4701>
2023-05-29 14:56:13 +00:00
Mengkejiergeli Ba
a15a16c99b msdkenc: Add a property to insert pic timing SEI for avc and hevc
User can decide whether to insert pic timing sei with pic_struct
syntax via oneVPL API mfxExtCodingOption.PicTimingSEI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4673>
2023-05-29 02:11:20 +00:00
Jordan Petridis
f94d1c4e93 ci: Set XDG_RUNTIME_DIR before running tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4697>
2023-05-27 13:50:03 +00:00
He Junyan
e23964cb5f glupload: Fix a memory leak point in gst_egl_image_cache_unref()
The image cache itself should be freed when ref_count is 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4723>
2023-05-27 12:17:08 +00:00
Tim-Philipp Müller
26a451b59d docs: contributing: mention user verification to get forking rights
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4708>
2023-05-26 23:24:16 +00:00
Jordan Petridis
6032f51162 openjpegenc: do not set bpp field on opj_image_cmptparm_t
It's deprecated in favor of the .prec field which we already set.

https://github.com/uclouvain/openjpeg/pull/1383/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4715>
2023-05-26 20:24:27 +00:00
utzcoz
5c04d24553 README: Fix code formatting for meson installation command
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4721>
2023-05-26 12:29:14 +00:00
Víctor Manuel Jáquez Leal
8b75e5fb57 vkvideoutils: fix code-style
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal
b982fae9c7 tests: check if vulkan h264 decoding is supported
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal
365454790a vkphysicaldevice: fetch queue family query result support
And merged in a single structure the queue family operations report.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal
e2a40c58bf vkimagebufferpool: chain the correct structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 09:45:07 +02:00
Víctor Manuel Jáquez Leal
e9414b9582 vkvideoutils: fix bug for chroma string comparison
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 09:45:07 +02:00
Edward Hervey
d6f1c517f3 decodebin3: Handle changes in stream type
While decodebin3 could handle changes in inputs (ex: changing codecs), there was
still one limitation which was when changing between sources which had
non-intersecting stream types (ex: switching from a video-only source to a
audio-only source). While the decoder *could* change to the proper codec ... it
would carry on using a `DecodebinOutputStream` associated to that stream
type (and therefore with pads with the wrong name).

In order to handle this:

* We notify the `MultiQueueSlot` of the change in `GstStreamType` if it already
  had an associated inputstream (ex: the one associated with the static sink
  pad)

* We detect such changes on the output of multiqueue as soon as
  possible (i.e. when we get the GST_EVENT_STREAM_START for the new stream type)
  by discarding the associated output.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4703>
2023-05-25 21:23:21 +00:00
Edward Hervey
f51283b57b uridecodebin3: Also re-use decodebin3 static sink pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4703>
2023-05-25 21:23:21 +00:00
Michael Olbrich
285811e7a7 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/4696>
2023-05-25 18:34:34 +00:00
Michael Olbrich
59290feca4 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/4696>
2023-05-25 18:34:34 +00:00
Mathieu Duponchelle
2b4dca84dd gst-python: overrides: provide default to Gst.init()
Allows using Gst.init() as without the overrides, can be convenient.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/51
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4692>
2023-05-25 16:32:44 +00:00
Tim-Philipp Müller
e6d512a3b5 validate: remove known issue for mxfdemux that's fixed now
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1020

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4659>
2023-05-25 16:07:26 +00:00
Tim-Philipp Müller
7ad92c364a testsuites: remove wontfix issues for legacy HLS elements
Chances that will ever get fixed are about zero, so there's
no point leaving these issues open.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4659>
2023-05-25 16:07:26 +00:00
Seungha Yang
8e1677bd6a 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/4700>
2023-05-25 13:24:43 +00:00
Edward Hervey
75d6621c2a videodecoder: Only use subframes internal values in subframe mode
This clarifies the usage of it, and fixes issues with reverse playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
Edward Hervey
7a4916b251 videodecoder: Remove unused internal fields
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2552

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
Edward Hervey
386a8dbae5 videodecoder: refactor and document finish_frame some more
* Move the in-flight iteration and handling code into the main block
* Document the intent a bit more

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
Edward Hervey
bce9f3327d videodecoder: Refactor post-decode PTS/DTS recovery code
The code was a bit hard to follow. Use clear/explicity variable names and
comment a bit more on what is going on.

Also fold the double list iteration into a single one

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
He Junyan
1e9e976268 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/4674>
2023-05-24 16:22:21 +00:00
Sebastian Dröge
fa8fbab0f7 ptp: Parse PTP messages in the helper process and filter earlier
This drops invalid, unknown or uninteresting PTP messages in the helper
process already instead of forwarding them to the main process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4665>
2023-05-24 14:16:23 +00:00
Sebastian Dröge
61a6b79e62 ptp: Ignore DELAY_RESP messages not for us earlier in the main process
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4665>
2023-05-24 14:16:23 +00:00
Sebastian Dröge
5a79d230ce ptp: Set UDP sockets as non-blocking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4665>
2023-05-24 14:16:23 +00:00
Sebastian Dröge
b76f9c8392 ptp: Capture actual send/receive times in the helper process
While this doesn't yet use any OS provided times from the actual network
stack, this still gets rid of any IPC jitter between the helper process
and the main process as part of the PTP time calculations and should
improve accuracy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4665>
2023-05-24 14:16:23 +00:00
YURI FEDOSEEV
8dd51501d0 v4l2videoenc: support force keyframe event in v4l2 encoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4663>
2023-05-24 12:42:24 +00:00
Nicolas Beland
3a9c103b58 alsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4642>
2023-05-24 11:16:06 +00:00
Guillaume Desmottes
58f80c180c uridecodebin3: notify when 'current-(sub)uri' properties are updated
Assume both uri and suburi are changed when the main item changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4543>
2023-05-24 09:28:58 +00:00
Tim-Philipp Müller
f58416b1a4 docs: tutorials: fix 0.10-isms in "Shortcutting the pipeline"
GST_BUFFER_DATA and GST_BUFFER_SIZE are no more.

https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/121

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4691>
2023-05-23 23:48:27 +00:00
Michael Bunk
dc64f3e6cf docs: fix typos and grammar
https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/50

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4690>
2023-05-23 23:36:49 +00:00
Vivia Nikolaidou
1781b26ad2 tsmux.h: Remove TSMUX_MAX_ES_INFO_LENGTH dead code
Also TsMux.es_info_buf which was also not used anywhere

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
9e84b737cb tsmux: Separate DVB and ATSC AC3 descriptors
The previous code was ATSC-specific. Separated it into gstatscmux.c and
added the DVB-specific one from ETSI EN 300 468 V1.11.1 (2010-04)

https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.11.01_60/en_300468v011101p.pdf

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
866d5d87c4 tsmux: Refactor AC3 descriptor to use GstByteWriter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
637e263504 tsmux: Parse bitrate from tags into the stream
Instead of parsing a hardcoded zero and always writing the highest
limit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Vivia Nikolaidou
7a98a4214b tsmux: Fix 0x81 descriptor for AC3 streams
According to ATSCA/52:2018

https://prdatsc.wpenginepowered.com/wp-content/uploads/2021/04/A52-2018.pdf

Used wireshark as ground truth for detection/parsing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4681>
2023-05-23 14:00:11 +00:00
Thibault Saunier
7eca75130d encodebin: Plug a parser before timestamper
Timestamper might not support all stream formats so we need to make sure
some element is able to convert between those formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4122>
2023-05-22 15:10:52 +00:00