Sync from SUSE:SLFO:Main gstreamer-plugins-bad revision 2a8454b9f0c69a4b25ef1011315d5c6d

This commit is contained in:
Adrian Schröter 2024-10-03 15:11:22 +02:00
parent 1cbb79b0bf
commit 03264f6b65
7 changed files with 328 additions and 942 deletions

View File

@ -1,912 +0,0 @@
From d5755744c3e2b70e9f04704ae9d18b928d9fa456 Mon Sep 17 00:00:00 2001
From: Arun Raghavan <arun@asymptotic.io>
Date: Wed, 2 Dec 2020 18:31:44 -0500
Subject: [PATCH 1/2] webrtcdsp: Update code for webrtc-audio-processing-1
Updated API usage appropriately, and now we have a versioned package to
track breaking vs. non-breaking updates.
Deprecates a number of properties (and we have to plug in our own values
for related enums which are now gone):
* echo-suprression-level
* experimental-agc
* extended-filter
* delay-agnostic
* voice-detection-frame-size-ms
* voice-detection-likelihood
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2943>
---
.../ext/webrtcdsp/gstwebrtcdsp.cpp | 271 +++++++-----------
.../ext/webrtcdsp/gstwebrtcechoprobe.cpp | 87 +++---
.../ext/webrtcdsp/gstwebrtcechoprobe.h | 9 +-
.../gst-plugins-bad/ext/webrtcdsp/meson.build | 4 +-
4 files changed, 164 insertions(+), 207 deletions(-)
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
index 7ee09488fb7..c9a7cdae2f4 100644
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
@@ -71,9 +71,7 @@
#include "gstwebrtcdsp.h"
#include "gstwebrtcechoprobe.h"
-#include <webrtc/modules/audio_processing/include/audio_processing.h>
-#include <webrtc/modules/interface/module_common_types.h>
-#include <webrtc/system_wrappers/include/trace.h>
+#include <modules/audio_processing/include/audio_processing.h>
GST_DEBUG_CATEGORY (webrtc_dsp_debug);
#define GST_CAT_DEFAULT (webrtc_dsp_debug)
@@ -82,10 +80,9 @@ GST_DEBUG_CATEGORY (webrtc_dsp_debug);
#define DEFAULT_COMPRESSION_GAIN_DB 9
#define DEFAULT_STARTUP_MIN_VOLUME 12
#define DEFAULT_LIMITER TRUE
-#define DEFAULT_GAIN_CONTROL_MODE webrtc::GainControl::kAdaptiveDigital
+#define DEFAULT_GAIN_CONTROL_MODE webrtc::AudioProcessing::Config::GainController1::Mode::kAdaptiveDigital
#define DEFAULT_VOICE_DETECTION FALSE
#define DEFAULT_VOICE_DETECTION_FRAME_SIZE_MS 10
-#define DEFAULT_VOICE_DETECTION_LIKELIHOOD webrtc::VoiceDetection::kLowLikelihood
static GstStaticPadTemplate gst_webrtc_dsp_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
@@ -119,7 +116,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
"channels = (int) [1, MAX]")
);
-typedef webrtc::EchoCancellation::SuppressionLevel GstWebrtcEchoSuppressionLevel;
+typedef int GstWebrtcEchoSuppressionLevel;
#define GST_TYPE_WEBRTC_ECHO_SUPPRESSION_LEVEL \
(gst_webrtc_echo_suppression_level_get_type ())
static GType
@@ -127,10 +124,9 @@ gst_webrtc_echo_suppression_level_get_type (void)
{
static GType suppression_level_type = 0;
static const GEnumValue level_types[] = {
- {webrtc::EchoCancellation::kLowSuppression, "Low Suppression", "low"},
- {webrtc::EchoCancellation::kModerateSuppression,
- "Moderate Suppression", "moderate"},
- {webrtc::EchoCancellation::kHighSuppression, "high Suppression", "high"},
+ {1, "Low Suppression", "low"},
+ {2, "Moderate Suppression", "moderate"},
+ {3, "high Suppression", "high"},
{0, NULL, NULL}
};
@@ -141,7 +137,7 @@ gst_webrtc_echo_suppression_level_get_type (void)
return suppression_level_type;
}
-typedef webrtc::NoiseSuppression::Level GstWebrtcNoiseSuppressionLevel;
+typedef webrtc::AudioProcessing::Config::NoiseSuppression::Level GstWebrtcNoiseSuppressionLevel;
#define GST_TYPE_WEBRTC_NOISE_SUPPRESSION_LEVEL \
(gst_webrtc_noise_suppression_level_get_type ())
static GType
@@ -149,10 +145,10 @@ gst_webrtc_noise_suppression_level_get_type (void)
{
static GType suppression_level_type = 0;
static const GEnumValue level_types[] = {
- {webrtc::NoiseSuppression::kLow, "Low Suppression", "low"},
- {webrtc::NoiseSuppression::kModerate, "Moderate Suppression", "moderate"},
- {webrtc::NoiseSuppression::kHigh, "High Suppression", "high"},
- {webrtc::NoiseSuppression::kVeryHigh, "Very High Suppression",
+ {webrtc::AudioProcessing::Config::NoiseSuppression::Level::kLow, "Low Suppression", "low"},
+ {webrtc::AudioProcessing::Config::NoiseSuppression::Level::kModerate, "Moderate Suppression", "moderate"},
+ {webrtc::AudioProcessing::Config::NoiseSuppression::Level::kHigh, "High Suppression", "high"},
+ {webrtc::AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh, "Very High Suppression",
"very-high"},
{0, NULL, NULL}
};
@@ -164,7 +160,7 @@ gst_webrtc_noise_suppression_level_get_type (void)
return suppression_level_type;
}
-typedef webrtc::GainControl::Mode GstWebrtcGainControlMode;
+typedef webrtc::AudioProcessing::Config::GainController1::Mode GstWebrtcGainControlMode;
#define GST_TYPE_WEBRTC_GAIN_CONTROL_MODE \
(gst_webrtc_gain_control_mode_get_type ())
static GType
@@ -172,8 +168,9 @@ gst_webrtc_gain_control_mode_get_type (void)
{
static GType gain_control_mode_type = 0;
static const GEnumValue mode_types[] = {
- {webrtc::GainControl::kAdaptiveDigital, "Adaptive Digital", "adaptive-digital"},
- {webrtc::GainControl::kFixedDigital, "Fixed Digital", "fixed-digital"},
+ {webrtc::AudioProcessing::Config::GainController1::kAdaptiveDigital, "Adaptive Digital", "adaptive-digital"},
+ {webrtc::AudioProcessing::Config::GainController1::kFixedDigital, "Fixed Digital", "fixed-digital"},
+ {webrtc::AudioProcessing::Config::GainController1::kAdaptiveAnalog, "Adaptive Analog", "adaptive-analog"},
{0, NULL, NULL}
};
@@ -184,7 +181,7 @@ gst_webrtc_gain_control_mode_get_type (void)
return gain_control_mode_type;
}
-typedef webrtc::VoiceDetection::Likelihood GstWebrtcVoiceDetectionLikelihood;
+typedef int GstWebrtcVoiceDetectionLikelihood;
#define GST_TYPE_WEBRTC_VOICE_DETECTION_LIKELIHOOD \
(gst_webrtc_voice_detection_likelihood_get_type ())
static GType
@@ -192,10 +189,10 @@ gst_webrtc_voice_detection_likelihood_get_type (void)
{
static GType likelihood_type = 0;
static const GEnumValue likelihood_types[] = {
- {webrtc::VoiceDetection::kVeryLowLikelihood, "Very Low Likelihood", "very-low"},
- {webrtc::VoiceDetection::kLowLikelihood, "Low Likelihood", "low"},
- {webrtc::VoiceDetection::kModerateLikelihood, "Moderate Likelihood", "moderate"},
- {webrtc::VoiceDetection::kHighLikelihood, "High Likelihood", "high"},
+ {1, "Very Low Likelihood", "very-low"},
+ {2, "Low Likelihood", "low"},
+ {3, "Moderate Likelihood", "moderate"},
+ {4, "High Likelihood", "high"},
{0, NULL, NULL}
};
@@ -227,6 +224,7 @@ enum
PROP_VOICE_DETECTION,
PROP_VOICE_DETECTION_FRAME_SIZE_MS,
PROP_VOICE_DETECTION_LIKELIHOOD,
+ PROP_EXTRA_DELAY_MS,
};
/**
@@ -248,7 +246,7 @@ struct _GstWebrtcDsp
/* Protected by the stream lock */
GstAdapter *adapter;
GstPlanarAudioAdapter *padapter;
- webrtc::AudioProcessing * apm;
+ webrtc::AudioProcessing *apm;
/* Protected by the object lock */
gchar *probe_name;
@@ -257,21 +255,15 @@ struct _GstWebrtcDsp
/* Properties */
gboolean high_pass_filter;
gboolean echo_cancel;
- webrtc::EchoCancellation::SuppressionLevel echo_suppression_level;
gboolean noise_suppression;
- webrtc::NoiseSuppression::Level noise_suppression_level;
+ webrtc::AudioProcessing::Config::NoiseSuppression::Level noise_suppression_level;
gboolean gain_control;
- gboolean experimental_agc;
- gboolean extended_filter;
- gboolean delay_agnostic;
gint target_level_dbfs;
gint compression_gain_db;
gint startup_min_volume;
gboolean limiter;
- webrtc::GainControl::Mode gain_control_mode;
+ webrtc::AudioProcessing::Config::GainController1::Mode gain_control_mode;
gboolean voice_detection;
- gint voice_detection_frame_size_ms;
- webrtc::VoiceDetection::Likelihood voice_detection_likelihood;
};
G_DEFINE_TYPE_WITH_CODE (GstWebrtcDsp, gst_webrtc_dsp, GST_TYPE_AUDIO_FILTER,
@@ -376,9 +368,9 @@ gst_webrtc_dsp_analyze_reverse_stream (GstWebrtcDsp * self,
GstClockTime rec_time)
{
GstWebrtcEchoProbe *probe = NULL;
- webrtc::AudioProcessing * apm;
- webrtc::AudioFrame frame;
+ webrtc::AudioProcessing *apm;
GstBuffer *buf = NULL;
+ GstAudioBuffer abuf;
GstFlowReturn ret = GST_FLOW_OK;
gint err, delay;
@@ -391,48 +383,44 @@ gst_webrtc_dsp_analyze_reverse_stream (GstWebrtcDsp * self,
if (!probe)
return GST_FLOW_OK;
+ webrtc::StreamConfig config (probe->info.rate, probe->info.channels,
+ false);
apm = self->apm;
- if (self->delay_agnostic)
- rec_time = GST_CLOCK_TIME_NONE;
-
-again:
- delay = gst_webrtc_echo_probe_read (probe, rec_time, (gpointer) &frame, &buf);
+ delay = gst_webrtc_echo_probe_read (probe, rec_time, &buf);
apm->set_stream_delay_ms (delay);
+ g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
+
if (delay < 0)
goto done;
- if (frame.sample_rate_hz_ != self->info.rate) {
+ if (probe->info.rate != self->info.rate) {
GST_ELEMENT_ERROR (self, STREAM, FORMAT,
("Echo Probe has rate %i , while the DSP is running at rate %i,"
" use a caps filter to ensure those are the same.",
- frame.sample_rate_hz_, self->info.rate), (NULL));
+ probe->info.rate, self->info.rate), (NULL));
ret = GST_FLOW_ERROR;
goto done;
}
- if (buf) {
- webrtc::StreamConfig config (frame.sample_rate_hz_, frame.num_channels_,
- false);
- GstAudioBuffer abuf;
- float * const * data;
+ gst_audio_buffer_map (&abuf, &self->info, buf, GST_MAP_READWRITE);
+
+ if (probe->interleaved) {
+ int16_t * const data = (int16_t * const) abuf.planes[0];
- gst_audio_buffer_map (&abuf, &self->info, buf, GST_MAP_READWRITE);
- data = (float * const *) abuf.planes;
if ((err = apm->ProcessReverseStream (data, config, config, data)) < 0)
GST_WARNING_OBJECT (self, "Reverse stream analyses failed: %s.",
webrtc_error_to_string (err));
- gst_audio_buffer_unmap (&abuf);
- gst_buffer_replace (&buf, NULL);
} else {
- if ((err = apm->AnalyzeReverseStream (&frame)) < 0)
+ float * const * data = (float * const *) abuf.planes;
+
+ if ((err = apm->ProcessReverseStream (data, config, config, data)) < 0)
GST_WARNING_OBJECT (self, "Reverse stream analyses failed: %s.",
webrtc_error_to_string (err));
}
- if (self->delay_agnostic)
- goto again;
+ gst_audio_buffer_unmap (&abuf);
done:
gst_object_unref (probe);
@@ -443,16 +431,14 @@ done:
static void
gst_webrtc_vad_post_activity (GstWebrtcDsp *self, GstBuffer *buffer,
- gboolean stream_has_voice)
+ gboolean stream_has_voice, guint8 level)
{
GstClockTime timestamp = GST_BUFFER_PTS (buffer);
GstBaseTransform *trans = GST_BASE_TRANSFORM_CAST (self);
GstStructure *s;
GstClockTime stream_time;
GstAudioLevelMeta *meta;
- guint8 level;
- level = self->apm->level_estimator ()->RMS ();
meta = gst_buffer_get_audio_level_meta (buffer);
if (meta) {
meta->voice_activity = stream_has_voice;
@@ -481,6 +467,7 @@ gst_webrtc_dsp_process_stream (GstWebrtcDsp * self,
{
GstAudioBuffer abuf;
webrtc::AudioProcessing * apm = self->apm;
+ webrtc::StreamConfig config (self->info.rate, self->info.channels, false);
gint err;
if (!gst_audio_buffer_map (&abuf, &self->info, buffer,
@@ -490,19 +477,10 @@ gst_webrtc_dsp_process_stream (GstWebrtcDsp * self,
}
if (self->interleaved) {
- webrtc::AudioFrame frame;
- frame.num_channels_ = self->info.channels;
- frame.sample_rate_hz_ = self->info.rate;
- frame.samples_per_channel_ = self->period_samples;
-
- memcpy (frame.data_, abuf.planes[0], self->period_size);
- err = apm->ProcessStream (&frame);
- if (err >= 0)
- memcpy (abuf.planes[0], frame.data_, self->period_size);
+ int16_t * const data = (int16_t * const) abuf.planes[0];
+ err = apm->ProcessStream (data, config, config, data);
} else {
float * const * data = (float * const *) abuf.planes;
- webrtc::StreamConfig config (self->info.rate, self->info.channels, false);
-
err = apm->ProcessStream (data, config, config, data);
}
@@ -511,10 +489,13 @@ gst_webrtc_dsp_process_stream (GstWebrtcDsp * self,
webrtc_error_to_string (err));
} else {
if (self->voice_detection) {
- gboolean stream_has_voice = apm->voice_detection ()->stream_has_voice ();
+ webrtc::AudioProcessingStats stats = apm->GetStatistics ();
+ gboolean stream_has_voice = stats.voice_detected && *stats.voice_detected;
+ // The meta takes the value as -dbov, so we negate
+ guint8 level = stats.output_rms_dbfs ? (guint8) -(*stats.output_rms_dbfs) : 127;
if (stream_has_voice != self->stream_has_voice)
- gst_webrtc_vad_post_activity (self, buffer, stream_has_voice);
+ gst_webrtc_vad_post_activity (self, buffer, stream_has_voice, level);
self->stream_has_voice = stream_has_voice;
}
@@ -583,21 +564,9 @@ static gboolean
gst_webrtc_dsp_start (GstBaseTransform * btrans)
{
GstWebrtcDsp *self = GST_WEBRTC_DSP (btrans);
- webrtc::Config config;
GST_OBJECT_LOCK (self);
- config.Set < webrtc::ExtendedFilter >
- (new webrtc::ExtendedFilter (self->extended_filter));
- config.Set < webrtc::ExperimentalAgc >
- (new webrtc::ExperimentalAgc (self->experimental_agc, self->startup_min_volume));
- config.Set < webrtc::DelayAgnostic >
- (new webrtc::DelayAgnostic (self->delay_agnostic));
-
- /* TODO Intelligibility enhancer, Beamforming, etc. */
-
- self->apm = webrtc::AudioProcessing::Create (config);
-
if (self->echo_cancel) {
self->probe = gst_webrtc_acquire_echo_probe (self->probe_name);
@@ -618,10 +587,8 @@ static gboolean
gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info)
{
GstWebrtcDsp *self = GST_WEBRTC_DSP (filter);
- webrtc::AudioProcessing * apm;
- webrtc::ProcessingConfig pconfig;
+ webrtc::AudioProcessing::Config config;
GstAudioInfo probe_info = *info;
- gint err = 0;
GST_LOG_OBJECT (self, "setting format to %s with %i Hz and %i channels",
info->finfo->description, info->rate, info->channels);
@@ -633,7 +600,7 @@ gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info)
self->info = *info;
self->interleaved = (info->layout == GST_AUDIO_LAYOUT_INTERLEAVED);
- apm = self->apm;
+ self->apm = webrtc::AudioProcessingBuilder().Create();
if (!self->interleaved)
gst_planar_audio_adapter_configure (self->padapter, info);
@@ -642,8 +609,7 @@ gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info)
self->period_samples = info->rate / 100;
self->period_size = self->period_samples * info->bpf;
- if (self->interleaved &&
- (webrtc::AudioFrame::kMaxDataSizeSamples * 2) < self->period_size)
+ if (self->interleaved && (self->period_size > MAX_DATA_SIZE_SAMPLES * 2))
goto period_too_big;
if (self->probe) {
@@ -658,40 +624,31 @@ gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info)
GST_WEBRTC_ECHO_PROBE_UNLOCK (self->probe);
}
- /* input stream */
- pconfig.streams[webrtc::ProcessingConfig::kInputStream] =
- webrtc::StreamConfig (info->rate, info->channels, false);
- /* output stream */
- pconfig.streams[webrtc::ProcessingConfig::kOutputStream] =
- webrtc::StreamConfig (info->rate, info->channels, false);
- /* reverse input stream */
- pconfig.streams[webrtc::ProcessingConfig::kReverseInputStream] =
- webrtc::StreamConfig (probe_info.rate, probe_info.channels, false);
- /* reverse output stream */
- pconfig.streams[webrtc::ProcessingConfig::kReverseOutputStream] =
- webrtc::StreamConfig (probe_info.rate, probe_info.channels, false);
-
- if ((err = apm->Initialize (pconfig)) < 0)
- goto initialize_failed;
-
/* Setup Filters */
+ // TODO: expose pre_amplifier
+
if (self->high_pass_filter) {
GST_DEBUG_OBJECT (self, "Enabling High Pass filter");
- apm->high_pass_filter ()->Enable (true);
+ config.high_pass_filter.enabled = true;
}
if (self->echo_cancel) {
GST_DEBUG_OBJECT (self, "Enabling Echo Cancellation");
- apm->echo_cancellation ()->enable_drift_compensation (false);
- apm->echo_cancellation ()
- ->set_suppression_level (self->echo_suppression_level);
- apm->echo_cancellation ()->Enable (true);
+ config.echo_canceller.enabled = true;
}
if (self->noise_suppression) {
GST_DEBUG_OBJECT (self, "Enabling Noise Suppression");
- apm->noise_suppression ()->set_level (self->noise_suppression_level);
- apm->noise_suppression ()->Enable (true);
+ config.noise_suppression.enabled = true;
+ config.noise_suppression.level = self->noise_suppression_level;
+ }
+
+ // TODO: expose transient suppression
+
+ if (self->voice_detection) {
+ GST_DEBUG_OBJECT (self, "Enabling Voice Activity Detection");
+ config.voice_detection.enabled = true;
+ self->stream_has_voice = FALSE;
}
if (self->gain_control) {
@@ -706,30 +663,17 @@ gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info)
g_type_class_unref (mode_class);
- apm->gain_control ()->set_mode (self->gain_control_mode);
- apm->gain_control ()->set_target_level_dbfs (self->target_level_dbfs);
- apm->gain_control ()->set_compression_gain_db (self->compression_gain_db);
- apm->gain_control ()->enable_limiter (self->limiter);
- apm->gain_control ()->Enable (true);
+ config.gain_controller1.enabled = true;
+ config.gain_controller1.target_level_dbfs = self->target_level_dbfs;
+ config.gain_controller1.compression_gain_db = self->compression_gain_db;
+ config.gain_controller1.enable_limiter = self->limiter;
+ config.level_estimation.enabled = true;
}
- if (self->voice_detection) {
- GEnumClass *likelihood_class = (GEnumClass *)
- g_type_class_ref (GST_TYPE_WEBRTC_VOICE_DETECTION_LIKELIHOOD);
- GST_DEBUG_OBJECT (self, "Enabling Voice Activity Detection, frame size "
- "%d milliseconds, likelihood: %s", self->voice_detection_frame_size_ms,
- g_enum_get_value (likelihood_class,
- self->voice_detection_likelihood)->value_name);
- g_type_class_unref (likelihood_class);
+ // TODO: expose gain controller 2
+ // TODO: expose residual echo detector
- self->stream_has_voice = FALSE;
-
- apm->voice_detection ()->Enable (true);
- apm->voice_detection ()->set_likelihood (self->voice_detection_likelihood);
- apm->voice_detection ()->set_frame_size_ms (
- self->voice_detection_frame_size_ms);
- apm->level_estimator ()->Enable (true);
- }
+ self->apm->ApplyConfig (config);
GST_OBJECT_UNLOCK (self);
@@ -738,9 +682,9 @@ gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info)
period_too_big:
GST_OBJECT_UNLOCK (self);
GST_WARNING_OBJECT (self, "webrtcdsp format produce too big period "
- "(maximum is %" G_GSIZE_FORMAT " samples and we have %u samples), "
+ "(maximum is %d samples and we have %u samples), "
"reduce the number of channels or the rate.",
- webrtc::AudioFrame::kMaxDataSizeSamples, self->period_size / 2);
+ MAX_DATA_SIZE_SAMPLES, self->period_size / 2);
return FALSE;
probe_has_wrong_rate:
@@ -751,14 +695,6 @@ probe_has_wrong_rate:
" use a caps filter to ensure those are the same.",
probe_info.rate, info->rate), (NULL));
return FALSE;
-
-initialize_failed:
- GST_OBJECT_UNLOCK (self);
- GST_ELEMENT_ERROR (self, LIBRARY, INIT,
- ("Failed to initialize WebRTC Audio Processing library"),
- ("webrtc::AudioProcessing::Initialize() failed: %s",
- webrtc_error_to_string (err)));
- return FALSE;
}
static gboolean
@@ -803,8 +739,6 @@ gst_webrtc_dsp_set_property (GObject * object,
self->echo_cancel = g_value_get_boolean (value);
break;
case PROP_ECHO_SUPPRESSION_LEVEL:
- self->echo_suppression_level =
- (GstWebrtcEchoSuppressionLevel) g_value_get_enum (value);
break;
case PROP_NOISE_SUPPRESSION:
self->noise_suppression = g_value_get_boolean (value);
@@ -817,13 +751,10 @@ gst_webrtc_dsp_set_property (GObject * object,
self->gain_control = g_value_get_boolean (value);
break;
case PROP_EXPERIMENTAL_AGC:
- self->experimental_agc = g_value_get_boolean (value);
break;
case PROP_EXTENDED_FILTER:
- self->extended_filter = g_value_get_boolean (value);
break;
case PROP_DELAY_AGNOSTIC:
- self->delay_agnostic = g_value_get_boolean (value);
break;
case PROP_TARGET_LEVEL_DBFS:
self->target_level_dbfs = g_value_get_int (value);
@@ -845,11 +776,8 @@ gst_webrtc_dsp_set_property (GObject * object,
self->voice_detection = g_value_get_boolean (value);
break;
case PROP_VOICE_DETECTION_FRAME_SIZE_MS:
- self->voice_detection_frame_size_ms = g_value_get_int (value);
break;
case PROP_VOICE_DETECTION_LIKELIHOOD:
- self->voice_detection_likelihood =
- (GstWebrtcVoiceDetectionLikelihood) g_value_get_enum (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -876,7 +804,7 @@ gst_webrtc_dsp_get_property (GObject * object,
g_value_set_boolean (value, self->echo_cancel);
break;
case PROP_ECHO_SUPPRESSION_LEVEL:
- g_value_set_enum (value, self->echo_suppression_level);
+ g_value_set_enum (value, (GstWebrtcEchoSuppressionLevel) 2);
break;
case PROP_NOISE_SUPPRESSION:
g_value_set_boolean (value, self->noise_suppression);
@@ -888,13 +816,13 @@ gst_webrtc_dsp_get_property (GObject * object,
g_value_set_boolean (value, self->gain_control);
break;
case PROP_EXPERIMENTAL_AGC:
- g_value_set_boolean (value, self->experimental_agc);
+ g_value_set_boolean (value, false);
break;
case PROP_EXTENDED_FILTER:
- g_value_set_boolean (value, self->extended_filter);
+ g_value_set_boolean (value, false);
break;
case PROP_DELAY_AGNOSTIC:
- g_value_set_boolean (value, self->delay_agnostic);
+ g_value_set_boolean (value, false);
break;
case PROP_TARGET_LEVEL_DBFS:
g_value_set_int (value, self->target_level_dbfs);
@@ -915,10 +843,10 @@ gst_webrtc_dsp_get_property (GObject * object,
g_value_set_boolean (value, self->voice_detection);
break;
case PROP_VOICE_DETECTION_FRAME_SIZE_MS:
- g_value_set_int (value, self->voice_detection_frame_size_ms);
+ g_value_set_int (value, 0);
break;
case PROP_VOICE_DETECTION_LIKELIHOOD:
- g_value_set_enum (value, self->voice_detection_likelihood);
+ g_value_set_enum (value, 2);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1005,13 +933,13 @@ gst_webrtc_dsp_class_init (GstWebrtcDspClass * klass)
g_object_class_install_property (gobject_class,
PROP_ECHO_SUPPRESSION_LEVEL,
- g_param_spec_enum ("echo-suppression-level", "Echo Suppression Level",
+ g_param_spec_enum ("echo-suppression-level",
+ "Echo Suppression Level (does nothing)",
"Controls the aggressiveness of the suppressor. A higher level "
"trades off double-talk performance for increased echo suppression.",
- GST_TYPE_WEBRTC_ECHO_SUPPRESSION_LEVEL,
- webrtc::EchoCancellation::kModerateSuppression,
+ GST_TYPE_WEBRTC_ECHO_SUPPRESSION_LEVEL, 2,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)));
g_object_class_install_property (gobject_class,
PROP_NOISE_SUPPRESSION,
@@ -1026,7 +954,7 @@ gst_webrtc_dsp_class_init (GstWebrtcDspClass * klass)
"Controls the aggressiveness of the suppression. Increasing the "
"level will reduce the noise level at the expense of a higher "
"speech distortion.", GST_TYPE_WEBRTC_NOISE_SUPPRESSION_LEVEL,
- webrtc::EchoCancellation::kModerateSuppression,
+ webrtc::AudioProcessing::Config::NoiseSuppression::Level::kModerate,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT)));
@@ -1039,24 +967,26 @@ gst_webrtc_dsp_class_init (GstWebrtcDspClass * klass)
g_object_class_install_property (gobject_class,
PROP_EXPERIMENTAL_AGC,
- g_param_spec_boolean ("experimental-agc", "Experimental AGC",
+ g_param_spec_boolean ("experimental-agc",
+ "Experimental AGC (does nothing)",
"Enable or disable experimental automatic gain control.",
FALSE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)));
g_object_class_install_property (gobject_class,
PROP_EXTENDED_FILTER,
g_param_spec_boolean ("extended-filter", "Extended Filter",
"Enable or disable the extended filter.",
TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)));
g_object_class_install_property (gobject_class,
PROP_DELAY_AGNOSTIC,
- g_param_spec_boolean ("delay-agnostic", "Delay Agnostic",
+ g_param_spec_boolean ("delay-agnostic",
+ "Delay agnostic mode (does nothing)",
"Enable or disable the delay agnostic mode.",
FALSE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)));
g_object_class_install_property (gobject_class,
PROP_TARGET_LEVEL_DBFS,
@@ -1111,24 +1041,23 @@ gst_webrtc_dsp_class_init (GstWebrtcDspClass * klass)
g_object_class_install_property (gobject_class,
PROP_VOICE_DETECTION_FRAME_SIZE_MS,
g_param_spec_int ("voice-detection-frame-size-ms",
- "Voice Detection Frame Size Milliseconds",
+ "Voice detection frame size in milliseconds (does nothing)",
"Sets the |size| of the frames in ms on which the VAD will operate. "
"Larger frames will improve detection accuracy, but reduce the "
"frequency of updates",
10, 30, DEFAULT_VOICE_DETECTION_FRAME_SIZE_MS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)));
g_object_class_install_property (gobject_class,
PROP_VOICE_DETECTION_LIKELIHOOD,
g_param_spec_enum ("voice-detection-likelihood",
- "Voice Detection Likelihood",
+ "Voice detection likelihood (does nothing)",
"Specifies the likelihood that a frame will be declared to contain "
"voice.",
- GST_TYPE_WEBRTC_VOICE_DETECTION_LIKELIHOOD,
- DEFAULT_VOICE_DETECTION_LIKELIHOOD,
+ GST_TYPE_WEBRTC_VOICE_DETECTION_LIKELIHOOD, 2,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED)));
gst_type_mark_as_plugin_api (GST_TYPE_WEBRTC_GAIN_CONTROL_MODE, (GstPluginAPIFlags) 0);
gst_type_mark_as_plugin_api (GST_TYPE_WEBRTC_NOISE_SUPPRESSION_LEVEL, (GstPluginAPIFlags) 0);
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp
index acdb3d8a7d5..8e8ca064c48 100644
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp
@@ -33,7 +33,8 @@
#include "gstwebrtcechoprobe.h"
-#include <webrtc/modules/interface/module_common_types.h>
+#include <modules/audio_processing/include/audio_processing.h>
+
#include <gst/audio/audio.h>
GST_DEBUG_CATEGORY_EXTERN (webrtc_dsp_debug);
@@ -102,7 +103,7 @@ gst_webrtc_echo_probe_setup (GstAudioFilter * filter, const GstAudioInfo * info)
self->period_size = self->period_samples * info->bpf;
if (self->interleaved &&
- (webrtc::AudioFrame::kMaxDataSizeSamples * 2) < self->period_size)
+ (MAX_DATA_SIZE_SAMPLES * 2) < self->period_size)
goto period_too_big;
GST_WEBRTC_ECHO_PROBE_UNLOCK (self);
@@ -112,9 +113,9 @@ gst_webrtc_echo_probe_setup (GstAudioFilter * filter, const GstAudioInfo * info)
period_too_big:
GST_WEBRTC_ECHO_PROBE_UNLOCK (self);
GST_WARNING_OBJECT (self, "webrtcdsp format produce too big period "
- "(maximum is %" G_GSIZE_FORMAT " samples and we have %u samples), "
+ "(maximum is %d samples and we have %u samples), "
"reduce the number of channels or the rate.",
- webrtc::AudioFrame::kMaxDataSizeSamples, self->period_size / 2);
+ MAX_DATA_SIZE_SAMPLES, self->period_size / 2);
return FALSE;
}
@@ -303,18 +304,20 @@ gst_webrtc_release_echo_probe (GstWebrtcEchoProbe * probe)
gint
gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
- gpointer _frame, GstBuffer ** buf)
+ GstBuffer ** buf)
{
- webrtc::AudioFrame * frame = (webrtc::AudioFrame *) _frame;
GstClockTimeDiff diff;
- gsize avail, skip, offset, size;
+ gsize avail, skip, offset, size = 0;
gint delay = -1;
GST_WEBRTC_ECHO_PROBE_LOCK (self);
+ /* We always return a buffer -- if don't have data (size == 0), we generate a
+ * silence buffer */
+
if (!GST_CLOCK_TIME_IS_VALID (self->latency) ||
!GST_AUDIO_INFO_IS_VALID (&self->info))
- goto done;
+ goto copy;
if (self->interleaved)
avail = gst_adapter_available (self->adapter) / self->info.bpf;
@@ -324,7 +327,7 @@ gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
/* In delay agnostic mode, just return 10ms of data */
if (!GST_CLOCK_TIME_IS_VALID (rec_time)) {
if (avail < self->period_samples)
- goto done;
+ goto copy;
size = self->period_samples;
skip = 0;
@@ -371,23 +374,51 @@ gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
size = MIN (avail - offset, self->period_samples - skip);
copy:
- if (self->interleaved) {
- skip *= self->info.bpf;
- offset *= self->info.bpf;
- size *= self->info.bpf;
-
- if (size < self->period_size)
- memset (frame->data_, 0, self->period_size);
-
- if (size) {
- gst_adapter_copy (self->adapter, (guint8 *) frame->data_ + skip,
- offset, size);
- gst_adapter_flush (self->adapter, offset + size);
- }
+ if (!size) {
+ /* No data, provide a period's worth of silence */
+ *buf = gst_buffer_new_allocate (NULL, self->period_size, NULL);
+ gst_buffer_memset (*buf, 0, 0, self->period_size);
+ gst_buffer_add_audio_meta (*buf, &self->info, self->period_samples,
+ NULL);
} else {
+ /* We have some actual data, pop period_samples' worth if have it, else pad
+ * with silence and provide what we do have */
GstBuffer *ret, *taken, *tmp;
- if (size) {
+ if (self->interleaved) {
+ skip *= self->info.bpf;
+ offset *= self->info.bpf;
+ size *= self->info.bpf;
+
+ gst_adapter_flush (self->adapter, offset);
+
+ /* we need to fill silence at the beginning and/or the end of the
+ * buffer in order to have period_samples in the buffer */
+ if (size < self->period_size) {
+ gsize padding = self->period_size - (skip + size);
+
+ taken = gst_adapter_take_buffer (self->adapter, size);
+ ret = gst_buffer_new ();
+
+ /* need some silence at the beginning */
+ if (skip) {
+ tmp = gst_buffer_new_allocate (NULL, skip, NULL);
+ gst_buffer_memset (tmp, 0, 0, skip);
+ ret = gst_buffer_append (ret, tmp);
+ }
+
+ ret = gst_buffer_append (ret, taken);
+
+ /* need some silence at the end */
+ if (padding) {
+ tmp = gst_buffer_new_allocate (NULL, padding, NULL);
+ gst_buffer_memset (tmp, 0, 0, padding);
+ ret = gst_buffer_append (ret, tmp);
+ }
+ } else {
+ ret = gst_adapter_take_buffer (self->adapter, size);
+ }
+ } else {
gst_planar_audio_adapter_flush (self->padapter, offset);
/* we need to fill silence at the beginning and/or the end of each
@@ -430,23 +461,13 @@ copy:
ret = gst_planar_audio_adapter_take_buffer (self->padapter, size,
GST_MAP_READWRITE);
}
- } else {
- ret = gst_buffer_new_allocate (NULL, self->period_size, NULL);
- gst_buffer_memset (ret, 0, 0, self->period_size);
- gst_buffer_add_audio_meta (ret, &self->info, self->period_samples,
- NULL);
}
*buf = ret;
}
- frame->num_channels_ = self->info.channels;
- frame->sample_rate_hz_ = self->info.rate;
- frame->samples_per_channel_ = self->period_samples;
-
delay = self->delay;
-done:
GST_WEBRTC_ECHO_PROBE_UNLOCK (self);
return delay;
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h
index 36fd34f1794..488c0e958f3 100644
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h
@@ -45,6 +45,12 @@ G_BEGIN_DECLS
#define GST_WEBRTC_ECHO_PROBE_LOCK(obj) g_mutex_lock (&GST_WEBRTC_ECHO_PROBE (obj)->lock)
#define GST_WEBRTC_ECHO_PROBE_UNLOCK(obj) g_mutex_unlock (&GST_WEBRTC_ECHO_PROBE (obj)->lock)
+/* From the webrtc audio_frame.h definition of kMaxDataSizeSamples:
+ * Stereo, 32 kHz, 120 ms (2 * 32 * 120)
+ * Stereo, 192 kHz, 20 ms (2 * 192 * 20)
+ */
+#define MAX_DATA_SIZE_SAMPLES 7680
+
typedef struct _GstWebrtcEchoProbe GstWebrtcEchoProbe;
typedef struct _GstWebrtcEchoProbeClass GstWebrtcEchoProbeClass;
@@ -71,6 +77,7 @@ struct _GstWebrtcEchoProbe
GstClockTime latency;
gint delay;
gboolean interleaved;
+ gint extra_delay;
GstSegment segment;
GstAdapter *adapter;
@@ -92,7 +99,7 @@ GST_ELEMENT_REGISTER_DECLARE (webrtcechoprobe);
GstWebrtcEchoProbe *gst_webrtc_acquire_echo_probe (const gchar * name);
void gst_webrtc_release_echo_probe (GstWebrtcEchoProbe * probe);
gint gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self,
- GstClockTime rec_time, gpointer frame, GstBuffer ** buf);
+ GstClockTime rec_time, GstBuffer ** buf);
G_END_DECLS
#endif /* __GST_WEBRTC_ECHO_PROBE_H__ */
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/meson.build b/subprojects/gst-plugins-bad/ext/webrtcdsp/meson.build
index 5aeae69a44d..09565e27c73 100644
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/meson.build
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/meson.build
@@ -4,7 +4,7 @@ webrtc_sources = [
'gstwebrtcdspplugin.cpp'
]
-webrtc_dep = dependency('webrtc-audio-processing', version : ['>= 0.2', '< 0.4'],
+webrtc_dep = dependency('webrtc-audio-processing-1', version : ['>= 1.0'],
required : get_option('webrtcdsp'))
if not gnustl_dep.found() and get_option('webrtcdsp').enabled()
@@ -20,7 +20,7 @@ if webrtc_dep.found() and gnustl_dep.found()
dependencies : [gstbase_dep, gstaudio_dep, gstbadaudio_dep, webrtc_dep, gnustl_dep],
install : true,
install_dir : plugins_install_dir,
- override_options : ['cpp_std=c++11'],
+ override_options : ['cpp_std=c++17'],
)
plugins += [gstwebrtcdsp]
endif
--
GitLab
#From 37aab17be305b8033e682276ad9d4ea2d0ab9ee2 Mon Sep 17 00:00:00 2001
#From: Nirbheek Chauhan <nirbheek@centricular.com>
#Date: Wed, 31 May 2023 17:51:38 +0530
#Subject: [PATCH 2/2] meson: Update webrtc-audio-processing wrap to 1.1
#
#Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2943>
#---
# subprojects/webrtc-audio-processing.wrap | 8 ++++----
# 1 file changed, 4 insertions(+), 4 deletions(-)
#
#diff --git a/subprojects/webrtc-audio-processing.wrap b/subprojects/webrtc-audio-processing.wrap
#index 11e9390bc53..bba7dd0b516 100644
#--- a/subprojects/webrtc-audio-processing.wrap
#+++ b/subprojects/webrtc-audio-processing.wrap
#@@ -1,8 +1,8 @@
# [wrap-git]
#-directory=webrtc-audio-processing
#-url=https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing.git
#-push-url=git@gitlab.freedesktop.org:pulseaudio/webrtc-audio-processing.git
#-revision=v1.0
#+directory = webrtc-audio-processing
#+url = https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing.git
#+push-url = git@gitlab.freedesktop.org:pulseaudio/webrtc-audio-processing.git
#+revision = v1.1
#
# [provide]
# dependency_names = webrtc-audio-coding-1, webrtc-audio-processing-1
#--
#GitLab
#

View File

@ -3,14 +3,17 @@ gstreamer-plugins-bad-chromaprint
gstreamer-plugins-bad-fluidsynth
gstreamer-plugins-bad-orig-addon
libgstadaptivedemux-1_0-0
libgstanalytics-1_0-0
libgstbadaudio-1_0-0
libgstbasecamerabinsrc-1_0-0
libgstcodecparsers-1_0-0
libgstcodecs-1_0-0
libgstcuda-1_0-0
libgstdxva-1_0-0
libgstinsertbin-1_0-0
libgstisoff-1_0-0
libgstmpegts-1_0-0
libgstmse-1_0-0
libgstphotography-1_0-0
libgstplay-1_0-0
libgstplayer-1_0-0

BIN
gst-plugins-bad-1.22.9.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
gst-plugins-bad-1.24.7.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,190 @@
-------------------------------------------------------------------
Fri Aug 23 07:42:34 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.24.7:
+ aom: av1enc: restrict allowed input width and height
+ h264parse:
- bypass check for length_size_minus_one
- Reject FD received before SPS
+ msdk: replace strcmp with g_strcmp0
+ msdkvc1dec crashes (segfault)
+ rsvgoverlay: add debug category
+ va:
- don't use GST_ELEMENT_WARNING in set_context() vmethod to fix
potential deadlock
- deadlock when playing two videos at once
+ webrtc: Add missing G_BEGIN/END_DECLS in header for C++
+ wpe: initialize threading.ready before reading it
- Drop 85b4fbf40b1d53a4141941abf70d2d4d83eb140e.patch: Fixed
upstream.
-------------------------------------------------------------------
Sat Aug 17 17:34:16 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Add 85b4fbf40b1d53a4141941abf70d2d4d83eb140e.patch: msdk: replace
strcmp with g_strcmp0. Because strcmp doesn't handle NULL.
-------------------------------------------------------------------
Wed Jul 31 13:43:43 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.24.6:
+ Highlighted bugfixes:
- Fix compatibility with FFmpeg 7.0.
- qmlglsink: Fix failure to display content on recent Android
devices.
- adaptivedemux: Fix handling of closed caption streams.
- cuda: Fix runtime compiler loading with old CUDA tookit.
- decodebin3 stream selection handling fixes.
- d3d11compositor, d3d12compositor: Fix transparent background
mode with YUV output.
- d3d12converter: Make gamma remap work as intended.
- h264decoder: Update output frame duration for interlaced
video when second field frame is discarded.
- macOS audio device provider now listens to audio devices
being added/removed at runtime.
- Rust plugins: audioloudnorm, s3hlssink, gtk4paintablesink,
livesync and webrtcsink fixes.
- videoaggregator: preserve features in non-alpha caps for
subclasses with non-system memory sink caps.
- vtenc: Fix redistribute latency spam.
- v4l2: fixes for complex video formats.
- va: Fix strides when importing DMABUFs, dmabuf handle leaks,
and blocklist unmaintained Intel i965 driver for encoding.
- waylandsink: Fix surface cropping for rotated streams.
- webrtcdsp: Enable multi_channel processing to fix handling of
stereo streams.
- Various bug fixes, memory leak fixes, and other stability and
reliability improvements.
-------------------------------------------------------------------
Thu Jun 27 18:41:29 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.24.5:
+ Highlighted bugfixes:
- webrtcsink: Support for AV1 via nvav1enc, av1enc or rav1enc
encoders
- AV1 RTP payloader/depayloader fixes to work correctly with
Chrome and Pion WebRTC
- av1parse, av1dec error handling/robustness improvements
- av1enc: Handle force-keyunit events properly for WebRTC
- decodebin3: selection and collection handling improvements
- hlsdemux2: Various fixes for discontinuities, variant
switching, playlist updates
- qml6glsink: fix RGB format support
- rtspsrc: more control URL handling fixes
- v4l2src: Interpret V4L2 report of sync loss as video signal
loss
- d3d12 encoder, memory and videosink fixes
- vtdec: more robust error handling, fix regression
- ndi: support for NDI SDK v6
- Various bug fixes, memory leak fixes, and other stability and
reliability improvements
- Please see https://gstreamer.freedesktop.org/releases/1.24/ for
changes between 1.24.0 and this version and even more in-depth
info.
- Drop 0001-Move-PROP_RATE_CONTROL-to-the-end-of-the-array.patch:
Fixed upstream.
-------------------------------------------------------------------
Mon Mar 18 06:05:18 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Disable the webrtcdsp plugin if webrtc-audio-processing-1 is not
available (as in s390x).
-------------------------------------------------------------------
Tue Mar 12 09:36:29 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Add patch that fixes a crash when initializing gstva, submitted
to upstream at https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6319
(boo#1221150):
* 0001-Move-PROP_RATE_CONTROL-to-the-end-of-the-array.patch
-------------------------------------------------------------------
Wed Mar 6 07:44:01 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- baselibs.conf: Produce -32bit biarch packages of
libgstanalytics-1_0-0 and libgstmse-1_0-0: dependencies of
gstreamer-plugins-bad-32bit.
-------------------------------------------------------------------
Wed Mar 6 07:38:12 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Add new gstreamer plugins to baselibs.conf
-------------------------------------------------------------------
Tue Mar 5 06:22:06 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 1.24.0:
* Highlights
- New Discourse forum and Matrix chat space
- New Analytics and Machine Learning abstractions and elements
- Playbin3 and decodebin3 are now stable and the default in
gst-play-1.0, GstPlay/GstPlayer
- The va plugin is now preferred over gst-vaapi and has higher
ranks
- GstMeta serialization/deserialization and other GstMeta
improvements
- New GstMeta for SMPTE ST-291M HANC/VANC Ancillary Data
- New unixfd plugin for efficient 1:N inter-process
communication on Linux
- cudaipc source and sink for zero-copy CUDA memory sharing
between processes
- New intersink and intersrc elements for 1:N pipeline
decoupling within the same process
- Qt5 + Qt6 QML integration improvements including qml6glsrc,
qml6glmixer, qml6gloverlay, and qml6d3d11sink elements
- DRM Modifier Support for dmabufs on Linux
- OpenGL, Vulkan and CUDA integration enhancements
- Vulkan H.264 and H.265 video decoders
- RTP stack improvements including new RFC7273 modes and more
correct header extension handling in depayloaders
- WebRTC improvements such as support for ICE consent
freshness, and a new webrtcsrc element to complement
webrtcsink
- WebRTC signallers and webrtcsink implementations for LiveKit
and AWS Kinesis Video Streams
- WHIP server source and client sink, and a WHEP source
- Precision Time Protocol (PTP) clock support for Windows and
other additions
- Low-Latency HLS (LL-HLS) support and many other HLS and DASH
enhancements
- New W3C Media Source Extensions library
- Countless closed caption handling improvements including new
cea608mux and cea608tocea708 elements
- Translation support for awstranscriber
- Bayer 10/12/14/16-bit depth support
- MPEG-TS support for asynchronous KLV demuxing and segment
seeking, plus various new muxer features
- Capture source and sink for AJA capture and playout cards
- SVT-AV1 and VA-API AV1 encoders, stateless AV1 video decoder
- New uvcsink element for exporting streams as UVC camera
- DirectWrite text rendering plugin for windows
- Direct3D12-based video decoding, conversion, composition, and
rendering
- AMD Advanced Media Framework AV1 + H.265 video encoders with
10-bit and HDR support
- AVX/AVX2 support and NEON support on macOS on Apple ARM64
CPUs via new liborc
- GStreamer C# bindings have been updated
- Rust bindings improvements and many new and improved Rust
plugins
- Rust plugins now shipped in packages for all major platforms
including Android and iOS
- Lots of new plugins, features, performance improvements and
bug fixes
* For more detailed information on this update, please see
https://gstreamer.freedesktop.org/releases/1.24/
- Remove patch reduce-required-meson.patch since meson 1.1 is
really required now.
- Remove patch which is already included in this version:
* 0001-Update-code-for-webrtc-audio-processing-1.patch
-------------------------------------------------------------------
Mon Mar 4 12:58:16 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Disable webrtc audio processing dependency on s390 s390x ppc64:
webrtc-autio-processing is excluded on these architectures.
-------------------------------------------------------------------
Mon Feb 5 10:47:19 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
@ -15,7 +202,8 @@ Thu Feb 1 10:56:39 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 1.22.9:
+ av1parser: Fix potential stack overflow during tile list
parsing (CVE-2024-0444, bsc#1219453, ZDI-CAN-22300)
parsing (CVE-2024-0444, ZDI-CAN-22873, bsc#1219453,
CVE-2023-50186, ZDI-CAN-22300, bsc#1218534, bsc#1223263)
+ camerabin: Correctly relink viewfinderbin_queue
+ GstPlay: Fix error details parsing
+ h264decoder: Handle malformed avc/avc3 packets

View File

@ -64,16 +64,26 @@
%bcond_without ldacBT
%endif
%ifnarch s390 s390x ppc64
%if 0%{?suse_version} >= 1550
%bcond_without microdns
%else
%bcond_with microdns
%endif
%bcond_without webrtc_audio_processing_1
%else
%bcond_with microdns
%bcond_with webrtc_audio_processing_1
%endif
%ifarch x86_64 aarch64 riscv64
%bcond_without svtav1
%else
%bcond_with svtav1
%endif
Name: gstreamer-plugins-bad
Version: 1.22.9
Version: 1.24.7
Release: 0
Summary: GStreamer Streaming-Media Framework Plug-Ins
License: LGPL-2.1-or-later
@ -86,10 +96,6 @@ Source99: baselibs.conf
Patch0: fix-build-with-srt-1.3.4.patch
# PATCH-FIX-OPENSUSE spandsp3.patch jengelh@inai.de -- Fix build against spandsp 3.x. Patch is not upstreamable in this form
Patch2: spandsp3.patch
# PATCH-FIX-SLE reduce-required-meson.patch alarrosa@suse.com -- Reduce the required meson version to build in SLE
Patch3: reduce-required-meson.patch
# PATCH-FIX-UPSTREAM 0001-Update-code-for-webrtc-audio-processing-1.patch alarrosa@suse.com -- Update code to use webrtc-audio-processing-1
Patch4: 0001-Update-code-for-webrtc-audio-processing-1.patch
%if %{with fdk_aac}
BuildRequires: pkgconfig(fdk-aac) >= 0.1.4
@ -100,7 +106,7 @@ BuildRequires: gobject-introspection-devel
BuildRequires: ladspa-devel
BuildRequires: libgme-devel
BuildRequires: libgsm-devel
BuildRequires: meson >= 0.61.0
BuildRequires: meson >= 1.1
BuildRequires: musepack-devel
BuildRequires: orc >= 0.4.11
BuildRequires: pkgconfig
@ -138,6 +144,7 @@ BuildRequires: pkgconfig(gstreamer-video-1.0) >= %{gstreamer_req_version}
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(lc3)
BuildRequires: pkgconfig(lcms2)
%if %{with ldacBT}
BuildRequires: pkgconfig(ldacBT-enc)
@ -166,6 +173,9 @@ BuildRequires: pkgconfig(lrdf)
%if %{with microdns}
BuildRequires: pkgconfig(microdns)
%endif
%if %{with svtav1}
BuildRequires: pkgconfig(SvtAv1Enc)
%endif
BuildRequires: pkgconfig(mjpegtools)
BuildRequires: pkgconfig(neon)
BuildRequires: pkgconfig(nice) >= 0.1.20
@ -193,8 +203,6 @@ BuildRequires: pkgconfig(wayland-scanner) >= 1.4.0
%if %{with webrtc_audio_processing_1}
BuildRequires: pkgconfig(webrtc-audio-coding-1) >= 1.0
BuildRequires: pkgconfig(webrtc-audio-processing-1) >= 1.0
%else
BuildRequires: pkgconfig(webrtc-audio-processing) >= 0.2
%endif
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb) >= 1.10
@ -205,7 +213,7 @@ BuildRequires: pkgconfig(zvbi-0.2)
BuildRequires: pkgconfig(zxing) >= 1.4.0
%endif
Requires(post): glib2-tools
Requires(postun):glib2-tools
Requires(postun): glib2-tools
# FIXME! - this leads to unresolvables currently
#%%define gstreamer_plugins_bad_req %%(xzgrep --text "^GST.*_REQ" %%{S:0} | sort -u | sed 's/GST_REQ=/gstreamer >= /;s/GSTPB_REQ=/gstreamer-plugins-base >= /' | tr '\\n' ' ')
#Requires: %%gstreamer_plugins_bad_req
@ -489,19 +497,55 @@ anything media-related,from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n libgstanalytics-1_0-0
Summary: GStreamer Streaming-Media Framework Plug-Ins
Group: System/Libraries
%description -n libgstanalytics-1_0-0
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related,from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n libgstdxva-1_0-0
Summary: GStreamer Streaming-Media Framework Plug-Ins
Group: System/Libraries
%description -n libgstdxva-1_0-0
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related,from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n libgstmse-1_0-0
Summary: GStreamer Streaming-Media Framework Plug-Ins
Group: System/Libraries
%description -n libgstmse-1_0-0
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related,from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package devel
Summary: GStreamer Streaming-Media Framework Plug-Ins
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libgstadaptivedemux-1_0-0 = %{version}
Requires: libgstanalytics-1_0-0 = %{version}
Requires: libgstbadaudio-1_0-0 = %{version}
Requires: libgstbasecamerabinsrc-1_0-0 = %{version}
Requires: libgstcodecparsers-1_0-0 = %{version}
Requires: libgstcodecs-1_0-0 = %{version}
Requires: libgstcuda-1_0-0 = %{version}
Requires: libgstdxva-1_0-0 = %{version}
Requires: libgstinsertbin-1_0-0 = %{version}
Requires: libgstisoff-1_0-0 = %{version}
Requires: libgstmpegts-1_0-0 = %{version}
Requires: libgstmse-1_0-0 = %{version}
Requires: libgstphotography-1_0-0 = %{version}
Requires: libgstplay-1_0-0 = %{version}
Requires: libgstplayer-1_0-0 = %{version}
@ -514,11 +558,14 @@ Requires: libgstwayland-1_0-0 = %{version}
Requires: libgstwebrtc-1_0-0 = %{version}
Requires: libgstwebrtcnice-1_0-0 = %{version}
Requires: typelib-1_0-CudaGst-1_0 = %{version}
Requires: typelib-1_0-GstAnalytics-1_0 = %{version}
Requires: typelib-1_0-GstBadAudio-1_0 = %{version}
Requires: typelib-1_0-GstCodecs-1_0 = %{version}
Requires: typelib-1_0-GstCuda-1_0 = %{version}
Requires: typelib-1_0-GstDxva-1_0 = %{version}
Requires: typelib-1_0-GstInsertBin-1_0 = %{version}
Requires: typelib-1_0-GstMpegts-1_0 = %{version}
Requires: typelib-1_0-GstMse-1_0 = %{version}
Requires: typelib-1_0-GstPlay-1_0 = %{version}
Requires: typelib-1_0-GstPlayer-1_0 = %{version}
Requires: typelib-1_0-GstVa-1_0 = %{version}
@ -547,6 +594,17 @@ anything media-related,from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n typelib-1_0-GstAnalytics-1_0
Summary: GStreamer Streaming-Media Framework Plug-Ins -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-GstAnalytics-1_0
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n typelib-1_0-GstBadAudio-1_0
Summary: GStreamer Streaming-Media Framework Plug-Ins -- Introspection bindings
Group: System/Libraries
@ -558,6 +616,28 @@ anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n typelib-1_0-GstDxva-1_0
Summary: GStreamer Streaming-Media Framework Plug-Ins -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-GstDxva-1_0
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n typelib-1_0-GstMse-1_0
Summary: GStreamer Streaming-Media Framework Plug-Ins -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-GstMse-1_0
GStreamer is a streaming media framework based on graphs of filters
that operate on media data. Applications using this library can do
anything media-related, from real-time sound processing to playing
videos. Its plug-in-based architecture means that new data types or
processing capabilities can be added simply by installing new plug-ins.
%package -n typelib-1_0-GstPlay-1_0
Summary: GStreamer Streaming-Media Framework Plug-Ins -- Introspection bindings
Group: System/Libraries
@ -740,10 +820,6 @@ sed -ie "/subdir('decklink')/d" sys/meson.build
%if %{pkg_vcmp spandsp-devel >= 3}
%patch -P 2 -p1
%endif
%patch -P 3 -p1
%if %{with webrtc_audio_processing_1}
%patch -P 4 -p3
%endif
%build
%global optflags %{optflags} -fcommon
@ -762,6 +838,7 @@ export PYTHON=%{_bindir}/python3
-D openaptx=disabled \
%endif
-D gpl=enabled \
-D aja=disabled \
%if %{without avtp}
-D avtp=disabled \
%endif
@ -800,7 +877,6 @@ export PYTHON=%{_bindir}/python3
-D hls-crypto=openssl \
-D introspection=enabled \
-D iqa=disabled \
-D kate=disabled \
-D magicleap=disabled \
%if %{without microdns}
-D microdns=disabled \
@ -812,6 +888,9 @@ export PYTHON=%{_bindir}/python3
-D opensles=disabled \
-D sctp=enabled \
-D svthevcenc=disabled \
%if %{without svtav1}
-D svtav1=disabled \
%endif
-D tinyalsa=disabled \
%if %{without voamrwbenc}
-D voamrwbenc=disabled \
@ -833,6 +912,11 @@ export PYTHON=%{_bindir}/python3
%endif
-D amfcodec=disabled \
-D directshow=disabled \
-D d3d11=disabled \
-D qt6d3d11=disabled \
%if %{without webrtc_audio_processing_1}
-D webrtcdsp=disabled \
%endif
%{nil}
%meson_build
@ -862,14 +946,17 @@ find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{_name}-%{gst_branch}
%ldconfig_scriptlets -n libgstadaptivedemux-1_0-0
%ldconfig_scriptlets -n libgstanalytics-1_0-0
%ldconfig_scriptlets -n libgstbadaudio-1_0-0
%ldconfig_scriptlets -n libgstbasecamerabinsrc-1_0-0
%ldconfig_scriptlets -n libgstcodecs-1_0-0
%ldconfig_scriptlets -n libgstcodecparsers-1_0-0
%ldconfig_scriptlets -n libgstcuda-1_0-0
%ldconfig_scriptlets -n libgstdxva-1_0-0
%ldconfig_scriptlets -n libgstinsertbin-1_0-0
%ldconfig_scriptlets -n libgstisoff-1_0-0
%ldconfig_scriptlets -n libgstmpegts-1_0-0
%ldconfig_scriptlets -n libgstmse-1_0-0
%ldconfig_scriptlets -n libgstphotography-1_0-0
%ldconfig_scriptlets -n libgstplayer-1_0-0
%ldconfig_scriptlets -n libgstsctp-1_0-0
@ -892,6 +979,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/gstreamer-%{gst_branch}/libgstadpcmenc.so
%{_libdir}/gstreamer-%{gst_branch}/libgstaes.so
%{_libdir}/gstreamer-%{gst_branch}/libgstaiff.so
%{_libdir}/gstreamer-%{gst_branch}/libgstanalyticsoverlay.so
%{_libdir}/gstreamer-%{gst_branch}/libgstaom.so
%{_libdir}/gstreamer-%{gst_branch}/libgstasfmux.so
%{_libdir}/gstreamer-%{gst_branch}/libgstassrender.so
@ -910,6 +998,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/gstreamer-%{gst_branch}/libgstcamerabin.so
%{_libdir}/gstreamer-%{gst_branch}/libgstclosedcaption.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcodecalpha.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcodec2json.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcoloreffects.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcolormanagement.so
%{_libdir}/gstreamer-%{gst_branch}/libgstcurl.so
@ -936,6 +1025,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/gstreamer-%{gst_branch}/libgstgme.so
%{_libdir}/gstreamer-%{gst_branch}/libgstgsm.so
%{_libdir}/gstreamer-%{gst_branch}/libgsthls.so
%{_libdir}/gstreamer-%{gst_branch}/libgstinsertbin.so
%if %{with ldacBT}
%{_libdir}/gstreamer-%{gst_branch}/libgstldac.so
%endif
@ -949,6 +1039,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/gstreamer-%{gst_branch}/libgstjpegformat.so
%{_libdir}/gstreamer-%{gst_branch}/libgstkms.so
%{_libdir}/gstreamer-%{gst_branch}/libgstladspa.so
%{_libdir}/gstreamer-%{gst_branch}/libgstlc3.so
%if %{with microdns}
%{_libdir}/gstreamer-%{gst_branch}/libgstmicrodns.so
%endif
@ -962,6 +1053,7 @@ find %{buildroot} -type f -name "*.la" -delete -print
%ifarch x86_64
%{_libdir}/gstreamer-%{gst_branch}/libgstmsdk.so
%endif
%{_libdir}/gstreamer-%{gst_branch}/libgstmse.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmusepack.so
%{_libdir}/gstreamer-%{gst_branch}/libgstmxf.so
%{_libdir}/gstreamer-%{gst_branch}/libgstlegacyrawparse.so
@ -994,9 +1086,14 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/gstreamer-%{gst_branch}/libgstspeed.so
%{_libdir}/gstreamer-%{gst_branch}/libgstsrt.so
%{_libdir}/gstreamer-%{gst_branch}/libgstsubenc.so
%if %{with svtav1}
%{_libdir}/gstreamer-%{gst_branch}/libgstsvtav1.so
%endif
%{_libdir}/gstreamer-%{gst_branch}/libgstswitchbin.so
%{_libdir}/gstreamer-%{gst_branch}/libgsttimecode.so
%{_libdir}/gstreamer-%{gst_branch}/libgstttmlsubs.so
%{_libdir}/gstreamer-%{gst_branch}/libgstunixfd.so
%{_libdir}/gstreamer-%{gst_branch}/libgstuvcgadget.so
%{_libdir}/gstreamer-%{gst_branch}/libgstv4l2codecs.so
%{_libdir}/gstreamer-%{gst_branch}/libgstva.so
%{_libdir}/gstreamer-%{gst_branch}/libgstvideofiltersbad.so
@ -1018,7 +1115,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
%if %{with zxing}
%{_libdir}/gstreamer-%{gst_branch}/libgstzxing.so
%endif
%if %{with webrtc_audio_processing_1}
%{_libdir}/gstreamer-%{gst_branch}/libgstwebrtcdsp.so
%endif
%{_libdir}/gstreamer-%{gst_branch}/libgsty4mdec.so
%{_libdir}/gstreamer-%{gst_branch}/libgstuvch264.so
%{_libdir}/gstreamer-%{gst_branch}/libgstwebp.so
@ -1108,9 +1207,27 @@ find %{buildroot} -type f -name "*.la" -delete -print
%files -n libgstwebrtcnice-1_0-0
%{_libdir}/libgstwebrtcnice-%{gst_branch}.so.0*
%files -n libgstanalytics-1_0-0
%{_libdir}/libgstanalytics-%{gst_branch}.so.0*
%files -n libgstdxva-1_0-0
%{_libdir}/libgstdxva-%{gst_branch}.so.0*
%files -n libgstmse-1_0-0
%{_libdir}/libgstmse-%{gst_branch}.so.0*
%files -n typelib-1_0-GstAnalytics-1_0
%{_libdir}/girepository-1.0/GstAnalytics-1.0.typelib
%files -n typelib-1_0-GstBadAudio-1_0
%{_libdir}/girepository-1.0/GstBadAudio-1.0.typelib
%files -n typelib-1_0-GstDxva-1_0
%{_libdir}/girepository-1.0/GstDxva-1.0.typelib
%files -n typelib-1_0-GstMse-1_0
%{_libdir}/girepository-1.0/GstMse-1.0.typelib
%files -n typelib-1_0-GstPlay-1_0
%{_libdir}/girepository-1.0/GstPlay-1.0.typelib
@ -1151,10 +1268,12 @@ find %{buildroot} -type f -name "*.la" -delete -print
%doc AUTHORS NEWS README.md RELEASE REQUIREMENTS
%{_includedir}/gstreamer-%{gst_branch}
%{_libdir}/*.so
%{_libdir}/pkgconfig/gstreamer-analytics-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-bad-audio-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-codecparsers-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-insertbin-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-mpegts-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-mse-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-photography-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-player-%{gst_branch}.pc
%{_libdir}/pkgconfig/gstreamer-plugins-bad-%{gst_branch}.pc

View File

@ -1,12 +0,0 @@
Index: gst-plugins-bad-1.22.9/meson.build
===================================================================
--- gst-plugins-bad-1.22.9.orig/meson.build
+++ gst-plugins-bad-1.22.9/meson.build
@@ -1,6 +1,6 @@
project('gst-plugins-bad', 'c', 'cpp',
version : '1.22.9',
- meson_version : '>= 0.62',
+ meson_version : '>= 0.61',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])