Commit graph

2264 commits

Author SHA1 Message Date
Matthew Waters
f954d93f27 applemedia: silence some deprecation warnings from ios 12.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5111>
2023-07-27 13:05:37 +00:00
He Junyan
5aa2239c4b codecs: AV1: Ensure current picture and frame to NULL before return
The current code fails to clear the current picture and frame pointer if
some flow error such as EOS happens. This causes the double free issue in
gst_av1_decoder_reset().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5104>
2023-07-26 16:27:43 +08:00
Mengkejiergeli Ba
8846400b83 msdkh264enc: Set profile as unknown when not specified by downstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5039>
2023-07-26 02:01:31 +00:00
He Junyan
4e47a73ddf fakevideosink: Add DMA_DRM format into sink template caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5094>
2023-07-25 19:34:58 +00:00
Fabian Orccon
216f9d66a0 h265parser: Write Unregistered User Data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Fabian Orccon
dd47fa53d8 h265parse: Parse SEI unregistered user data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Piotr Brzeziński
dc494d9edb vtenc: Move output loop to a separate thread
vtenc has an async output queue, which we only iterate over after another frame is enqueued.
At the very least it means we're always a frame behind the fastest possible output.
In edge cases it's also bug-prone - for example if we only have 1 frame, the downstream caps negotiation
will never happen.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4967>
2023-07-21 13:05:26 +00:00
Jakub Adam
f7b719ae91 av1parse: calculate framerate from AV1 timing info
When framerate info isn't provided by upstream elements, try to extract
it from AV1 timing info, if present.

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

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

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

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

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

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

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Olivier Crête
48c43e5b7f gst-omx: Retire the whole package
The OpenMAX standard is long dead and even the Raspberry Pi OS
no longer supports it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4976>
2023-07-16 19:10:03 +00:00
Seungha Yang
fdb3cdf1fd qsv: Remove x86_64 constraint on Linux
Updated oneVPL SDK supports 32bit and ARM build

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00
Seungha Yang
1bc5dc778c qsv: Update oneVPL SDK version to v2023.3.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5032>
2023-07-14 13:12:29 +00:00
Seungha Yang
9a902afce4 codecs: Use release_frame() instead of drop_frame()
drop_frame() will post QoS message which is not intended here

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5024>
2023-07-13 13:48:46 +00:00
Seungha Yang
45766f2448 codecs: Propagate downstream flow ERROR
Don't translate downstream flow ERROR to OK

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5024>
2023-07-13 13:48:46 +00:00
Nirbheek Chauhan
576ec6e72e d3d11: Fix build on MSYS2 GCC
```
../subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11overlay.cpp:145:37: error:
invalid conversion from 'unsigned int' to 'D2D1_DRAW_TEXT_OPTIONS' [-fpermissive]
  145 |         D2D1_DRAW_TEXT_OPTIONS_CLIP | D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     unsigned int
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Nirbheek Chauhan
8e1b6accbd meson: Always use forward slashes in defines with paths
Fixes the following build failure on MSYS2:

```
../subprojects/gstreamer/tests/check/elements/filesrc.c: In function 'test_seeking':
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: error: incomplete universal character name \U
  107 |   g_object_set (G_OBJECT (src), "location", TESTFILE, NULL);
      |                                                     ^
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\A'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\s'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\c'
```

Due to: `-DTESTFILE=\"C:\\Users\\Administrator\[...]`

https://gitlab.freedesktop.org/nirbheek/gstreamer/-/jobs/45317733

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Carlos Rafael Giani
da3b51c0c4 gl: Take into account viv-fb vs. viv_fb naming in meson scripts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5020>
2023-07-12 21:35:57 +10:00
Matthew Waters
a2d9584b27 gl: provide a pkg-config/gir file for the viv-fb backend
Required to be able to generate coherent bindings for window system
specific APIs due to limitations in gobject-introspection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5020>
2023-07-12 21:35:55 +10:00
Seungha Yang
31c1cf0150 qt6d3d11: Set sampler filtering method
QQuickItem::smooth property doesn't seem to be propagated to
newly created QSGSimpleTextureNode automatically.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2793
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5004>
2023-07-11 12:14:17 +00:00
Philippe Normand
424a78c9b9 webrtcbin: Prevent critical warning when creating an additional data channel
The max_channels value wasn't clamped to 65534 in all situations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5001>
2023-07-10 14:08:09 +00:00
Seungha Yang
6429f04692 meson: d3d11: Add d3d11-wgc option for Windows Graphics Capture feature
Make the feature requirement explicitly controllable via build option

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4939>
2023-07-06 21:20:50 +00:00
Sebastian Dröge
e63548906c video: Move NV12_10LE40_4L4 before the BE variant on LE platforms
This keeps the sorting rules for the format list intact.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4974>
2023-07-06 00:11:45 +01:00
Taruntej Kanakamalla
33bcbad782 lc3: add unit test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4376>
2023-07-05 03:00:43 +00:00
Taruntej Kanakamalla
1865c87ec6 lc3: plugin for LC3 audio codec
lc3enc:
- encodes raw audio into lc3 format
- uses the default bitrate property and frame duration
from the caps to determine the byte count of
the encoded frames if it is not specified in
the downstream caps after negotiation
- uses the same byte count value for all the channels
- all the common session configuration parameters
are passed in the src caps

