Commit graph

112906 commits

Author SHA1 Message Date
Olivier Crête
be84cc2c54 webrtcbin: Remove unused session_mid_map
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
08dd305a20 webrtcbin: Enforce m-line restrictions when creating offer
First fail the offer creation if the mid of an existing offer doesn't
match a forced m-mline.

Then, for all newly added mlines, first look for a transceiver that
forces this m-line, then add a "floating" one, then the data channel.
And repeat this until we're out of transceivers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
ed1f0f33a2 webrtcbin: Remember if a transceiver had a forced m-line
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
92d356d4b0 webrtcbin: Enforce same-kind on request sink pad with a specific name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
249b2d54d7 webrtcbin: Enforce compatible caps on pad request
If a pad is requested with certain caps and there is already a
transceiver, reject the pad request if the caps don't match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
902e40cae2 webrtcbin: Reject pad request for a specific m-line if it already exists
This way, the app developer is in control.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
0e2d128bec webrtcbin: Make request-pad validation an early return
This reduces the indendation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
0f758a1730 webrtcbin: Add document for webrtcbin itself to generated doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
d49e664c84 webrtcbin test: Test adding a stream to a stream+datachannel
This use-case was previously broken by the expectation of having
a 1-1 match between the pad id and the m-line index

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
3be72a6c86 webrtc: Reset received_caps when releasing pad
This is to work around a race where the pad is accessed in the
webrtc main thread while being released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
b6114a7fed webrtcbin: Split pad name from mline
The simple case where this breaks is if you add a
datachannel and want to add a new pad (a new media) after). Another
case where this is broken is if the order of the media is forced to
something different by the peer.

It's more simple to just split both things completely. In practice, the
pads will be named in the order in which they are allocated, so it
shouldn't change the current behaviour, just enable new ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:06 -04:00
Jan Schmidt
bd9f675318 switchbin: When collecting srcpad caps, don't intersect with path caps.
The path caps describe the input caps that will select each path, don't
intersect those with the srcpad caps, which could be completely
different. Instead, when querying allowed caps for the srcpad, just
construct the union of all possible output caps from all path srcpads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2018>
2021-04-12 14:27:00 +00:00
Jan Schmidt
1f865246c1 switchbin: Don't report sink pad caps for src pad queries.
When handling a caps query on the src pad, don't return the union
of input caps. Even when not active, a path element can be queried
for srcpad template caps, or for dropping paths the allowed downstream
caps is anything - as data will be dropped anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2018>
2021-04-12 14:27:00 +00:00
Jan Schmidt
fae29cb3c2 qtmux: Protect against writing absurd sample durations
If the input DTS goes backward or is missing, the calculated
sample duration goes negative and wraps around to a very big
number. In that case, just write a sample with a duration of
0 and hope the problem is transient.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/914>
2021-04-13 00:18:36 +10:00
Mathieu Duponchelle
c17781e1a9 playbin{2,3}: fix base_time selection when flush seeking live
This is a direct translation of
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/429>,
as playbin{2,3} insulates its sub groups state changes from the pipeline
base class, it needs to track whether the subgroup is live itself,
and handle RESET_TIME the same way GstPipeline does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1104>
2021-04-12 12:43:53 +00:00
Doug Nazar
b500ac31ab tests: Remove invalid buffer test in test_get_allowed_caps.
Passing a non-GObject pointer causes SIGSEGV on certain architectures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/790>
2021-04-12 10:15:47 +00:00
Doug Nazar
d323942999 leaks: Fix SIGSEGV detecting object type.
G_IS_OBJECT & GST_IS_OBJECT work by following pointers which is unsafe
on certain architectures. GstMiniObject detection however does a lookup
to see if it's a valid type derived from G_TYPE_BOXED.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/791>
2021-04-12 05:18:25 -04:00
Doug Nazar
a273573d1e overlaycomposition: Fix test for big endian.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1103>
2021-04-12 04:39:49 -04:00
Nirbheek Chauhan
590fbb4ddd rtspsrc: De-dup seek event seqnums to avoid multiple seeks
Seek events are sent upstream on each sink, so if we receive multiple
seeks with the same seqnum, we must only perform one seek, not N seeks
where N = the number of sinks in the pipeline connected to rtspsrc.

