Add SSRC filter and NetEq accessor to NetEq simulator.
Bug: None Change-Id: I6b3f9c564199d75adf5830a7d0f58aeb50674c39 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345440 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42002}
This commit is contained in:
parent
71a5f58f9c
commit
e0f08a325a
@ -962,6 +962,7 @@ rtc_library("neteq_simulator_api") {
|
|||||||
"test/neteq_simulator.cc",
|
"test/neteq_simulator.cc",
|
||||||
"test/neteq_simulator.h",
|
"test/neteq_simulator.h",
|
||||||
]
|
]
|
||||||
|
deps = [ "neteq:neteq_api" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_source_set("function_view") {
|
rtc_source_set("function_view") {
|
||||||
|
|||||||
@ -16,6 +16,8 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/neteq/neteq.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
|
|
||||||
@ -74,6 +76,9 @@ class NetEqSimulator {
|
|||||||
|
|
||||||
// Get the current state of NetEq.
|
// Get the current state of NetEq.
|
||||||
virtual NetEqState GetNetEqState() = 0;
|
virtual NetEqState GetNetEqState() = 0;
|
||||||
|
|
||||||
|
// Get the underlying NetEq instance.
|
||||||
|
virtual NetEq* GetNetEq() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
|
|||||||
@ -36,6 +36,7 @@ NetEqTestFactory::Config convertConfig(
|
|||||||
config.plot_scripts_basename = simulation_config.python_plot_filename;
|
config.plot_scripts_basename = simulation_config.python_plot_filename;
|
||||||
config.textlog = simulation_config.text_log_filename.has_value();
|
config.textlog = simulation_config.text_log_filename.has_value();
|
||||||
config.textlog_filename = simulation_config.text_log_filename;
|
config.textlog_filename = simulation_config.text_log_filename;
|
||||||
|
config.ssrc_filter = simulation_config.ssrc_filter;
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
#ifndef API_TEST_NETEQ_SIMULATOR_FACTORY_H_
|
#ifndef API_TEST_NETEQ_SIMULATOR_FACTORY_H_
|
||||||
#define API_TEST_NETEQ_SIMULATOR_FACTORY_H_
|
#define API_TEST_NETEQ_SIMULATOR_FACTORY_H_
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -50,6 +51,8 @@ class NetEqSimulatorFactory {
|
|||||||
absl::optional<std::string> text_log_filename;
|
absl::optional<std::string> text_log_filename;
|
||||||
// A custom NetEqFactory can be used.
|
// A custom NetEqFactory can be used.
|
||||||
NetEqFactory* neteq_factory = nullptr;
|
NetEqFactory* neteq_factory = nullptr;
|
||||||
|
// The SSRC to use for the simulation.
|
||||||
|
absl::optional<uint32_t> ssrc_filter;
|
||||||
};
|
};
|
||||||
std::unique_ptr<NetEqSimulator> CreateSimulatorFromFile(
|
std::unique_ptr<NetEqSimulator> CreateSimulatorFromFile(
|
||||||
absl::string_view event_log_filename,
|
absl::string_view event_log_filename,
|
||||||
|
|||||||
@ -100,6 +100,7 @@ class NetEqTest : public NetEqSimulator {
|
|||||||
|
|
||||||
void SetNextAction(Action next_operation) override;
|
void SetNextAction(Action next_operation) override;
|
||||||
NetEqState GetNetEqState() override;
|
NetEqState GetNetEqState() override;
|
||||||
|
NetEq* GetNetEq() override { return neteq_.get(); }
|
||||||
|
|
||||||
// Returns the statistics from NetEq.
|
// Returns the statistics from NetEq.
|
||||||
NetEqNetworkStatistics SimulationStats();
|
NetEqNetworkStatistics SimulationStats();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user