1.24.6
This commit is contained in:
parent
851eb29c89
commit
3312612a46
1
.gitignore
vendored
1
.gitignore
vendored
@ -91,3 +91,4 @@
|
|||||||
/gst-plugins-bad-free-1.22.8.tar.xz
|
/gst-plugins-bad-free-1.22.8.tar.xz
|
||||||
/gst-plugins-bad-free-1.22.9.tar.xz
|
/gst-plugins-bad-free-1.22.9.tar.xz
|
||||||
/gst-plugins-bad-free-1.22.12.tar.xz
|
/gst-plugins-bad-free-1.22.12.tar.xz
|
||||||
|
/gst-plugins-bad-free-1.24.6.tar.xz
|
||||||
|
@ -1,881 +0,0 @@
|
|||||||
From 0757dbc0b406ebd6c38c8d86bf4d4738a232db40 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/3] 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 7ee09488fb..c9a7cdae2f 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 acdb3d8a7d..8e8ca064c4 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 36fd34f179..488c0e958f 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 5aeae69a44..09565e27c7 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
|
|
||||||
--
|
|
||||||
2.45.2
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 187eb3d4874ff6ceccf85bed3e8161f68f8e09da Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nirbheek Chauhan <nirbheek@centricular.com>
|
|
||||||
Date: Tue, 6 Jun 2023 16:34:19 +0530
|
|
||||||
Subject: [PATCH 2/3] webrtcdsp: Map probe buffers with probe info, not dsp
|
|
||||||
info
|
|
||||||
|
|
||||||
The probe's info may not precisely match the dsp's info. For instance,
|
|
||||||
the number of channels or their layout might be different.
|
|
||||||
|
|
||||||
```
|
|
||||||
GStreamer-Audio-CRITICAL **: 16:21:32.899: the GstAudioInfo argument is not equal to the GstAudioMeta's attached info
|
|
||||||
```
|
|
||||||
|
|
||||||
This broke in d5755744c3e2b70e9f04704ae9d18b928d9fa456.
|
|
||||||
|
|
||||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4849>
|
|
||||||
---
|
|
||||||
subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
|
|
||||||
index c9a7cdae2f..87e5cbc4a2 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
|
|
||||||
@@ -404,7 +404,7 @@ gst_webrtc_dsp_analyze_reverse_stream (GstWebrtcDsp * self,
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
- gst_audio_buffer_map (&abuf, &self->info, buf, GST_MAP_READWRITE);
|
|
||||||
+ gst_audio_buffer_map (&abuf, &probe->info, buf, GST_MAP_READWRITE);
|
|
||||||
|
|
||||||
if (probe->interleaved) {
|
|
||||||
int16_t * const data = (int16_t * const) abuf.planes[0];
|
|
||||||
--
|
|
||||||
2.45.2
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
|||||||
From 7c5003367fe7528c5b5a5bac0243910e46019d0f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arun Raghavan <arun@asymptotic.io>
|
|
||||||
Date: Tue, 13 Jun 2023 11:41:43 -0400
|
|
||||||
Subject: [PATCH 3/3] webrtcdsp: Deal with echo probe info not being available
|
|
||||||
|
|
||||||
Even if we don't yet know what the echo probe format is, we want to be able to
|
|
||||||
provide silence for the reverse path, so that when the probe becomes available,
|
|
||||||
there is no ambiguity around what time period the new set of samples are for.
|
|
||||||
|
|
||||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4849>
|
|
||||||
---
|
|
||||||
.../ext/webrtcdsp/gstwebrtcdsp.cpp | 20 ++++++++------
|
|
||||||
.../ext/webrtcdsp/gstwebrtcechoprobe.cpp | 26 +++++++++++++------
|
|
||||||
.../ext/webrtcdsp/gstwebrtcechoprobe.h | 3 ++-
|
|
||||||
3 files changed, 32 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
|
|
||||||
index 87e5cbc4a2..dc4190cff0 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcdsp.cpp
|
|
||||||
@@ -370,6 +370,8 @@ gst_webrtc_dsp_analyze_reverse_stream (GstWebrtcDsp * self,
|
|
||||||
GstWebrtcEchoProbe *probe = NULL;
|
|
||||||
webrtc::AudioProcessing *apm;
|
|
||||||
GstBuffer *buf = NULL;
|
|
||||||
+ GstAudioInfo info;
|
|
||||||
+ gboolean interleaved = self->interleaved;
|
|
||||||
GstAudioBuffer abuf;
|
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
|
||||||
gint err, delay;
|
|
||||||
@@ -377,36 +379,38 @@ gst_webrtc_dsp_analyze_reverse_stream (GstWebrtcDsp * self,
|
|
||||||
GST_OBJECT_LOCK (self);
|
|
||||||
if (self->echo_cancel)
|
|
||||||
probe = GST_WEBRTC_ECHO_PROBE (g_object_ref (self->probe));
|
|
||||||
+ info = self->info;
|
|
||||||
GST_OBJECT_UNLOCK (self);
|
|
||||||
|
|
||||||
/* If echo cancellation is disabled */
|
|
||||||
if (!probe)
|
|
||||||
return GST_FLOW_OK;
|
|
||||||
|
|
||||||
- webrtc::StreamConfig config (probe->info.rate, probe->info.channels,
|
|
||||||
- false);
|
|
||||||
- apm = self->apm;
|
|
||||||
+ delay =
|
|
||||||
+ gst_webrtc_echo_probe_read (probe, rec_time, &buf, &info, &interleaved);
|
|
||||||
|
|
||||||
- delay = gst_webrtc_echo_probe_read (probe, rec_time, &buf);
|
|
||||||
+ apm = self->apm;
|
|
||||||
apm->set_stream_delay_ms (delay);
|
|
||||||
|
|
||||||
+ webrtc::StreamConfig config (info.rate, info.channels, false);
|
|
||||||
+
|
|
||||||
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
|
|
||||||
|
|
||||||
if (delay < 0)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
- if (probe->info.rate != self->info.rate) {
|
|
||||||
+ if (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.",
|
|
||||||
- probe->info.rate, self->info.rate), (NULL));
|
|
||||||
+ info.rate, self->info.rate), (NULL));
|
|
||||||
ret = GST_FLOW_ERROR;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
- gst_audio_buffer_map (&abuf, &probe->info, buf, GST_MAP_READWRITE);
|
|
||||||
+ gst_audio_buffer_map (&abuf, &info, buf, GST_MAP_READWRITE);
|
|
||||||
|
|
||||||
- if (probe->interleaved) {
|
|
||||||
+ if (interleaved) {
|
|
||||||
int16_t * const data = (int16_t * const) abuf.planes[0];
|
|
||||||
|
|
||||||
if ((err = apm->ProcessReverseStream (data, config, config, data)) < 0)
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp
|
|
||||||
index 8e8ca064c4..13d0fc6cb0 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.cpp
|
|
||||||
@@ -304,7 +304,7 @@ gst_webrtc_release_echo_probe (GstWebrtcEchoProbe * probe)
|
|
||||||
|
|
||||||
gint
|
|
||||||
gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
|
|
||||||
- GstBuffer ** buf)
|
|
||||||
+ GstBuffer ** buf, GstAudioInfo * info, gboolean * interleaved)
|
|
||||||
{
|
|
||||||
GstClockTimeDiff diff;
|
|
||||||
gsize avail, skip, offset, size = 0;
|
|
||||||
@@ -315,10 +315,17 @@ gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
|
|
||||||
/* 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))
|
|
||||||
+ if (!GST_CLOCK_TIME_IS_VALID (self->latency))
|
|
||||||
goto copy;
|
|
||||||
|
|
||||||
+ /* If we have a format, use that, else generate silence in input format */
|
|
||||||
+ if (!GST_AUDIO_INFO_IS_VALID (&self->info)) {
|
|
||||||
+ goto copy;
|
|
||||||
+ } else {
|
|
||||||
+ *info = self->info;
|
|
||||||
+ *interleaved = self->interleaved;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (self->interleaved)
|
|
||||||
avail = gst_adapter_available (self->adapter) / self->info.bpf;
|
|
||||||
else
|
|
||||||
@@ -375,11 +382,14 @@ gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
|
|
||||||
|
|
||||||
copy:
|
|
||||||
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);
|
|
||||||
+ /* No data, provide a period's worth of silence, using our format if we have
|
|
||||||
+ * it, or the provided format if we don't */
|
|
||||||
+ guint period_samples = info->rate / 100;
|
|
||||||
+ guint period_size = period_samples * info->bpf;
|
|
||||||
+
|
|
||||||
+ *buf = gst_buffer_new_allocate (NULL, period_size, NULL);
|
|
||||||
+ gst_buffer_memset (*buf, 0, 0, period_size);
|
|
||||||
+ gst_buffer_add_audio_meta (*buf, info, 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 */
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h
|
|
||||||
index 488c0e958f..30ab50b355 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/webrtcdsp/gstwebrtcechoprobe.h
|
|
||||||
@@ -99,7 +99,8 @@ 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, GstBuffer ** buf);
|
|
||||||
+ GstClockTime rec_time, GstBuffer ** buf, GstAudioInfo * info,
|
|
||||||
+ gboolean * interleaved);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
#endif /* __GST_WEBRTC_ECHO_PROBE_H__ */
|
|
||||||
--
|
|
||||||
2.45.2
|
|
||||||
|
|
@ -58,6 +58,7 @@ h264parse
|
|||||||
hdvparse
|
hdvparse
|
||||||
hls
|
hls
|
||||||
id3tag
|
id3tag
|
||||||
|
insertbin
|
||||||
inter
|
inter
|
||||||
interlace
|
interlace
|
||||||
invtelecine
|
invtelecine
|
||||||
@ -69,6 +70,7 @@ legacyresample
|
|||||||
librfb
|
librfb
|
||||||
liveadder
|
liveadder
|
||||||
midi
|
midi
|
||||||
|
mse
|
||||||
mve
|
mve
|
||||||
mpegdemux
|
mpegdemux
|
||||||
mpeg4videoparse
|
mpeg4videoparse
|
||||||
@ -108,6 +110,7 @@ switchbin
|
|||||||
timecode
|
timecode
|
||||||
transcode
|
transcode
|
||||||
tta
|
tta
|
||||||
|
unixfd
|
||||||
valve
|
valve
|
||||||
videofilters
|
videofilters
|
||||||
videoframe_audiolevel
|
videoframe_audiolevel
|
||||||
|
@ -5,14 +5,17 @@
|
|||||||
%bcond extras %{defined fedora}
|
%bcond extras %{defined fedora}
|
||||||
%bcond opencv %[ 0%{?fedora} >= 39 ]
|
%bcond opencv %[ 0%{?fedora} >= 39 ]
|
||||||
%bcond openh264 %[ 0%{?fedora} >= 40 ]
|
%bcond openh264 %[ 0%{?fedora} >= 40 ]
|
||||||
|
%bcond svtav1 %[ 0%{?fedora} >= 40 ]
|
||||||
|
# requires new webrtc-audio-processing-1
|
||||||
|
%bcond webrtcdsp %[ 0%{?fedora} >= 40 || 0%{?rhel} >= 10 ]
|
||||||
|
|
||||||
#global gitrel 140
|
#global gitrel 140
|
||||||
#global gitcommit 4ca3a22b6b33ad8be4383063e76f79c4d346535d
|
#global gitcommit 4ca3a22b6b33ad8be4383063e76f79c4d346535d
|
||||||
#global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
|
#global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
|
||||||
|
|
||||||
Name: gstreamer1-plugins-bad-free
|
Name: gstreamer1-plugins-bad-free
|
||||||
Version: 1.22.12
|
Version: 1.24.6
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: GStreamer streaming media framework "bad" plugins
|
Summary: GStreamer streaming media framework "bad" plugins
|
||||||
|
|
||||||
License: LGPLv2+ and LGPLv2
|
License: LGPLv2+ and LGPLv2
|
||||||
@ -31,13 +34,6 @@ Source1: gst-p-bad-cleanup.sh
|
|||||||
|
|
||||||
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5622
|
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5622
|
||||||
Patch: openh264-add-license-file.patch
|
Patch: openh264-add-license-file.patch
|
||||||
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5780
|
|
||||||
Patch: openh264-drop-runtime-version-checks.patch
|
|
||||||
|
|
||||||
Patch: 0001-webrtcdsp-Update-code-for-webrtc-audio-processing-1.patch
|
|
||||||
Patch: 0002-webrtcdsp-Map-probe-buffers-with-probe-info-not-dsp-.patch
|
|
||||||
Patch: 0003-webrtcdsp-Deal-with-echo-probe-info-not-being-availa.patch
|
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: meson >= 0.48.0
|
BuildRequires: meson >= 0.48.0
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -83,11 +79,6 @@ BuildRequires: libwebp-devel
|
|||||||
BuildRequires: mesa-libEGL-devel
|
BuildRequires: mesa-libEGL-devel
|
||||||
BuildRequires: vulkan-devel
|
BuildRequires: vulkan-devel
|
||||||
#BuildRequires: mesa-vulkan-devel
|
#BuildRequires: mesa-vulkan-devel
|
||||||
%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10
|
|
||||||
BuildRequires: pkgconfig(webrtc-audio-processing-1)
|
|
||||||
%else
|
|
||||||
BuildRequires: pkgconfig(webrtc-audio-processing) >= 0.3
|
|
||||||
%endif
|
|
||||||
%if 0
|
%if 0
|
||||||
BuildRequires: wpewebkit-devel
|
BuildRequires: wpewebkit-devel
|
||||||
BuildRequires: wpebackend-fdo-devel
|
BuildRequires: wpebackend-fdo-devel
|
||||||
@ -95,6 +86,17 @@ BuildRequires: wpebackend-fdo-devel
|
|||||||
BuildRequires: glslc
|
BuildRequires: glslc
|
||||||
BuildRequires: libdrm-devel
|
BuildRequires: libdrm-devel
|
||||||
BuildRequires: libva-devel
|
BuildRequires: libva-devel
|
||||||
|
%if %{with svtav1}
|
||||||
|
BuildRequires: svt-av1-devel
|
||||||
|
%endif
|
||||||
|
BuildRequires: liblc3-devel
|
||||||
|
BuildRequires: json-glib-devel
|
||||||
|
%if %{with openh264}
|
||||||
|
BuildRequires: pkgconfig(openh264)
|
||||||
|
%endif
|
||||||
|
%if %{with webrtcdsp}
|
||||||
|
BuildRequires: pkgconfig(webrtc-audio-processing-1)
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with extras}
|
%if %{with extras}
|
||||||
BuildRequires: ladspa-devel
|
BuildRequires: ladspa-devel
|
||||||
@ -117,7 +119,6 @@ BuildRequires: libcurl-devel
|
|||||||
BuildRequires: libssh2-devel
|
BuildRequires: libssh2-devel
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: game-music-emu-devel
|
BuildRequires: game-music-emu-devel
|
||||||
BuildRequires: libkate-devel
|
|
||||||
BuildRequires: libmodplug-devel
|
BuildRequires: libmodplug-devel
|
||||||
BuildRequires: libmpcdec-devel
|
BuildRequires: libmpcdec-devel
|
||||||
## Plugins not ported
|
## Plugins not ported
|
||||||
@ -128,9 +129,6 @@ BuildRequires: openal-soft-devel
|
|||||||
BuildRequires: opencv-devel
|
BuildRequires: opencv-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: openjpeg2-devel
|
BuildRequires: openjpeg2-devel
|
||||||
%if %{with openh264}
|
|
||||||
BuildRequires: pkgconfig(openh264)
|
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(spandsp) >= 0.0.6
|
BuildRequires: pkgconfig(spandsp) >= 0.0.6
|
||||||
## Plugins not ported
|
## Plugins not ported
|
||||||
#BuildRequires: SDL-devel
|
#BuildRequires: SDL-devel
|
||||||
@ -144,7 +142,6 @@ BuildRequires: libnice-devel
|
|||||||
BuildRequires: pkgconfig(ldacBT-enc)
|
BuildRequires: pkgconfig(ldacBT-enc)
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: qrencode-devel
|
BuildRequires: qrencode-devel
|
||||||
BuildRequires: json-glib-devel
|
|
||||||
BuildRequires: vo-amrwbenc-devel
|
BuildRequires: vo-amrwbenc-devel
|
||||||
BuildRequires: libavtp-devel
|
BuildRequires: libavtp-devel
|
||||||
BuildRequires: libdca-devel
|
BuildRequires: libdca-devel
|
||||||
@ -310,11 +307,12 @@ aren't tested well enough, or the code is not of good enough quality.
|
|||||||
%{!?with_extras:-D directsound=disabled -D dts=disabled } \
|
%{!?with_extras:-D directsound=disabled -D dts=disabled } \
|
||||||
%{!?with_extras:-D fluidsynth=disabled -D openexr=disabled } \
|
%{!?with_extras:-D fluidsynth=disabled -D openexr=disabled } \
|
||||||
%{!?with_extras:-D curl=disabled -D curl-ssh2=disabled } \
|
%{!?with_extras:-D curl=disabled -D curl-ssh2=disabled } \
|
||||||
%{!?with_extras:-D ttml=disabled -D kate=disabled } \
|
%{!?with_extras:-D ttml=disabled } \
|
||||||
%{!?with_extras:-D modplug=disabled } \
|
%{!?with_extras:-D modplug=disabled } \
|
||||||
%{!?with_extras:-D openal=disabled } \
|
%{!?with_extras:-D openal=disabled } \
|
||||||
%{!?with_opencv:-D opencv=disabled } \
|
%{!?with_opencv:-D opencv=disabled } \
|
||||||
%{!?with_openh264:-D openh264=disabled } \
|
%{!?with_openh264:-D openh264=disabled } \
|
||||||
|
%{!?with_svtav1:-D svtav1=disabled } \
|
||||||
%{!?with_extras:-D openjpeg=disabled } \
|
%{!?with_extras:-D openjpeg=disabled } \
|
||||||
%{!?with_extras:-D wildmidi=disabled -D zbar=disabled } \
|
%{!?with_extras:-D wildmidi=disabled -D zbar=disabled } \
|
||||||
%{!?with_extras:-D gme=disabled -D lv2=disabled } \
|
%{!?with_extras:-D gme=disabled -D lv2=disabled } \
|
||||||
@ -348,7 +346,9 @@ aren't tested well enough, or the code is not of good enough quality.
|
|||||||
%{!?with_extras:-D qroverlay=disabled } \
|
%{!?with_extras:-D qroverlay=disabled } \
|
||||||
-D gs=disabled -D isac=disabled \
|
-D gs=disabled -D isac=disabled \
|
||||||
-D onnx=disabled -D openaptx=disabled -Dgpl=enabled \
|
-D onnx=disabled -D openaptx=disabled -Dgpl=enabled \
|
||||||
-D amfcodec=disabled -D directshow=disabled -D qsv=disabled
|
-D amfcodec=disabled -D directshow=disabled -D qsv=disabled \
|
||||||
|
%{!?with_webrtcdsp:-D webrtcdsp=disabled } \
|
||||||
|
-D aja=disabled -D qt6d3d11=disabled
|
||||||
|
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
@ -446,9 +446,6 @@ EOF
|
|||||||
|
|
||||||
%find_lang gst-plugins-bad-%{majorminor}
|
%find_lang gst-plugins-bad-%{majorminor}
|
||||||
|
|
||||||
# unpackaged files
|
|
||||||
rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
%files -f gst-plugins-bad-%{majorminor}.lang
|
%files -f gst-plugins-bad-%{majorminor}.lang
|
||||||
@ -459,9 +456,13 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_bindir}/gst-transcoder-%{majorminor}
|
%{_bindir}/gst-transcoder-%{majorminor}
|
||||||
|
|
||||||
# presets
|
# presets
|
||||||
|
%dir %{_datadir}/gstreamer-%{majorminor}/
|
||||||
%dir %{_datadir}/gstreamer-%{majorminor}/presets/
|
%dir %{_datadir}/gstreamer-%{majorminor}/presets/
|
||||||
%{_datadir}/gstreamer-%{majorminor}/presets/GstFreeverb.prs
|
%{_datadir}/gstreamer-%{majorminor}/presets/GstFreeverb.prs
|
||||||
|
%dir %{_datadir}/gstreamer-%{majorminor}/encoding-profiles/
|
||||||
|
%dir %{_datadir}/gstreamer-%{majorminor}/encoding-profiles/device/
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/device/dvd.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/device/dvd.gep
|
||||||
|
%dir %{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/avi.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/avi.gep
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/flv.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/flv.gep
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/mkv.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/mkv.gep
|
||||||
@ -471,6 +472,7 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/ogv.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/ogv.gep
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/ts.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/ts.gep
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/webm.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/file-extension/webm.gep
|
||||||
|
%dir %{_datadir}/gstreamer-%{majorminor}/encoding-profiles/online-services/
|
||||||
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/online-services/youtube.gep
|
%{_datadir}/gstreamer-%{majorminor}/encoding-profiles/online-services/youtube.gep
|
||||||
|
|
||||||
# Plugins without external dependencies
|
# Plugins without external dependencies
|
||||||
@ -478,6 +480,7 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_libdir}/gstreamer-%{majorminor}/libgstadpcmdec.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstadpcmdec.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstadpcmenc.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstadpcmenc.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstaiff.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstaiff.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstanalyticsoverlay.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstasfmux.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstasfmux.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstaudiobuffersplit.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstaudiobuffersplit.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstaudiofxbad.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstaudiofxbad.so
|
||||||
@ -548,6 +551,11 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_libdir}/gstreamer-%{majorminor}/libgstvideosignal.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstvideosignal.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstvmnc.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstvmnc.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgsty4mdec.so
|
%{_libdir}/gstreamer-%{majorminor}/libgsty4mdec.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstcodec2json.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstinsertbin.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstmse.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstunixfd.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstuvcgadget.so
|
||||||
|
|
||||||
# System (Linux) specific plugins
|
# System (Linux) specific plugins
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstdvb.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstdvb.so
|
||||||
@ -568,6 +576,7 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_libdir}/gstreamer-%{majorminor}/libgstgsm.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstgsm.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstgtkwayland.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstgtkwayland.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstkms.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstkms.so
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstlc3.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstnvcodec.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstnvcodec.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstopusparse.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstopusparse.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstrist.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstrist.so
|
||||||
@ -581,7 +590,9 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_libdir}/gstreamer-%{majorminor}/libgstwaylandsink.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstwaylandsink.so
|
||||||
%endif
|
%endif
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstwebp.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstwebp.so
|
||||||
|
%if %{with webrtcdsp}
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstwebrtcdsp.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstwebrtcdsp.so
|
||||||
|
%endif
|
||||||
%if 0
|
%if 0
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstwpe.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstwpe.so
|
||||||
%endif
|
%endif
|
||||||
@ -590,6 +601,9 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_libdir}/gstreamer-%{majorminor}/libgstlv2.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstlv2.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstttmlsubs.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstttmlsubs.so
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with svtav1}
|
||||||
|
%{_libdir}/gstreamer-%{majorminor}/libgstsvtav1.so
|
||||||
|
%endif
|
||||||
|
|
||||||
#debugging plugin
|
#debugging plugin
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstdebugutilsbad.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstdebugutilsbad.so
|
||||||
@ -611,7 +625,6 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_libdir}/gstreamer-%{majorminor}/libgstdtsdec.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstdtsdec.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstflite.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstflite.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstgme.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstgme.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstkate.so
|
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstladspa.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstladspa.so
|
||||||
%ifnarch s390x
|
%ifnarch s390x
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstldac.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstldac.so
|
||||||
@ -659,15 +672,18 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
%{_libdir}/libgstanalytics-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstadaptivedemux-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstadaptivedemux-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstbasecamerabinsrc-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstbasecamerabinsrc-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstbadaudio-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstbadaudio-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstcodecparsers-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstcodecparsers-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstcodecs-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstcodecs-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstcuda-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstcuda-%{majorminor}.so.0{,.*}
|
||||||
|
%{_libdir}/libgstdxva-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstinsertbin-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstinsertbin-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstisoff-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstisoff-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstmpegts-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstmpegts-%{majorminor}.so.0{,.*}
|
||||||
|
%{_libdir}/libgstmse-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstplay-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstplay-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstplayer-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstplayer-%{majorminor}.so.0{,.*}
|
||||||
%{_libdir}/libgstphotography-%{majorminor}.so.0{,.*}
|
%{_libdir}/libgstphotography-%{majorminor}.so.0{,.*}
|
||||||
@ -685,11 +701,14 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{_libdir}/girepository-1.0/CudaGst-1.0.typelib
|
%{_libdir}/girepository-1.0/CudaGst-1.0.typelib
|
||||||
|
%{_libdir}/girepository-1.0/GstAnalytics-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstBadAudio-1.0.typelib
|
%{_libdir}/girepository-1.0/GstBadAudio-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstCodecs-1.0.typelib
|
%{_libdir}/girepository-1.0/GstCodecs-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstCuda-1.0.typelib
|
%{_libdir}/girepository-1.0/GstCuda-1.0.typelib
|
||||||
|
%{_libdir}/girepository-1.0/GstDxva-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstInsertBin-1.0.typelib
|
%{_libdir}/girepository-1.0/GstInsertBin-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstMpegts-1.0.typelib
|
%{_libdir}/girepository-1.0/GstMpegts-1.0.typelib
|
||||||
|
%{_libdir}/girepository-1.0/GstMse-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstPlay-1.0.typelib
|
%{_libdir}/girepository-1.0/GstPlay-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstPlayer-1.0.typelib
|
%{_libdir}/girepository-1.0/GstPlayer-1.0.typelib
|
||||||
%{_libdir}/girepository-1.0/GstTranscoder-1.0.typelib
|
%{_libdir}/girepository-1.0/GstTranscoder-1.0.typelib
|
||||||
@ -705,11 +724,14 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{_datadir}/gir-1.0/CudaGst-%{majorminor}.gir
|
%{_datadir}/gir-1.0/CudaGst-%{majorminor}.gir
|
||||||
|
%{_datadir}/gir-1.0/GstAnalytics-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstBadAudio-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstBadAudio-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstCodecs-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstCodecs-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstCuda-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstCuda-%{majorminor}.gir
|
||||||
|
%{_datadir}/gir-1.0/GstDxva-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstInsertBin-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstInsertBin-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstMpegts-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstMpegts-%{majorminor}.gir
|
||||||
|
%{_datadir}/gir-1.0/GstMse-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstPlay-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstPlay-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstPlayer-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstPlayer-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstTranscoder-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstTranscoder-%{majorminor}.gir
|
||||||
@ -718,15 +740,18 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_datadir}/gir-1.0/GstVulkanWayland-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstVulkanWayland-%{majorminor}.gir
|
||||||
%{_datadir}/gir-1.0/GstWebRTC-%{majorminor}.gir
|
%{_datadir}/gir-1.0/GstWebRTC-%{majorminor}.gir
|
||||||
|
|
||||||
|
%{_libdir}/libgstanalytics-%{majorminor}.so
|
||||||
%{_libdir}/libgstadaptivedemux-%{majorminor}.so
|
%{_libdir}/libgstadaptivedemux-%{majorminor}.so
|
||||||
%{_libdir}/libgstbasecamerabinsrc-%{majorminor}.so
|
%{_libdir}/libgstbasecamerabinsrc-%{majorminor}.so
|
||||||
%{_libdir}/libgstbadaudio-%{majorminor}.so
|
%{_libdir}/libgstbadaudio-%{majorminor}.so
|
||||||
%{_libdir}/libgstcuda-%{majorminor}.so
|
%{_libdir}/libgstcuda-%{majorminor}.so
|
||||||
%{_libdir}/libgstcodecparsers-%{majorminor}.so
|
%{_libdir}/libgstcodecparsers-%{majorminor}.so
|
||||||
%{_libdir}/libgstcodecs-%{majorminor}.so
|
%{_libdir}/libgstcodecs-%{majorminor}.so
|
||||||
|
%{_libdir}/libgstdxva-%{majorminor}.so
|
||||||
%{_libdir}/libgstinsertbin-%{majorminor}.so
|
%{_libdir}/libgstinsertbin-%{majorminor}.so
|
||||||
%{_libdir}/libgstisoff-%{majorminor}.so
|
%{_libdir}/libgstisoff-%{majorminor}.so
|
||||||
%{_libdir}/libgstmpegts-%{majorminor}.so
|
%{_libdir}/libgstmpegts-%{majorminor}.so
|
||||||
|
%{_libdir}/libgstmse-%{majorminor}.so
|
||||||
#{_libdir}/libgstopencv-%{majorminor}.so
|
#{_libdir}/libgstopencv-%{majorminor}.so
|
||||||
%{_libdir}/libgstplay-%{majorminor}.so
|
%{_libdir}/libgstplay-%{majorminor}.so
|
||||||
%{_libdir}/libgstplayer-%{majorminor}.so
|
%{_libdir}/libgstplayer-%{majorminor}.so
|
||||||
@ -745,6 +770,7 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/audio
|
%{_includedir}/gstreamer-%{majorminor}/gst/audio
|
||||||
|
%{_includedir}/gstreamer-%{majorminor}/gst/analytics
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc
|
%{_includedir}/gstreamer-%{majorminor}/gst/basecamerabinsrc
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/codecparsers
|
%{_includedir}/gstreamer-%{majorminor}/gst/codecparsers
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/cuda/
|
%{_includedir}/gstreamer-%{majorminor}/gst/cuda/
|
||||||
@ -752,6 +778,7 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_includedir}/gstreamer-%{majorminor}/gst/interfaces/photography*
|
%{_includedir}/gstreamer-%{majorminor}/gst/interfaces/photography*
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/isoff/
|
%{_includedir}/gstreamer-%{majorminor}/gst/isoff/
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/mpegts
|
%{_includedir}/gstreamer-%{majorminor}/gst/mpegts
|
||||||
|
%{_includedir}/gstreamer-%{majorminor}/gst/mse/
|
||||||
#{_includedir}/gstreamer-%{majorminor}/gst/opencv
|
#{_includedir}/gstreamer-%{majorminor}/gst/opencv
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/play
|
%{_includedir}/gstreamer-%{majorminor}/gst/play
|
||||||
%{_includedir}/gstreamer-%{majorminor}/gst/player
|
%{_includedir}/gstreamer-%{majorminor}/gst/player
|
||||||
@ -764,11 +791,13 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
%{_includedir}/gstreamer-%{majorminor}/gst/webrtc/
|
%{_includedir}/gstreamer-%{majorminor}/gst/webrtc/
|
||||||
|
|
||||||
# pkg-config files
|
# pkg-config files
|
||||||
|
%{_libdir}/pkgconfig/gstreamer-analytics-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-bad-audio-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-bad-audio-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-cuda-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-cuda-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-codecparsers-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-codecparsers-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-insertbin-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-insertbin-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-mpegts-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-mpegts-%{majorminor}.pc
|
||||||
|
%{_libdir}/pkgconfig/gstreamer-mse-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-photography-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-photography-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-play-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-play-%{majorminor}.pc
|
||||||
%{_libdir}/pkgconfig/gstreamer-player-%{majorminor}.pc
|
%{_libdir}/pkgconfig/gstreamer-player-%{majorminor}.pc
|
||||||
@ -786,15 +815,35 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jul 15 2024 Wim Taymans <wtaymans@redhat.com> - 1.22.12-3
|
* Mon Jul 29 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.24.6-1
|
||||||
- Add patch to use new webrtc version
|
- 1.24.6
|
||||||
- Resolves: RHEL-28928
|
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.22.12-2
|
* Thu Jul 25 2024 Sérgio Basto <sergio@serjux.com> - 1.24.5-3
|
||||||
- Bump release for June 2024 mass rebuild
|
- Rebuild for opencv 4.10.0
|
||||||
|
|
||||||
* Fri Jun 14 2024 Wim Taymans <wtaymans@redhat.com> - 1.22.12-1
|
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.24.5-2
|
||||||
- Update to 1.22.12
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 21 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.24.5-1
|
||||||
|
- 1.24.5
|
||||||
|
|
||||||
|
* Thu May 30 2024 Robert-André Mauchin <zebob.m@gmail.com> - 1.24.4-2
|
||||||
|
- Rebuild for svt-av1 2.1.0
|
||||||
|
|
||||||
|
* Wed May 29 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.24.4-1
|
||||||
|
- 1.24.4
|
||||||
|
|
||||||
|
* Tue Apr 30 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.24.3-1
|
||||||
|
- 1.24.3
|
||||||
|
|
||||||
|
* Mon Apr 22 2024 Gwyn Ciesla <gwync@protonmail.com> - 1.24.0-3
|
||||||
|
- openexr rebuild
|
||||||
|
|
||||||
|
* Wed Mar 13 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 1.24.0-2
|
||||||
|
- Re-enable webrtcdsp for f40+ and ELN
|
||||||
|
|
||||||
|
* Tue Mar 05 2024 Wim Taymans <wtaymans@redhat.com> - 1.24.0-1
|
||||||
|
- Update to 1.24.0
|
||||||
|
|
||||||
* Thu Feb 08 2024 Kalev Lember <klember@redhat.com> - 1.22.9-3
|
* Thu Feb 08 2024 Kalev Lember <klember@redhat.com> - 1.22.9-3
|
||||||
- Add gstreamer1-plugin-openh264 subpackage with the openh264 plugin
|
- Add gstreamer1-plugin-openh264 subpackage with the openh264 plugin
|
||||||
|
@ -1,149 +0,0 @@
|
|||||||
From 1dadccd48c97a4b7c96ae0307c2263107e7f1876 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kalev Lember <klember@redhat.com>
|
|
||||||
Date: Wed, 6 Dec 2023 14:58:38 +0100
|
|
||||||
Subject: [PATCH] openh264: Drop runtime version checks
|
|
||||||
|
|
||||||
With the way the runtime checks are currently set up, every single
|
|
||||||
openh264 release, no matter how minor, is considered an ABI break and
|
|
||||||
requires gst-plugins-bad recompilation. This is unnecessarily strict
|
|
||||||
because it doesn't allow downstream distributions to ship any openh264
|
|
||||||
bug fix version updates without breaking gstreamer's openh264 support.
|
|
||||||
|
|
||||||
Years ago, at the time when gstreamer's openh264 support was merged,
|
|
||||||
openh264 releases were done without a versioned soname (the library was
|
|
||||||
just libopenh264.so, unversioned). Since then, starting with version
|
|
||||||
1.3.0, openh264 has started using versioned sonames and the intent has
|
|
||||||
been to bump the soname every time there's a new release with an ABI
|
|
||||||
change.
|
|
||||||
|
|
||||||
This patch drops the strict version check. meson.build already has a
|
|
||||||
minimum requirement on openh264 version 1.3.0 where soname versioning
|
|
||||||
was added, which should be good enough to ensure that the library is
|
|
||||||
using soname versioning.
|
|
||||||
|
|
||||||
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5780>
|
|
||||||
---
|
|
||||||
.../ext/openh264/gstopenh264dec.cpp | 7 +--
|
|
||||||
.../ext/openh264/gstopenh264element.c | 48 -------------------
|
|
||||||
.../ext/openh264/gstopenh264elements.h | 2 -
|
|
||||||
.../ext/openh264/gstopenh264enc.cpp | 7 +--
|
|
||||||
.../gst-plugins-bad/ext/openh264/meson.build | 1 -
|
|
||||||
5 files changed, 4 insertions(+), 61 deletions(-)
|
|
||||||
delete mode 100644 subprojects/gst-plugins-bad/ext/openh264/gstopenh264element.c
|
|
||||||
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
|
|
||||||
index 77f2b8fe348..f3302567c7b 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
|
|
||||||
@@ -459,10 +459,7 @@ openh264dec_element_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_openh264dec_debug_category, "openh264dec", 0,
|
|
||||||
"debug category for openh264dec element");
|
|
||||||
- if (openh264_element_init (plugin))
|
|
||||||
- return gst_element_register (plugin, "openh264dec", GST_RANK_MARGINAL,
|
|
||||||
- GST_TYPE_OPENH264DEC);
|
|
||||||
|
|
||||||
- GST_ERROR ("Incorrect library version loaded, expecting %s", g_strCodecVer);
|
|
||||||
- return FALSE;
|
|
||||||
+ return gst_element_register (plugin, "openh264dec", GST_RANK_MARGINAL,
|
|
||||||
+ GST_TYPE_OPENH264DEC);
|
|
||||||
}
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264element.c b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264element.c
|
|
||||||
deleted file mode 100644
|
|
||||||
index 3c5c378c81e..00000000000
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264element.c
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,48 +0,0 @@
|
|
||||||
-/*
|
|
||||||
- * Copyright (c) 2014, Ericsson AB. All rights reserved.
|
|
||||||
- *
|
|
||||||
- * Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
- * are permitted provided that the following conditions are met:
|
|
||||||
- *
|
|
||||||
- * 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
- * list of conditions and the following disclaimer.
|
|
||||||
- *
|
|
||||||
- * 2. Redistributions in binary form must reproduce the above copyright notice, this
|
|
||||||
- * list of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
- * materials provided with the distribution.
|
|
||||||
- *
|
|
||||||
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
||||||
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
||||||
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
||||||
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
||||||
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
||||||
- * OF SUCH DAMAGE.
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-#ifdef HAVE_CONFIG_H
|
|
||||||
-#include <config.h>
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-#include <gst/gst.h>
|
|
||||||
-#include <wels/codec_api.h>
|
|
||||||
-#include <wels/codec_ver.h>
|
|
||||||
-#include <string.h>
|
|
||||||
-#include "gstopenh264elements.h"
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-gboolean
|
|
||||||
-openh264_element_init (GstPlugin * plugin)
|
|
||||||
-{
|
|
||||||
- OpenH264Version libver;
|
|
||||||
- /* g_stCodecVersion is the version detected at build time as defined in the
|
|
||||||
- * headers and WelsGetCodecVersion() is the version detected at runtime.
|
|
||||||
- * This is a safeguard to avoid crashes since OpenH264 has been changing
|
|
||||||
- * ABI without changing the SONAME.
|
|
||||||
- */
|
|
||||||
- libver = WelsGetCodecVersion ();
|
|
||||||
- return (memcmp (&libver, &g_stCodecVersion, sizeof (libver)) == 0);
|
|
||||||
-}
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264elements.h b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264elements.h
|
|
||||||
index 572f6a8e078..5c9582941ee 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264elements.h
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264elements.h
|
|
||||||
@@ -27,8 +27,6 @@
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
-gboolean openh264_element_init (GstPlugin * plugin);
|
|
||||||
-
|
|
||||||
GST_ELEMENT_REGISTER_DECLARE (openh264dec);
|
|
||||||
GST_ELEMENT_REGISTER_DECLARE (openh264enc);
|
|
||||||
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
|
|
||||||
index 6b54b1584f8..05c126cfc64 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
|
|
||||||
@@ -1066,10 +1066,7 @@ openh264enc_element_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_openh264enc_debug_category, "openh264enc", 0,
|
|
||||||
"debug category for openh264enc element");
|
|
||||||
- if (openh264_element_init (plugin))
|
|
||||||
- return gst_element_register (plugin, "openh264enc", GST_RANK_MARGINAL,
|
|
||||||
- GST_TYPE_OPENH264ENC);
|
|
||||||
|
|
||||||
- GST_ERROR ("Incorrect library version loaded, expecting %s", g_strCodecVer);
|
|
||||||
- return FALSE;
|
|
||||||
+ return gst_element_register (plugin, "openh264enc", GST_RANK_MARGINAL,
|
|
||||||
+ GST_TYPE_OPENH264ENC);
|
|
||||||
}
|
|
||||||
diff --git a/subprojects/gst-plugins-bad/ext/openh264/meson.build b/subprojects/gst-plugins-bad/ext/openh264/meson.build
|
|
||||||
index 1f0a198b05e..c6f247e1cdd 100644
|
|
||||||
--- a/subprojects/gst-plugins-bad/ext/openh264/meson.build
|
|
||||||
+++ b/subprojects/gst-plugins-bad/ext/openh264/meson.build
|
|
||||||
@@ -1,7 +1,6 @@
|
|
||||||
openh264_sources = [
|
|
||||||
'gstopenh264dec.cpp',
|
|
||||||
'gstopenh264enc.cpp',
|
|
||||||
- 'gstopenh264element.c',
|
|
||||||
'gstopenh264plugin.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (gst-plugins-bad-free-1.22.12.tar.xz) = 791a35edcfbf3ac6e4442ff0cf43f41edd547ebeeafa33771c365345dd04319453bea7a0a3d706a665e7e5c579d45072b182cfecae5595c25064653745e96972
|
SHA512 (gst-plugins-bad-free-1.24.6.tar.xz) = 174f3d0ee0ff8e6e73768ddac2fe82cd250c1295f64dddf87c9bf33d175422baf2a05989f019464463bb955920f639c3c651c56f32c0e7587731425ae8aca3e7
|
||||||
|
Loading…
Reference in New Issue
Block a user