Commit graph

112906 commits

Author SHA1 Message Date
Stéphane Cerveau
176a00985a mpegpsdemux: fix accurate seek
In an accurate seek, the segment start should be
the same as the one requested in the seek.
The start should be kept as the one from the
segment if its inferior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2048>
2021-03-22 12:54:14 +01:00
Stéphane Cerveau
497e88ae88 mpegpsdemux: Keep seqnum events
Keep the same seqnum of the new segment events for each
of the streams.
Keep the segment to send the EOS event.
Keep the seek seqnum for segment and flush event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2048>
2021-03-22 12:54:14 +01:00
Stéphane Cerveau
96467f581e mpegpsdemux: avoid early EOS
In a case of a scr different from 0, after a seek,
the src_segment.stop has been updated with the duration
not including the base_time (scr). The segment position
needs to be tested upon segment.stop + base_time (scr)
to check for an EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2048>
2021-03-22 12:54:14 +01:00
Víctor Manuel Jáquez Leal
32fa99d3e0 va: postproc: disable passthrough as soon as possible
After the VA filter creation, when changing the element's state from NULL
to READY, immediatly checks for any filter operation requested by the user.
If any, the passthrough mode is disabled early, so there's no need for a
future renegotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2094>
2021-03-22 09:34:15 +01:00
Víctor Manuel Jáquez Leal
594c1450da va: postproc: rename function to gst_va_vpp_update_passthrough
Since it's widely used, a proper name will reflect its importance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2094>
2021-03-22 09:33:58 +01:00
He Junyan
993d46bb2f decoder: H265: Enable cu_qp_delta_enabled_flag when ROI
If ROI is enabled, the CUs within the ROI region may have different
QP from the other part of the picture. This needs us to enable the
cu_qp_delta_enabled_flag even in the CQP mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/419>
2021-03-22 13:43:01 +08:00
Matthew Waters
640a65bf96 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2098>
2021-03-22 14:34:36 +11:00
Matthew Waters
eb06907fb4 gl/wayland: provide a dummy global_remove function
Even if we don't care about any global objects being removed, wayland
will still error if globals are removed without a corresponding listener
set up for them.  e.g. wl_output hotplugging

Discovered by: Matthias Clasen

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1079>
2021-03-22 14:05:27 +11:00
Hou Qi
4c6ff9fb58 v4l2object: Add support for hdr10 stream playback
Colorimetry of hdr10 video is bt2100-pq with transfer as
GST_VIDEO_TRANSFER_SMPTE2084. So map GST_VIDEO_TRANSFER_SMPTE2084
to V4L2_XFER_FUNC_SMPTE2084 to support hdr10 stream playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/888>
2021-03-22 09:15:54 +08:00
Jan Schmidt
0444cf8fcc gstgiosrc: Don't leak scheme string in gst_gio_src_query()
Add a g_free() in the code path that forwards the query to the parent
handler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1078>
2021-03-21 06:14:37 +00:00
Sid Sethupathi
0a0333d9e4 shapewipe: fix broken link in docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/916>
2021-03-20 12:33:55 -05:00
Seungha Yang
e22befad2e mfvideoenc: Enable Direct3D multi-thread protection
As documented by MS. See also
https://docs.microsoft.com/en-us/windows/win32/medfound/supporting-direct3d-11-video-decoding-in-media-foundation#open-a-device-handle

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2095>
2021-03-20 17:54:04 +09:00
Seungha Yang
824b0ce0f4 Revert "d3d11: Enable native multi-thread protection layer and make use of it"
This reverts commit 872b7f503c.

Native multi-thread protection layer seems to be consuming more CPU
resource than application side protection approach in some cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2095>
2021-03-20 17:53:58 +09:00
Bing Song
d7de78e554 encodebin: handle video encoder preset fail.
Check video encoder preset before request muxer pad as MOV/MP4 don't
support addition/removal of tracks at random times.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1064>
2021-03-19 12:43:59 +00:00
Stéphane Cerveau
178c7d2732 device provider: add custom register macro
This macro allows to register a device provider with
a custom function which gives more flexibility when
registering it (see v4l2 register).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/773>
2021-03-19 10:15:49 +00:00
Sebastian Dröge
747eaf3634 rtspclientsink: Don't run signal class handlers during the CLEANUP stage
It's sufficient to run them during the FIRST stage instead of in both.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/193>
2021-03-19 10:36:20 +02:00
Matthew Waters
d270654c48 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/418>
2021-03-19 19:03:54 +11:00
Alba Mendez
20e80f1473 rtspsrc: Fix more signals
Behaviour change in GLib causes select-stream signal to discard
the value returned by handlers. See !909 for more info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/912>
2021-03-19 07:23:42 +00:00
Matthew Waters
e463bcfadf tests/webrtc: check for more sdp things across the board
e.g.

