Commit graph

113094 commits

Author SHA1 Message Date
Sebastian Dröge
4efdb40f43 webrtcbin: When creating a new transceiver as part of creating the answer also take its codec preferences into account
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
2021-06-25 09:45:24 +00:00
Sebastian Dröge
b7951fb897 webrtcbin: Fix a couple of caps leaks of the offer caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
2021-06-25 09:45:24 +00:00
Philippe Normand
0f492a39c9 webrtcbin: Stop transceivers update after first SDP error on data channel
When invalid SDP is supplied, _update_data_channel_from_sdp_media() sets the
GError, so it is invalid to continue any further SDP processing, we have to exit
early when the first error is raised.

This change is similar to the one applied in
064428cb34.
See also #1595

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2356>
2021-06-25 05:12:37 +00:00
Olivier Crête
38e906de5d rtpmanager: Access GstRTPHdrExt fields through accessor
This way, the implementation can be private.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1017>
2021-06-24 14:57:14 -04:00
Olivier Crête
239320e190 Update webrtc bindings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/merge_requests/29>
2021-06-24 14:54:53 -04:00
Olivier Crête
71052f0321 webrtcbin test: Fix race in new test
Pull a buffer from a sink to make sure that the caps are already
set before trying to update them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2348>
2021-06-24 09:41:09 +00:00
Sebastian Dröge
81bd8913b5 basesrc: Print segments with GST_SEGMENT_FORMAT and not GST_PTR_FORMAT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/842>
2021-06-24 07:01:38 +00:00
Per Förlin
30f88aa7c8 gstrtspconnection: Add IPv6 support for tunneled mode
An IPv6 address must be specified within [] brackets.
Add brackets for IPv6 address used for tunneled mode,
for non-tunneled this is already supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1145>
2021-06-24 06:10:19 +00:00
Mengkejiergeli Ba
85c17f6c23 msdk: fix qp range for vp9enc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2349>
2021-06-24 01:30:18 +00:00
Nicolas Dufresne
be6793d0d1 videodecoder: Call drain() rather then finish() on segment-done
The finish() virtual function documentation state that "Sub-classes can refuse
to decode new data after." Though, it is very common to issue a non-flushing
seek after that event in gapless playback uses case. This fixes potential
stalls with code using segment seeks, by using drain() virtual funciton
instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1206>
2021-06-23 20:31:06 +00:00
Sebastian Dröge
1d4ecd0bde avwait: Don't consider it a segment change if the segment is the same except for the position
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2319>
2021-06-23 16:03:38 +00:00
Seungha Yang
7c94b9c4b0 d3d11: Add support for GRAY and more YUV formats
By this commit, following formats will be newly supported by d3d11 elements

* Y444_{8, 12, 16}LE formats:
  Similar to other planar formats. Such Y444 variants are not supported
  by Direct3D11 natively, but we can simply map each plane by
  using R8 and/or R16 texture.
* P012_LE:
  It is not different from P016_LE, but defining P012 and P016 separately
  for more explicit signalling. Note that DXVA uses P016 texture
  for 12bits encoded bitstreams.
* GRAY:
  This format is required for some codecs (e.g., AV1) if monochrome
  is supported
* 4:2:0 planar 12bits (I420_12LE) and 4:2:2 planar 8, 10, 12bits
  formats (Y42B, I422_10LE, and I422_12LE)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2346>
2021-06-23 15:35:36 +00:00
Sebastian Dröge
52a0c36598 tsmux: When selecting random PIDs, name the pads according to those PIDs
Some elements will make use of the automatically generated names to
create new pads in future muxer instances, for example splitmuxsink.

Previously we would've created a pad with a random pid that would become
"sink_0", and then on a new muxer instance a pad "sink_0" and tsmux
would've then failed because 0 is not a valid PID.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2318>
2021-06-23 14:59:43 +00:00
Seungha Yang
ba26a5aea8 mfvideoenc: Enhance B-frame timestamp handling
When B-frame is enabled, encoder seems to adjust PTS of encoded sample
by using frame duration.

For instance, one observed timestamp pattern by using B-frame enabled
and 30fps stream is:
* Frame-1: MF pts 0:00.033333300 MF dts 0:00.000000000
* Frame-2: MF pts 0:00.133333300 MF dts 0:00.033333300
* Frame-3: MF pts 0:00.066666600 MF dts 0:00.066666600
* Frame-4: MF pts 0:00.099999900 MF dts 0:00.100000000

We can notice that the amount of PTS shift is frame duration and
Frame-4 exhibits PTS < DTS.

To compensate shifted timestamp, we should
calculate the timestamp offset and re-calculate DTS correspondingly.
Otherwise, total timeline of output stream will be shifted, and that
can cause time sync issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2354>
2021-06-23 14:12:22 +00:00
He Junyan
310ffc17a8 libs: encoder: mpeg2: Add highP level for 1080@50p/60p.
The MPEG2 spec has amendment 3 to introduce a new level highP, which
is used for 1080@50p/60p streams. We need to add this level to avoid
encoding failure because of the level check.

