Commit graph

114005 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal 602d249847 va: Don't expose internal classes.
VA allocators and pools classes don't need to be exposed as external
symbols.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2070>
2022-03-30 11:36:03 +02:00
Haihua Hu 630acb40f0 gstplay: don't print error log in warning_cb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2069>
2022-03-30 08:12:05 +00:00
Víctor Manuel Jáquez Leal 599257bf10 vapostproc: Build classification dynamically.
By default, the classification is
"Converter/Filter/Colorspace/Scaler/Video/Hardware", but if VA
post-processor driver supports either color balance, skin tone
enhancement, sharpening or noise reduction, "Effect" is added.

Thus, if vapostproc ranking is raised, it can be chosen by
autovideosink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2066>
2022-03-30 04:24:35 +00:00
Matthew Waters 041eee6c2e webrtc: produce stats for all relevant streams
Instead of only using the last ssrc that was pushed into a sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 04de1a161f webrtc: avoid different versions of gnu-indent always wanting to change !!
Add some sneaky parenthesis to avoid always having to use git commit -n
or revert out hunk of the change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 5bfe36746a webrtc: implement initial simulcast fec/rtx usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:41 +00:00
Matthew Waters 5741ee38e0 webrtc/datachannel: fix use-after-free in sctp state notification
g_signal_disconnect*() doesn't stop any existing callbacks from running
which means that if the notify::state callback is in progress in one
thread and the data channel object is finalize()ed in another thread,
then there could be a use-after-free trying lock the data channel
object.

We can't reasonably use a GWeakRef as we don't have a 'parent' object to
free the GWeakRef after the data channel is finalized.  This is also
complicated by the fact that the application can hold a reference to the
data channel object that would live beyond the lifetime of webrtcbin
itself.

We solve this by implementing a ghetto weak-ref solution internally with
a list of outstanding data channels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 831b34fb43 tests/webrtc: fix a use-after-free in test_data_channel_close
g_object_weak_ref() is not thread-safe and the data channel object's
refs/unrefs can happen on multiple threads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters f11e0e76c6 tests/webrtc: fix a race in the tests related to state tracking
If things progress fast enough, some state changes may not be seen be
the waiting code.

Fix by:
1. keeping a list of all the state changes
2. waiting checks each entry and if the relevant state is found, all
   states up to and including then are removed.

This ensures that any waits will see all the state sets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 5257093268 tests/webrtc: factor out src pad property checking to a separate function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 2377f8b3f2 webrtcbin: initial support for sending and receiving simulcast streams
Input (sink pads) is the already-ssrc-muxed stream with the relevant rtp
sdes header extensions already applied:
  - mid
  - stream-id
  - repaired-stream-id

Output (src pads) have the pads separated into individual ssrc's as
that's what rtpbin gives us.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 75b23d646a tests/webrtc: test for enabled bundled fec/rtx
Doesn't actually check that any fec/rtx happens, just that the pipeline
is vaguely sane and doesn't error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 699739c130 webrtcbin: support multiple received streams for a single mline
Each rtpbin exposed recv_src pad is now exposed as webrtcbin src_%u pad
now with no meaining applied to the value of %u.  Previously this used
to mean the mline in the SDP.  If this is is still required, then the
transceiver can be retrieved from the pad and the "mlineindex" property
from the transciever.  The "mid" is also retrievable from the
transceiver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters e28c45fd05 webrtc: explicitly error out in a couple of renegotiation cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 318a639e43 webrtc/transportstream: add debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters e18ee04cd2 tests/webrtc: also check valid mline for srcpad codec-preferences negotiation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 2aeca9ed84 webrtcbin: don't name src pads based on the mline specifically anymore
Naming based on the mline doesn't really work with e.g. simulcast
scenarios.

It is entirely possible to retrieve the transceiver and then the mline
from that if that is so required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 8a65fa40c7 webrtc/tests: print the correct media idx on error
Instead of the attribute index

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters b153ffdd56 webrtc/tests: give slightly better names to the dot file dumps
Don't use printf-specifiers with g_strconcat().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters cda81bdb1e webrtcbin: improve some debugging output
- Put human readable names into debug strings.
- Demote some frequent rtpbin signal logging
- Don't use GST_PTR_FORMAT in g_set_error()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters c02c8a85ce webrtcbin: silence spurious warning when creating answer transceiver
When creating a transceiver when creating an answer, the media kind of the
transceiver was never set correctly initially.  This would lead to a
GST_WARNING being produced about changin a transceiver's media kind.

Fix by retrieving the GstSDPMedia kind from the offer instead as the answer
GstSDPMedia has not been set as the answer caps have not been chosen yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 246374c4e7 tests/webrtc: always use a unique SSRC for each stream
Will become more relevant with mid/rid->ssrc mappings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 533d4937fe webrtcbin: add a specific find_transceiver_by_mid function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 79d58200c9 webrtcbin: explicitly use a variable for the rtp session idx
Slightly clearer in meaning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Matthew Waters 9a758d78a9 webrtcbin: support using an a=mid value from the sink/transceiver caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
2022-03-29 23:55:40 +00:00
Víctor Manuel Jáquez Leal 400faf7361 va: Set <gst/va/gstva.h> as library single point entry header.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 990fbb3b52 va: Move allocators and pool objects into gstva library.
In order to other plugins use gstva objects, such as allocators and buffer
pools, this merge request move them from the va plugin to the gstva library.

This objects are not exposed in <gst/va/gstva.h> since they are not expected
to be used by users, only by plugin implementators.

Because of the surface copy design, which is used to implement allocator's
mem_copy() virtual function, depends on the vafilter, which is kept inside
the plugin, memory copy through VAPosproc is disabled and removed temporarly.

