mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1924098 - Vendor libwebrtc from 77eba46324
Upstream commit: https://webrtc.googlesource.com/src/+/77eba463248c07c633a50a2acdeae31b04356f1e Adding ChannelStatistics Logs Bug: webrtc:363353566 Change-Id: I187432794d173175b83efd4a8899199916306dcd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361127 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Tim Na <natim@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42916}
This commit is contained in:
parent
d8555a113f
commit
f29a0fc2d2
1
third_party/libwebrtc/AUTHORS
vendored
1
third_party/libwebrtc/AUTHORS
vendored
@ -59,6 +59,7 @@ Gustavo Garcia <gustavogb@gmail.com>
|
||||
Hans Knoechel <hans@hans-knoechel.de>
|
||||
Helmut Januschka <helmut@januschka.com>
|
||||
Hugues Ekra <hekra01@gmail.com>
|
||||
Hyungjoo Na <element11sodium@gmail.com>
|
||||
Jake Hilton <jakehilton@gmail.com>
|
||||
James H. Brown <jbrown@burgoyne.com>
|
||||
Jan Grulich <grulja@gmail.com>
|
||||
|
3
third_party/libwebrtc/README.moz-ff-commit
vendored
3
third_party/libwebrtc/README.moz-ff-commit
vendored
@ -32535,3 +32535,6 @@ cb00e16dcb
|
||||
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
|
||||
# base of lastest vendoring
|
||||
86251a072a
|
||||
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
|
||||
# base of lastest vendoring
|
||||
77eba46324
|
||||
|
2
third_party/libwebrtc/README.mozilla
vendored
2
third_party/libwebrtc/README.mozilla
vendored
@ -21714,3 +21714,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
|
||||
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-14T23:12:03.588513.
|
||||
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
|
||||
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-14T23:12:54.186167.
|
||||
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
|
||||
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-14T23:13:49.589805.
|
||||
|
@ -69,6 +69,7 @@ if (is_android) {
|
||||
"//api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"//api/audio_codecs:builtin_audio_encoder_factory",
|
||||
"//api/task_queue:default_task_queue_factory",
|
||||
"//api/units:time_delta",
|
||||
"//api/voip:voip_api",
|
||||
"//api/voip:voip_engine_factory",
|
||||
"//rtc_base/network:received_packet",
|
||||
|
@ -16,8 +16,6 @@
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@ -25,9 +23,12 @@
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "api/task_queue/default_task_queue_factory.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "api/voip/voip_base.h"
|
||||
#include "api/voip/voip_codec.h"
|
||||
#include "api/voip/voip_engine_factory.h"
|
||||
#include "api/voip/voip_network.h"
|
||||
#include "api/voip/voip_statistics.h"
|
||||
#include "examples/androidvoip/generated_jni/VoipClient_jni.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/network.h"
|
||||
@ -333,6 +334,28 @@ void AndroidVoipClient::StartSession(JNIEnv* env) {
|
||||
});
|
||||
Java_VoipClient_onStartSessionCompleted(env_, j_voip_client_,
|
||||
/*isSuccessful=*/true);
|
||||
voip_thread_->PostTask([this, env] { LogChannelStatistics(env); });
|
||||
}
|
||||
|
||||
void AndroidVoipClient::LogChannelStatistics(JNIEnv* env) {
|
||||
RUN_ON_VOIP_THREAD(LogChannelStatistics, env)
|
||||
|
||||
if (!channel_)
|
||||
return;
|
||||
webrtc::ChannelStatistics stats;
|
||||
if (voip_engine_->Statistics().GetChannelStatistics(*channel_, stats) ==
|
||||
webrtc::VoipResult::kInvalidArgument)
|
||||
return;
|
||||
|
||||
RTC_LOG(LS_INFO) << "PACKETS SENT: " << stats.packets_sent
|
||||
<< " BYTES SENT: " << stats.bytes_sent
|
||||
<< " PACKETS RECV: " << stats.packets_received
|
||||
<< " BYTES RECV: " << stats.bytes_received
|
||||
<< " JITTER: " << stats.jitter
|
||||
<< " PACKETS LOST: " << stats.packets_lost;
|
||||
|
||||
voip_thread_->PostDelayedTask([this, env] { LogChannelStatistics(env); },
|
||||
webrtc::TimeDelta::Seconds(1));
|
||||
}
|
||||
|
||||
void AndroidVoipClient::StopSession(JNIEnv* env) {
|
||||
|
@ -150,6 +150,9 @@ class AndroidVoipClient : public webrtc::Transport {
|
||||
void ReadRTPPacket(const std::vector<uint8_t>& packet_copy);
|
||||
void ReadRTCPPacket(const std::vector<uint8_t>& packet_copy);
|
||||
|
||||
// Method to print out ChannelStatistics
|
||||
void LogChannelStatistics(JNIEnv* env);
|
||||
|
||||
// Used to invoke operations and send/receive RTP/RTCP packets.
|
||||
std::unique_ptr<rtc::Thread> voip_thread_;
|
||||
// Reference to the VoipClient java instance used to
|
||||
|
@ -456,7 +456,7 @@ index 65ab875893..0e4594ee9d 100644
|
||||
deps = [
|
||||
":generated_jni",
|
||||
diff --git a/examples/androidvoip/BUILD.gn b/examples/androidvoip/BUILD.gn
|
||||
index c86f899df4..3d86113fe8 100644
|
||||
index b36f586141..6b70e63833 100644
|
||||
--- a/examples/androidvoip/BUILD.gn
|
||||
+++ b/examples/androidvoip/BUILD.gn
|
||||
@@ -51,8 +51,8 @@ if (is_android) {
|
||||
|
Loading…
Reference in New Issue
Block a user