Fix: #306
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/432>
2021-06-23 06:33:40 +00:00
Sebastian Dröge
127ade39cf tsmux: Recheck existing pad PIDs when requesting a new pad with a random pid
Previously pads might have been requested already (e.g. in NULL state),
then reset was called (e.g. because changing state) and then a new pad
was requested. Resetting is re-creating the internal muxer object and as
such resetting the pid counter, so the next requested pad would get the
same pid as the first requested pad which then leads to collisions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2317>
2021-06-23 05:44:48 +00:00
Matthew Waters
0ac4fda2d6 oggdemux: fix a race in push mode when performing the duration seek
There may be two or more threads involved here however the important
interaction is the use of ogg->seeK_event_drop_till value that was only
set in the push-mode seek-event thread and could race with upstream
sending e.g. and EOS (or data).

Scenario is this:
1. oggdemux performs a seek to near the end of the file to try and find
   the duration. ogg->push_state is set to PUSH_DURATION.
2. Seek is picked up by the dedicated seek event thread and sets
   ogg->seek_event_drop_till to the seek event's seqnum.
3. Most operations are blocked or dropped waiting on the duration to
   be determined and processing continues until a duration is found.
4. Two branching options for how this ultimately plays out
4a. The source is too fast and we receive an EOS event which is dropped
    because ogg->push_state == PUSH_DURATION.  In this case everything
    works.
4b. We hit our 'almost at the end' check in
    gst_ogg_pad_handle_push_mode_state() and attempt to seek back to the
    beginning (or to a user-provided seek).  This seek is marshalled to
    the seek event thread without setting ogg->seek_event_drop_till but
    with change ogg->push_state = PUSH_PLAYING.  If an EOS event or
    e.g. buffers arrive from upstream before the seek event thread has
    picked up the seek event, then the EOS/data is processed as if it
    came as a result of the seek event.  This is the case that fails.

The fix is two-fold:
1. Preemptively set ogg->seek_event_drop_till when setting the seek
   event so that data and other events can be dropped correctly.
2. In addition to dropping and EOS events while ogg->push_state ==
   PUSH_DURATION, also drop any EOS events that are received before the
   seek event has been processed by also tracking the seqnum of the seek.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1196>
2021-06-23 05:09:41 +00:00
Seungha Yang
569910a5ac mfh264enc, mfh265enc: Set profile string to src caps
Set configured profile to src caps so that downstream can figure
out selected profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2347>
2021-06-22 15:20:05 +00:00
Víctor Manuel Jáquez Leal
9be63d2ca3 Fix GI annotations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/840>
2021-06-22 13:02:41 +02:00
Jan Schmidt
34a6acede1 qtdemux: Refuse seeks in BYTES format
If downstream tries to seek in BYTES format, don't pass that through
to upstream. The byte positions downstream requests won't make any
sense in the muxed stream. There might be other formats we want to
pass through to upstream, but BYTES is not one of them. If we get a
seeking query about BYTES format, refuse that too.

This fixes a situation where we're playing a fragmented mp4 over http
and qtdemux refuses the initial seek (in TIME format), but then
h264parse/baseparse send a seek in BYTES format and everything falls
apart.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1014>
2021-06-22 18:05:56 +10:00
Corey C
f5cbbab4d5 fix(gst-rust): response spelling typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/41>
2021-06-21 22:20:40 +00:00
Olivier Crête
a931e31141 webrtc lib: Make the datachannel struct private
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
2021-06-21 20:53:09 +00:00
Olivier Crête
dd2da6f2b4 webrtc lib: Make the DTLSTransport struct private
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
2021-06-21 20:53:09 +00:00
Olivier Crête
a0813c5bd2 webrtc lib: Make the icetransport struct private
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
2021-06-21 20:53:09 +00:00
Olivier Crête
5233c349e7 webrtc lib: Make the rtpreceiver struct private
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
2021-06-21 20:53:09 +00:00
Olivier Crête
a6593753a5 webrtc lib: Make the rtpsender struct private
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
2021-06-21 20:53:09 +00:00
Olivier Crête
b5f2de3124 webrtc lib: Make the transceiver struct private
This will prevent any unsafe access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241>
2021-06-21 20:53:09 +00:00
Sergei Kovalev
ba4f031864 audiobasesink: Fix of double lock release
Add missing "return;" which prevents double lock release.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1208>
2021-06-21 15:58:01 +00:00
Mathieu Duponchelle
08323f382c x265enc: add negative DTS support
Use the same set_min_pts approach as x264enc.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/304
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2340>
2021-06-21 10:31:21 +00:00
Seungha Yang
ba83f29cec decklinkaudiosrc: Don't assume that stream time is always valid
As per SDK doc, IDeckLinkInputCallback::VideoInputFrameArrived
method might not provide video frame and it can be null.
In that case, given stream_time can be invalid.
So, we should not try to convert GST_CLOCK_TIME_NONE
by using gst_clock_adjust_with_calibration()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2337>
2021-06-21 09:58:46 +00:00
Corentin Damman
e5382fe84c Update COPYING
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1207>
2021-06-21 09:28:04 +00:00
Thibault Saunier
d7c716d562 transcoder: Fix usage of g_error_propagate
In the error callback we were propagating an error we were not owning
which is incorrect use of the API.