Also added some missing parameter validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 53783eab6c va: Move the video format functions into gstlibva.
Untabifying header file.

The logging category was moved from the plugin generic category to
the display category. It can argue that video formats hacks are
display dependant.

Added validations for input parameters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
Nirbheek Chauhan b7086a368f meson: Add some messages when selecting libsoup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2032>
2022-03-29 18:30:03 +00:00
Nirbheek Chauhan 54eff61f0f soup: Fix usage of symbols / defines that are gone in libsoup3
I am not sure about the SOUP_MESSAGE_OVERWRITE_CHUNKS change, but it
was definitely already broken when using libsoup-3.0 in a shared
build. souphttpsrc probably needs to be ported from SoupMessage to
SoupServerMessage when using libsoup-3.0.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1111

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2032>
2022-03-29 18:30:03 +00:00
Nirbheek Chauhan 6c910dc746 soup: Fix pre-processor macros in souploader for libsoup-3.0
Some of the preprocessor conditionals in the loader were very broken
with libsoup-3.0 + --default-library=static

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1111

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2032>
2022-03-29 18:30:03 +00:00
Edward Hervey 00187ddb0c pbutils: Fix wmv screen detection
strncmp vs !strncmp :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2050>
2022-03-29 17:31:44 +00:00
Stéphane Cerveau 39e45e5b1c ges: remove memory leak with description
free the capsdesc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2047>
2022-03-29 16:50:13 +00:00
Stéphane Cerveau ef9962d66a nle: clear seek event properly
Use gst_clear_event instead of g_clear_object
avoiding a failing gobject unref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2047>
2022-03-29 16:50:13 +00:00
Seungha Yang 886cfecd36 qsvencoder: Add support for dynamic bitrate update
... and add more encoding options.

QSV API supports dynamic bitrate change without IDR insertion.
That's more efficient way of runtime encoding option update
than starting from new sequence with IDR per bitrate option change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00
Seungha Yang a8d7b10cc4 qsvh265enc: Add missing gop-size property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00
Seungha Yang 1a7b23dc02 qsv: Fix mfxFrameAllocator::Lock for encoder
Only read map is possible for encoder input system memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00
Thibault Saunier 761f26080a python: Add a suppression file for a leak in PyGObject
And ensure that the CI runs GES valgrind test when we change the
overrides as many GES tests are implemented in python

Proper fix is at: https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/204

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2060>
2022-03-29 19:16:58 +02:00
Edward Hervey be1b31b5f8 avviddec: Remove vc1/wmv3 override
FFMPEG 5+ doesn't allow overriding the codec anymore (causes a segfault if you
attempt to do that). But the best part is ... that with the current caps
implementation in pad template and gst_ffmpeg_caps_to_codecid() we would never
replace it by anything different than the existing codec id.

Fixes #1054

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2052>
2022-03-29 11:46:45 +00:00
Edward Hervey f5ab89abf9 docs: Fix doc generation example
They need to be generated from the devenv else it just hangs for no reason.

See #1108

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2051>
2022-03-29 09:28:33 +02:00
Thibault Saunier 904bb001c5 python: Add support for the GstURIHandlerInterface
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1423>
2022-03-28 11:25:24 +00:00
Matthew Waters 8b82463b01 validate/media-info: silence unsed variable warning
Fixes:

../validate/gst/validate/gst-validate-media-info.c:714:28: error: variable 'total_sink_count' set but not used [-Werror,-Wunused-but-set-variable]
  guint id, ncounters = 0, total_sink_count = 0;
                           ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 67e364b34d rtsp-stream: remove unused variable:
Fixes:

../gst/rtsp-server/rtsp-stream.c:2670:9: error: variable 'n_messages' set but not used [-Werror,-Wunused-but-set-variable]
  guint n_messages = 0;
        ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters b8a5e7a4e4 applemeida/texturecache: remove unused variable
Fixes:

../sys/applemedia/videotexturecache.m:71:20: error: variable 'features' set but not used [-Werror,-Wunused-but-set-variable]
  GstCapsFeatures *features;
                   ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 3ffbb66593 applemedia/corevideobuffer: remove unused variable
Fixes:

../sys/applemedia/corevideobuffer.c:209:19: error: variable 'video_meta' set but not used [-Werror,-Wunused-but-set-variable]
    GstVideoMeta *video_meta;
                  ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters b8f83c9d14 applemedia/iosgl: remove unused variable
Fixes:

../sys/applemedia/iosurfaceglmemory.c:219:41: error: variable 'texfmt' set but not used [-Werror,-Wunused-but-set-variable]
    GLuint tex_id, tex_target, texifmt, texfmt;
                                        ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 49e452525d vtdec: remove unused variable
Fixes:

../sys/applemedia/vtdec.c:611:35: error: variable 'output_flags' set but not used [-Werror,-Wunused-but-set-variable]
  VTDecodeFrameFlags input_flags, output_flags;
                                  ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters edd9ec0456 avsamplevideosink: remove unused variable
Fixes

../sys/applemedia/avsamplevideosink.m:80:20: error: variable 'gstelement_class' set but not used [-Werror,-Wunused-but-set-variable]
  GstElementClass *gstelement_class;
                   ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 651cd8e0bb avfassetsrc: fix unused-but-set warning
../sys/applemedia/avfassetsrc.m:1014:12: error: variable 'caps' set but not used [-Werror,-Wunused-but-set-variable]
  GstCaps *caps;
           ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters f65b61fd53 speed: fix unused-but-set warning
../gst/speed/gstspeed.c:523:39: error: variable 'base' set but not used [-Werror,-Wunused-but-set-variable]
      gint64 start_value, stop_value, base;
                                      ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00