Commit graph

113094 commits

Author SHA1 Message Date
Mathieu Duponchelle
081509e030 rtpst2022-1-fec-*: protect additional RTP header fields
While the standard is a bit vague about whether the padding,
extension and marker bits should be protected:

> The usage, by senders and receivers, of the following bits shall
> be defined by the associated video/audio transport standards:

It is obviously necessary and useful for some formats (eg VP8)
that those indeed be protected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/839>
2020-12-12 09:29:15 +00:00
Arun Raghavan
2a5d564de3 openaptx: Drop lib prefix from option name for consistency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1876>
2020-12-11 22:08:01 -05:00
Edward Hervey
56e05f63f5 decodebin3: Release selection lock when pushing EOS
We can't keep the lock otherwise this would lock other actions. In order to keep
it safe, we grab a list of peer pads to send EOS to with the lock taken, then
send to the peer pads with the lock released.

Also make sure the selection lock is taken for another call to this function

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/971>
2020-12-11 18:36:30 +00:00
He Junyan
5bee089331 plugins: encode: unlock the stream lock before _flush()
The current encoder will hang when EOS comes. When we call the
gst_vaapi_encoder_encode_and_queue(), we should release the stream
lock, just like what we do in gst_vaapiencode_handle_frame().

The deadlock happens when: The input thread holding the stream lock
is using gst_vaapi_encoder_create_coded_buffer() to acquire a coded
buffer, while the output thread which holding the coded buffer resource
is acquiring the stream lock in _push_frame() to push the data to
down stream element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/404>
2020-12-11 18:02:34 +00:00
Jan Schmidt
2d24a45c89 splitmuxsink: Unit test - check format/opened/closed sequence
Check the sequence of format-location/fragment-opened/fragment-closed
events is respected. There should be 1 format-location call for each
fragment-opened message, and 1 fragment-closed for each.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/833>
2020-12-12 03:28:56 +11:00
Jan Schmidt
d7a9a844f6 splitmuxsink: Fix for 'reference bytes muxed' check.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/798
introduced a check in the need-new-fragment logic to avoid starting a
new fragment unless there has been some data on the reference stream,
but the check is done against the number of bytes that have been
received on the input, not the number that were released for output
into the current fragment.

Fix the check to remember and test against bytes that have been sent
for output.

This also fixes a problem where starting a new fragment fails to
request a new filename from the format-location signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/833>
2020-12-12 03:28:19 +11:00
Jakub Adam
a06dcc3e38 harness: don't use GST_DEBUG_OBJECT with GstHarness
GstHarness is not a GObject. Fixes assert on recently added check in
gst_debug_log_valist() if GST_ENABLE_EXTRA_CHECKS is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/720>
2020-12-11 16:05:55 +01:00
Edward Hervey
030ccaedb5 typefind: Fix debug category usage
Only register it in one place and use it everywhere from the header. Also make
sure it doesn't clash with the debug category from core.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/972>
2020-12-11 14:06:30 +01:00
Stéphane Cerveau
f0f0662d9d gst-full: add way to test features presence
This test allows to test a list of features to be
registered in the library (or not).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199>
2020-12-11 12:50:16 +00:00
Stéphane Cerveau
b6f61768d3 gst-full: add 'gst-full-' features options
These options allow to select a set of features from a given
plugin with the following syntax:

-Dgst-full-plugins=plugin1;plugin10
-Dgst-full-elements=plugin2:element1,element2
-Dgst-full-typefind-functions=plugins3:func
-Dgst-full-device-providers=plugin4,dp1
-Dgst-full-dynamic-types=plugin5:dt1

By default all the enabled plugin are registered and
gst-full-plugins will allow to include only a set of plugin

