Commit graph

1499 commits

Author SHA1 Message Date
Vivienne Watermeier 3b7f397863 ximagesink: Add touch event support
Send touch events for XI_TouchBegin, XI_TouchEnd, and XI_TouchUpdate
events, grouping events with identical timestamps into one TOUCH_FRAME.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Vivienne Watermeier 97bc8f193f navigationtest: Display touchscreen events, log all events
Represents touchscreen events as a trail of black squares, one for each
reported position. Additionally, this adds the `display-mouse` and
`display-touch` properties to toggle visibility of mouse/touchscreen
events, since touchscreens often emulate mouse events, as well as
logging for all received navigation events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Vivienne Watermeier 01876d5712 navigation: Add API for touchscreen events
Add 5 new navigation event types for touchscreen events, with the same
naming and meaning as in libinput - touch-down, touch-motion, touch-up,
touch-frame and touch-cancel - as well as constructors and parse
functions for them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Vivienne Watermeier 6c2f6c3bd4 all: Use new navigation interface and API
Use and implement the new navigation interface in all relevant sink elements,
and use API functions everywhere instead of directy accessing the event structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Vivienne Watermeier f402b2e180 navigation: Add coordinate helper functions
Add a function to get x/y coordinates from suitable navigation events,
and one to create a copy with given coordinate values.

For e.g. translating event coordinates, this avoids having to either
switch on the event type to select the right parse function, or
having to rely on implementation details of the underlying event
structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:51 +00:00
Vivienne Watermeier 8648275601 navigation: Improve interface to avoid exposing implementation details
This deprecates the current send_event interface, and the wrapper
functions based on it, replacing it with a send_event_simple interface and
wrapper function. Together with the new event constructors, this avoids
implementations having to directly access the underlying structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:51 +00:00
Tong Wu 2a703678c0 msdkenc: add macro definitions to avoid the gst-inspect error
Since the strings are empty for GST_MSDK_CAPS_MAKE_WITH_DMABUF_FEATURE
and GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE, when excuting
gst-inspect-1.0.exe msdkh265enc, there will be convert static caps error
because of the extra semicolon between two empty strings. Now macro
definitions are added to avoid this issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2004>
2022-03-23 04:34:06 +00:00
Stéphane Cerveau 1170ab3c29 wavparse: handle query in any parse state
In order to create the stream_id, we need to
pass the query to the default query handler.

If the parse state is different from GST_WAVPARSE_DATA
the query should be passed to the default query
handler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1987>
2022-03-22 16:25:35 +00:00
Jan Alexander Steffens (heftig) 074f7c2e4e flvmux: Clean up aggregate's control flow
This unifies exits to go through a single out label. It mostly
simplifies how EOS is handled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1035>
2022-03-22 15:28:57 +00:00
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
Philippe Normand 027f4a56c0 gstplay: Fix warning parsing API
The GError is an out parameter, so should be a ** parameter, like the details
parameter.

See also #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1869>
2022-03-07 11:03:41 +00:00
Seungha Yang a63d1cf4c4 cudamemorycopy: Fix build when gl is disabled
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1707
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1868>
2022-03-07 10:22:21 +00:00
Branko Subasic 41d436e56e gst-rtsp-server: fix race in rtsp-client
When tunneling over HTTP, if connection on the second channel happens
before the control timer is created we may trigger an assert in
rtsp_ctrl_timeout_remove(). Avoid that by taking the priv->lock before
attaching the client thread to the context.

Fixes #1025

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1867>
2022-03-07 09:15:11 +00:00
Mengkejiergeli Ba c9aa529484 msdkdec: Fix to not trigger SFC scaling when vpp at downstream
When there is vpp scaling downstream, we need to make sure SFC is not
triggered because vpp may fall into passthrough mode which causes
the decoder negotiation to create src caps with vpp scaled width/height.

This patch includes bitstream's original size in first query with
downstream in gst_msdkdec_src_caps, which is the same for what we do for
color format in this query. This is to ensure SFC scaling starts to
work only when downstream directly asks for a different size instead of
through vpp.

