Commit graph

112906 commits

Author SHA1 Message Date
Seungha Yang
5b3e316039 d3d11: Port to C++
Direct3D11 objects are COM, and most COM C APIs are verbose
(C++ is a little better). So, by using C++ APIs, we can make code
shorter and more readable.
Moreover, "ComPtr" helper class (which is C++ only) can be
utilized, that is very helpful for avoiding error-prone COM refcounting
issue/leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2077>
2021-03-14 13:05:22 +09:00
Jakub Adam
1a87a6572e rtpbasedepayload: handle caps change partway through buffer list
While preparing a blist for pushing, some RTP header extension may
request caps change for a specific buffer in the list. When this
happens, depayloader should immediately push those buffers from the list
that precede the currently processed buffer (for which the caps change
was requested) and only then apply the new caps to the src pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>
2021-03-12 18:45:04 +01:00
Jakub Adam
c222f322c0 rtphdrext: allow updating depayloader src caps
Add overridable method that updates depayloader's src caps based on
the data from RTP header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>
2021-03-12 18:45:04 +01:00
Jakub Adam
899c69abad rtphdrext: allow the extension to inspect payloader's sink caps
Some header extensions may need to read information from the payloader's
sink caps. Introduce gst_rtp_header_extension_update_from_sinkcaps ()
that passes the caps to the extension, which can then use it to update
its internal state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>
2021-03-12 18:45:04 +01:00
Philipp Zabel
78dec1e403 v4l2object: handle GST_VIDEO_TRANSFER_BT601
V4L2 makes no difference between the BT.601 and BT.709 transfer
functions [1], but GStreamer does since 1.18 [2].

Adapt gst_v4l2_object_get_colorspace() and
gst_v4l2_object_set_format_full().

[1] https://linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/colorspaces-details.html#colorspace-smpte-170m-v4l2-colorspace-smpte170m
[2] https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/724

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/856>
2021-03-12 16:57:50 +00:00
Víctor Manuel Jáquez Leal
3c40ffc00f va: example: multiple-vpp: test direction change
If the driver supports it (iHD, so far) and the parameter -d is set,
the direction of the video will be changed randomly.

In the code you can select, at compilation time, if the direction
change is done by element's property or by pipeline events.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2074>
2021-03-12 12:46:41 +01:00
Víctor Manuel Jáquez Leal
0b2848fc32 va: postproc: update passthrough and reconfigure pads
Added helper function _update_passthrough() which will define and set
the pass-through mode of the filter, and it'll either reconfigure both
pads or it will just mark the src pad for renegotiation or nothing at
all.

There are cases where both pads have to be reconfigured (direction
changed, for example), other when just src pad has to (filters
updated) or none (changing to ready state).

The requirement of renegotiation depends on the need to enable/disable
its VA buffer pools.

This patch sets pass-through mode by default, so the buffer pools
aren't allocated if no filtering/direction operations are defined,
which is the correct behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2074>
2021-03-12 12:34:46 +01:00
Stéphane Cerveau
451c875d40 zxing: update to support version 1.1.1
Support new API in 1.1.1
Update the supported input video format.
Update tests to use parse_launch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2037>
2021-03-12 01:03:49 +00:00
Mathieu Duponchelle
f2d909eb4e rtspsrc: fix title of a few properties docstrings
GstRtspSrc -> GstRTSPSrc

This would have been noticed by the since checker, but those
properties were introduced prior to that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/899>
2021-03-11 22:22:15 +01:00
Guillaume Desmottes
44bdad58f6 clock: define AUTO_CLEANUP_FREE_FUNC for GstClockID
GstClockID is secretly a gpointer so we can't use g_autoptr(),
instead user can do:
  g_auto (GstClockID) clock_id = 0;

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/769>
2021-03-11 15:41:16 +01:00
Devarsh Thakkar
9759810d82 ext: alsa: Set buffer time after period time
This because underlying driver may have constraint on
buffer size to be dependent on period size, so period
time needs to be set first.

For e.g. Xilinx ASoC driver requires
buffer size to be multiple of period size for it's DMA
operation.

alsa-utils also set period time first as seen in below commit :
9b621eeac4