If a feature(element, typefind etc.) is selected from a plugin,
the plugin is removed from the plugins list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199>
2020-12-11 12:50:16 +00:00
Thibault Saunier
0daa48f1b1 bus: Ensure that only one GSource can be attached to the bus
Until now we were enforcing that only 1 signal GSource was attached
the bus but we could attach as many GSource with `gst_bus_create_watch`
as we wanted... but in the end only 1 GSource will ever be dispatched for
a given `GstMessage` leading to totally broken behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/718>
2020-12-11 12:29:50 +00:00
Thibault Saunier
5db76b4d41 bus: Do not override source->prepare
Since GLib 2.36 we do not need it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/718>
2020-12-11 12:29:50 +00:00
Stéphane Cerveau
4000e4b55e plugin: update the doc to declare a typefind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/117>
2020-12-11 10:12:39 +01:00
Stéphane Cerveau
5a004ed35b plugin: update doc to declare an element
Use GST_ELEMENT_REGISTER_DEFINE in addition
to G_DEFINE_TYPE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/117>
2020-12-11 10:12:39 +01:00
Igor Kovalenko
b916522382 openaptx: add aptX and aptX-HD codecs using libopenaptx
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1871>
2020-12-11 11:55:54 +03:00
Thibault Saunier
373071a743 scenario: Ensure that messages are handled from the right thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/233>
2020-12-10 18:31:43 -03:00
Nicolas Dufresne
8a45c8d1df gir: Fix parser warning due to empty line
The GIR parser does not want any empty line after the function or macro
name line.

Fixes the following warning:
[309/4246] Generating Gst-1.0.gir with a custom command
../subprojects/gstreamer/gst/gstelement.h:57: Warning: Gst: "@element" parameter unexpected at this location:
 * @element: The element name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstelement.h:84: Warning: Gst: "@e" parameter unexpected at this location:
 * @e: The element name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstelement.h:106: Warning: Gst: "@e" parameter unexpected at this location:
 * @e: The element name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstdeviceprovider.h:32: Warning: Gst: "@d_p" parameter unexpected at this location:
 * @d_p: The device provider name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gstdynamictypefactory.h:28: Warning: Gst: "@t_n" parameter unexpected at this location:
 * @t_n: The dynamic type name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gsttypefind.h:34: Warning: Gst: "@type_find" parameter unexpected at this location:
 * @type_find: The type find name in lower case, with words separated by '_'.
    ^
../subprojects/gstreamer/gst/gsttypefind.h:61: Warning: Gst: "@t_f" parameter unexpected at this location:
 * @t_f: The type find name in lower case, with words separated by '_'.
    ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/719>
2020-12-10 14:08:53 -05:00
Thibault Saunier
978ba72bdd structure: Handle trailing comas in serialized structs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/717>
2020-12-10 13:35:17 +00:00
Stéphane Cerveau
dff494977b typefindfunctions: allow per features registration
Split plugin into features including
typefind functions 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-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
817a533e47 pbtypes: allow per features 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-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
b6f8d0544c subparse: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.

More details here:
i
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-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Julian Bouzas
d58cf8b8d3 ogg: allow per feature registration
Split plugin into features including
elements and device providers 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-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
1e02717e83 playback: allow per feature registration
Split plugin into features including
elements and device providers 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-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
4a2981f906 alsa: allow per feature registration
Split plugin into features including
elements and device providers 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-base/-/merge_requests/900>
2020-12-10 13:01:57 +00:00
Stéphane Cerveau
3822c33704 gstreamer-full: enable features unit test
As gst-build can select features to be exposed by
gstreamer-full, the test will check that feature
are present or not present according to the current
configuration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/381>
2020-12-10 12:51:32 +01:00
Stéphane Cerveau
783e19b04c coreelements: allow per features 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/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
a41f37d94c dynamic type: add convenience macros to register
This macros will help to register a dynamic type
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
9fd20cf1a0 type find: add convenience macros to register
This macros will help to register a device provider
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Stéphane Cerveau
ff36ce0051 device provider: add convenience macros to register
This macros will help to register a device provider
apart from a given plugin such as in a static build
of gstreamer where libgstreamer-full is generated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Julian Bouzas
7828237496 element: add convenience macros to register
Define separate macros to define an element
apart from the plugin itself.
These macros will help to register
elements a part from a plugin.
By example in the case of a gstreamer static build
producing the libgstreamer-full library.