Note that here SFC scaling follows the same behavior as msdkvpp:
if user only changes width or height, e.g. dec ! video/x-raw,width=xx !,
the height will be modified to the value which fits the original DAR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1838>
2022-03-07 07:26:40 +00:00
Hou Qi 89a5cae89b encodebasebin: Use GST_DEBUG instead of GST_ERROR when skipping muxer
_get_muxer() skips the muxers that do not satisfy the requirement and select
the desired one. It should not print error log, so use debug log instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1830>
2022-03-06 18:15:04 +00:00
Seungha Yang 30ddb0cd97 nvcodec: Add missing null check in context sharing code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang c31bf2db4d nvcodec: Refactor cudaupload/download and add support for GL memory
* Implement new baseclass GstCudaMemoryCopy to remove duplicated
  cudaupload/download code
* Add support for CUDA <-> GL memory conversion via cudaupload/download

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang 111b2c3f53 nvcodec: Refactor GstCudaMemory abstraction
* Hide GstCudaMemory member variables
* Make GstCudaAllocator object GstCudaContext independent
* Set offset/stride of memory correctly via video meta
* Drop GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT support.
  This implementation actually does not support custom alignment
  because we allocate device memory via cuMemAllocPitch
  of which alignment is almost uncontrollable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang ad0e7fca14 nvcodec: Refactor basetransform subclasses
* cudaupload/download
  - Specify only formats actually we can deal with
    nvcodec elements, not all video formats
  - Supports CUDA output for download and input for upload in order
    to make passthrough possible, like other upload/download elements.
* cudabasetransform
  - Reset conversion element if upstream CUDA memory
    holds different CUDA context and the element can accept it.
    This is the same behavior as corresponding d3d11 filter elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang 89bbcf0061 cudabufferpool: Move GstCudaContext object to public member
... so that plugins can understand assosicated cuda context with the
pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang c8a1c953d8 cudacontext: Require explicit gpu id instead of auto (-1)
Sync up with GstD3D11Device implementation. The auto stuff should
be handled in context sharing step, not device creation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang 1b9274307a nvcodec: Indent update
... to prevent gnu indent version dependent diffs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
Seungha Yang cec7ac2a1b cudacontext: Remove unnecessary cuInit() call
It's already called at plugin init time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1834>
2022-03-06 15:39:04 +00:00
He Junyan 2d624a1d6b av1parse: Add a comment when the detection of TU fails.
Also update the print message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1863>
2022-03-05 11:45:15 +08:00
Nicolas Dufresne 576b074dde camerabin: Remove drain query
This was to support very old V4L2 kernel. As we moved to DMABuf and can now
detach buffers on renegotiation, the buffer it tries to fix no longer exist.
The risk to blocking indefinitly the application does still exist though.

Fixes #1070

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1861>
2022-03-04 22:45:58 +00:00
Nicolas Dufresne 0b7e8efe61 doc: AV1 demuxers now expose their alignment
Update the chache accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan 9c4adf5a64 av1parse: check the error return when parse_alignment_from_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan 81bae87079 av1parse: Use the intersected caps to decide the alignment.
When we negotiate with downstream, We should use the intersected
caps of input and output to decide the alignment and stream format.
The current code just uses the input caps which may lack the stream
format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan ccd1ed9cbc ivfparse: Set the alignment to tu for AV1 stream.
Just do the same as other demux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
He Junyan 4c8777667a av1parse: Only detect the stream format when input alignment is tu.
The demux now outputs the AV1 stream in "tu" alignment, so we do not need
to detect the input alignment. But the annex b stream format is not recognized
by the demux, we still need to detect that stream format for the first input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne 0f15580853 matroska: Fix AV1 alignment to TU
Matroska stores AV1 in temporal unit, so that all OBU sharing the same
timestamp are put together. This was previously just assumed, which isn't
safe now that we have more alignments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne f6c070fbff isomp4: Fix AV1 default alignment
ISOMP4 store TU (temporal units) worth of AV1. Expose this in the
caps to reduce overhead in the parser, and in the muxer to avoid
storing frames split in the wrong way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne 29826aa80e av1parse: Save the default alignment
Otherwise the transformation is not applied and decoders may not
get the appropriate format despite the caps being negotiated
correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne f627d6aafc av1parse: Remove duplicated check
The case of both strings being empty is already checked in the
helper function. No functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1837>
2022-03-04 21:58:15 +00:00
Nicolas Dufresne 57c2adeeb2 vp9parse: Fix auto-plugging of HW frame decoder
Decoders that required frame aligmment and didn't have an associated
alpha decoder were skipped. This is because the parser was constructing
caps based on the software alpha decoder, which specify super-frame
alignment.

