Commit graph

162 commits

Author SHA1 Message Date
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
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
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
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
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
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
Edward Hervey 8081c22a73 streamcollection: Use upstream-id as name
It is more coherent, in the same vein as  08dc5d29

Fixes #2640

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4911>
2023-06-22 14:06:04 +02:00
Stéphane Cerveau 981db9d1d3 tests: fix mem leak in vkimagebufferpool
caps should be freed after usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4904>
2023-06-22 04:42:58 +00:00
Seungha Yang 7b4e1fd602 qt6d3d11: Add Direct3D11 Qt6 QML sink
Adding Direct3D11 backend Qt6 QML videosink element, qml6d3d11sink.
Implementation details are similar to the qt6 plugin in -good
but there are a few notable differences.

* qml6d3d11sink accepts all GstD3D11 supported video formats (e.g., NV12).
* Scene graph (owned by qml6d3d11sink) will hold dedicated and sharable
  RGBA texture which belongs to Qt6's Direct3D11 device, instead of sharing
  GStreamer's own texture with Qt6.
* All rendering operations will be done by using GStreamer's Direct3D11 device.
  Specifically, upstream texture will be copied (in case of RGBA)
  or converted to the above mentioned Qt6's sharable texture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3707>
2023-06-21 15:32:17 +00:00
Andoni Morales Alastruey 23812bbc92 vtenc: apply DTS offset to ensure DTS <= PTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4282>
2023-06-19 08:37:54 +00:00
Stéphane Cerveau dd17beb681 gstreamer-full: add full static support
Allow a project to use gstreamer-full as a static library
and link to create a binary without dependencies.

Introduce the option 'gst-full-target-type' to
select the build type, dynamic(default) or static.

In gstreamer-full/static build configuration gstreamer (gst.c)
needs the symbol gst_init_static_plugins which is defined
in gstreamer-full.
All the tests and examples are linking with gstreamer but the
symbol gst_init_static_plugins is only defined in the gstreamer-full
library. gstreamer-full can not be built first as it needs to know what plugins
will be built.

One option would be to build all the examples and tests after
gstreamer-full as the tools.

Disable tools build in subprojects too as it will be built at the end of
build process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
2023-05-31 15:17:11 +00:00
Víctor Manuel Jáquez Leal b982fae9c7 tests: check if vulkan h264 decoding is supported
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal 00189bf8f3 tests: vkimagebufferpool and format mapping
This test will create a pool for VkImageMemory for decoding and others usages.

And a test for the new Vulkan format mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
2023-05-19 04:26:29 +00:00
Sangchul Lee 2a79f23e9d tests/webrtc: Validate peer connection stats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2127>
2023-05-18 12:08:55 +00:00
Matthew Waters b10ec569d7 webrtc: advertise end-of-candidate with an empty candidate string
Just like what is done in the browsers.  When this is sent to the peer,
they will be able to know that no more candidates are coming and can
complete ICE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4598>
2023-05-12 04:52:22 +00:00
Matthew Waters 21b232ce30 closedcaption: write 0x00 padding instead of 0x80 in cc_data/cdp
Depending on the exact output format, 0x00 may be a better default for
padding than 0x80.  0x00 is the recommended padding value when used in
CDP (and cc_data) but is not when used in s334-1a.  See CTA-708-E 4.3.5
amd SMPTE 334-1-2007 5.3.2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4578>
2023-05-10 00:52:01 +00:00
Matthew Waters 262be30b6f ccutils: generate valid padding in field 1 when needing to generate field 2
Fixes CC in Field 2 but not in Field 1 errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4490>
2023-04-26 20:43:13 +00:00
Stéphane Cerveau 40bd8468af bad: disable dtls test if openssl is not present
On MacOS with homebrew, the openssl library is not
properly detected with pkg-config.
So disable the test compilation if openssl
is not properly detected along with libcrypto.

libcrypto is detected but it uses the system one
which leads to the error:

your binary is not an allowed client of /usr/lib/libcrypto.dylib for
architecture x86_64

See more details from Apple:

