Commit graph

1440 commits

Author SHA1 Message Date
Mengkejiergeli Ba d8ab85c3ef msdkdec: Check width and height of mfxVideoParam before allocation
DecodeHeader must be called to fill the mfxVideoParam before allocation,
and thus the check for width and height in mfxVideoParam is necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1817>
2022-03-22 05:22:09 +00:00
Nicolas Dufresne ebf63e1b91 doc: Update cache after NV12_8L128 addition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>
2022-03-22 00:41:39 +00:00
Ming Qian 2861bd9456 v4l2: Add NV12_8L128 and NV12_10BE_8L128
These formats are used by i.MX 8QXP/8QM VPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>
2022-03-22 00:41:39 +00:00
Ming Qian 094d121812 video: Add support for linear 8x128 NV12 tiles and 10bit BE tiles
This adds linear 8x128 NV12 based tiles and NV12 10bit big endian tiles.
These formats are used by i.MX 8QXP/8QM VPU and exposed in V4L2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>
2022-03-22 00:41:39 +00:00
Benjamin Gaignard 98cb44ffc6 v4l2codecs: Fix memory leak
Free pending_requests array when releasing decoder to avoid memory leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2000>
2022-03-21 16:06:05 +00:00
Daniel Almeida 9a364464f0 av1decoder: Sync duplicate_picture with VP9 one
Pass the current frame to the duplicate_picture callback. This makes it easier
to set the frame's output_buffer if we already have one available. Also
documented that unlike VP9, it is not optional to implement this as the
picture will populate the DPB if it is a key-frame. To ensure this, remove the
default implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1992>
2022-03-21 15:10:01 +00:00
Nicolas Dufresne a7ceac50b2 vp9decoder: Copy system_frame_number in duplicate_picture
Just like AV1, copy the system_frame_number from the original picture to make
it clear they reference the same data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1992>
2022-03-21 15:10:01 +00:00
Nicolas Dufresne 80107d4a86 cdoecs: av1: Copy system_frame_number in duplicate_picture
The system_frame_number is notably used by V4L2 decoder as a unique
indentifier for the frame that was decoded. This value is used to tell driver
which frame to reference, as V4L2 does not have an efficient mechanism to
otherwise pass back the frames.

For this reason, and because it is more ligical, copy the original
system_frame_number into the duplicate picture instead of using the current
frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1992>
2022-03-21 15:10:01 +00:00
Seungha Yang 0c6125bad6 meson: va: Define GST_USE_UNSTABLE_API
Remove extra_c_args which is not defined in this meson file at all,
and define GST_USE_UNSTABLE_API to avoid build warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1999>
2022-03-21 22:17:00 +09:00
Matthew Waters 206021e4d4 rtpmanager/rtx: implement initial support for reading/writing rid extensions
Two RTP Header extensions are very relevant for rtprtxsend/receive.
1. "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id": will always be removed
2. "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id": will be written
    instead of the "rtp-stream-id" header extension.

Currently it's only a simple replacement of one header extension for
another however a future change would only add the relevant extension
based on some heuristics (like, video frames only on one of the rtp key
frame buffers, or only until the rtx ssrc has been validated by the peer)
in order to reduce the required bandwidth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1759>
2022-03-21 03:18:18 +00:00
Matthew Waters 33be3e5936 test: add tests for sdes-based RTP header extensions
mid, stream id and repaired stream id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1759>
2022-03-21 03:18:18 +00:00
Matthew Waters 1e55e2d654 rtpmanager: add support for RFC8852 (rid) RTP header extensions
Both for regular RID and for adding on a repaired (RTX) etc stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1759>
2022-03-21 03:18:18 +00:00
Matthew Waters ecd9cce3b1 rtpmanager: add support for writing RFC8843 (BUNDLE mid) RTP header extension
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1759>
2022-03-21 03:18:18 +00:00
Nicolas Dufresne 049655c824 codecs: av1: Fix state when we show existing keyframe
Showing existing keyframe have special meaning in AV1. All the references
frame will be refreshed with the original keyframe information. The refresh
process (7.20) is implemented by saving data from the frame_header into the
state. To fix this special case, load all the relevant information into the
frame_header.

As there is nothing happening in between this and the loading of the key-frame
into the state, this patch also remove the separate API function, using it
internally instead.