This is the same thing done by demuxers like qtdemux or matrsokademux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/938>
2021-04-12 03:32:08 +00:00
Nirbheek Chauhan
57e4eab72d rtspsrc: Using multicast UDP has no relation to seekability
The transport has no relation to whether a media can be seeked. The
range response having a duration is the correct thing to check for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/939>
2021-04-12 02:56:44 +00:00
Nirbheek Chauhan
b1dcbf393b rtspsrc: Add more logging for range parsing and seekable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/939>
2021-04-12 02:56:44 +00:00
Nirbheek Chauhan
192fe04d8a installing: Add some docs for CI setup of cerbero
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/151>
2021-04-12 08:20:41 +05:30
Nirbheek Chauhan
2ebc27b5e9 installing: Document how to build gstreamer releases with cerbero
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/151>
2021-04-12 08:20:41 +05:30
Nirbheek Chauhan
54e1dbd613 installing: Clarify when to use Meson and when to use Cerbero
It seems people are getting confused by this and thinking that Meson
replaces Cerbero.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/151>
2021-04-12 08:20:41 +05:30
Nirbheek Chauhan
35b3a4ab25 installing: Update the documentation for building with Cerbero
This was horrendously out of date. Copy over the instructions from
Cerbero's README file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/151>
2021-04-12 08:20:41 +05:30
Edward Hervey
ce79200376 subprojects: Update glib to 2.68 and glib-networking to 2.66 branch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/143>
2021-04-12 00:14:20 +01:00
Tim-Philipp Müller
5b754c381c gl: fix up Since markers for newly-added _get_type() functions
Follow-up to !999 which wasn't backported into 1.18 in the end
after all.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/857

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1101>
2021-04-11 23:50:35 +01:00
Stéphane Cerveau
891be51105 gst-plugins: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2110>
2021-04-11 16:16:55 +00:00
Helmut Januschka
7f60138ef6 allow NetStream.Play.PublishNotify Message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2154>
2021-04-10 20:34:26 +02:00
Chris White
c711c8ed39 allocator: add gst_allocation_params_new()
This permits creating GstAllocationParams instances on the heap, which
is useful for language bindings that can handle GBoxed types.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/683

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/788>
2021-04-10 10:46:28 -04:00
Sebastian Dröge
af5abe43d0 videocrop: Update documentation cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 14:48:02 +03:00
Markus Ebner
7276b0f9d1 videocrop: Add support for GBR* video formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 11:26:59 +00:00
Markus Ebner
e31cbce4d5 videocrop: Added support for planar pixel formats > 8bits
- Added support for planar pixel formats with depths greater than 8bits
  to transform_planar implementation
- Added a whole lot of new pixel formats to the support-list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 11:26:59 +00:00
Markus Ebner
3ba8abb056 videocrop: Move supported format list into private header
- Moved declaration of supported pixel formats to private header, which
  can be shared between videocrop and aspectvideocrop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/515>
2021-04-10 11:26:59 +00:00
Stéphane Cerveau
da9e012e8a plugins-sys: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2116>
2021-04-09 19:23:40 +00:00
Seungha Yang
fee725f3cc codecs: vp9decoder: Update docs
* Remove "FIXME 1.20": All the bits are addressed already by using
  vp9parse element
* Fix copy & paste errors: Some comments were copied from h264decoder
  blindly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2151>
2021-04-09 12:13:24 +00:00
Seungha Yang
f7a341a1f0 codecs: vp9decoder: Make duplicate_picture() vfunc optional
The default implementation was required when superframe parsing
was handled by vp9decoder. For instance, if a superframe consists
of multiple frames with show_existing_frame header, it was vague
that which GstVp9Picture should consume GstVideoCodecFrame.

After 1.18 release, we introduced vp9parse element and
superframe should be handled by upstream vp9parse elemenet now.
So, we don't need to care about the superframe at vp9decoder class
level anymore. Simply, a frame corresponding to show_existing_frame
can be dropped if subclass doesn't implement duplicate_picture().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2151>
2021-04-09 12:13:24 +00:00
Philippe Normand
933ebba435 debugutils: Add fakeaudiosink element
This element can be useful for CI purposes on machines not running any system
audio daemon. The element implements the GstStreamVolume interface.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2125>
2021-04-09 08:13:12 +00:00
Robin Burchell
1a1a885db4 gstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()
As the comment asked, yes, incomplete writes can happen.
I have encountered this with an sshfs mount, for example.