Iterate over the caps to filter the one that have a matching codec-alpha, with
the semantic the no codec-alpha field means codec-alpha=false. Then if
everything was removed, callback to the original, so that the first non-alpha
decoder will be picked.

Fixes #820

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1855>
2022-03-04 21:24:17 +00:00
Tristan Matthews 9d0d001d19 matroskamux: allow width+height caps changes for VP8/9
For VP8 and VP9, width+height changes are signalled inband.

Refs https://github.com/Kurento/bugtracker/issues/535 and
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1657>
2022-03-04 14:17:20 -05:00
Tristan Matthews c6ba57eb8e matroskamux: allow width + height changes for avc3|hev1
For avc3 and hev1, the intent was to allow more flexibility for caps changes
(see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit_id=9bd8d608d5bae27ec5ff09e733f76ca32b17420c)
however width and resolution were previously omitted.

avc3 and hev1 specifically support changing stream-parameters on the fly, whereas avc1/hvc1 disallow in-band SPS.

This commit allows for changes to width and height for these which is in line with matroskamux's behaviour prior to 1.14.0.

Practically speaking, one use case where this is commonly seen is when capturing a WebRTC stream, as the browser will adapt the resolution live.

Suggested-by: Mathieu Duponchelle "<mathieu@centricular.com>"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1657>
2022-03-04 14:17:20 -05:00
Jan Alexander Steffens (heftig) ce503d0645 deinterlace: Prevent race between _set_method and latency query
It's possible that the method is being manipulated while downstream
queries our latency, leading to crashes.

Prevent that from happening.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1854>
2022-03-04 16:14:46 +00:00
Edward Hervey 03b1790e0d tsdemux: Handle PES headers bigger than a mpeg-ts packet
While the actual PES header parser could notify us that it needed more data, we
would never actually act on it.

This commit will accumulate incoming packets in such situation and re-attempt
the header parsing.

Fixes #1027

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1852>
2022-03-04 15:14:31 +00:00
Víctor Manuel Jáquez Leal e42d10431d va: basetransform: Add device-path read-only property.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1844>
2022-03-04 14:34:32 +00:00
Víctor Manuel Jáquez Leal 47a95dfd65 va: basedec: Add device-path read-only property.
And elements will notify the used device-path if display is DRM.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1844>
2022-03-04 14:34:32 +00:00
Seungha Yang 16f37f8b9c gldisplay: Reorder GST_GL_WINDOW check for egl-device
"egl-device" should be checked before the "egl", otherwise unexpected egl will be picked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1853>
2022-03-04 13:34:34 +00:00
Víctor Manuel Jáquez Leal 72c6a3b95a vah264enc: Remove GST_PARAM_CONDITIONALLY_AVAILABLE.
Since it's used only when the property is conditionally installed, and
these parameters are always installed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
He Junyan be24cdb150 va: encoder: Clean dead code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 7aa597d6df va: encoder: Fix error code path when open.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 81c00664a2 vah264enc: Remove preferred_output_delay.
In the current state of the encoder it's just dead code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 1a19a835a9 vah264enc: Avoid mapping coded buffer twice.
Currently for copying the coded buffer onto a GStreamer buffer, the
coded buffer is mapped two times: one for getting the size, and later
for do the actual copy. We can avoid this by doing directly in the
element rather than in the general encoder object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 81b99c37d8 vah264enc: Single parameter array per picture.
There's no need, at least in H.264, to hold a global parameter array,
since there's no need to submit SPS, trellis, hdr or quality in every
buffer, but only on IDR ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Víctor Manuel Jáquez Leal 72b0f8ab17 va: Fix log message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1845>
2022-03-04 12:41:37 +00:00
Philippe Normand 7a7daf0f37 play: Fix error parsing API
The GError is an out parameter, so should be a ** parameter, like the details
parameter.

Fixes #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1849>
2022-03-04 10:00:30 +00:00
Matthew Waters b7d0ddd1a4 webrtc: support renegotiating adding/removing RTX
We need to always add the RTX/RED/ULPFEC elements as rtpbin will only
call us once to request aux/fec senders/receivers.

We also need to regenerate the media section of the SDP instead of
blindly copying from the previous offer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1762>
2022-03-04 19:21:59 +11:00