lc3dec:
- decodes an lc3 encoded audio
- sink caps should contain all the common session configuration
params
- uses frame_duration and frame_bytes (byte count) in the sink
caps as parameters along with sample rate and channel count
- byte count is same for all the channels

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4376>
2023-07-05 03:00:43 +00:00
Philippe Normand
d317379287 webrtcstats: Properly report IceCandidate type
strcmp returns a positive value if s1 is greater than s2, while we actually
needed to check equality here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4952>
2023-07-03 03:51:53 +00:00
Jan Alexander Steffens (heftig)
565f9d18ae srt: Always format reject reason code
`srt_rejectreason_str` doesn't give us a unique string for every
possible reason. Peers can define their own reasons and SRT just gives
us the string `"Application-defined rejection reason"` for all of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4948>
2023-07-02 13:36:42 +00:00
Seungha Yang
1f18ceaf0f dwritesubtitlemux: Update object name
Add missing prefix `DWrite` so that this element can coexist with
subtitlemux proposed in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4938

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4949>
2023-06-30 23:41:36 +09:00
Seungha Yang
8650c7a42a dwrite: Add support for non-d3d11/system memory
Attach meta if downstream supports it whatever the negotiated memory type is,
or just silently passthrough when meta is not supported

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4945>
2023-06-30 11:14:17 +00:00
Seungha Yang
1c4de219e4 dwrite: Add dwritesubtitleoverlay element
Adding new subtitle overlay element. It's a bin which is wrapping
two internal elements dwritesubtitlemux and dwritetextoverlay.

* dwritesubtitlemux: A new internal element to aggregate subtitle
buffers and to attach the aggregated subtitle buffers on
video buffer as meta.
* dwritetextoverlay: Extracts/renders the subtitle meta and
discard the meta after rendering.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4934>
2023-06-28 20:15:31 +00:00
Seungha Yang
a1ca42ad66 dwritebaseoverlay: Fix color-font property get/set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4934>
2023-06-28 20:15:31 +00:00
Seungha Yang
0091166a38 dwrite: Add dwritesubtitlemux element
dwrite plugin internal use and will be removed once it's added to -base

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4934>
2023-06-28 20:15:31 +00:00
Seungha Yang
fce6edd0f1 dwrite: Add GstDWriteSubtitleMeta
dwrite plugin internal use and will be removed once it's added to -base

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4934>
2023-06-28 20:15:30 +00:00
Mathieu Duponchelle
7445b73e76 rtpsession: expose timeout-inactive-sources property
In some situations it is not desirable to time out when no data is
received any longer, users can opt in to this behavior via a new
property.

The property is also exposed on rtpbin and sdpdemux

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4880>
2023-06-28 18:45:25 +00:00
Seungha Yang
b18bd5ec2b d3d11bufferpool: Fix heavy CPU usage in case of fixed-size pool
There's no reason to release GstMemory manually at all.
If we do release GstMemory, corresponding GstBuffer will be
discarded by GstBufferPool baseclass because the size is changed
to zero.

Actual cause of heavy CPU usage in case of fixed-size pool
(i.e., decoder output buffer pool) and if we remove GstMemory from
GstBuffer is that GstBufferPool baseclass is doing busy wait in acquire_buffer()
for some reason. That needs to be investigated though, discarding
and re-alloc every GstBuffer is not ideal already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4935>
2023-06-27 23:25:09 +00:00
Seungha Yang
9aa1d683a2 d3d11poolallocator: Initialize flush flag with TRUE
If it's not active state, it should return flushing from acquire
method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4935>
2023-06-27 23:25:09 +00:00
Seungha Yang
43ee082189 dwritebaseoverlay: Forward downstream wanted min buffer size
Upstream element might want to know the min buffer size,
d3d11 decoders for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4929>
2023-06-27 13:23:07 +00:00
Seungha Yang
8838a670e0 dwrite: Remove unused values
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4929>
2023-06-27 13:23:07 +00:00
Seungha Yang
6cb41569e6 dwrite: Add support for closed caption overlay
Adding closed caption rendering feature to dwritetextoverlay
element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4929>
2023-06-27 13:23:07 +00:00
Seungha Yang
713f74f4f9 dwrite: Import libcaption source code
Import the code from gst-plugins-rs
(origin is https://github.com/szatmary/libcaption)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4929>
2023-06-27 13:23:07 +00:00
Seungha Yang
37c7c92c03 dwritetimeoverlay: Fix member variable initialization
Use GstBaseTransform::start() instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4929>
2023-06-27 13:23:07 +00:00
He Junyan
6accb7a1f5 va: Only change video format in gst_va_video_info_from_dma_info()
The current way of using gst_video_info_set_format() will change all
fields of the GstVideoInfo. We only need to change its format, stride
and offset fields.

In order to keep the consistency with th common drm API, we rename the
gst_va_video_info_from_dma_info() into gst_va_dma_drm_info_to_video_info().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4883>
2023-06-26 16:18:23 +00:00
Stéphane Cerveau
53e48ce14d va: use GstH264Level enum in _va_h264_level_limits
The 1B value has been changed to 9 instead of 11 in the list
of level limits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4737>
2023-06-26 10:47:36 +00:00
Stéphane Cerveau
2974c18a5c codecparsers: keep naming consistency in GST_H264_LEVEL
GST_H264_LEVEL_2 should be used instead of GST_H264_LEVEL_2_0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4737>
2023-06-26 10:47:36 +00:00