Commit graph

92772 commits

Author SHA1 Message Date
Matthew Waters
50661c1aa9 qmlgl: don't critical on input events before input format has been set
Accessing the unset GstVideoInfo would result in criticals

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1065>
2021-08-27 13:34:01 +10:00
Mathieu Duponchelle
5bd31b8cce timecodestamper: add support for closedcaption input
Some closedcaption elements like sccenc except input buffers
to have timecode metas. The original use case is to serialize
closed captions extracted from a video stream, in that case
ccextractor copies the video time code metas to the closed
caption buffers, but no such mechanism exists when creating
a CC stream ex nihilo.

Remedy that by having timecodestamper accept closedcaption
input caps, as long as they have a framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2490>
2021-08-26 16:03:23 +00:00
Aaron Boxer
5cf4dc2b82 aes: add aes encryption and decryption elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1505>
2021-08-25 21:16:09 -04:00
Johan Sternerup
1a919a1e41 webrtcbin: Return typed "sctp-transport"
With GstWebRTCSCTPTransport type exposed we can now define
"sctp-transport" property as being of this type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2214>
2021-08-25 13:20:22 +00:00
Johan Sternerup
607ef6db60 webrtc: Split sctptransport into lib and implementation parts
GstWebRTCSCTPTransport is now made into into an abstract base class
that only contains property specifications matching the
RTCSctpTransport interface of the W3C WebRTC specification, see
https://w3c.github.io/webrtc-pc/#rtcsctptransport-interface. This
class is put into the WebRTC library to expose it for applications and
to allow for generation of bindings for non-dynamic languages using
GObject introspection.