Fixes #1090

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1971>
2022-03-19 11:56:33 +00:00
Sebastian Dröge 3de245ed17 videocrop: Add support for v210
Like UYVY and similar formats this is rounding down to the start of the
previous macro-pixel to not mix up the different components.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1988>
2022-03-19 01:25:07 +00:00
Sebastian Dröge 49ec82b209 videocrop: Use GST_ROUND_DOWN_2 instead of re-defining a local version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1988>
2022-03-19 01:25:07 +00:00
Sebastian Dröge cd86181d54 videocrop: Rename PACKED_COMPLEX to PACKED_YVYU
It's not handling any kind of complex packed format, only formats that
are like YVYU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1988>
2022-03-19 01:25:07 +00:00
Jakub Adam 90eadae350 d3d11: Fix some typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1985>
2022-03-19 00:19:41 +00:00
Thibault Saunier 692750efae validate: Totally hide media descriptor node types from the API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1986>
2022-03-18 23:30:37 +00:00
Nirbheek Chauhan 1cb127f16b meson: Bump all meson requirements to 0.60
Lots of new warnings ever since
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1934

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1977>
2022-03-18 22:49:16 +00:00
Nirbheek Chauhan 8819350b74 openexr: Fix some warnings
```
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:46:24: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   46 |   virtual Int64 tellg ();
      |                        ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:47:32: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   47 |   virtual void seekg (Int64 pos);
      |                                ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:67:26: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   67 | Int64 MemIStream::tellg ()
      |                          ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:73:29: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   73 | MemIStream::seekg (Int64 pos)
      |                             ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1977>
2022-03-18 22:49:16 +00:00
Nirbheek Chauhan 5182daaf88 subprojects/avtp: Update to latest avtp 0.2.0
Fixes some meson warnings too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1977>
2022-03-18 22:49:16 +00:00
He Junyan 580a2bb64b codecparsers: av1parser: Fix a typo in FilmGrainParams comment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1974>
2022-03-18 18:59:25 +00:00
Matthew Waters 203e34fb75 discoverer: chain up to parent finalize methods in all our types
Fixes a memory leak:

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x5ac5cd in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
    #1 0x1007007 in g_malloc /work/glib-2.72.0/_builddir/../glib/gmem.c:125:13
    #2 0xf82e82 in g_data_set_internal /work/glib-2.72.0/_builddir/../glib/gdataset.c:464:8
    #3 0xf833f7 in g_datalist_id_set_data_full /work/glib-2.72.0/_builddir/../glib/gdataset.c:670:3
    #4 0xef81be in g_object_notify_queue_freeze /work/glib-2.72.0/_builddir/../gobject/gobject.c:295:7
    #5 0xef79c6 in g_object_unref /work/glib-2.72.0/_builddir/../gobject/gobject.c:3632:16
    #6 0x5e58bf in LLVMFuzzerTestOneInput /src/gstreamer/ci/fuzzing/gst-discoverer.c:132:5
    #7 0x4dd1a2 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #8 0x4dc98a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #9 0x4de6c4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:809:5
    #10 0x4dea29 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
    #11 0x4ce4a0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #12 0x4f6f52 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #13 0x7f1c709980b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1984>
2022-03-18 17:49:08 +00:00
Jakub Adam df55700f44 d3d11screencapturesrc: Allow capturing screen sub-area
Adds crop-x, crop-y, crop-width, crop-height properties specifying the
screen area to capture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1932>
2022-03-18 13:56:51 +01:00
Nirbheek Chauhan 253ee75a72 webrtcbin: Warn when offer didn't intersect with transceiver caps
We were silently falling back to creating a recvonly offer if the caps
didn't intersect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan 0007fa38e0 webrtc-sendrecv: Fix create-answer caps negotiation
We need to parse the payload type map provided by the offer SDP and
set those values on the payloader, otherwise webrtcbin will create
a recvonly answer SDP and we won't send anything to the browser.

Fixed it for both C and Python sendrecv examples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan 3c0d582b7c webrtc_sendrecv.py: Add picture-id-mode to rtpvp8pay
This doesn't just make TWCC stats perform better, it also fixes
stuttery video playback in Chrome.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan e0378f9913 webrtc_sendrecv.py: Print an error on unknown JSON message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan 90da0e1d1e webrtc_sendrecv.py: Add missing copyright headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan 583408c312 webrtc_sendrecv.py: Implement all negotiation modes
Earlier, the example only supported one negotiation mode:
* Browser client is running, gstreamer starts a call and sends offer

Now these three modes are also supported:
* Browser client is running, gstreamer starts a call and sends an
  offer request
* gstreamer connects and waits for browser client to start a call and
  send an offer
* gstreamer connects and waits for browser client to start a call and
  send an offer request

The following features are still missing:
* Data channel support
* TWCC support + stats logging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:46 +00:00
Nirbheek Chauhan 0b1438cc97 webrtc_sendrecv.py: Make it executable
Why wasn't it already. Tired of typing 'python webrtc_sendrecv.py'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:45 +00:00
Nirbheek Chauhan 2294356d9b webrtc_sendrecv.py: Fix event loop usage for messages
Instead of creating a new loop, we should just be fetching the running
loop, then doing a blocking network call inside the callback, schedule
it on the event loop. This is what the C example does too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:45 +00:00
Nirbheek Chauhan ee4ca699a0 webrtc_sendrecv.py: Use default arg for server URL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
2022-03-18 08:16:45 +00:00
Vivienne Watermeier 2b85e5f99c glvideomixerelement: send translated navigation events to the relevant sink pads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1495>
2022-03-18 06:22:02 +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
Thibault Saunier 1a5d2ce98c validate: Cleanup ABI and make it ready to be stabilized this cycle
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Thibault Saunier 5089139e57 validate: Introspect gst-validate-runner.c
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Thibault Saunier 2ef203e659 validate: Add getters for ValidateReports
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand 5ea0c20a33 validate: Change IssueId type to guint32
Which is a bit more bindings-friendly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand 616d1dd6ba validate: ssim: Respect requested dump recurrence parameter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand c275b5c678 validate: Keep scenario alive enough when executing actions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand a9e3b05055 validate: Introspection annotation cleanups
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand d07f2323fe validate: Fix padding and constants
Without this the Rust -sys validate crate tests don't pass.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand 8780da3ffe validate: Expose all public headers in main header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Philippe Normand aa917a9d9a validate: Fix pkgconfig name
Making it consistent with the reset of GStreamer. This also means that
anyone wanting to target -validate >= 1.22 needs to change the way they
link against it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1810>
2022-03-17 14:48:34 +00:00
Sangchul Lee 7691c6776a rtpjitterbuffer: Fix invalid memory access in rtp_jitter_buffer_pop()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1973>
2022-03-17 12:46:14 +00:00
Vivienne Watermeier 8cb5d9f49e documentation: improve misleading wording
The documentation for several gst_*_writable_structure functions stated
that they would never return NULL, without making clear that the passed
object is required to be writable. This changes the wording in those
cases to make that requirement more clear.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1784>
2022-03-17 11:56:37 +00:00
Matthew Waters 098ff9a453 ccconverter: drop data with a warning if scratch buffers overflow
Instead of asserting which could bring down the entire application.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1972>
2022-03-17 21:46:44 +11:00
Hou Qi b962126b06 v4l2videodec: set frame duration according to framerate
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1953>
2022-03-16 14:15:04 +00:00
Philippe Normand 4277af3219 uri: Build doubly-linked list by prepending items
As outlined in the API documentation, g_list_append() iterates over the whole
list, which can quickly introduce performance issues when the list becomes very
big, such as for data URIs for instance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1909>
2022-03-16 11:39:28 +00:00
Philippe Normand b8ccf7f802 typefind: Skip parsing of data URIs
Commit a46ab2ced2 introduced a regression,
breaking typefinding for media content muxed in mp4 container and serialized to
data URIs. For this case it doesn't make sense to look for a file extension, so
skip URI parsing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1909>
2022-03-16 11:39:28 +00:00
Corentin Noël a451b66479 basesink: Fix annotations
We should annotate the Class and not the object itself.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1965>
2022-03-16 10:37:44 +00:00
Corentin Noël a5249f7c5f gst-plugins-base: Fix several annotations
Add annotations for virtual methods when possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1965>
2022-03-16 10:37:44 +00:00
Corentin Noël 15a75b99df validate: Fix typo in get_reports
Return without s isn't taken into account for the introspection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1965>
2022-03-16 10:37:44 +00:00
Tim-Philipp Müller 7895bf38ad rtspsrc: proxy new "add-reference-timestamp-meta" property from rtpjitterbuffer
When syncing to an RFC7273 clock this will add the original
reconstructed reference clock timestamp to buffers in form
of a GstReferenceTimestampMeta.

This is useful when we want to process or analyse data based
on the original timestamps untainted by any local adjustments,
for example reconstruct AES67 audio streams with sample accuracy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1964>
2022-03-16 09:52:58 +00:00
Tim-Philipp Müller c29d741c0e rtpbin: proxy new "add-reference-timestamp-meta" property from rtpjitterbuffer
When syncing to an RFC7273 clock this will add the original
reconstructed reference clock timestamp to buffers in form
of a GstReferenceTimestampMeta.

This is useful when we want to process or analyse data based
on the original timestamps untainted by any local adjustments,
for example reconstruct AES67 audio streams with sample accuracy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1964>
2022-03-16 09:52:58 +00:00
Tim-Philipp Müller c88bfc0b3e rtpjitterbuffer: add "add-reference-timestamp-meta" property
When syncing to an RFC7273 clock this will add the original
reconstructed reference clock timestamp to buffers in form
of a GstReferenceTimestampMeta.

This is useful when we want to process or analyse data based
on the original timestamps untainted by any local adjustments,
for example reconstruct AES67 audio streams with sample accuracy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1964>
2022-03-16 09:52:58 +00:00
Philippe Normand 3e3ba1772c wpe: Reintroduce persistent WebContext
A WebContext leak was introduced in MR
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2252.
If we wanted one WebContext per WebView we should also unref the
WebKitWebContext when destroying the WebView.

This patch reintroduces the persistent WebContext, initially part of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1484.

Fixes #1084

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1933>
2022-03-16 09:07:21 +00:00
Tim-Philipp Müller a525a76e54 opusenc: change default bitrate-type from cbr to constrained-vbr
Which is the default in libopus itself as well, with a comment
that constrained-vbr is considered "safer for real-time use".

Unclear why CBR was the default in the first place.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1451>
2022-03-16 07:12:30 +00:00
Mathieu Duponchelle 30d028317b webrtcbin: fix deadlock when setting up FEC encoder
We bind transceivers' fec_percentage property to the FEC encoder
percentage property, and with the binding bidirectional a deadlock
was introduced by the latest changes from !1762:

We take hold of the transceiver's object lock, then add the binding
and set the property to its initial value on the encoder, which causes
set_property to deadlock in the transceiver when the binding kicks in.

Changing the binding type to DEFAULT (source to target) is enough
to address the deadlock and still serves the original intent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1967>
2022-03-16 06:06:39 +00:00
MGlolenstine 5c54cad469 doc: handy-elements: fix audiotestsrc description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1966>
2022-03-16 06:00:08 +00:00
Sangchul Lee 2f7c843f2b webrtcbin: Check data channel transport for notifying 'ice-gathering-state'
Previously, it did not care about data channel's. It is fixed by adding
some conditions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1957>
2022-03-16 03:31:08 +00:00
Nirbheek Chauhan 1ae7ea508d rtpbuffer: The out args for rtp extension data are optional
The code checks that these are != NULL before dereferencing them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1962>
2022-03-16 02:48:34 +00:00
Hou Qi 738dbf1cb7 v4l2videodec: safely retrun from video_dec_loop with stream unlock
This is to avoid decoder hang when doing trick play between
different resolutions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1960>
2022-03-16 02:13:00 +00:00
Sebastian Dröge 5ca39060f4 rtpjitterbuffer: Improve accuracy of RFC7273 clock time calculations
Previously the result of the calculations included inaccuracies caused
by the NTP clock estimation, which caused the timestamps to jitter
+/- 1/clockrate.

By reorganizing the calculations it is possible to get rid of this
inaccuracy and calculate deterministic and exact packet timestamps based
on the actual NTP clock as long as the estimation is not off by more
than 2**31 clockrate units.

The only remaining inaccuracy that is introduced now is caused by the
conversion from the NTP clock to the pipeline clock.

Also split up debug output, demote many messages to the trace debug
level and output more intermediate results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1955>
2022-03-15 23:33:37 +00:00
Nirbheek Chauhan 8c2ef0f025 twcc: Add some logging to debug TWCC feedback
This should allow people to debug when TWCC feedback is not enabled
because they haven't set the extmap in the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1952>
2022-03-15 22:32:07 +00:00
Nirbheek Chauhan a6bb63dcd7 twcc: Note that packet-loss-pct can count reordering as loss
This is difficult to encounter in ordinary networks, but is
encountered when using tc-netem to add random delays to packets, and
also when your UDP stream is bonded over multiple links with varying
characteristics.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1952>
2022-03-15 22:32:07 +00:00
Seungha Yang c08ce58753 nvcodec: Move CUDA <-> GL, D3D11, NVMM copy function to utils
This method can be used in other elements as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1945>
2022-03-15 21:51:50 +00:00
Seungha Yang b3df58add1 nvh265sldec: Add support for delayed output
Delay 4 frames in case of non-live to improve throughput

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1937>
2022-03-15 21:08:06 +00:00
Seungha Yang 1a0d5bff61 h265decoder: Add support for delayed output
Functionally identical to the other decoder baseclasses.
Delayed output can improve throughput depending on decoding APIs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1937>
2022-03-15 21:08:06 +00:00
Seungha Yang 0624434d84 h265decoder: Update documentation
Sync up with other baseclasses

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1937>
2022-03-15 21:08:06 +00:00
Seungha Yang 3e49ff0ff5 h265decoder: Drain decoder on new_sequence()
Holding previously decoded but not outputted pictures even after
new_sequence is not a safe approach in various aspect.
However, we cannot drain out DPB on new_sequence() unconditionally,
because there is a case where decoder should drop decoded pictures
if NoOutputOfPriorPicsFlag is set.

To detect NoOutputOfPriorPicsFlag before the new_sequence() call,
this patch splits decoding process into two path, one for nal unit parsing
in order to detect NoOutputOfPriorPicsFlag and then each nal unit
will be decoded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1937>
2022-03-15 21:08:06 +00:00
Seungha Yang 9494509ee0 h265decoder: Remove unused pts variable
We can know timestamp from associated GstVideoCodecFrame

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1937>
2022-03-15 21:08:06 +00:00
Bastien Nocera bd39ad4519 convertframe: Add support for GL-memory backend GstFrame input
Add "gldownload" early in the pipeline so that GL-memory backed raw
frames can be downloaded and processed on the CPU.

Closes: #1073
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1916>
2022-03-15 20:31:24 +00:00
Havard Graff e5bd9839c4 rtprtxsend: don't require clock-rate in caps
For multiplexing, the rtpstreams you are multiplexing might not use
the same clock-rate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1881>
2022-03-15 19:05:00 +00:00
Havard Graff 4d31641302 rtprtxsend: don't start the task unless we are doing rtx
The rtxsend element can do pass-through when not enabled (no pt-map set)
and in those cases there is no point in starting an additional task
that does absolutely nothing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1880>
2022-03-15 12:03:27 +00:00
Xavier Claessens 0fa7923937 Meson: Set install_tag on some files
Meson tries to guess the tag (runtime, devel, etc) for every installed
file, but it cannot guess them all. There is a list at the end of
meson-log.txt of files we need to tag manually.

See https://mesonbuild.com/Installing.html#installation-tags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1934>
2022-03-14 08:56:54 -04:00
Havard Graff 6f57199958 rtprtxreceive: add ssrc-map property
Mirroring the rtxsend, this allows the application to "pre-map" the
retransmission-ssrcs to the "real" ssrc, if this information is known.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1878>
2022-03-14 09:14:10 +00:00
Carlos Rafael Giani 671c89c392 mpg123: Add gapless playback support
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>
2022-03-14 10:32:15 +02:00
Sebastian Dröge abb8d54bb0 avaudenc: Add support for AV_PKT_DATA_SKIP_SAMPLES side data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>
2022-03-14 10:32:15 +02:00
Carlos Rafael Giani 492dc666df avauddec: Add clipping meta support for gapless playback
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>
2022-03-14 10:32:15 +02:00
Carlos Rafael Giani 0431a0845c mpegaudioparse: Support gapless playback
Gapless playback is handled by adjusting buffer timestamps & durations
and by adding GstAudioClippingMeta.

Support for "Frankenstein" streams (= poorly stitched together streams)
is also added, so that gapless playback support doesn't prevent those
from being properly played.

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>
2022-03-14 10:32:15 +02:00
Jan Alexander Steffens (heftig) 2db283499e deinterlace: scalerbob: Reduce latency to 0
We only need the current field, just like `linear`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1926>
2022-03-12 22:48:39 +00:00
Vivia Nikolaidou 8c648384f2 yadif: Fix CHECK macro for YUY2 format
Used to make comb artifacts for videotestsrc pattern=ball for YUY2
format only (not AYUV).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1938>
2022-03-12 17:18:47 +00:00
Seungha Yang e270e2967f nvenc: Fix deadlock because of too strict buffer pool size
The pool size might need to be larger than encoding surface pool size.
Also, because we always copy input frame into internal CUDA memory,
there's no reason to restrict max size of buffer pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1939>
2022-03-12 16:44:44 +00:00
He Junyan 50a481939d va: Fix a regression because of "Invert video codec frame dependency".
1. Always set the according GstVaH264EncFrame pointer when GstVideoCodecFrame
   pointer is assigned, which can make the logic safe.
2. Fix the forgotten change in _sort_by_frame_num. Its input pointer now is
   GstVideoCodecFrame type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1935>
2022-03-12 15:20:19 +00:00
Seungha Yang aa476452fb codecs: Rename picture clear functions
Our convention for clear method is gst_clear_foo_bar().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1897>
2022-03-11 20:20:17 +00:00
Seungha Yang 423111480c nvh265sldec: Always fill SPS/PPS related parameters
Address compare was not a valid approach since it works
only if SPS/PPS id are changed. Otherwise it will always point to
the same address of member variables of h265parser.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1931>
2022-03-11 16:14:14 +00:00
Damian Hobson-Garcia bd2a55dcb3 doc: New cropping parameters added to v4l2src
v4l2src add several new parameters to control cropping of
the captured video stream.  Update the doc cache to reflect
this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +00:00
Damian Hobson-Garcia 1fc8347c1e examples: v4l2: Add v4l2src crop example
Add a simple utility to illustrate how to set input cropping on v4l2src.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +00:00
Damian Hobson-Garcia 70086fda22 v4l2src: Add support for cropping at capture source input
Add properties to control input cropping in the V4L2 device.
The input cropping is applied before composing the result to the
capture buffer.  By default the capture size will be set to the same
size as the crop region, but it can be scaled to a different output
frame size if supported by the V4L2 device.
If scaling is not supported, the cropped image will
be composed as is into the top-left corner of the capture buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +00:00
Damian Hobson-Garcia ceff3e8ff7 v4l2object: Add function to get crop regions from device
Get the current crop bounding region from the V4L2 device so
that it can be provided to applications and used to validate
crop settings. Also make the default crop region available so
that it can be used to reset the crop when appropriate.

Uses the selection API when available with fallback to the crop
API for older kernels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +00:00
Damian Hobson-Garcia 25f240993c v4l2object: rename crop function to reflect its usage
The gst_v4l2_object_set_crop() is used for removing buffer
alignment padding. Give it a name that better reflects
that usage.  This helps to distinguish from cropping of the
input image (e.g. cropping at the image sensor on a captre
device), which can be  unrelated to the memory buffer padding,
especially if scaling is involved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +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
Seungha Yang 3694045a54 h264decoder: Fix invalid memory access
gst_h264_dpb_needs_bump() can be called with null picture
in case of live

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1928>
2022-03-11 19:32:59 +09:00
Branko Subasic 2689277a6b rtponviftimestamp: add support for using reference timestamps
Make it posible to configure the element to obtain the timestamps from
reference timestamp meta data instead of using the ntp-offset property,
or estimating its own offset. Currently the only time format supported
is "timestamp/x-unix", i.e. UTC time expressed in the unix time epoch.

In addition the custom event GstNtpOffset has been renamed to
GstOnvifTimestamp, to reflect that it is not necessarily used to convey
the ntp-offset. As a consequence we had to modify a couple of files in
the rtsp-server as well.

Fixes #984

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1683>
2022-03-11 08:39:50 +00:00
Edward Hervey bce779e66d pbutils: Add function to parse RFC 6381 codecs field
This is the opposite of `gst_codec_utils_caps_get_mime_codec()`, which allows
elements to get the `GstCaps`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1894>
2022-03-11 07:14:33 +00:00
Tim-Philipp Müller 6fec258930 sdpdemux: add media attributes to caps to fix ptp clock handling
Those are needed by rtpjitterbuffer to do the right thing, e.g.

a=ts-refclk:ptp=IEEE1588-2008:00-**-**-**-**-**-**-**:0
a=mediaclk:direct=1266592257

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1924>
2022-03-10 20:49:36 +00:00
Sangchul Lee 67df5815a9 rtpvp8depay: Fix crash when making 'GstRTPPacketLost' custom event
This patch fixes a seg.fault in gst_structure_new() with warnings as below.

GLib-GObject-WARNING **:
 ../gobject/gtype.c:4330: type id '0' is invalid
GLib-GObject-WARNING **:
 can't peek value table for type '<invalid>' which is not currently referenced

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1918>
2022-03-10 19:37:49 +00:00
Corentin Damman 1fb3e35708 cudamemorycopy: add D3D11 resource support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1807>
2022-03-10 18:08:10 +00:00
Corentin Damman 1568db2c3e cudacontext: find associated DXGI Adapter LUID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1807>
2022-03-10 18:08:10 +00:00
Corentin Damman 895f11401d cudautils: add support of D3D11 resource as Cuda graphics resource type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1807>
2022-03-10 18:08:10 +00:00
Corentin Damman f76ecf1e63 cudaloader: add D3D11 API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1807>
2022-03-10 18:08:10 +00:00
Edward Hervey fb81c4dbf5 mpegts: Handle glib < 2.58
By using a workaround to the lack of g_ptr_array_steal_index.

Fixes #1078

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1917>
2022-03-10 17:24:45 +00:00
Matthew Waters ccd1b76625 webrtcbin: fix ulpfecenc passthrough pt
ulpfecenc uses a value of pt=255 for passthrough.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1075
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1914>
2022-03-10 16:20:03 +00:00
Seungha Yang 5d298b98da nvh264dec,nvh265dec: Fix broken key-unit trick and reverse playback
On GstVideoDecoder::{drain,flush}, we send null packet with
CUVID_PKT_ENDOFSTREAM flag to drain out decoder. Which will
reset CUVID parser as well.
To continue decoding after the drain, the next input buffer
should include sequence headers otherwise CUVID parser will
not report any decodeable frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1911>
2022-03-10 12:40:05 +00:00
Nirbheek Chauhan 146111d7c2 rtpbasepayload: Remove dead twcc code
This feature was removed in 7a53fbad68,
but this code was left behind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1902>
2022-03-10 11:27:49 +00:00
Tomasz Andrzejak e74435008f rtpbin: allow FEC elements with Always pads
This patch enable picking up FEC decoder or enocder that have
static repair packets pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1860>
2022-03-10 08:33:27 +00:00
Nirbheek Chauhan 40efef1fac soup: Load the runtime library, not the development library
libsoup-2.4.so / libsoup-3.0.so are symlinks installed by development
packages, they are not available at runtime.

Also eliminate G_MODULE_SUFFIX since it's not useful for us, and is
actually incorrect on macOS anyway.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1899>
2022-03-10 07:44:54 +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
Edward Hervey 0d617885f1 tagdemux: Properly propagate sequence numbers
If we received a time segment from upstream, we need to make sure we propagate
it downstream with the same sequence number.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1903>
2022-03-09 23:58:07 +00:00
Edward Hervey a95a3ca807 tsbase: Handle more program updates
There could be a case where the new program has the same program number as the
previous one ... but is actually located on a PID previously used for elementary
stream. In that case the program is guaranteed to not be an update of the
previous program but a completely new one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1893>
2022-03-09 19:45:08 +00:00
Edward Hervey 76543ee73a mpegtsbase: Use an array to track programs
We need to be able to look for programs by their PID also. Using a hash table
was a bit sub-par (and overkill) for storing a range of programs.

This is needed because there could potentially be two programs with the same
program id but different PMT PID (while one is being deactivated the new one
would "exist").

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1893>
2022-03-09 19:45:08 +00:00
Edward Hervey 2943d92389 multiqueue: Fix interleave calculation for data before segment start
This commit modifies the interleave calculation to allow growing when incoming
data is before the segment start.

The rationale is that there is no requirement whatsoever for data before the
segment start to be "coherent" on all streams.

For example, a demuxer could rightfully send data from the video stream from the
previous keyframe (potentially quite a bit before the segment start) and the
audio from just before the segment start.

This will activate the same logic as growing the interleave when some streams
haven't received buffers yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1892>
2022-03-09 18:49:51 +00:00
Edward Hervey b141324eae multiqueue: Improve interleave calculation at startup and EOS
* When a stream receives EOS, it will no longer change, we shouldn't take that
  stream into account for interleave calculation.

* When streams (re)appear, we do not want to grow the initial interleave values
  to excessive values. Instead of setting it to a default of 5s, progressively
  grow it to that maximum.

* When the status of input streams change (i.e. going to/from "some haven't
received data yet" and "all have received data"), update the interleave
immediately instead of waiting for (potentially) 5s of data before updating
it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1892>
2022-03-09 18:49:51 +00:00
Mathieu Duponchelle b6ffad41ca gst-python: gstmodule.c: fix build with 3.11
https://docs.python.org/fr/3.10/whatsnew/3.10.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1639>
2022-03-09 18:13:25 +00:00
Edward Hervey 568b918971 qtdemux: Propagate stick events downstream when creating pads
If upstream provided a stream collection event before any pads were created,
make sure it's propagated downstream when pads are created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1891>
2022-03-09 16:09:31 +00:00
Havard Graff a2c25ccd09 rtprtxsend: if no rtx is present, don't expose a rtx-ssrc in caps
The point here is that rtpsession will create a new rtpsource when
the field "rtx-ssrc" is present, and when not doing rtx, that means
a random ssrc will create a new rtpsource that will be included in RTCP
messages for the current session.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1882>
2022-03-09 15:30:37 +00:00
Víctor Manuel Jáquez Leal 838fe24e78 vah264enc: Invert video codec frame dependency.
Instead of using GstMiniObject to hold H264 frame, now it uses a plain
structure. Besides, instead of holding a reference to
GstVideoCodecFrame, the H264 frame structure is set as a
GstVideoCodecFrame user data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1856>
2022-03-09 12:57:30 +00:00
GuYanjie f39174fbc4 vaapih265dec: fixed st_rps_bits setting in h265 decoding.
According to va_dec_hevc.h, pic_param->st_rps_bits should be set
for accelorater to skip parsing the *short_term_ref_pic_set
(num_short_term_ref_pic_sets) structure.
Also modified fill_picture to get parser info as a parameter,
in order to get slide_hdr->short_term_ref_pic_set_size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1886>
2022-03-09 10:38:36 +00:00
Havard Graff 2a8fa45ba8 rtprtxsend: don't process or warn if no map is set
This makes it more gentle when doing "pass-through"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1879>
2022-03-09 12:01:22 +05:30
Seungha Yang 496b77e6aa cudamemorycopy: Fix GL resource leak
Clear GL resources on stop()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1896>
2022-03-08 18:02:25 +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
Jakub Adam 1f3ca43c51 gstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1885>
2022-03-08 12:01:13 +00:00
Jakub Adam 38a3af96d0 gstreamer-sharp: Fix App{Src,Sink} constructors
Apparently GtkSharp expects each object has only one ToggleRef at any
time. Assigning element.Handle into Raw has a consequence that second
ToggleRef attempts to get created but fails on g_object_unref () that
breaks a GObject assertion:

  toggle_refs_notify: assertion failed: (tstack.n_toggle_refs == 1)

This is because toggle references should be removed with
g_object_remove_toggle_ref(), not a simple unref().

In order to avoid duplicate toggle references, introduce
ElementFactory.MakeRaw(), which creates a GstElement without its
accompanying C# object. The returned raw pointer can be assigned into
another GLib.Object without trouble.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1885>
2022-03-08 12:01:13 +00:00
Jan Alexander Steffens (heftig) 95ff949eff mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE
And use the output segment position for the outgoing timestamp while it
is. This is needed to delay the calculation of `output_ts_offset` until
we actually have a usable timestamp, as tsmux will output a few initial
packets while `last_ts` is still unset.

Without this, the calculation would use the initial `0` value, which did
not have the intended effect of making VBR mode behave like CBR mode,
but always calculated an offset equal to the selected start time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
2022-03-08 10:57:44 +00:00
Jan Alexander Steffens (heftig) e5dbf86a54 mpegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset
It's a GstClockTimeDiff, thus GST_CLOCK_TIME_NONE isn't appropriate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
2022-03-08 10:57:44 +00:00
Seungha Yang 34c6063769 decklink: Update SDK version to 12.2.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1883>
2022-03-08 10:16:29 +00:00
Mikhail Fludkov 815d279f2e rtprtxreceive: fix crash when RTX payload has zero length
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1875>
2022-03-08 09:07:41 +00:00
sergei.kovalev 4c7f3cc366 check: Fix valgrind suppression for debug function list
Fix suppression to support release and debug builds.

Here is the debug build call stack:
```
==10707==    by 0x48B5520: g_malloc (gmem.c:106)
==10707==    by 0x48D19DC: g_slice_alloc (gslice.c:1069)
==10707==    by 0x48D3947: g_slist_copy_deep (gslist.c:619)
==10707==    by 0x48D38B8: g_slist_copy (gslist.c:567)
==10707==    by 0x4ADC90B: gst_debug_remove_with_compare_func (gstinfo.c:1504)
```

In release build `g_slist_copy (gslist.c:567)` got inlined:
```
==15419==    by 0x48963E0: g_malloc (gmem.c:106)
==15419==    by 0x48AA382: g_slice_alloc (gslice.c:1069)
==15419==    by 0x48AB732: g_slist_copy_deep (gslist.c:619)
==15419==    by 0x4A39B8F: gst_debug_remove_with_compare_func (gstinfo.c:1504)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1814>
2022-03-08 08:25:39 +00:00
Havard Graff 86c7231dae rtprtxreceive: allow passthrough and non-rtp buffers
To avoid mapping rtp buffers when RTX is not in use, and to not
do a full error on receiving a non-rtp buffer, since you have no control
of what a rouge sender might send you.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1874>
2022-03-07 23:43:49 +00:00
Havard Graff a475c93346 rtprtx: don't access type-system per buffer
When doing only a single stream of audio/video this hardly matters,
but when doing many at the same time, the fact that you have to get
a hold of the glib global type-system lock every time you process a buffer,
means that there is a limit to how many streams you can process in
parallel.