- test for a=setup:$val and direction attributes in all tests
- test number of media sections
- test number of formats in each m= section (for audio/video)
- test no duplicate formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2093>
2021-03-19 18:02:21 +11:00
Matthew Waters
10a461daf4 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/150>
2021-03-19 17:31:51 +11:00
Matthew Waters
083ae2b8ed gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/234>
2021-03-19 17:21:22 +11:00
Matthew Waters
8d4a815577 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/238>
2021-03-19 17:17:00 +11:00
Matthew Waters
98249a57db gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1073>
2021-03-19 04:20:19 +00:00
Matthew Waters
6399179d7a gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/78>
2021-03-19 15:17:05 +11:00
Matthew Waters
3d887c7f07 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/775>
2021-03-19 04:15:19 +00:00
Julien
e9f5d94c93 gs: add source and sink for Google Cloud Storage
Useful when having a service that runs a GStreamer pipeline
or application in Google Cloud to avoid storing the inputs
and outputs in the running container or service. For example
when analyzing a video from a Google Cloud Storage bucket
and extracting images or converting the video and then uploading
the results into another Google Cloud Storage bucket.

- gssrc allows to read from a file located in Google Cloud
Storage and it supports seeking.
- gssink allows to write to a file located in Google Cloud
Storage. There are 2 modes, one similar to multifilesink and
the other similar to filesink.

Example:
  gst-launch-1.0 gssrc location=gs://mybucket/videos/sample.mp4 ! decodebin ! glimagesink
  gst-launch-1.0 playbin uri=gs://mybucket/videos/sample.mp4
  gst-launch-1.0 videotestsrc num-buffers=5 ! pngenc ! gssink object-name="img/img%05d.png" bucket-name="mybucket" next-file=buffer
  gst-launch-1.0 filesrc location=sample.mp4 ! gssink object-name="videos/video.mp4" bucket-name="mybucket" next-file=none

When running locally simply set GOOGLE_APPLICATION_CREDENTIALS. But
when running in Google Cloud Run or Google Cloud Engine, just set the
"service-account-email" property on each element.

Closes #1264

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1369>
2021-03-18 22:32:48 +00:00
Seungha Yang
872b7f503c d3d11: Enable native multi-thread protection layer and make use of it
... instead of our own GRecMutex locking. In this way, any other
Direct3D11 client (MediaFoundation for example) can safely call
any Direct3D11 API even when we are sharing our Direct3D11 device
with others.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2092>
2021-03-18 16:37:37 +00:00
Jan Schmidt
0d36dcab4e examples: Add an mpegtsmux example of prog-map usage.
Add an example of how to construct the prog-map structure for
the MPEG-TS muxers and assign streams to programs, and set PCR
and PMT PIDs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2039>
2021-03-18 15:07:53 +00:00
Jan Schmidt
18a095ca63 mpegtsmux: Add PMT_%d support to prog-map.
Support a PMT_%d field in the prog-map, that's optionally used
to set the PMT for each program in the mux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2039>
2021-03-18 15:07:53 +00:00
Stéphane Cerveau
00a71112c0 vorbis: fix debug category init
During the element splitting process,
the debug category initialization has
been dropped accidently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1074>
2021-03-18 15:59:34 +01:00
Seungha Yang
69e6cd773a clocksync: Add a new property "sync-to-first" for automatic ts-offset setup
Add a new property so that clocksync can setup "ts-offset" value
based on the first buffer and pipeline's running time when the
first arrived. Newly update "ts-offset" in this case would be
a value that allows outputting the first buffer without clock waiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/702>
2021-03-18 14:22:44 +00:00
Jan Schmidt
5e4a11bf36 mpegtsmux: Don't write PCR until PAT/PMT are output.
Make sure streams start cleanly with a PAT/PMT and defer the first PCR
output until after that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
2021-03-18 13:57:27 +00:00
Mathieu Duponchelle
b7e9e606a9 tsmux: finalize PCR timing for complete accuracy
In order to always insert a PCR packet right on time, we need to
check whether one is needed when outputting any packet, not only
a packet for the PCR stream. Most of the PCR packets will remain
data-carrying packets, but as a last resort we may insert stuffing
packets on the PCR stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
2021-03-18 13:57:27 +00:00
Jan Schmidt
3201575d2a mpegtsmux: Improve PCR/SI scheduling.
Change PCR / SI scheduling so that instead of checking if
the current PCR is larger than the next target time, instead
check if the PCR of the next packet would be too late, so PCR
and SI are always scheduled earlier than the target, not later.

There are still cases where PCR can be written too late though,
because we don't check before each output packet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
2021-03-18 13:57:27 +00:00
Jan Schmidt
49c61338d6 tsmuxstream: Fix comment typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
2021-03-18 13:57:27 +00:00
Matthew Waters
612102fdbc gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/911>
2021-03-18 19:52:53 +11:00
Mathieu Duponchelle
08442cc792 cccombiner: implement scheduling
Prior to that, cccombiner's behaviour was essentially that of
a funnel: it strictly looked at input timestamps to associate
together video and caption buffers.