The actual implementation is moved to the subclass WebRTCSCTPTransport
located in the WebRTC plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2214>
2021-08-25 13:20:22 +00:00
Johan Sternerup
7f9bb15055 webrtcbin: Expose SCTP Transport
Being able to access the SCTP Transport object from the application
means the application can access the associated DTLS Transport object
and its ICE Transport object. This means we can observe the ICE state
also for a data-channel-only session. The collated
ice-connection-state on webrtcbin only includes the ICE Transport
objects that resides on the RTP transceivers (which is exactly how it
is specified in
https://w3c.github.io/webrtc-pc/#rtciceconnectionstate-enum).

For the consent freshness functionality (RFC 7675) to work the ICE
state must be accessible and consequently the SCTP transport must be
accessible for enabling consent freshness checking for a
data-channel-only session.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2214>
2021-08-25 13:20:22 +00:00
Sebastian Dröge
5472252688 docs: Add Since marker to "twcc-feedback-interval" property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 11:53:58 +03:00
Havard Graff
32cdea7c73 docs: update with "twcc-feedback-interval"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Tulio Beloqui
266c2d0619 rtptwcc: changes to use rtp buffer arrival time and current time.
For TWCC we are more interested to track the arrival time (receive side)
and the current time (sender side) of the buffers rather than the
running time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Knut Inge Hvidsten
0440cb12de rtptwcc: add payloadtype to RTPTWCCPacket
The consumer of the stats can then separate between different media-types,
and do individual stats for each of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
8194ab13f7 rtptwcc: make enabling TWCC sticky
Meaning that if a caps comes along that does NOT have TWCC in it,
this does not turn of TWCC for the rest, as this is in fact
completely allowed. (To have some payload-types not containing TWCC
seqnums).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
b66c6714fa rtptwcc: move TWCC-logic over to the TWCC-manager
Prevent cluttering up the rtpsession, and keeping things localized.

Also write TWCC-seqnums for *all* streams in the session if configured by
caps.

A while back WebRTC was not doing TWCC for audio, basically breaking the
whole idea of a "transport-wide seqnuencenumber" applying for all bundled
streams. However, they have since fixed this, and now it no longers
makes sense to be able to single out certain payloadtypes for
use with TWCC, rather just including them all.

This also makes using RTX, RED, FEC etc much simpler, as it will apply
to them all as they enter the rtpsession.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
ee361bf958 rtptwcc: fix warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Tulio Beloqui
4ef0ce282e rtptwcc: fixes and optimizations around run-length chunks
Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
219749c40c rtptwcc: fix seqnum-wrap
Using the proper API to do this is obviously an improvement, and
adding a test for the case of a packet-loss when the seqnum wrap
is also a good idea.

Co-authored-by: Tulio Beloqui <tulio.beloqui@pexip.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Tulio Beloqui
3b14a24630 rtptwcc: fixed feedback packet count overflow that allowed late
packets to be processed

Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Tulio Beloqui
3484f21b95 rtptwcc: fixed parsing of old sequence number
Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Tulio Beloqui
abf4b57a1c rtptwcc: fixed guint8 overflow of feedback packet count
Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
be5fab15e0 rtptwcc: add feedback-interval
To allow RTCP TWCC reports to be scheduled on a timer instead of per
marker-bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
ddcde96efe rtptwcc: remove _set_send_packet_ts
Not in use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Havard Graff
c8400120f1 rtptwcc: make twcc-tests more deterministic
They were a bit racy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>
2021-08-25 08:36:06 +00:00
Olivier Blin
3823f94311 eglimage: fix redefinition of EGLuint64KHR
It is already defined in gst/gl/egl/gstegl.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1262>
2021-08-25 09:20:09 +02:00
Tim-Philipp Müller
67a49be61f openh264enc: fix broken header AU emission by base class
This encoder advertises alignment=au as output format, which means
each output frame should contain a full decodable access unit.

The video encoder base class is not aware of our output alignment
and will output spurious buffers with just the SPS/PPS inside when
we call gst_video_encoder_set_headers(), which is broken because
each buffer is supposed to contain a full decodable access unit
in our case.

Just don't tell the base class about our headers, they will be
sent at the beginning of each IDR frame anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2178>
2021-08-24 23:42:27 +01:00
Tim-Philipp Müller
90c1732849 openh264enc: fix caps and header buffer leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2178>
2021-08-24 23:42:27 +01:00
Tim-Philipp Müller
42a7edd40f openh264enc: fix broken sps/pps header generation
This was putting a truncated SPS into the initial header instead
of the PPS because it was always reading from the beginning of the
bitstream buffer (pBsBuf) and not from the offset where the current
NAL is at in the bitstream buffer (psBsBuf + nal_offset).

This was broken in commit 17113695.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1576

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2178>
2021-08-24 23:42:27 +01:00
Jan Alexander Steffens (heftig)
148ac71a1f pad: Keep IDLE probe hook alive during immediate callback
When the probe returns GST_PAD_PROBE_REMOVE and gets called concurrently
from the streaming thread while we're in the callback here, the hook has
already been destroyed by the time we've reacquired the object lock.
Consequently, cleanup_hook gets passed an invalid pointer.

Keep another reference to the hook alive to avoid this situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/873>
2021-08-24 15:13:19 +02:00
Tim-Philipp Müller
43f2fd8081 qtdemux: add depth for ProRes 4:4:4:4 variants if available
Might be 24bpp in case an alpha channel is coded but
the image is always opaque.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1061>
2021-08-24 12:35:47 +00:00
Ruslan Khamidullin
f510d48ecf qtmux: for Apple ProRes, allow overriding pixel bit depth for 4:4:4:4 variants
e.g. when exporting an opaque image, yet with alpha channel.

Apple ProRes certification requires that, when a ProRes-writing
application *knows* that the entire frame is opaque, the application
writes only RGB without alpha even when the clip is RGBA. For that,
this tiny change allows the app to override pixel depth when writing ProRes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1061>
2021-08-24 12:35:47 +00:00
Seungha Yang
c654f86859 video-converter: Add support for A420 to RGB fast path
Add fast path for A420 -> RGB format conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1245>
2021-08-24 11:09:28 +00:00
Havard Graff
068c2a71ba vpxdec: Fix direct rendering, avoid holding write access
When a buffer is pushed downstream, we should try not to hold the
buffer mapped with write access. Doing so would often lead to
an unneccesary memcpy later.

For instance, gst_buffer_make_writable() in
gst_video_decoder_finish_frame() will cause a memcpy because of
_memory_get_exclusive_reference().

We know that we can perform a two-step remap when using system
memory, as this will not cause the location of the memory to
change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/812>
2021-08-23 14:31:37 +00:00
Matthew Waters
6605174358 isomp4/mux: add a function for seeking to a specific output byte position
We do it enough times that this makes sense.  Also add a debug log line
for the seek position requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1060>
2021-08-23 04:17:36 +00:00
Matthew Waters
9dc5cb34ae isomp4/mux: don't overwrite with a bigger moov when fragmenting
When outputting fragmented mp4, with a seekable downstream, we rewrite
the moov to maybe add a duration to the mvex.  If we start by not
writing the initial moov->mvex->mhed duration and then overwrite with a
moov containing mhed atom, the moov's will have different sizes and
could overwrite subsequent data and result in an unplayable file.

e.g. The initial moov would be of size 842 and the final moov would have
a size of 862.

Fix by always pushing out the mhed duration in the moov when
fragmenting.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/898

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1060>
2021-08-23 04:17:36 +00:00
Matthew Waters
0d27e6f86e isomp4: actually make streamable fallback work
We weren't setting the fragment_mode field anymore now that the
implementation doesn't change based on the value of the streamable
property.  This lead to invalid files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1060>
2021-08-23 04:17:36 +00:00
Matthew Waters
d806486503 isomp4: fix trun data offset handling
The trun offset was missing a calculation for one of the box type
headers.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/866

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1060>
2021-08-23 04:17:36 +00:00
Matthew Waters
467829358c isomp4/mux: fixes for fragmented mp4 output
Various buffer offset calculations were not quite correct in all cases.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/866

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1060>
2021-08-23 04:17:36 +00:00
Seungha Yang
fe4ec03a4b d3d11bufferpool: Hide buffer_size field from header
User can get the required buffer size by using buffer pool config.
Since d3d11 implementation is a candidate for public library in the future,
we need to hide everything from header as much as possible.

Note that the total size of allocated d3d11 texture memory by GPU is not
controllable factor. It depends on hardware specific alignment/padding
requirement. So, GstD3D11 implementation updates actual buffer size
by allocating D3D11 texture, since there's no way to get CPU accessible
memory size without allocating real D3D11 texture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2482>
2021-08-22 00:46:19 +09:00
Seungha Yang
1874206abd nvcodec: Fix various typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2481>
2021-08-21 13:09:15 +00:00
Seungha Yang
4ed4a7ed7e nvcodec: Get rid of G_GNUC_INTERNAL
Our default symbol visibility is hidden, so G_GNUC_INTERNAL
is pointless

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2481>
2021-08-21 13:09:15 +00:00
Nicolas Dufresne
4eb22b7695 v4l2codecs: h264: Fix split field handling
Split fields ends up on multiple picture and requires accessing the
other_field to complete the information (POC).

This also cleanup the DPB from non-reference (was not useful) and skips
properly merge field instead of keeping them duplicated. This fixes most
of interlace decoding seen in fluster.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2474>
2021-08-20 19:29:53 +00:00
Nicolas Dufresne
ad5dcfb091 v4l2codec: h264: Implement support for split fields
When a frame is composed of two fields, the base class now split the
picture in two. In order to support this, we need to ensure that picture
buffer is held in VB2 queue so that the second field get decoded into
it. This also implements the new_field_picture() virtual and sets the
previous request on the new picture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2474>
2021-08-20 19:29:53 +00:00
Seungha Yang
f5a79ce05f compositor: Fix crash while drawing background and/or blending for subsampled YUV
Fix crash caused by out-of-bounds memory accesses when drawing
background and/or blending. This fix is conceptually identical to the
approach as the commit of 8ff5079e5e

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1229>
2021-08-21 01:19:06 +09:00
Nicolas Dufresne
0b05b9b3e6 v4l2codecs: h264: Fix filling weight factors
This was a typo, the wrong index was used to set l1 weight (b-frames).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2480>
2021-08-20 16:03:43 +00:00
Edward Hervey
637b0d8dc2 concat: Properly propagate seqnum of segment events
Was broken by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/871>
2021-08-20 16:35:53 +02:00
Mathieu Duponchelle
ebb6b9778a encoding-profile: ignore more encoding private fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1249>
2021-08-20 14:20:25 +00:00
Thibault Saunier
acf98372a3 smartencoder: Respect user stream-format when specified
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1249>
2021-08-20 14:20:25 +00:00
Mathieu Duponchelle
4aa72cea4f smartencoder: clean up and extend accepted formats
* Add support for H265

* Don't overwrite original codec_data / streamheader in the output
  caps, but instead allow them to change and send them to the
  combiner at the right moment: encoder caps, reencoded GOP,
  original caps, original GOP(s), and potentially encoder caps
  and rencoded last GOP.

* For H264 / H265, force usage of a format with inband SPS / PPS
  (avc3 / hev1), this is cleaner than misadvertising avc1, hvc1 and
  some muxers like mp4mux will actually advertise both differently.

  Unfortunately, while mp4 supports updating the codec_data and using
  avc1 with no in-band SPS / PPS updates, it turns out some decoders
  (eg chrome / firefox) don't handle this particularly well and stop
  decoding after the reencoded GOP. We could expose a switch to
  force usage of avc1 / hvc1 nevertheless, but for now stick to
  requiring that the parser output SPS / PPS in-band with
  config-interval=-1 (that has not changed)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1249>
2021-08-20 14:20:25 +00:00
Edward Hervey
e9996be658 dashdemux: Properly initalize GError
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2476>
2021-08-20 14:35:43 +02:00
Seungha Yang
1ae8b61ec0 compositor: Add "max-threads" property
Adding new property for user to be able to set expected the maximum
number of blend task threads. This can be useful in case that user
wants to restrict the number of parallel task runners for system
resource management or debugging/development purpose.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1242>
2021-08-20 18:43:26 +09:00
Théo MAILLART
adc565ff4a tests: elementfactory: add element creation tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>
2021-08-20 01:41:30 +00:00
Théo MAILLART
aadf84837b elementfactory: enable construct only property passing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>
2021-08-20 01:41:30 +00:00