Luckily the fix is very simple, by doing a cast rather than a full
type-check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1873>
2022-03-07 22:01:03 +00:00
Havard Graff 2a26daee46 rtprtx: signed/unsigned and style fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1872>
2022-03-07 21:16:45 +00:00
Seungha Yang 4aa516f305 cudamemorycopy: Remove texture-target caps field
It's GL specific field, and we can remove it unconditionally

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
2022-03-07 19:05:29 +00:00
Seungha Yang e5132a8508 cudaupload,cudadownload: Add support for dGPU NVMM
Implement NVMM <-> CUDA, GL, SYSTEM memory conversion. Jetson is
not supported yet. Note that NVMM <-> GL interop on Jetson platform
is supported by GstGL

Some example pipelines are:
- Convert NVMM to GstGL memory
  nvv4l2decoder ! "video/x-raw(memory:NVMM)" ! cudadownload ! "video/x-raw(memory:GLMemory)" ! glimagesink

- Upload system memory to NVMM and encode
  video/x-raw,format=NV12 ! cudaupload ! "video/x-raw(memory:NVMM)" ! nvv4l2h264enc

- Convert NVMM to GstCUDA memory and encode
  nvvideoconvert ! "video/x-raw(memory:NVMM)" ! cudaupload ! "video/x-raw(memory:CUDAMemory)" ! nvh264enc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