Tested it on zcu106 board with HDMI based record and playback.
Also tested on Intel PC using Logitech C920 Webcam mic and ALC887-VD
Analog for playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1040>
2021-03-11 14:15:54 +00:00
Stéphane Cerveau
b0a9ba4ccf mpegvideoparse: do not clip the frame
If the current buffer is delta unit such as P or B
frame, the buffer should not be clipped and need to
let the decoder handle the segment boundary situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2070>
2021-03-11 15:01:38 +01:00
Seungha Yang
cdce27d975 d3d11device: Fix wrong printf formatting
Add missing '%' there

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2069>
2021-03-11 13:31:18 +09:00
Stéphane Cerveau
01d1bbd1da playback: remove useless ret test
Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
2021-03-10 20:06:20 +01:00
Stéphane Cerveau
20da00f057 ogg: remove useless ret test
Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
2021-03-10 20:06:20 +01:00
Stéphane Cerveau
1682161355 alsa: remove useless ret test
Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
2021-03-10 20:06:20 +01:00
Philippe Normand
a6b5e3c7d5 transcoder: Add state-changed signal
Similar to GstPlayer, a new signal for state tracking is now emitted at runtime,
as a commodity for applications which then don't need to monitor the pipeline
GstBus for state changes anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2028>
2021-03-10 17:13:57 +00:00
Guillaume Desmottes
b7c1810aa3 audioaggregator: fix input_buffer ownership
The way pad->priv->input_buffer reference was managed was pretty
spurious:
- it was overridden without unrefing it, which could potentially lead to
  leaks.
- we were unreffing it while keeping the pointer around, which could
  potentially lead to use-after-free or double-free.

As priv->input_buffer is actually no longer used outside of the
aggregate() method, remove it from pad->priv to simplify the code and
prevent the issues desribed above.

Fix a single buffer leak when shutting down the pipeline as the buffer
returned from gst_aggregator_pad_drop_buffer() was never unreffed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>
2021-03-10 16:38:03 +01:00
Guillaume Desmottes
44358f1eaf audioaggregator: fix input buffer when converting
This code path is meant to convert the current buffer to the new format
on update. It was using priv->input_buffer as input which is either
priv->buffer or a converted version of it.
Use priv->buffer instead as priv->input_buffer may no longer be a valid
reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>
2021-03-10 16:34:28 +01:00
Philippe Normand
e0c77b75cd gtk-play: Port to GstPlay
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/33>
2021-03-09 21:36:27 +00:00
Philippe Normand
12a7bf9f7c player: Rewrite as GstPlay wrapper
For the time being the GstPlayer library remains as a wrapper for GstPlay, in
order to keep existing applications working and give them time to port to
GstPlay. GstPlayer will remain in -bad for a couple cycles and the plan for
GstPlay is to move it to -base before 1.20.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Philippe Normand
f009802771 play: Flush API bus before exiting main loop
Otherwise the bus might attempt to dispatch queued messages after the thread
ended, causing runtime warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Philippe Normand
fae7c8dd7e play: tests: Switch user-agent test to a real HTTP server
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Philippe Normand
3eec2f4be8 play: tests: Refactor to use new Message bus API
Instead of relying on an extra GMainLoop, the messages are poped from the player
bus and handled synchronously. This should avoid flaky behaviors.

Fixes #608

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Philippe Normand
19d57dcfa5 play: Plug media_info leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Stephan Hesse
e007c47c3f play: Rename internal buffering field to buffering_percent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Stephan Hesse
a74651ddc1 play: Introducing the new playback library
This aims to be a replacement for the GstPlayer library. In GstPlay, notifications are
sent as application messages through a dedicated GstBus. The GMainContext-based
signal dispatcher was replaced by a GObject signal adapter, now relying on the
bus to emit its signals. The signal dispatcher is now optional and fully
decoupled from the GstPlay object.

Co-authored with: Philippe Normand <philn@igalia.com>

Fixes #394

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
2021-03-09 18:03:48 +00:00
Sebastian Dröge
80c1722cba avwait: Don't post messages with the mutex locked
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2063>
2021-03-09 13:01:45 +02:00
Matthew Waters
2bed220771 webrtc: don't generate duplicate rtx payloads when bundle-policy is set
It was possible to generate a SDP that had an RTX payload type
that matched one of the media payload types when providing caps via
codec_preferences without any sink pads.

Fixes

m=video 9 UDP/TLS/RTP/SAVPF 96
...
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=fmtp:96 apt=96

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2046>
2021-03-09 02:22:35 +00:00
Vivia Nikolaidou
4ccad5336f tests: Add negotiation tests for the interlace elements
Many complicated cases exist. Would be good to have some checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
2021-03-08 21:02:13 +02:00
Vivia Nikolaidou
cde4e74eca interlace: Discard stored_frame on EOS and PAUSED_TO_READY
Would otherwise leak it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
2021-03-08 21:02:01 +02:00
Vivia Nikolaidou
cb55d30b3c interlace: Specify interlace-modes in the sink pad template
Especially specify the field-order in the interleaved mode. Otherwise it
might cause the negotiation to fail, because
GST_PAD_SET_ACCEPT_INTERSECT is not set on the sinkpad, and the
field-order is missing in the sink template but can be present in the
outside caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
2021-03-08 21:01:50 +02:00
Mathieu Duponchelle
c1fa62f971 symbol_index: update for newly-documented vulkan callback fields
Those symbols aren't available on my machine, adding manually
2021-03-08 19:41:17 +01:00
Mathieu Duponchelle
e035696697 symbol_index: update for newly-documented callback fields 2021-03-08 19:14:11 +01:00
Thibault Saunier
edf58d30e6 ges: doc: Fix wrong vmethod links 2021-03-08 14:50:52 -03:00
Stéphane Cerveau
0da1721364 element: remove useless ret test
The ret test is unrelevant and confusing.
We dont want the code to fail and the register
to succeed by example.
In the case of a conditional element_init,
the element should be defined with
GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/768>
2021-03-08 16:37:31 +01:00
Vladimir Menshakov
4de3ddad15 wavpackdec: Add floating point format support
This commit negotiate F32 audio format if MODE_FLOAT used in wavpack file.
Wavpack float mode is always in 32-bit IEEE format.

