Skip to content

Commit

Permalink
Moved to WebRTC branch 4692 (M97)
Browse files Browse the repository at this point in the history
  • Loading branch information
devopvoid committed Nov 30, 2021
1 parent 49b07d4 commit 29a6e3b
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
java: [13]

env:
WEBRTC_CACHE_BRANCH: 4664
WEBRTC_CACHE_BRANCH: 4692
WEBRTC_CHECKOUT_FOLDER: webrtc
WEBRTC_INSTALL_FOLDER: webrtc/build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
java: [13]

env:
WEBRTC_CACHE_BRANCH: 4664
WEBRTC_CACHE_BRANCH: 4692
WEBRTC_CHECKOUT_FOLDER: webrtc
WEBRTC_INSTALL_FOLDER: webrtc/build

Expand Down
2 changes: 1 addition & 1 deletion webrtc-jni/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>pom</packaging>

<properties>
<webrtc.branch>branch-heads/4664</webrtc.branch>
<webrtc.branch>branch-heads/4692</webrtc.branch>
<webrtc.src.dir>${user.home}/webrtc</webrtc.src.dir>
<webrtc.install.dir>${user.home}/webrtc/build</webrtc.install.dir>
<cmake.build.type>Release</cmake.build.type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ namespace jni
jfieldID echoCanceller;
jfieldID gainControl;
jfieldID highPassFilter;
jfieldID levelEstimation;
jfieldID noiseSuppression;
jfieldID residualEchoDetector;
jfieldID transientSuppression;
Expand Down Expand Up @@ -101,15 +100,6 @@ namespace jni
jfieldID enabled;
};

class JavaLevelEstimationClass : public JavaClass
{
public:
explicit JavaLevelEstimationClass(JNIEnv * env);

jclass cls;
jfieldID enabled;
};

class JavaNoiseSuppressionClass : public JavaClass
{
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ namespace jni
explicit JavaAudioProcessingStatsClass(JNIEnv * env);

jclass cls;
jfieldID outputRmsDbfs;
jfieldID voiceDetected;
jfieldID echoReturnLoss;
jfieldID echoReturnLossEnhancement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ namespace jni
JavaObject obj(env, javaType);
JavaObject statsObj(env, obj.getObject(javaClass->stats));

statsObj.setInt(javaStatsClass->outputRmsDbfs, stats.output_rms_dbfs.value_or(0));
statsObj.setBoolean(javaStatsClass->voiceDetected, stats.voice_detected.value_or(false));
statsObj.setDouble(javaStatsClass->echoReturnLoss, stats.echo_return_loss.value_or(0));
statsObj.setDouble(javaStatsClass->echoReturnLossEnhancement, stats.echo_return_loss_enhancement.value_or(0));
Expand Down
12 changes: 0 additions & 12 deletions webrtc-jni/src/main/cpp/src/media/audio/AudioProcessingConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace jni
const auto javaClass = JavaClasses::get<JavaAudioProcessingConfigClass>(env);
const auto javaEchoCancellerClass = JavaClasses::get<JavaEchoCancellerClass>(env);
const auto javaHighPassFilterClass = JavaClasses::get<JavaHighPassFilterClass>(env);
const auto javaLevelEstimationClass = JavaClasses::get<JavaLevelEstimationClass>(env);
const auto javaNoiseSuppressionClass = JavaClasses::get<JavaNoiseSuppressionClass>(env);
const auto javaResidualEchoDetectorClass = JavaClasses::get<JavaResidualEchoDetectorClass>(env);
const auto javaTransientSuppressionClass = JavaClasses::get<JavaTransientSuppressionClass>(env);
Expand All @@ -41,7 +40,6 @@ namespace jni
JavaObject obj(env, javaType);
JavaObject echoCanceller(env, obj.getObject(javaClass->echoCanceller));
JavaObject highPassFilter(env, obj.getObject(javaClass->highPassFilter));
JavaObject levelEstimation(env, obj.getObject(javaClass->levelEstimation));
JavaObject noiseSuppression(env, obj.getObject(javaClass->noiseSuppression));
JavaObject residualEchoDetector(env, obj.getObject(javaClass->residualEchoDetector));
JavaObject transientSuppression(env, obj.getObject(javaClass->transientSuppression));
Expand All @@ -56,8 +54,6 @@ namespace jni

config.high_pass_filter.enabled = highPassFilter.getBoolean(javaHighPassFilterClass->enabled);

config.level_estimation.enabled = levelEstimation.getBoolean(javaLevelEstimationClass->enabled);

config.noise_suppression.enabled = noiseSuppression.getBoolean(javaNoiseSuppressionClass->enabled);

JavaLocalRef<jobject> nsLevel = noiseSuppression.getObject(javaNoiseSuppressionClass->level);
Expand Down Expand Up @@ -106,7 +102,6 @@ namespace jni
echoCanceller = GetFieldID(env, cls, "echoCanceller", "L" PKG_AUDIO "AudioProcessingConfig$EchoCanceller;");
gainControl = GetFieldID(env, cls, "gainControl", "L" PKG_AUDIO "AudioProcessingConfig$GainControl;");
highPassFilter = GetFieldID(env, cls, "highPassFilter", "L" PKG_AUDIO "AudioProcessingConfig$HighPassFilter;");
levelEstimation = GetFieldID(env, cls, "levelEstimation", "L" PKG_AUDIO "AudioProcessingConfig$LevelEstimation;");
noiseSuppression = GetFieldID(env, cls, "noiseSuppression", "L" PKG_AUDIO "AudioProcessingConfig$NoiseSuppression;");
residualEchoDetector = GetFieldID(env, cls, "residualEchoDetector", "L" PKG_AUDIO "AudioProcessingConfig$ResidualEchoDetector;");
transientSuppression = GetFieldID(env, cls, "transientSuppression", "L" PKG_AUDIO "AudioProcessingConfig$TransientSuppression;");
Expand Down Expand Up @@ -156,13 +151,6 @@ namespace jni
enabled = GetFieldID(env, cls, "enabled", "Z");
}

