Commit graph

4986 commits

Author SHA1 Message Date
Philippe Normand
c506748c6f transcodebin: Fixes for upstream selectable support
The upstream selectable query was not performed in all situations where we
handle the stream-start event. This could potentially lead to unlinked pads
between decodebin3 and encodebin later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5089>
2023-08-02 17:12:48 +00:00
Matthew Waters
ea2a44cb97 qml/gl: fix array definition
Some implementations require the [N] to suffixed to the variable name.

Error message example: 'syntax error: Array size must appear after
variable name'

Follow up with https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5123
of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5119

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5137>
2023-08-02 21:17:26 +10:00
Ryan Pavlik
f3ce30a55a androidmedia: Add more null checks to JNI utilities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5130>
2023-08-01 23:17:54 +00:00
Ryan Pavlik
794d723871 androidmedia: Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5130>
2023-08-01 23:17:54 +00:00
Ryan Pavlik
ec201c6577 androidmedia: Clear err if we don't have an optional camera field/constant
Fixes startup on devices where those fields/constants are not found.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5130>
2023-08-01 23:17:54 +00:00
Ryan Pavlik
e31407f9d2 webrtc: Fix docs for create-data-channel action signal
Initial line of the doc comment was incorrect, so the nicely written
docs were not being extracted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5131>
2023-08-01 21:17:06 +00:00
Philippe Normand
1afeef0e8b decodebin3: Ensure the slot is unlinked before linking to decoder
When switching from a raw stream to an encoded stream we need to make sure the
slot is unlinked, there is code in place for this but it wasn't triggered
because the slot being reconfigured wasn't advertised as linked beforehand.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5126>
2023-08-01 20:16:59 +00:00
Nicolas Dufresne
0149d77eff waylandsink: Improve DMA DRM integration
Pass GstVideoInfoDmaDrm or GstVideoInfo whenever possible, avoiding passing
strange combination of GstVieoFormat + modifier. Even though we don't have any
at the moment, this also allow supporting GstVideoFormat that are not supported
in our DRM integration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5120>
2023-08-01 14:55:23 -04:00
Seungha Yang
15f0bd2461 dwrite: Move background-color and color-emoji options to effect object
... and simplify background rendering

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5121>
2023-08-02 01:02:32 +09:00
Seungha Yang
a1ad56ed5a dwrite: Add helper object for blending operation
For easy integration with a new text rendering baseclass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5121>
2023-08-02 01:02:28 +09:00
Seungha Yang
f792884ae7 dwritebaseoverlay: Handle only d3d11 allocation query
... and passthrough allocation queries of the other types

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5121>
2023-08-02 01:00:44 +09:00
Seungha Yang
8633b29fab dwritetextoverlay: Remove leading CRLF sequence from CC
The CRLF sequence is unnecessary

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5121>
2023-08-02 01:00:44 +09:00
Seungha Yang
f01fc727e3 dwrite: Remove some properties
Remove outline color and auto resize related properties
to be consistent with textoverlay elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5121>
2023-08-02 01:00:44 +09:00
Nicolas Dufresne
76fbc79494 v4l2: bufferpool: Keep processing bitstream buffer
Bitstream buffers may no fit a single v4l2 buffer, following spec
recommendation, keep processing the buffer until all the data has been
queued.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5100>
2023-08-01 11:02:12 +00:00
Nicolas Dufresne
de5e1e334e v4l2: bufferpool: Fix buffer resize asserstion
When we fill a bitstream buffer the buffer might be too small to hold
the entire frame. Only resize to the filled size, preventing the
following assertion to happen.

  gst_buffer_resize_range: assertion 'bufmax >= bufoffs + offset + size' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5100>
2023-08-01 11:02:12 +00:00
Nirbheek Chauhan
d381a28beb meson: Backport glib patch to allow pcre2 fallback
2.76 broke this, but glib main fixed it again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5124>
2023-08-01 06:29:39 +00:00
Tim-Philipp Müller
ddd4491635 gst-docs: add higher-resolution favicons
Same as on main website.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5122>
2023-08-01 02:23:17 +00:00
Matthew Waters
65fc381403 qml: add support for non-RGBA formats as input format
Currently supported are RGBA, BGRA and YV12

Output is still RGBA textures

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5119>
2023-08-01 01:36:40 +00:00
Nirbheek Chauhan
eb9be6de78 glcolorconvert: Fix syntax for GLSL shaders
Shader compilation was failing on macOS:

gstglslstage.c:519:_compile_shader:<glslstage1> fragment shader compilation failed:
ERROR: 0:10: 'input_swizzle' : syntax error: Array size must appear after variable name

Co-authored-by: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5123>
2023-07-31 17:33:20 +05:30
Matthew Waters
9160a9eb26 parse: avoid -Werror=unused-but-set-variable
bison seems to generate a yyparse() with one unsed but set variable in it.
Avoid that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5110>
2023-07-29 13:12:21 +00:00
Seungha Yang
3679713519 rtponviftimestamp: Fix drop-out-of-segment=false mode
Fixing unexpected buffer dropping and flow error in case that:
* use-reference-timestamps=false
* drop-out-of-segment=false
* Calculated utc offset is not valid because buffer is out-of-segment

The above case should be considered as a valid data flow without returning
errors.

Fixing regression introduced by
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1683

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5116>
2023-07-28 23:36:34 +09:00
Edward Hervey
176b884ec7 adaptivedemux2: Remove API lock
The various fields this was protecting were for the legacy design.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5113>
2023-07-28 12:27:09 +00:00
Matthew Waters
7fcef3818e glcolorconvert: expose the swizzle glsl functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5109>
2023-07-28 03:29:09 +00:00
Matthew Waters
bff5d6d725 glcolorconvert: expose the YUV->RGB glsl function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5109>
2023-07-28 03:29:09 +00:00
Matthew Waters
b32e2cd9dd gl: expose calculating swizzle indices to/from RGBA/YUVA
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5109>
2023-07-28 03:29:09 +00:00
Matthew Waters
a90f6d5d67 gl/format: add helper for returning the number of components in a GL format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5109>
2023-07-28 03:29:09 +00:00
Matthew Waters
5bf85e7588 gl/colorconvert: use swizzle indices instead of chars
Allows using a uniform to control which value goes where and not rewrite
the shader for every format combination.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5109>
2023-07-28 03:29:08 +00:00
Cheah, Vincent Beng Keat
104daade0d waylandsink: Add gst_buffer_pool_config_set_params() to a pool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5103>
2023-07-27 17:08:27 +00:00
Cheah, Vincent Beng Keat
6e22846301 waylandsink: Add DRM modifiers support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5103>
2023-07-27 17:08:26 +00:00
Mengkejiergeli Ba
ebea1219a9 vah265enc: Correct the value of cu_qp_delta flag and depth
According to libva API description, cu_qp_delta in VAConfigAttribValEncHEVCFeatures
is supposed to be used as a flag not the value of depth. And if flag enabled,
diff_cu_qp_delta_depth should be decided by log2_diff_max_min_luma_coding_block_size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5068>
2023-07-27 16:00:19 +00:00
Mengkejiergeli Ba
809a984b91 va:allocator: Rework the func va_map_unlocked
Rework the va_map_unlocked() after we keep mapping behavior (whether to
use derive) consistent with allocator_try stage. Also remove the flag
for iHD case because pitch/stride difference between vaCreateImage and
vaDeriveImage only possibly happen on iHD by now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5046>
2023-07-27 15:04:01 +00:00
Mengkejiergeli Ba
b997f541b2 va:allocator: Let pool alloc_info be consitent with the test order in gst_va_allocator_try
In gst_va_allocator_try, the first try is to use derive_image, if it
succeeds, we should use info from derived image to create bufferpool.
If derive fails, then try create_image and give created image info
to the pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5046>
2023-07-27 15:04:01 +00:00
Matthew Waters
f954d93f27 applemedia: silence some deprecation warnings from ios 12.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5111>
2023-07-27 13:05:37 +00:00
Matthew Waters
00316db5e5 gl/eagl: ignore OpenGLES deprecation on ios
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5111>
2023-07-27 13:05:37 +00:00
Matthew Waters
ce81b81d3f examples: update ios deplyoment target to 12.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5111>
2023-07-27 13:05:37 +00:00
He Junyan
3593d5eea8 test: video: Fix the caps comparing typo for video drm test case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5107>
2023-07-26 20:49:02 +00:00
He Junyan
9e863976c9 video: dma: let gst_video_info_dma_drm_to_caps() return caps with DMABuf feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5107>
2023-07-26 20:49:02 +00:00
Alicia Boya García
5fd3c8a16c qtdemux: Fix premature EOS when some files are played in push mode
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2771

This EOS branch exists so that if a seek with a stop is made, qtdemux
stops accepting bytes from the sink after the entire requested playback
range is demuxed, as otherwise we could keep download content that is
not being used.