https://developer.apple.com/forums/thread/124782

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4481>
2023-04-25 10:01:57 +00:00
Seungha Yang c883ab593c d3d11: Add d3d11overlay element
Similar to cairooverlay element but this element emits "draw"
signal with Direct3D11 render target view, so that an application
can render/overlay/blend on the given render target view
without any copy operation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4415>
2023-04-17 23:22:57 +09:00
Seungha Yang 9489fb3f54 sdpdemux: Add support for RFC4570 SDP source filters
Parse source-filter attributes and configure udpsrc accordingly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3485>
2023-04-12 16:32:07 +00:00
Thibault Saunier 5797fa09af codectimestamper: Implement QUERY_CAPS support
This is required to ensure that downstream restrcitions are also
propagated upstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4341>
2023-04-12 15:07:28 +00:00
Edward Hervey 8e51399334 mpegts: Fix include headers
<gst/mpegts/mpegts.h> is the unique header to use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4336>
2023-04-04 20:54:50 +00:00
Aleksandr Slobodeniuk fcf4dbf8e3 d3d11videosink: add gstcheck test for win32 window
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4260>
2023-04-03 11:19:10 +00:00
Brad Hards 4e14bac1ff mpegts: implement metadata in PES packets
Co-authored-by: Andoni Morales Alastruey <ylatuya@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1312>
2023-03-30 12:16:52 +00:00
Víctor Manuel Jáquez Leal d69e1393f8 tests: vkimage: add VK_IMAGE_USAGE_SAMPLED_BIT usage bit
Running tests with Vulkan Validation enabled show an error on vkimage tests:

Code 0 : Validation Error: [ VUID-VkImageViewCreateInfo-image-04441 ]
Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle
= 0x50000000005, type = VK_OBJECT_TYPE_IMAGE;
| MessageID = 0xb75da543
| Invalid usage flag for VkImage 0x50000000005[] used by vkCreateImageView(). In
this case, VkImage should have VK_IMAGE_USAGE_SAMPLED_BIT |
VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT |
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT |
VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR |
VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT |
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR | VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
| VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM set during creation.
The Vulkan spec states: image must have been created with a usage value
containing at least one of the usages defined in the valid image usage list for
image views

This patch adds VK_IMAGE_USAGE_SAMPLED_BIT to the usage bits in test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4296>
2023-03-30 00:03:04 +00:00
Nicolas Dufresne 0780e31581 test: h265parser: Test for NAL missing header bytes
H.265 NAL always have 2 bytes of headers. Unlike the H.264 parser, this parser
will simply return that there is NO_NAL if some of these bytes are missing.
This is then properly special cased by parsers and decoders. Add a test to
ensure we don't break this in the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3234>
2023-03-17 21:25:49 +00:00
Nicolas Dufresne dacb2a2b51 h264parser: Fix return value parsing short header
The appropriate return value for incomplete NAL header should be
GST_H264_PARSER_NO_NAL_END. This tells the parser element to
gather more data. Previously, it would assume the NAL is corrupted
and would drop the data, potentially causing stream corruption.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3234>
2023-03-17 21:25:49 +00:00
Tim-Philipp Müller 81716a1097 gst-plugins-bad: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:54 +00:00
Matthew Waters be72fbc334 cccombiner: fix output-padding=false for a cea608 field 1 only stream
If we have data that needs outputting but we have to output padding to
meet the alternating field requirements of cea608, then output that
padding anyway.

Also includes a test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4124>
2023-03-08 11:11:05 +00:00
Mathieu Duponchelle 2eab37f231 ccconverter: implement field conversion of CEA 608 control codes
As specified in EIA/CEA-608-B section 8.4:

When closed captioning is used on line 21, field 2, it shall conform
to all of the applicable specifications and recommended practices as
defined for field 1 services with the following differences:

a) The non-printing character of the miscellaneous control-character pairs
  that fall in the range of 14h, 20h to 14h, 2Fh in field 1, shall be replaced
  with 15h, 20h to 15h, 2Fh when used in field 2.
b) The non-printing character of the miscellaneous control-character pairs
  that fall in the range of 1Ch, 20h to 1Ch, 2Fh in field 1, shall be replaced
  with 1Dh, 20h to 1Dh, 2Fh when used in field 2.

This means simply switching the "field" field in the caps isn't enough for
converting raw 608 from one field to another, some control codes also
need to be amended.