2022-03-07 19:05:29 +00:00
Xavier Claessens af96f34fd8 Update wrap files from latest wrapdb version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1877>
2022-03-07 17:47:09 +00:00
Víctor Manuel Jáquez Leal 0c7fe80387 va: encoder: Don't preallocate reconstruct buffers.
It's not required by VA to register the reconstruct buffers at context
creation, just as in decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1857>
2022-03-07 16:31:41 +00:00
Hou Qi fa6f34d595 v4l2bufferpool: Fix race condition between qbuf and pool streamoff
There is a chance that pool->buffers[index] sets BUFFER_STATE_QUEUED, but
it has not been queued yet which makes pool->buffers[index] still NULL.
At this time, if pool_streamff release all buffers with BUFFER_STATE_QUEUED
state regardless of whether the buffer is NULL or not, it will cause segfault.

To fix this, also check buffer when streamoff release buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1842>
2022-03-07 15:14:15 +00:00
Branko Subasic 52c0763042 gst-rtsp-server: Plug a few memory leaks in tests
Found and fixed a few memory leaks in the gst_rtspserver, gst_onvif and
gst_stream tests by running the tests in valgrind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1742>
2022-03-07 13:57:27 +00:00
Hou Qi b11084f729 flvmux: Add protection when unref GstFlvMuxPad
This is to avoid gst_object_unref: assertion 'object != NULL' failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1843>
2022-03-07 13:03:16 +00:00
Philippe Normand 21f7889187 gstplay: tests: Keep track of errors/warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1869>
2022-03-07 11:03:41 +00:00
Philippe Normand 84717c6d2a gstplay: Do not error out on message parsing failures
Specially when parsing errors and warnings, the details field can be NULL and
the gst_structure_get() call would return FALSE in such cases, triggering false
positive errors.

Follow-up for #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1869>
2022-03-07 11:03:41 +00:00