Also we were clearing a GError we already propagated which is wrong
as propagating gives ownership away.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
2021-06-21 09:18:32 +00:00
Thibault Saunier
d85368eada transcoder: Add a missing object unlocking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
2021-06-21 09:18:32 +00:00
Corentin Damman
d157b23fb0 Update COPYING to LGPL 2.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/835>
2021-06-21 08:36:49 +00:00
Corentin Damman
cc5cdab016 Update COPYING.LIB, COPYING files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/210>
2021-06-21 08:34:35 +00:00
Corentin Damman
678773bb64 Update COPYING
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/135>
2021-06-21 08:33:59 +00:00
Matthew Waters
aa8b27d45a gl/context: fill a GError on platform-specific fill_info() error
Fixes bindings assuming that GError is always set on error:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809#note_957493
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809#note_957494
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809#note_957498

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1204>
2021-06-21 08:02:31 +00:00
Víctor Manuel Jáquez Leal
9a559c3705 docker: fedora: Add intel-mediasdk package.
Add intel-mediasdk package to build gst-msdk plugin in gst-plugins-bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/403>
2021-06-21 09:47:32 +02:00
Stéphane Cerveau
f30e74bb20 faad: fix typo in element documentation
seealso is now see_also

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2323>
2021-06-21 07:35:26 +00:00
Jan Schmidt
7f29361488 parse: Don't do delayed property setting for top-level properties.
If a property is supplied to gst-launch-1.0 to set on a property that
implements GstChildProxy, it would always accept any property name
and try to set it later. This means that (for example) decodebin
will accept and not complain about property names that can never exist like:

gst-launch-1.0 videotestsrc ! decodebin NON-EXISTING_PROPERTY=adsfdasf ! fakesink

Instead, only try to do deferred property setting for property names
that contain the :: separator that indicates it's a setting on a child
that might appear later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/832>
2021-06-21 07:32:27 +00:00
Víctor Manuel Jáquez Leal
046e92c503 tests: msdkh264dec: Run test only if factory is available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
2021-06-21 06:30:07 +00:00
Víctor Manuel Jáquez Leal
78f4777a82 msdk: Demote error log message to warning.
It is not an error that the available hardware doesn't support VA-API/MSDK. Just
none plugin features will be registered.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
2021-06-21 06:30:07 +00:00
Seungha Yang
2c14a7253b libs: d3d11: Port to C++
In general, C++ COM APIs are slightly less verbose and more readable
than C APIs. And C++ supports some helper methods
(smart pointer and C++ only macros for example) which are not allowed for C.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2343>
2021-06-20 20:10:24 +09:00
Thibault Saunier
2f46350910 git-update: Respect specified revision from manifest for gst-build
This broke in b9acfcace8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/249>
2021-06-17 21:41:10 -04:00
U. Artie Eoff
300f25ae36 msdk: declare external dependencies
Track kernel and VA driver dependencies so gstreamer
will re-inspect the plugin if any of them change.

Also, do not blacklist the plugin if !msdk_is_available
since it could be a transient issue caused by one or
more external dependency issues (e.g. wrong/missing
driver specified, but corrected by user later on).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2335>
2021-06-17 02:56:45 +00:00
Seungha Yang
058957fc22 h264parse,h265parse: Push parameter set NAL units again per segment-done
Some decoder implementations might drain out internal buffers and
reset its status on segment-done event. So, in case that
upstream stream-format is packetized but downstream supports only
byte-format, required codec-data might not be forwarded toward
downstream if such parameter set NAL units don't exist in inband
bitstream. Therefore, parse elements should re-send parameter set NAL
units like the case of flush event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2334>
2021-06-16 18:00:39 +00:00
Nicolas Dufresne
2696bcd9e2 vp8decoder: Drain the output queue on EOS/finish
The finish() virtual method was flushing the queue, instead push the
remaining buffers. It is not required to reset in finish() unlike
drain(). This a regression causing last frame to always be lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
2021-06-16 17:34:54 +00:00
Nicolas Dufresne
e5e2b6a652 v4l2slvp8dec: Only ask for output delay once per negotiation
While it's technically possible to change it per frame, asking for
that every frame is not very useful. This mimic H264 decoder better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2333>
2021-06-16 17:34:54 +00:00
François Laignel
777be5fad9 Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/258>
2021-06-16 17:12:11 +02:00
François Laignel
973f0bf552 Check mandatory ClockTime arguments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1205>
2021-06-16 14:52:38 +00:00