+ Adds simple test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4126>
2023-03-08 10:13:59 +00:00
Seungha Yang 5227b3c9a6 h265parser: Add an API for HEVCDecoderConfigurationRecord parsing
Add a method for HEVC configuration data parsing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2759>
2023-03-06 12:50:41 +00:00
Mathieu Duponchelle f3e16deaad aggregator: improve parsing in create_new_pad
The previous implementation was a bit primitive, assuming the subclass
had registered a template name starting with sink_ . Instead make
the effort of parsing the actual template name, and use that to generate
the final pad name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4032>
2023-02-28 17:43:57 +00:00
Mathieu Duponchelle 9e8d1dccb4 ccconverter: add support for advertising / selecting field
Raw 608 caps can now contain a "field" field. On the input side it
signifies that the input raw 608 is attached to either field 0 or 1,
on the output side it allows selecting whether to extract the raw 608
data for field 0 or 1 for field-aware formats.

In addition, it is also allowed to use ccconverter to "convert" 608
field 0 to 608 field 1 (and conversely), this is passthrough as the
change only needs to happen in the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4031>
2023-02-24 19:11:56 +00:00
Seungha Yang 5b84439711 h265parse: Always set profile on src caps
h265parse should provide profile for autoplugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4026>
2023-02-23 10:13:54 +00:00
Seungha Yang 090d50e1a0 tests: Add CUDA memory allocator test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:43 +00:00
Philippe Normand 72884f141c webrtcbin: Support for setting kind attribute on RTCRtpStreamStats
The attribute maps the `kind` property of the associated transceiver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3630>
2022-12-22 21:35:51 +00:00
Matthew Waters 993bc8fc01 webrtc: implement support for msid values
Local msid values are taken from sink pad property, or fallback to the
previously used cname.

The remote msid values are exposed on the relevant src pads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3106>
2022-12-14 12:23:32 +11:00
A. Wilcox f4bdc79a07 mpegts: Handle when iconv doesn't support ISO 6937
Systems like musl libc don't support ISO 6937 in iconv.  This ensures
that the MPEG-TS plugin can cope with that.  There is existing support
in the plugin for other methods, so it seems to have been the original
intent anyway.

Fixes: #1314
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3245>
2022-12-12 10:17:26 +00:00
Víctor Manuel Jáquez Leal 8f96453b0f example: vaenc-dynamic-reconfigure: Support H265.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:45:24 +08:00
Enrique Ocaña González a2990020b2 hlsdemux: Expose EXT-X-PROGRAM-DATE-TIME as tags.
This allows an application to use timestamps associated
with fragments.

Patch by: Thomas Bluemel <tbluemel@control4.com>

See: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/195
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1417>
2022-11-17 22:11:12 +00:00
Seungha Yang b886935e83 examples: Add test code to verify decoder caps update
Sample command lines
* Configures pipeline with video encoder
decoder-caps-update \
  --encoder="video/x-raw,format=NV12 ! qsvh264enc" \
  --decoder=d3d11h264dec \
  --videosink=d3d11videosink

* Playing exisiting file
decoder-caps-update \
  --location=test_file.mp4 \
  --decoder=d3d11h264dec \
  --videosink=d3d11videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3328>
2022-11-16 13:12:38 +00:00
Matthew Waters 6265fc8424 h264/5timestamper: provide a workaround for h264/5parse producing pts=NONE buffers
A workaround for
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/649
and
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/287
which is hard to change baseparse behaviour for both video and audio
parsers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3380>
2022-11-15 19:32:10 +00:00
Seungha Yang 5f1bc553f4 tests: cudaconvert: Update test code
Adding more formats, and rescale test with borders

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3389>
2022-11-15 16:25:44 +00:00
Rafał Dzięgiel e93f391139 tests: Add DASH MPD baseURL with query test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1147>
2022-11-14 23:45:53 +00:00
Seungha Yang d0572622fa d3d11: Add support for planar RGB formats
Adding RGBP, BGRP, GBR, GBR_10LE, GBR_12LE, GBRA, GBRA_10LE, and
GBRA_12LE format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3392>
2022-11-14 20:14:27 +00:00
He Junyan b010f00d36 test: Correct the test suite name of the h264 and h265 bitwriter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3384>
2022-11-11 08:19:01 +00:00