It seems like g_output_stream_write_all() is designed to handle this case,
by not returning until the requested buffer has been completely written,
or an error occurs, which seems to match up with the desired behaviour.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/885

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1100>
2021-04-09 07:35:07 +00:00
Nirbheek Chauhan
c8827acb93 rtpjitterbuffer: More logging when calculating rfc7273 timestamps
This code can be fragile, since it is very exacting in the timestamps
that it will accept. Add more logging so it's easier to debug issues
and figure out whether it's a bug in the calculation or something
wrong in the incoming buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/934>
2021-04-09 12:48:02 +05:30
Adam Leppky
a059031d02 titleclip: Expose draw-shadow child property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/235>
2021-04-08 15:35:30 -05:00
Nicolas Dufresne
f992c521c3 v4l2codecs: allocator: Keep dmabuf mapped
DMABuf allocator already implements DMABuf Sync, meaning that doing
mmap/munmap (unless the mode have changed) is not required. In fact, on
systems with IOMMU it makes the kernel redo the mmu table which is visible
in the CPU usage.

This change reduces CPU usage when decoding
bbb_sunflower_2160p_60fps_normal.mp4 on RK3399 SoC from over 30% to
around 15%.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2152>
2021-04-08 15:22:49 -04:00
Víctor Manuel Jáquez Leal
07a0b63472 va: allocator: Implement mem_copy for VA memory.
Implementation of mem_copy() virtual method for GstVaAllocator.

It's a deep copy where a new VA memory is popped out from the pool or,
if pool is empty, a new memory is allocated. The original memory is
mapped to read, and if its VAImage is not derived and size to copy is
the whole surface, the mapped VAImage of the original memory is put in
the new memory. Otherwise a slow memcpy is done between both memories.

Fixes: #1568
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2136>
2021-04-08 16:34:06 +00:00
Zhao Zhili
57d8de68d1 srtobject: fix optlen of srt_getsockflag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2149>
2021-04-08 20:30:20 +08:00
Stéphane Cerveau
0935c7efbb rtp: missing debug init after element splitting
- h264depay
- h265depay
- sv3vdepay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/936>
2021-04-08 14:02:46 +02:00
Nirbheek Chauhan
468232b6bc git-update: Make fetching of external repos non-fatal on the CI
Fixes intermittent failures when external repos have downtime. This is
common with GNOME Gitlab. Only error out on CI if a FDO gitlab repo
fails to fetch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/240>
2021-04-08 15:21:07 +05:30
Michal Dzik
8e8b22174d rtp: rename gst_rtp_sbc_pay_flush_buffers()
gst_rtp_sbc_pay_flush_buffers() is a misleading name. A better name would
be gst_rtp_sbc_pay_drain_buffers(), because that's what it does, it drains
any leftover queued data and pushes it downstream. "Flushing" in GStreamer
typically means to throw away any queued data and not process/push it
downstream.

Signed-off-by: Michal Dzik <michal.dzik@streamunlimited.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/700>
2021-04-08 08:46:34 +00:00
Michal Dzik
680722bbfa rtp: fix adapter flushing in sbc payloader
GstAdapter must be flushed in some cases (flush, new segment, state change)
Without it, it may, for example, push some leftover buffer from old
segment in new segment. This, in general, breaks timestamps.
See GstAdapter documentation for more.

Signed-off-by: Michal Dzik <michal.dzik@streamunlimited.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/700>
2021-04-08 08:46:34 +00:00
Seungha Yang
b70e83c409 clockoverlay: Fix broken string formatting by strftime() on Windows
Like other foobarA variant APIs on Windows, formatted string
by strftime() is ANSI string, not unicode encoded one.
It would be problematic for non-english locale systems.
We should use unicode version API (wcsftime in this case)
whenever it's possible on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1093>
2021-04-08 08:27:53 +00:00
Doug Nazar
1d5ad7d1da audio/alsa: Exit write loop if underlying device is already paused.
If the alsasink thread starts the write loop but another thread pauses
the underlying alsa device, the sink thread will endlessly loop.

snd_pcm_writei() will return 0 if the state is SND_PCM_STATE_PAUSED
and the loop will never make any progress.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1097>
2021-04-08 07:28:21 +00:00