This patch fixes two flaws that were present in that EOS check:

1) A comparison was made between track time and movie time without conversion.
This made the check trigger early in files with edit lists. This patch fixes
this by converting the track PTS to movie PTS (stream time) for the check.

2) To avoid sending a EOS prematurely when the segment stop is within a GOP and
B-frames are present, the check for EOS should only be done for keyframes. I
gather this was already the intention with the existing code, but because it
used `stream->on_keyframe` instead of the local variable `keyframe` the old
code was checking if the *previous* frame was a keyframe.

It's interesting to note that these two flaws in the old code mask each other
in most cases: the track PTS will have reached the movie end PTS, but EOS would
only be sent if the previous frame was a keyframe. A simple case where they
wouldn't mask each other, reproducing the bug, is a sequence of 3 frame GOPs
with structure I-B-P.

The following validateflow tests have been added to future-proof the
fix:

 * validate.test.mp4.qtdemux_ibpibp_non_frag_pull.default
 * validate.test.mp4.qtdemux_ibpibp_non_frag_push.default

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5021>
2023-07-26 19:14:43 +00:00
L. E. Segovia
8dddb9ad20 subprojects: update glib to 2.76.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5102>
2023-07-26 12:11:22 +00:00
He Junyan
5aa2239c4b codecs: AV1: Ensure current picture and frame to NULL before return
The current code fails to clear the current picture and frame pointer if
some flow error such as EOS happens. This causes the double free issue in
gst_av1_decoder_reset().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5104>
2023-07-26 16:27:43 +08:00
Mengkejiergeli Ba
8846400b83 msdkh264enc: Set profile as unknown when not specified by downstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5039>
2023-07-26 02:01:31 +00:00
He Junyan
4e47a73ddf fakevideosink: Add DMA_DRM format into sink template caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5094>
2023-07-25 19:34:58 +00:00
He Junyan
5299c34452 video: Add GST_VIDEO_FORMATS_STR to declare all video formats as a string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5094>
2023-07-25 19:34:58 +00:00
Fabian Orccon
216f9d66a0 h265parser: Write Unregistered User Data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Fabian Orccon
dd47fa53d8 h265parse: Parse SEI unregistered user data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Guillaume Desmottes
6b339b5d39 videoflip: fix concurrent access when modifying the tag list
We were checking if the tag list is writable, but it may actually be
shared through the same event (tee upstream or multiple consumers).

Fix a bug where multiple branches have a videoflip element checking the
taglist. The first one was changing the orientation back to rotate-0
which was resetting the other instances.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5097>
2023-07-25 15:18:05 +02:00
Xabier Rodriguez Calvar
5114fb4170 qtdemux: attach cbcs crypt info at the right moment
Before it was always added but that can cause issues when the stream begins
unencrypted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5085>
2023-07-25 10:06:48 +00:00
Piotr Brzeziński
dc494d9edb vtenc: Move output loop to a separate thread
vtenc has an async output queue, which we only iterate over after another frame is enqueued.
At the very least it means we're always a frame behind the fastest possible output.
In edge cases it's also bug-prone - for example if we only have 1 frame, the downstream caps negotiation
will never happen.

