Commit graph

87 commits

Author SHA1 Message Date
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
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
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
Matthew Waters 088597b430 closedcaption: move CC buffering to helper object
Move most of the interesting code from ccconverter to this new helper
object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
Matthew Waters 741cfd18b5 ccconverter: drop data when overflow on extracting cea608 from cc_data
If the buffer overflows, then drop rather than causing a failure and
fropping the output buffer indefinitely.  This may have caused downstream to
be waiting for data the will never arrive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
Matthew Waters 542060fea7 ccconverter: fix framerate passthrough with malformed input
If an input is malformed (only produces cea608 field 1 cc_data) then
when in passthrough we would effectively be dropping every second cea608
on output as we would not store any unused cea608 data.

Fix by having all code paths go through the framerate conversion code
which will store and retrieve any relevant data across buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
He Junyan 2408ca2f18 h265bitwriter: Correct the all API to byte aligned.
In fact, all the h265 bit writer have byte aligned output. So we
change the API from bit size in unit to byte size, which is easy
to use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
2022-10-27 12:15:43 +00:00
He Junyan c294ba82e6 h264bitwriter: Correct the all API to byte aligned.
In fact, all the h264 bit writer have byte aligned output except
the slice header. So we change the API from bit size in unit to
byte size, which is easy to use. For slice header, we add a extra
"trail_bits_num" to return the unaligned bits number.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
2022-10-27 12:15:43 +00:00
Tim-Philipp Müller e703374ff8 fdkaac: add minimal unit test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:05 +00:00
Sangchul Lee 0f4cf19fb9 tests/webrtc: Add test for 'add-turn-server' action signal
It just checks return value of the action signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3131>
2022-10-11 10:23:00 +00:00
Johan Sternerup 212c09a70e webrtc: return error when sending on non-open datachannel
According to W3C
specification (https://w3c.github.io/webrtc-pc/#datachannel-send) we
should return InvalidStateError exception when trying to send when the
channel is not open. In the world of C/glib/gstreamer we don't have
exceptions but have to rely on gboolean/GError instead. Introducing
these calls for a change in function signature of the action signals
used to send data on the datachannel. Changing the signature of the
existing "send-string" and "send-data" signals would mean an immediate
breaking change so instead we deprecate them. Furthermore, there is no
way to express GError** as an argument to an action signal in a way
that fits language bindings (pointer-to-pointer simply does not work)
and we have to use regular functions instead.

Therefore we introduce gst_webrtc_data_channel_send_data_full() and
gst_webrtc_data_channel_send_string_full() while deprecating the old
functions and corresponding signals.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1958>
2022-10-05 11:08:30 +00:00
Stéphane Cerveau fb09c028e3 h265parse: fix typo in member of GstH265SPS
Rename sps_extnsion_params to sps_extension_params

Fix comment about vui_parameters_present_flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3072>
2022-10-04 10:01:12 +00:00
Devin Anderson 31831eb47e voamrwbenc: Fix truncation of audio data at end-of-stream when audio data
doesn't align on 20 millisecond frame size.

The AMR-WB codec imposes a fixed 20 millisecond frame size.  In its current
form, the `voamrwbenc` plugin deals with this limitation by discarding any
audio at the end of the stream that falls short of 20 milliseconds.  This patch
keeps the audio data, and appends silence to the end to preserve frame size
alignment.

The patch also adds tests to check for the updated behavior.  I noticed that
tests weren't being built, so I changed the build to allow for building the
tests when the `tests` and `voamrwbenc` options are set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3027>
2022-09-16 00:14:58 +00:00
Tim-Philipp Müller 2ac5d687e1 tests: add a few more orc tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3029>
2022-09-15 12:14:56 +01:00
Olivier Crête 4b3b234f72 webrtcbin: Allow locked mlines with no caps, as the last ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2439>
2022-09-02 11:52:58 +02:00
Olivier Crête 0930c467d4 webrtcbin: Reject creating an offer if a locked mline has no caps
This avoids getting in a bunch of corner cases. We'd have to insert
a "rejected" line from the start as a place-holder to get around this,
but the rest of the code just becomes more complicated, so just
disallow it for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2439>
2022-09-02 11:52:58 +02:00
Olivier Crête 3503599e0a webrtcbin: Store pending mid to make create-offer idempotent
If the mid is not stored in the transceiver, but it is stored in
last_offer, then a further create-offer call will just ignore that
transceiver.

Also include unit test for ensure it doesn't regress.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2439>
2022-09-02 11:52:58 +02:00
Seungha Yang 37fdaaf8ff proxysink: Make sure stream-start and caps events are forwarded
There might be a sequence of event and buffer flow:
- Got stream-start/caps/segment events
- Got flush events
- And then buffers with a new segment event

In the above case, stream-start and caps event might not be reached to
peer proxysrc if peer proxysrc is not ready to receive them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:42:21 +09:00
Tim-Philipp Müller c895cdbec8 tests: skip unit tests for dependency-less elements that have been disabled
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2660>
2022-06-27 07:05:00 +00:00
Seungha Yang 72975fbd6d h264parser: Add an API for AVCDecoderConfigurationRecord parsing
Add a method for AVC configuration date parsing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2449>
2022-06-15 19:58:59 +00:00
Philippe Normand c287711418 webrtcbin: Add a prepare-data-channel GObject signal
This new signal allows data-channel consumers to configure signal handlers on a
newly created data-channel, before any data or state change has been notified.

The webrtcin unit-tests were refactored to make use of this new signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2427>
2022-06-07 11:29:33 +00:00
Olivier Crête 9fe2e1c5eb webrtcbin: Reject answers that don't contain the same number of m-line as offer
Otherwise, it segfaults later. Also add test to validate this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2526>
2022-06-03 20:28:19 +00:00
Brad Hards 804a6054bb h264parse: add unit test for Precision Time Stamp in SEI messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1458>
2022-06-03 08:29:05 +00:00
U. Artie Eoff becabd36da tests: va: add simple vacompositor test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2481>
2022-05-27 09:42:36 +00:00
Sherrill Lin f335b40ae8 webrtcstats: Update unit test for outbound rtp stats
"remote-id" is not guaranteed to present after commit 1deb034e3d.
Thus, we should not fail the test if "remote-id" is not found.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1998>
2022-05-26 10:54:59 +00:00
Sherrill Lin 3e7fb83393 webrtcstats: Improve selected candidate pair stats by adding ICE candidate info
The implementation follows w3.org specs:
* https://www.w3.org/TR/webrtc-stats/#icecandidate-dict*
* https://www.w3.org/TR/webrtc-stats/#candidatepair-dict*

Corresponding unit tests are also added.

Rebased and updated from
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1462

Fixes #1207

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1998>
2022-05-26 10:54:59 +00:00
Matthew Waters be2dfd0c36 webrtcbin: reuese the same fec/rtx/red payload types for the same media payload
WHen bundling, if multiple medias are used with the same media payload, then
each of the fec/rtx/red additions would add a distinct payload.  This could
very easily overflow the available payload space.

Instead, track the relationship between the media payload value and
the relevant fec/rtx/red payload values and reuse them whenever
necessary, even when bundling.

e.g.

...
a=group:BUNDLE video0 video1
m=video 9 UDP/SAVPF 96 97
a=mid:video0
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
...
m=video 9 UDP/SAVPF 96 97
a=mid:video1
a=rtpmap:96 VP8/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2474>
2022-05-24 10:21:11 +00:00
Víctor Manuel Jáquez Leal 5542dd395d jpegparse: Rewrite element.
Now it uses the JPEG parser in libgstcodecparsers, while the whole
code is simplified by relying more in baseparser class for tag
handling.

The element now signals chroma-format and default framerate is 0/1,
which is for still-images.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1473>
2022-05-20 08:51:23 +00:00
Víctor Manuel Jáquez Leal fa2b697389 tests: jpegparse: Mark data as static.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1473>
2022-05-20 08:51:23 +00:00
Seungha Yang be84fc23ca h265parser: Add a new NAL parsing API to handle malformed packets
Add gst_h265_parser_identify_and_split_nalu_hevc() method to
handle a case where packetized stream contains start-code prefix.
This new method behaves similar to exisiting gst_h265_parser_identify_nalu_hevc()
but it will scan start-code prefix to split given data into
NAL units.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2394>
2022-05-10 03:58:51 +09:00
Mengkejiergeli Ba efdd63d875 tests: Skip test if srtp element not built
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2383>
2022-05-06 09:13:31 +00:00
Stéphane Cerveau fcc6fa21e9 srtp: fix flaky unit test
Use different port for each test to avoid other UDP
packet to be received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2294>
2022-04-28 07:53:19 +00:00
Stéphane Cerveau 12776ba0fd srtp: add unit tests
Enable unit tests in meson.build
Add test_play_key_error to check the stats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2027>
2022-04-25 13:57:42 +00:00
He Junyan d824698561 test: Add test cases for the H265 bitwriter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1831>
2022-04-22 07:35:17 +00:00
Xavier Claessens b004464ac6 Remove glib and gobject dependencies everywhere
They are part of gst_dep already and we have to make sure to always have
gst_dep. The order in dependencies matters, because it is also the order
in which Meson will set -I args. We want gstreamer's config.h to take
precedence over glib's private config.h when it's a subproject.

While at it, remove useless fallback args for gmodule/gio dependencies,
only gstreamer core needs it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2031>
2022-04-01 16:32:17 +00:00
Sangchul Lee a801d6dd63 webrtcstats: Unify 'packets-lost' data type to int64
Previously, 'packets-lost' member of RTCReceivedRtpStreamStats had
a value of G_TYPE_INT from rtpsource or a value of G_TYPE_UINT64
from rtpjitterbuffer.
Because of the negative value of estimated amount of packets lost
in rtpsource as well as the description in
https://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats
it is fixed to set this value with G_TYPE_INT64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2049>
2022-03-31 05:37:39 +00:00
Matthew Waters 5bfe36746a webrtc: implement initial simulcast fec/rtx usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 831b34fb43 tests/webrtc: fix a use-after-free in test_data_channel_close
g_object_weak_ref() is not thread-safe and the data channel object's
refs/unrefs can happen on multiple threads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters f11e0e76c6 tests/webrtc: fix a race in the tests related to state tracking
If things progress fast enough, some state changes may not be seen be
the waiting code.

Fix by:
1. keeping a list of all the state changes
2. waiting checks each entry and if the relevant state is found, all
   states up to and including then are removed.

This ensures that any waits will see all the state sets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 5257093268 tests/webrtc: factor out src pad property checking to a separate function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 2377f8b3f2 webrtcbin: initial support for sending and receiving simulcast streams
Input (sink pads) is the already-ssrc-muxed stream with the relevant rtp
sdes header extensions already applied:
  - mid
  - stream-id
  - repaired-stream-id

Output (src pads) have the pads separated into individual ssrc's as
that's what rtpbin gives us.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00