More details here:

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661>
2020-12-10 12:45:16 +01:00
Seungha Yang
767f46b1a0 webrtc: sendonly: Add support for Windows
Add meson build script and use mfvideosrc element in case of Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/29>
2020-12-10 20:18:30 +09:00
Philippe Normand
3bcb876c29 wpe: Emit load-progress messages
The estimated-load-progress value can be used on application side to display a
progress bar for instance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1710>
2020-12-09 17:31:51 +00:00
Philippe Normand
59c3802711 debug-viewer: Make appdata valid again
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/229>
2020-12-09 14:55:17 +00:00
Thibault Saunier
22d37a930c tests: Fix races in the read-growing-file test
First: the buffer is pushed on the encoding filesink only *after* the
checkpoints, leading to wrong ordering in expectations.

The second one is about EOS being posted on the bus *before* the
stop action is executed, leading to the action never being executed.
That action was plain useless as the default behavior of validate
scenario is to internally create a "stop" action on EOS (unless
disabled by user).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/968>
2020-12-09 10:52:24 -03:00
Vivia Nikolaidou
82dcb27401 basetsmux: Don't send the capsheader if src pad has no caps
That means we're shutting down, so there's no point in the streamheader
being sent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1864>
2020-12-09 13:14:40 +00:00
Matthew Waters
1f7515100c rtmp2/connection: pass the parent cancellable down to the connection
Otherwise, when rtpm2src cancels an inflight operation that has a queued
message stored, then the rtmp connection operation is not stopped.

If the cancellation occurs during rtmp connection start up, then
rtpm2src does not have any way of accessing the connection object as it
has not been returned yet.  As a result, rtpm2src will cancel, the
connection will still be processing things and the
GMainContext/GMainLoop associated with the outstanding operation will be
destroyed.  All outstanding operations and the rtmpconnection object will
therefore be leaked in this case.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1425
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1862>
2020-12-08 23:43:02 +00:00
He Junyan
5997093ba1 libs: encoder: H264: Fix one assert in get_pending_reordered().
gst_vaapi_encoder_h264_get_pending_reordered() does not consider the
case for HIERARCHICAL_B mode. The pipeline:

gst-launch-1.0  videotestsrc num-buffers=48 ! vaapih264enc prediction-type=2 \
keyframe-period=32 ! fakesink

get a assert:

ERROR:../gst-libs/gst/vaapi/gstvaapiencoder_h264.c:1996:reflist1_init_hierarchical_b:
assertion failed: (count != 0)

The last few B frames are not fetched in correct order when HIERARCHICAL_B
is enabled.

We also fix a latent bug for normal mode. The g_queue_pop_tail() of B frames
make the last several frames encoded in reverse order. The NAL of last few
frames come in reverse order in the bit stream, though it can still output
the correct image.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/405>
2020-12-09 01:26:26 +08:00
Thibault Saunier
9eb7df7fef validate:scenario: Fix the refcount management for actions in structures
Handling the refcounting the same whether the action is blocking or not
as we were leaking a ref for non-blocking waits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
aca781f981 validate:scenario: Minor cleanup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
0a7cc6a56e validate: Use gst_validate_action_*ref everywhere.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Thibault Saunier
d974b0b5d5 validate: Add support to check properties of object properties
And recursively

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/231>
2020-12-08 16:47:15 +00:00
Stéphane Cerveau
88b320cc2b validate: add sync-version
Be able by the command line to change the sync version
which is usually the GST_VALIDATE_TESTSUITE_VERSION
from the test suite

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/227>
2020-12-08 15:25:30 +00:00
Thibault Saunier
f1f966d987 giosrc: Add support for growing source files
Add a way for applications to specify that the underlying file is
growing which implies that the source won't EOS when reaching the end
of the file but instead start monitoring it and start reading it again
whenever a change is detected.