This commit adds a separate task running on the source pad, which only iterates over the output queue
and pushes frames out as soon as they're put there. The queue length is limited to ensure we don't encode
too far ahead compared to what downstream can consume. Any failures that occur when pushing data downstream
will be signalled in self->downstream_ret so that other parts of code can act accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4967>
2023-07-21 13:05:26 +00:00
Andoni Morales Alastruey
3683cd9052 gst-python: fix build and usage in Windows
Windows require the python module to be linked to GStreamer.
With msvc and /FORCE:UNUSED, links succeeds but it failes to
load the library at runtime.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1584>
2023-07-21 06:37:45 +00:00
Andoni Morales Alastruey
84c558b25c libffi: fix wrap file to provide the libffi dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1584>
2023-07-21 06:37:45 +00:00
Andoni Morales Alastruey
2ae4aa2384 win: add new win-pkgconfig subproject
This subprojects provides the pkg-config.exe binary on Windows
required by g-ir-scanner to build introspection GIR's

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1584>
2023-07-21 06:37:45 +00:00
Andoni Morales Alastruey
4172b0152f gi: add support for introspection with subprojects
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3505
https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/363
https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1584>
2023-07-21 06:37:45 +00:00
Seungha Yang
792eb0cf48 tests: compositor: Fix race in buffer unref
Don't assume that compositor will output only single buffer
for single input buffer. If buffer's running time is not completly
aligned to output buffer running time or duration, compositor
can generate multiple buffers. If that happens, two threads,
one is aggregator output thread and main thread were trying
to modify buffer in this test. Clear the buffer after
shutting down pipeline to avoid the race.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2836
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5081>
2023-07-21 00:59:59 +09:00
Seungha Yang
3a5978def1 tests: compositor: Remove whitespace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5081>
2023-07-21 00:46:55 +09:00
Nirbheek Chauhan
cb32918d22 meson: Use tarball for graphene instead of git
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5060>
2023-07-20 11:00:35 +00:00
Nirbheek Chauhan
ecee3a9e7d meson: Provide fontconfig dep from the subproject
The wrap was doing nothing, because nothing in it was providing the
dep.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5060>
2023-07-20 11:00:35 +00:00
Nirbheek Chauhan
5621b1030a meson: Fix pixman build on ARM64 macOS
https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5060>
2023-07-20 11:00:35 +00:00
Nirbheek Chauhan
b7e2b24945 meson: Force pcre2 to be provided by a subproject on macOS
Newer macOS provides /usr/lib/pkgconfig/libpcre2-8.pc which is broken
because it says headers are in /usr/include but that directory doesn't
exist. It can only be used to find the library, which only exists on
newer macOS at /usr/lib/libpcre2-8.dylib, so it's also unusable.

So, force usage of the subproject for glib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5060>
2023-07-20 11:00:35 +00:00
He Junyan
a61ba1b7e1 vaapi: delete the unused dma caps variable when ensuring src pad caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5078>
2023-07-20 11:02:14 +08:00
Jordan Petridis
9fdf3dbc7f docs: Port toolkit integration tutorial to gtksink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4789>
2023-07-20 00:27:37 +00:00
Jakub Adam
f7b719ae91 av1parse: calculate framerate from AV1 timing info
When framerate info isn't provided by upstream elements, try to extract
it from AV1 timing info, if present.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5041>
2023-07-19 20:45:05 +00:00
Roman Lebedev
dfe67ba7c6 volume: print actual produced values, not bytes
`map.data` is a pointer to a byte array,
we need to first cast it to the pointer to the expected element type,
otherwise we will get not what we are expecting.

I have stumbled into this in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5063#note_2007447

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5075>
2023-07-19 19:54:38 +00:00
Sebastian Dröge
67e38cf47b rmdemux: Check for integer overflow when calculation audio packet size
Fixes ZDI-CAN-21444
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5072>
2023-07-19 19:01:36 +00:00
Sebastian Dröge
d8d83ad435 rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5072>
2023-07-19 19:01:36 +00:00
Sebastian Dröge
aca056b01d rmdemux: Check that enough SIPR audio data is available when copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5072>
2023-07-19 19:01:36 +00:00
Sebastian Dröge
b268b27cd8 rmdemux: Check for integer overflows when calculating the size of SIPR audio buffers
Fixes ZDI-CAN-21443
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5072>
2023-07-19 19:01:36 +00:00
Sebastian Dröge
763d2bb43c rmdemux: Use GST_LOG_OBJECT instead of GST_LOG
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5072>
2023-07-19 19:01:36 +00:00
Philippe Normand
0d5f6f3d47 decodebin3: Prevent a critical warning when reassigning output slots
Do not attempt to send a streams-selected message when reassigning
an output slot in case upstream signalled that it is handling stream selection.
In this case decodebin3 doesn't keep track of stream
collections (`dbin->collection` is NULL).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5059>
2023-07-19 15:17:46 +00:00
Nirbheek Chauhan
d7d5d1ba93 webrtcbin: Fix support for glib older than 2.74
G_CONNECT_DEFAULT was added in 2.74, and passing `0` in older versions
gets the same behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan
b0dbc09ea2 webrtcrenego: Use payload type correctly for the dynamic stream
All streams were using pt=96 which is incorrect. In some cases that
can cause EOS to be sent to both branches of the receiver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan
76b5178260 webrtcrenego: Fix incorrect release of non-request pad
GStreamer-CRITICAL **: 16:39:23.230: gst_element_release_request_pad:
assertion 'GST_PAD_PAD_TEMPLATE (pad) == NULL ||
GST_PAD_TEMPLATE_PRESENCE (GST_PAD_PAD_TEMPLATE (pad)) ==
GST_PAD_REQUEST' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan
fb406b7a56 webrtcrenego: Port to updated mechanism for doing renegotiation
Sending an EOS event is actually really bad because rtpbin doesn't
handle that very well. It was only being used as a way to notify
webrtcbin to check if re-negotiation is needed.