JavaLevelEstimationClass::JavaLevelEstimationClass(JNIEnv* env)
{
cls = FindClass(env, PKG_AUDIO"AudioProcessingConfig$LevelEstimation");

enabled = GetFieldID(env, cls, "enabled", "Z");
}

JavaNoiseSuppressionClass::JavaNoiseSuppressionClass(JNIEnv* env)
{
cls = FindClass(env, PKG_AUDIO"AudioProcessingConfig$NoiseSuppression");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace jni
{
cls = FindClass(env, PKG_AUDIO"AudioProcessingStats");

outputRmsDbfs = GetFieldID(env, cls, "outputRmsDbfs", "I");
voiceDetected = GetFieldID(env, cls, "voiceDetected", "Z");
echoReturnLoss = GetFieldID(env, cls, "echoReturnLoss", "D");
echoReturnLossEnhancement = GetFieldID(env, cls, "echoReturnLossEnhancement", "D");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace jni
// Crop black window borders.
bool fullscreen = cFrame->stride() == (cFrame->size().width() * webrtc::DesktopFrame::kBytesPerPixel);

if (rtc::IsWindows8OrLater() && !fullscreen) {
if (!fullscreen) {
const webrtc::DesktopVector & top_left = cFrame->top_left();
const webrtc::DesktopSize & size = cFrame->size();
const int32_t border = GetSystemMetrics(SM_CXPADDEDBORDER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public class AudioProcessingConfig {

public final HighPassFilter highPassFilter = new HighPassFilter();

public final LevelEstimation levelEstimation = new LevelEstimation();

public final NoiseSuppression noiseSuppression = new NoiseSuppression();

public final ResidualEchoDetector residualEchoDetector = new ResidualEchoDetector();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,6 @@

public class AudioProcessingStats {

/**
* The root-mean-square (RMS) level in dBFS (decibels from digital
* full-scale) of the last capture frame, after processing. It is
* constrained to [-127, 0].
* <p>
* The computation follows: https://tools.ietf.org/html/rfc6465 with the
* intent that it can provide the RTP audio level indication.
* <p>
* Only reported if level estimation is enabled via {@code
* AudioProcessingConfig}.
*/
public int outputRmsDbfs;

/**
* True if voice is detected in the last capture frame, after processing.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ void applyConfig() {

config.residualEchoDetector.enabled = true;
config.transientSuppression.enabled = true;
config.levelEstimation.enabled = true;
config.voiceDetection.enabled = true;

audioProcessing.applyConfig(config);
Expand Down

0 comments on commit 29a6e3b

Please sign in to comment.