This patch instead exposes a "schedule" property, with a default
of TRUE, to control whether caption buffers should be smoothly
scheduled, in order to have exactly one per output video buffer.

This can involve rewriting input captions, for example when the
input is CDP sequence counters are rewritten, time codes are dropped
and potentially re-injected if the input video frame had a time code
meta.

Caption buffers may also get split up in order to assign captions to
the correct field when the input is interlaced.

This can also imply that the input will drift from synchronization,
when there isn't enough padding in the input stream to catch up. In
that case the element will start dropping old caption buffers once
the number of buffers in its internal queue reaches a certain limit
(configurable).

The property is exposed so that existing users of cccombiner can
revert back to the original behaviour, but should eventually be
removed, as that behaviour was simply inadequate.

This commit also disallows changing the input caption type, as
this would needlessly complicate implementation, and removes
the corresponding test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2076>
2021-03-17 22:00:25 +00:00
Olivier Crête
c6a98609e5 aggregator: Release the SRC lock while querying latency
This is required because the query could be intercepted and the
application could send any other requests to the element from this
thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/771>
2021-03-17 14:13:27 +00:00
Stéphane Cerveau
f25ceab46f audioconvert: update doc for mix-matrix
No need for specific cast in mix-matrix
syntax.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1072>
2021-03-17 14:26:54 +01:00
Seungha Yang
80792e12d4 d3d11: Use render-target and shader-resource bind flags by default
Even if bind flags is not needed by an element, other element
might need such bind flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2091>
2021-03-17 22:17:22 +09:00
Mathieu Duponchelle
12661d90a3 value: fix parsing of explicit value casts
Since acdb4ce03d , parsing of the
value for a property can use the pspec to determine what type
a value should be casted to.

However, this broke the case where the value is explicitly casted
to a type (eg <(float) 0.0>). In that situation, we want to respect
the casting decision, and only use the pspec to perform "implicit"
casts.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/772>
2021-03-17 14:11:39 +01:00
Nirbheek Chauhan
95ef0a1df8 Update docs cache and fix before-send signal doc syntax
The docs for before-send were missing because of this

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/909>
2021-03-17 15:55:30 +05:30
He Junyan
805ff6346a va: vpp: Fix features lost in transform_caps().
When we transform the caps from the sink to src, or vice versa, the
"caps" passed to us may only contain parts of the features. Which
makes our vpp lose some feature in caps and get a negotiation error.
The correct way should be:
Cleaning the format and resolution of that caps, but adding all VA,
DMA features to it, making it a full feature caps. Then, clipping it
with the pad template.

fixes: #1551

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2081>
2021-03-17 10:25:11 +01:00
Nirbheek Chauhan
73fb107a85 rtspsrc: Fix accumulation of before-send signal return values
Since glib 2.62, the accumulated return values in RUN_CLEANUP override the
accumulated return values in RUN_FIRST. Since:

1. We have a default handler that always returns TRUE, and
2. User handlers are only run in RUN_FIRST, and
3. Our accumulator just takes the latest return value

We were discarding the return value from the user handler and always
sending messages even if the user handler said not to. See
https://gitlab.gnome.org/GNOME/glib/-/issues/2352 for more details.

This signal does not need RUN_CLEANUP or RUN_FIRST, so just change it
to RUN_LAST so that it's emitted exactly once and accumulated once.

With this fix, this signal can now be used to intercept PAUSE when
going to GST_STATE_NULL so that the server does a TEARDOWN (if
necessary) and not a PAUSE, which will confuse other RTSP clients when
playing shared media.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/909>
2021-03-17 14:05:44 +05:30
Nirbheek Chauhan
55edd59f48 Revert unusable workaround for PAUSE being sent when going NULL
Directly setting rtspsrc to the NULL state before putting the pipeline
in the NULL state usually works, but it can cause a deadlock in some
cases, so it's not a reliable mechanism to fix this.

This reverts commit f37afdafff:
"rtspsrc: Fix state changes from PAUSED to PLAYING"

and commit 76d624b2df:
"rtspsrc: Do not send PAUSE command when going to GST_STATE_NULL"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/908>
2021-03-17 14:04:16 +05:30
Sebastian Dröge
00e73e1657 rtpjitterbuffer: Fix parsing of the mediaclk:direct= field
Due to an off-by-one when parsing the string, the most significant digit
or the clock offset was skipped when parsing the offset.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/907>
2021-03-16 18:02:48 +00:00
Stéphane Cerveau
930877b022 ogg: element_init returns void
no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
a750bc8f23 playback: element_init returns void
no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
d8e00a4ff9 ogg: element_init returns void
no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00
Stéphane Cerveau
a06be2e81a alsa: element_init returns void
no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:59:00 +00:00