We don't need that anymore, since changing the direction is enough to
notify webrtcbin to check for re-negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Matthew Waters
6af8b3dd80 webrtcbin: don't hold the webrtc lock over on-new-transceiver emission
Could potentially produce a deadlock if the direction is changed in the
callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Matthew Waters
77e01571c8 webrtc: don't disallow transceiver direction changes
Initial testing seems to suggest that we support them reasonably well
(at least for BUNDLEd streams).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Matthew Waters
13f4066580 webrtc: add check for negotiation on transceiver direction changes
As required by the webrtc specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan
639f8a24ae webrtc/js: Support renegotiation during a call correctly
When a video track is muted, hide the video element to differentiate
it from a track that is stuck because we stopped receiving RTP data.
Show it again when it is unmuted.

When a video track is removed, remove the video element. It will be
re-added on renegotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan
57b6c743ef webrtc/js: Remove obsolete mozilla stun server
Mozilla's public stun server is gone. Remove it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Nirbheek Chauhan
80603746af webrtc/js: Support pressing "enter" to connect
I press "enter" every time which doesn't work and then I click
"Connect", so let's fix that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
He Junyan
5a3b31108d Doc: Dmabuf: Set drm caps' format field to DMA_DRM
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
He Junyan
e14d4e08c1 test: Update all video related tests because of adding DMA_DRM format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
Víctor Manuel Jáquez Leal
8b38614173 video: add GST_VIDEO_DMA_DRM_CAPS_MAKE
It is requried this macro because it doesn't define format field, neither
drm-format which is suppossed to be generated in run-time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
He Junyan
bc48588818 video: dma: Set DMA caps' format field to DMA_DRM
The current way of dma caps uses the drm-format to replace the orginal
format field. The absence of format field means it can accept all formats.
It causes problems when clipping with other old DMA or video/x-raw(ANY)
caps, the result will contain both format field and drm-format field,
which is not valid DMA caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
He Junyan
94c94d34dc video: Add new GST_VIDEO_FORMAT_DMA_DRM video format
This GST_VIDEO_FORMAT_DMA_DRM is introduced for DMABuf kind feature
usage. It represent the DMA DRM kind memory. And like the ENCODED
format, it should not be interpreted and mapped as normal video format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
2023-07-19 09:57:50 +00:00
Sebastian Dröge
e5be080042 gtk: Update subproject from 4.9.2 to 4.10.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5065>
2023-07-19 07:38:36 +00:00
Philippe Normand
4404e7203c decodebin3: Fix slot input linking when the associated stream has changed
Setting the input field on the empty slot prevents future linking of it and will
result in flow errors later on.

This was observed in WebKit's MediaStream source element, when it changes the
caps on one of its associated streams, from an encoded format to a raw video
format. The associated stream-id on the sticky stream-start event doesn´t
change, but the element creates a new GstStream with a different ID and sets it
on the stream-start event. Stream parsing is disabled in urisourcebin, so
decodebin3 handles the parsing. Without this patch we would end-up with unlinked
pads in decodebin3 after switching to the raw video format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5048>
2023-07-19 01:24:30 +00:00
Philippe Normand
cec774b653 query: Add a quark for SELECTABLE query type
So that `gst_query_type_get_name()` won't return "unknown" for this type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5048>
2023-07-19 01:24:30 +00:00
Ruslan Khamidullin
9ec5ee2984 video: add extensive tests for gst_video_time_code_is_valid()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5028>
2023-07-18 13:46:57 +00:00
Ruslan Khamidullin
53582b7430 video: accept timecode of 119.88 (120/1.001) FPS
The drop-frame rules are specified in “SMPTE ST 12-3:2016” and are
consistent with the traditional ones:

“

To minimize fractional time deviation from real time, the first two
super-frame numbers (00 and 01) shall be omitted from the count at the
start of each minute except minutes 00, 10, 20, 30, 40, and 50. Thus the
first eight frame numbers (0 through 7) are omitted from the count at
the start of each minute except minutes 00, 10, 20, 30, 40, and 50.
”

Where “super-frame” is a group of 4 frames for 120 FPS.

Fixes #2797

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5028>
2023-07-18 13:46:57 +00:00
Edward Hervey
7e7f02f4f4 decodebin3: Rename and refactor function
It was doing a bit more than it did initially, update the name accordingly.