The following pipeline plays distorted audio if source file is encoded in float mode:
gst-launch-1.0 filesrc ... ! wavpackparse ! wavpackdec ! pulsesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/894>
2021-03-08 15:19:57 +02:00
Thibault Saunier
cebdfad9fe group: Use proper group constructor
Otherwise we might en up having a group which is not backed by any asset
leading to possible assertion as this should never happen (see
https://gitlab.gnome.org/GNOME/pitivi/-/issues/2526)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/232>
2021-03-08 09:58:50 -03:00
Philippe Normand
840fcf43f5 gst-play: Port to GstPlay
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/33>
2021-03-07 17:59:35 +00:00
Stephan Hesse
50e61f52ed gst-play.c: update to signal-adapter constructor change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/33>
2021-03-07 17:59:35 +00:00
Stephan Hesse
d5a183cc2f gst-play: use novel signal-adapter (requires gstplayer lib patch from https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/35)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/33>
2021-03-07 17:59:35 +00:00
Seungha Yang
9da6da20e7 nvh264sldec: Reopen decoder object if larger DPB size is required
Equivalent to the d3d11h264dec fix
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1839

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2059>
2021-03-07 16:51:59 +09:00
Florian Karydes
9163aad08a Install *-dev packages in Linux to get headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/147>
2021-03-05 08:00:13 +01:00
Jordan Petridis
8f8cd9ec4b ci_template: use older windows image for cerbero
Current windows image doesn't seem to be able to spawn procceses for reason,
use a different image until this is debuged

```
Running command 'c:/builds/alatiera/gst-ci/cerbero-build/build-tools/bin/meson --prefix=c:/builds/alatiera/gst-ci/cerbero-build/dist/msvc_x86_64 --libdir=lib -Ddebug=true --default-library=both -Doptimization=2 --backend=ninja --wrap-mode=nodownload -Db_vscrt=md --native-file c:/builds/alatiera/gst-ci/cerbero-build/sources/msvc_x86_64/gstreamer-1.0-1.19.0.1/_builddir/meson-native-file.txt -Dlibunwind=disabled -Ddbghelp=enabled -Dintrospection=disabled -Dexamples=disabled'
failed to create process
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/399>
2021-03-05 08:28:47 +02:00
Jordan Petridis
136019bab7 ci_template: fix WINDOWS_CONTAINER_SCRIPT_URL location
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/399>
2021-03-05 07:12:35 +02:00
Seungha Yang
a29c8935b7 d3d11: Fix an HLSL compiler warning
warning X3578: Output value 'main' is not completely initialized

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2052>
2021-03-04 20:34:23 +00:00
Bing Song
89f193e1eb transcoder: handle SIGINT and SIGHUP
Handle SIGINT and SIGHUP in transcoder. Or the output file maybe corrupt.

Fixes #1507

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1987>
2021-03-04 14:04:43 +00:00
Matthew Waters
e73559f815 matroska: also support push-mode from seek events sent to the element
Otherwise sending seek events would fail to actually seek.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/891>
2021-03-04 13:28:55 +00:00
Marc Leeman
c7356c70ee gstrtspsrc: 551 should not result in an unhandled error
Some cameras (e.g. HikVision DS-2CD2732F-IS) return "551 Option
not supported" when a command is sent that is not implemented
(e.g. PAUSE). Instead; it should return "501 Not Implemented".

This is wrong, as previously, the camera did announce support for PAUSE
in the OPTIONS.

In this case, handle the 551 as if it was 501 to avoid throwing errors
to application level. */

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/885>
2021-03-04 13:07:49 +01:00
Seungha Yang
3730ea3366 d3d11h264dec: Keep track of actually configured DPB size
... instead of the largest we ever seen.
Note that d3d11h264dec element holds previously configured DPB size
for later decoder object re-open decision.

This is to fix below case:
1) Initial SPS, required DPB size is 6
  - decoder object is opened with DPB size 6
  - max_dpb_size is now 6
2) SPS update with resolution change, required DPB size is 1
  - decoder object is re-opened with DPB size 1
  - max_dpb_size should be updated to 1, but it didn't happen (BUG)
3) SPS update without resolution change, only required DPB size is updated to 6
  - decoder object should be re-opened but didn't happen
    because we didn't update max_dpb_size at 2).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2056>
2021-03-04 17:57:14 +09:00