Also add a validate test to check the behavior

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/937>
2020-12-08 12:14:58 -03:00
Jan Schmidt
67f70af1bb splitmuxsink: Add debug for fragment opened/closed msgs
When posting fragment-opened and fragment-closed messages,
put a debug statement in the logs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/833>
2020-12-09 01:03:01 +11:00
Jan Schmidt
df8b147e75 splitmuxsink: Convert asserts into element errors.
Change some g_assert into element errors so that they can be
caught and the pipeline shut down.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/833>
2020-12-09 01:03:01 +11:00
Stéphane Cerveau
80f671207a gst-inspect: add an option to sort plugins
with the option --sort, the output is sort by default
with alphabetical order with plugins and features.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/709>
2020-12-08 13:02:53 +00:00
Seungha Yang
a4ba868225 video: Make use of gst_video_chroma_site_{from,to}_string() API
Replace deprecated gst_video_chroma_{from,to}_string()
to newly added gst_video_chroma_site_{from,to}_string()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/927>
2020-12-08 07:21:28 +00:00
Seungha Yang
410efd196a video-chroma: Add support for any combination of chroma-site flags
We've been allowing only a few known chroma-site values such as
jpeg (not co-sited), mpeg2 (horizontally co-sited) and
dv (co-sited on alternate lines). That's insufficient for
representing all possible chroma-site values. By this commit,
we can represent any combination of chroma-site flags.
But, an exception here is that any combination with
GST_VIDEO_CHROMA_SITE_NONE will be considered as invalid value.

For any combination of chroma-site flags,
gst_video_chroma_to_string() method is deprecated in order to
return newly allocated string via a new gst_video_chroma_site_to_string()
method. And for consistent API naming, gst_video_chroma_from_string()
is also deprecated. Newly written code should use
gst_video_chroma_site_from_string() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/927>
2020-12-08 07:21:28 +00:00
Jan Alexander Steffens (heftig)
470e6989d2 srt: Don't take object lock calling gst_srt_object_get_stats
This function takes the sock lock. This can result in a deadlock when
another thread holding the sock lock is trying to take the object lock.

Thread A (Holds object lock, wants sock lock):

    #2  gst_srt_object_get_stats at gst-plugins-bad/ext/srt/gstsrtobject.c:1753
    #3  gst_srt_object_get_property_helper at gst-plugins-bad/ext/srt/gstsrtobject.c:409
    #4  gst_srt_sink_get_property at gst-plugins-bad/ext/srt/gstsrtsink.c:95
    #5  g_object_get_property from libgobject-2.0.so.0

Thread B (Holds sock lock, wants object lock):

    #2  gst_element_post_message_default at gstreamer/gst/gstelement.c:2069
    #3  gst_element_post_message at gstreamer/gst/gstelement.c:2123
    #4  gst_element_message_full_with_details at gstreamer/gst/gstelement.c:2259
    #5  gst_element_message_full at gstreamer/gst/gstelement.c:2298
    #6  gst_srt_object_send_headers at gst-plugins-bad/ext/srt/gstsrtobject.c:1407
    #7  gst_srt_object_send_headers at gst-plugins-bad/ext/srt/gstsrtobject.c:1444
    #8  gst_srt_object_write_to_callers at gst-plugins-bad/ext/srt/gstsrtobject.c:1444
    #9  gst_srt_object_write at gst-plugins-bad/ext/srt/gstsrtobject.c:1598
    #10 gst_srt_sink_render at gst-plugins-bad/ext/srt/gstsrtsink.c:179

Fixes d2d00e07ac.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1861>
2020-12-07 17:59:09 +00:00
Sebastian Dröge
0243afcb9d ccconverter: Add property to specify which sections to include in CDP packets
Various software, including ffmpeg's Decklink support, fails parsing CDP
packets that contain anything but CC data in the CDP packets.

Based on this property, timecodes are not written into the CDP packets
even if they're present.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1833>
2020-12-07 19:23:42 +02:00