Refactor slightly for visibility

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5052>
2023-07-18 11:42:13 +02:00
Edward Hervey
1fd7c2c17a decodebin3: Remove dead code
Was never used since initial commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5052>
2023-07-18 11:42:13 +02:00
Andoni Morales Alastruey
fcf2d8c350 videodecoder: fix segfault copying buffer metas
The current implementation copies metas without checking if the buffer
is writable.

The operation that needs to be done, replacing the input buffer and
copying the metas, is only part of that process. We create a new function
that does both.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4912>
2023-07-18 07:39:02 +00:00
Bastien Nocera
913f6013a8 gtk: Fix critical caused by pointer movement when stream is getting ready
This check fixes a critical warning that can happen when a pointer motion
happens and the video doesn't have its width/height information available.

GStreamer-Video-CRITICAL **: gst_video_center_rect: assertion 'src->h != 0' failed

 #0  g_logv (log_domain=0x7ffff705e176 "GStreamer-Video", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../../../../Projects/jhbuild/glib/glib/gmessages.c:1422
 #1  0x00007ffff7e1a81d in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7e77a9d "%s: assertion '%s' failed") at ../../../../Projects/jhbuild/glib/glib/gmessages.c:1460
 #2  0x00007ffff7e1b749 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=<optimized out>, expression=<optimized out>) at ../../../../Projects/jhbuild/glib/glib/gmessages.c:2930
 #3  0x00007ffff701d90b in gst_video_sink_center_rect (src=..., dst=..., result=result@entry=0x7fffffffc6d0, scaling=scaling@entry=1) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideosink.c:105
 #4  0x00007fffe5652dbb in _fit_stream_to_allocated_size (result=0x7fffffffc6d0, allocation=0x7fffffffc6c0, base_widget=0x9396f0) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:326
 #5  gtk_gst_base_widget_display_size_to_stream_size (base_widget=base_widget@entry=0x9396f0, x=1207.7109375, y=811.84765625, stream_x=stream_x@entry=0x7fffffffc720, stream_y=stream_y@entry=0x7fffffffc728) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:344
 #6  0x00007fffe5651a4b in gst_gtk_base_sink_navigation_send_event (navigation=0x5ff990, event=0x178a730) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gstgtkbasesink.c:340
 #7  0x00007fffe5652432 in gtk_gst_base_widget_motion_event (widget=<optimized out>, event=event@entry=0x1f14b60) at ../../../../Projects/jhbuild/gstreamer/subprojects/gst-plugins-good/ext/gtk/gtkgstbasewidget.c:404

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5049>
2023-07-17 14:53:43 -04:00
Hou Qi
4f5e881e2a riff: add more h265 fourcc formats
Regards hevc/HEVC/hev1/HEV1 fourcc as video/x-h265 format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5031>
2023-07-17 13:17:20 +00:00
Mathieu Duponchelle
6305db1279 base/video-converter: downgrade log level
We don't need to know about routine operation of video conversion
at GST_DEBUG=5 level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4993>
2023-07-17 07:39:46 +00:00
Nirbheek Chauhan
cc6ccd881e meson: Fix fontconfig build failure with MSYS2 gperf
The CI image now contains MSYS2 gperf, and the build fails due to CRLF
newlines in files generated by the build files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5043>
2023-07-17 05:52:24 +00:00
Olivier Crête
e8731f26de docs: Replace gst-omx with v4l2 in memory allocation example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4976>
2023-07-16 19:10:03 +00:00
Olivier Crête
48c43e5b7f gst-omx: Retire the whole package
The OpenMAX standard is long dead and even the Raspberry Pi OS
no longer supports it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4976>
2023-07-16 19:10:03 +00:00
Nirbheek Chauhan
62d3e8fc32 meson: Ensure that soup plugin is built on Windows
The libpsl subproject wasn't building successfully and CI didn't
notice because:

1. The plugin wasn't explicitly enabled
2. Even when the plugin is explicitly enabled, the dep is not required
   at build time when not building a static plugin

So fix all of these issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5038>
2023-07-15 05:06:35 +00:00
Seungha Yang
fdb3cdf1fd qsv: Remove x86_64 constraint on Linux
Updated oneVPL SDK supports 32bit and ARM build

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00
Seungha Yang
25d10acaa2 qsv: Re-apply MinGW build workaround
Apply the changes of the commits
c80132e4a3 and
23261bccbb

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00