Use backticks not vertical bars to denote variables in comments for /api
Bug: webrtc:12338 Change-Id: Ib97b2c3d64dbd895f261ffa76a2e885bd934a87f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226940 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34554}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
7750d802a5
commit
0e61fdd27c
@ -25,9 +25,9 @@ class AudioQualityAnalyzerInterface : public StatsObserverInterface {
|
||||
~AudioQualityAnalyzerInterface() override = default;
|
||||
|
||||
// Will be called by the framework before the test.
|
||||
// |test_case_name| is name of test case, that should be used to report all
|
||||
// `test_case_name` is name of test case, that should be used to report all
|
||||
// audio metrics.
|
||||
// |analyzer_helper| is a pointer to a class that will allow track_id to
|
||||
// `analyzer_helper` is a pointer to a class that will allow track_id to
|
||||
// stream_id matching. The caller is responsible for ensuring the
|
||||
// AnalyzerHelper outlives the instance of the AudioQualityAnalyzerInterface.
|
||||
virtual void Start(std::string test_case_name,
|
||||
|
||||
@ -23,12 +23,12 @@ namespace test {
|
||||
// utility can be used to simulate the audioprocessing module using a recording
|
||||
// (either an AEC dump or wav files), and generate the output as a wav file.
|
||||
// Any audio_processing object specified in the input is used for the
|
||||
// simulation. The optional |audio_processing| object provides the
|
||||
// simulation. The optional `audio_processing` object provides the
|
||||
// AudioProcessing instance that is used during the simulation. Note that when
|
||||
// the audio_processing object is specified all functionality that relies on
|
||||
// using the AudioProcessingBuilder is deactivated, since the AudioProcessing
|
||||
// object is already created and the builder is not used in the simulation. It
|
||||
// is needed to pass the command line flags as |argc| and |argv|, so these can
|
||||
// is needed to pass the command line flags as `argc` and `argv`, so these can
|
||||
// be interpreted properly by the utility. To see a list of all supported
|
||||
// command line flags, run the executable with the '--help' flag.
|
||||
int AudioprocFloat(rtc::scoped_refptr<AudioProcessing> audio_processing,
|
||||
@ -38,10 +38,10 @@ int AudioprocFloat(rtc::scoped_refptr<AudioProcessing> audio_processing,
|
||||
// This is an interface for the audio processing simulation utility. This
|
||||
// utility can be used to simulate the audioprocessing module using a recording
|
||||
// (either an AEC dump or wav files), and generate the output as a wav file.
|
||||
// The |ap_builder| object will be used to create the AudioProcessing instance
|
||||
// that is used during the simulation. The |ap_builder| supports setting of
|
||||
// The `ap_builder` object will be used to create the AudioProcessing instance
|
||||
// that is used during the simulation. The `ap_builder` supports setting of
|
||||
// injectable components, which will be passed on to the created AudioProcessing
|
||||
// instance. It is needed to pass the command line flags as |argc| and |argv|,
|
||||
// instance. It is needed to pass the command line flags as `argc` and `argv`,
|
||||
// so these can be interpreted properly by the utility.
|
||||
// To get a fully-working audioproc_f utility, all that is needed is to write a
|
||||
// main function, create an AudioProcessingBuilder, optionally set custom
|
||||
@ -56,9 +56,9 @@ int AudioprocFloat(std::unique_ptr<AudioProcessingBuilder> ap_builder,
|
||||
// Interface for the audio processing simulation utility, which is similar to
|
||||
// the one above, but which adds the option of receiving the input as a string
|
||||
// and returning the output as an array. The first three arguments fulfill the
|
||||
// same purpose as above. Pass the |input_aecdump| to provide the content of an
|
||||
// same purpose as above. Pass the `input_aecdump` to provide the content of an
|
||||
// AEC dump file as a string. After the simulation is completed,
|
||||
// |processed_capture_samples| will contain the the samples processed on the
|
||||
// `processed_capture_samples` will contain the the samples processed on the
|
||||
// capture side.
|
||||
int AudioprocFloat(std::unique_ptr<AudioProcessingBuilder> ap_builder,
|
||||
int argc,
|
||||
|
||||
@ -24,8 +24,8 @@ namespace test {
|
||||
|
||||
// Creates a frame generator that produces frames with small squares that
|
||||
// move randomly towards the lower right corner.
|
||||
// |type| has the default value FrameGeneratorInterface::OutputType::I420.
|
||||
// |num_squares| has the default value 10.
|
||||
// `type` has the default value FrameGeneratorInterface::OutputType::I420.
|
||||
// `num_squares` has the default value 10.
|
||||
std::unique_ptr<FrameGeneratorInterface> CreateSquareFrameGenerator(
|
||||
int width,
|
||||
int height,
|
||||
@ -66,7 +66,7 @@ CreateScrollingInputFromYuvFilesFrameGenerator(
|
||||
|
||||
// Creates a frame generator that produces randomly generated slides. It fills
|
||||
// the frames with randomly sized and colored squares.
|
||||
// |frame_repeat_count| determines how many times each slide is shown.
|
||||
// `frame_repeat_count` determines how many times each slide is shown.
|
||||
std::unique_ptr<FrameGeneratorInterface>
|
||||
CreateSlideFrameGenerator(int width, int height, int frame_repeat_count);
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ void ValidateScreenShareConfig(const VideoConfig& video_config,
|
||||
const ScreenShareConfig& screen_share_config) {
|
||||
if (screen_share_config.slides_yuv_file_names.empty()) {
|
||||
if (screen_share_config.scrolling_params) {
|
||||
// If we have scrolling params, then its |source_width| and |source_heigh|
|
||||
// If we have scrolling params, then its `source_width` and `source_heigh`
|
||||
// will be used as width and height of video input, so we have to validate
|
||||
// it against width and height of default input.
|
||||
RTC_CHECK_EQ(screen_share_config.scrolling_params->source_width,
|
||||
|
||||
@ -21,7 +21,7 @@ namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
// Creates a frame generator that produces frames with small squares that move
|
||||
// randomly towards the lower right corner. |type| has the default value
|
||||
// randomly towards the lower right corner. `type` has the default value
|
||||
// FrameGeneratorInterface::OutputType::I420. video_config specifies frame
|
||||
// weight and height.
|
||||
std::unique_ptr<test::FrameGeneratorInterface> CreateSquareFrameGenerator(
|
||||
|
||||
@ -25,10 +25,10 @@ namespace webrtc_pc_e2e {
|
||||
|
||||
// Create test fixture to establish test call between Alice and Bob.
|
||||
// During the test Alice will be caller and Bob will answer the call.
|
||||
// |test_case_name| is a name of test case, that will be used for all metrics
|
||||
// `test_case_name` is a name of test case, that will be used for all metrics
|
||||
// reporting.
|
||||
// |time_controller| is used to manage all rtc::Thread's and TaskQueue
|
||||
// instances. Instance of |time_controller| have to outlive created fixture.
|
||||
// `time_controller` is used to manage all rtc::Thread's and TaskQueue
|
||||
// instances. Instance of `time_controller` have to outlive created fixture.
|
||||
// Returns a non-null PeerConnectionE2EQualityTestFixture instance.
|
||||
std::unique_ptr<PeerConnectionE2EQualityTestFixture>
|
||||
CreatePeerConnectionE2EQualityTestFixture(
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Creates a time coltroller that wraps |alarm|.
|
||||
// Creates a time coltroller that wraps `alarm`.
|
||||
std::unique_ptr<TimeController> CreateTimeController(
|
||||
ControlledAlarmClock* alarm);
|
||||
|
||||
|
||||
@ -27,12 +27,12 @@ class CrossTrafficRoute {
|
||||
public:
|
||||
virtual ~CrossTrafficRoute() = default;
|
||||
|
||||
// Triggers sending of dummy packets with size |packet_size| bytes.
|
||||
// Triggers sending of dummy packets with size `packet_size` bytes.
|
||||
virtual void TriggerPacketBurst(size_t num_packets, size_t packet_size) = 0;
|
||||
// Sends a packet over the nodes. The content of the packet is unspecified;
|
||||
// only the size metter for the emulation purposes.
|
||||
virtual void SendPacket(size_t packet_size) = 0;
|
||||
// Sends a packet over the nodes and runs |action| when it has been delivered.
|
||||
// Sends a packet over the nodes and runs `action` when it has been delivered.
|
||||
virtual void NetworkDelayedAction(size_t packet_size,
|
||||
std::function<void()> action) = 0;
|
||||
};
|
||||
|
||||
@ -204,9 +204,9 @@ class EmulatedNetworkStats {
|
||||
class EmulatedEndpoint : public EmulatedNetworkReceiverInterface {
|
||||
public:
|
||||
// Send packet into network.
|
||||
// |from| will be used to set source address for the packet in destination
|
||||
// `from` will be used to set source address for the packet in destination
|
||||
// socket.
|
||||
// |to| will be used for routing verification and picking right socket by port
|
||||
// `to` will be used for routing verification and picking right socket by port
|
||||
// on destination endpoint.
|
||||
virtual void SendPacket(const rtc::SocketAddress& from,
|
||||
const rtc::SocketAddress& to,
|
||||
@ -214,12 +214,12 @@ class EmulatedEndpoint : public EmulatedNetworkReceiverInterface {
|
||||
uint16_t application_overhead = 0) = 0;
|
||||
|
||||
// Binds receiver to this endpoint to send and receive data.
|
||||
// |desired_port| is a port that should be used. If it is equal to 0,
|
||||
// `desired_port` is a port that should be used. If it is equal to 0,
|
||||
// endpoint will pick the first available port starting from
|
||||
// |kFirstEphemeralPort|.
|
||||
// `kFirstEphemeralPort`.
|
||||
//
|
||||
// Returns the port, that should be used (it will be equals to desired, if
|
||||
// |desired_port| != 0 and is free or will be the one, selected by endpoint)
|
||||
// `desired_port` != 0 and is free or will be the one, selected by endpoint)
|
||||
// or absl::nullopt if desired_port in used. Also fails if there are no more
|
||||
// free ports to bind to.
|
||||
//
|
||||
@ -256,7 +256,7 @@ class EmulatedEndpoint : public EmulatedNetworkReceiverInterface {
|
||||
// they are guranteed to be delivered eventually, even on lossy networks.
|
||||
class TcpMessageRoute {
|
||||
public:
|
||||
// Sends a TCP message of the given |size| over the route, |on_received| is
|
||||
// Sends a TCP message of the given `size` over the route, `on_received` is
|
||||
// called when the message has been delivered. Note that the connection
|
||||
// parameters are reset iff there's no currently pending message on the route.
|
||||
virtual void SendMessage(size_t size, std::function<void()> on_received) = 0;
|
||||
|
||||
@ -130,7 +130,7 @@ class EmulatedNetworkManagerInterface {
|
||||
virtual std::vector<EmulatedEndpoint*> endpoints() const = 0;
|
||||
|
||||
// Passes summarized network stats for endpoints for this manager into
|
||||
// specified |stats_callback|. Callback will be executed on network emulation
|
||||
// specified `stats_callback`. Callback will be executed on network emulation
|
||||
// internal task queue.
|
||||
virtual void GetStats(
|
||||
std::function<void(std::unique_ptr<EmulatedNetworkStats>)> stats_callback)
|
||||
@ -180,13 +180,13 @@ class NetworkEmulationManager {
|
||||
|
||||
// Creates an emulated network node, which represents single network in
|
||||
// the emulated network layer. Uses default implementation on network behavior
|
||||
// which can be configured with |config|. |random_seed| can be provided to
|
||||
// which can be configured with `config`. `random_seed` can be provided to
|
||||
// alter randomization behavior.
|
||||
virtual EmulatedNetworkNode* CreateEmulatedNode(
|
||||
BuiltInNetworkBehaviorConfig config,
|
||||
uint64_t random_seed = 1) = 0;
|
||||
// Creates an emulated network node, which represents single network in
|
||||
// the emulated network layer. |network_behavior| determines how created node
|
||||
// the emulated network layer. `network_behavior` determines how created node
|
||||
// will forward incoming packets to the next receiver.
|
||||
virtual EmulatedNetworkNode* CreateEmulatedNode(
|
||||
std::unique_ptr<NetworkBehaviorInterface> network_behavior) = 0;
|
||||
@ -205,8 +205,8 @@ class NetworkEmulationManager {
|
||||
|
||||
// Creates a route between endpoints going through specified network nodes.
|
||||
// This route is single direction only and describe how traffic that was
|
||||
// sent by network interface |from| have to be delivered to the network
|
||||
// interface |to|. Return object can be used to remove created route. The
|
||||
// sent by network interface `from` have to be delivered to the network
|
||||
// interface `to`. Return object can be used to remove created route. The
|
||||
// route must contains at least one network node inside it.
|
||||
//
|
||||
// Assume that E{0-9} are endpoints and N{0-9} are network nodes, then
|
||||
@ -228,7 +228,7 @@ class NetworkEmulationManager {
|
||||
const std::vector<EmulatedNetworkNode*>& via_nodes,
|
||||
EmulatedEndpoint* to) = 0;
|
||||
|
||||
// Creates a route over the given |via_nodes| creating the required endpoints
|
||||
// Creates a route over the given `via_nodes` creating the required endpoints
|
||||
// in the process. The returned EmulatedRoute pointer can be used in other
|
||||
// calls as a transport route for message or cross traffic.
|
||||
virtual EmulatedRoute* CreateRoute(
|
||||
@ -239,7 +239,7 @@ class NetworkEmulationManager {
|
||||
// packet's destination IP.
|
||||
//
|
||||
// This route is single direction only and describe how traffic that was
|
||||
// sent by network interface |from| have to be delivered in case if routing
|
||||
// sent by network interface `from` have to be delivered in case if routing
|
||||
// was unspecified. Return object can be used to remove created route. The
|
||||
// route must contains at least one network node inside it.
|
||||
//
|
||||
@ -269,29 +269,29 @@ class NetworkEmulationManager {
|
||||
// packets being dropped.
|
||||
virtual void ClearRoute(EmulatedRoute* route) = 0;
|
||||
|
||||
// Creates a simulated TCP connection using |send_route| for traffic and
|
||||
// |ret_route| for feedback. This can be used to emulate HTTP cross traffic
|
||||
// Creates a simulated TCP connection using `send_route` for traffic and
|
||||
// `ret_route` for feedback. This can be used to emulate HTTP cross traffic
|
||||
// and to implement realistic reliable signaling over lossy networks.
|
||||
// TODO(srte): Handle clearing of the routes involved.
|
||||
virtual TcpMessageRoute* CreateTcpRoute(EmulatedRoute* send_route,
|
||||
EmulatedRoute* ret_route) = 0;
|
||||
|
||||
// Creates a route over the given |via_nodes|. Returns an object that can be
|
||||
// Creates a route over the given `via_nodes`. Returns an object that can be
|
||||
// used to emulate network load with cross traffic over the created route.
|
||||
virtual CrossTrafficRoute* CreateCrossTrafficRoute(
|
||||
const std::vector<EmulatedNetworkNode*>& via_nodes) = 0;
|
||||
|
||||
// Starts generating cross traffic using given |generator|. Takes ownership
|
||||
// Starts generating cross traffic using given `generator`. Takes ownership
|
||||
// over the generator.
|
||||
virtual CrossTrafficGenerator* StartCrossTraffic(
|
||||
std::unique_ptr<CrossTrafficGenerator> generator) = 0;
|
||||
|
||||
// Stops generating cross traffic that was started using given |generator|.
|
||||
// The |generator| shouldn't be used after and the reference may be invalid.
|
||||
// Stops generating cross traffic that was started using given `generator`.
|
||||
// The `generator` shouldn't be used after and the reference may be invalid.
|
||||
virtual void StopCrossTraffic(CrossTrafficGenerator* generator) = 0;
|
||||
|
||||
// Creates EmulatedNetworkManagerInterface which can be used then to inject
|
||||
// network emulation layer into PeerConnection. |endpoints| - are available
|
||||
// network emulation layer into PeerConnection. `endpoints` - are available
|
||||
// network interfaces for PeerConnection. If endpoint is enabled, it will be
|
||||
// immediately available for PeerConnection, otherwise user will be able to
|
||||
// enable endpoint later to make it available for PeerConnection.
|
||||
@ -299,8 +299,8 @@ class NetworkEmulationManager {
|
||||
CreateEmulatedNetworkManagerInterface(
|
||||
const std::vector<EmulatedEndpoint*>& endpoints) = 0;
|
||||
|
||||
// Passes summarized network stats for specified |endpoints| into specified
|
||||
// |stats_callback|. Callback will be executed on network emulation
|
||||
// Passes summarized network stats for specified `endpoints` into specified
|
||||
// `stats_callback`. Callback will be executed on network emulation
|
||||
// internal task queue.
|
||||
virtual void GetStats(
|
||||
rtc::ArrayView<EmulatedEndpoint* const> endpoints,
|
||||
|
||||
@ -67,17 +67,17 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// bottom right corner of the picture.
|
||||
//
|
||||
// In such case source dimensions must be greater or equal to the sliding
|
||||
// window dimensions. So |source_width| and |source_height| are the dimensions
|
||||
// of the source frame, while |VideoConfig::width| and |VideoConfig::height|
|
||||
// window dimensions. So `source_width` and `source_height` are the dimensions
|
||||
// of the source frame, while `VideoConfig::width` and `VideoConfig::height`
|
||||
// are the dimensions of the sliding window.
|
||||
//
|
||||
// Because |source_width| and |source_height| are dimensions of the source
|
||||
// Because `source_width` and `source_height` are dimensions of the source
|
||||
// frame, they have to be width and height of videos from
|
||||
// |ScreenShareConfig::slides_yuv_file_names|.
|
||||
// `ScreenShareConfig::slides_yuv_file_names`.
|
||||
//
|
||||
// Because scrolling have to be done on single slide it also requires, that
|
||||
// |duration| must be less or equal to
|
||||
// |ScreenShareConfig::slide_change_interval|.
|
||||
// `duration` must be less or equal to
|
||||
// `ScreenShareConfig::slide_change_interval`.
|
||||
struct ScrollingParams {
|
||||
ScrollingParams(TimeDelta duration,
|
||||
size_t source_width,
|
||||
@ -110,16 +110,16 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// will be applied in such case.
|
||||
bool generate_slides = false;
|
||||
// If present scrolling will be applied. Please read extra requirement on
|
||||
// |slides_yuv_file_names| for scrolling.
|
||||
// `slides_yuv_file_names` for scrolling.
|
||||
absl::optional<ScrollingParams> scrolling_params;
|
||||
// Contains list of yuv files with slides.
|
||||
//
|
||||
// If empty, default set of slides will be used. In such case
|
||||
// |VideoConfig::width| must be equal to |kDefaultSlidesWidth| and
|
||||
// |VideoConfig::height| must be equal to |kDefaultSlidesHeight| or if
|
||||
// |scrolling_params| are specified, then |ScrollingParams::source_width|
|
||||
// must be equal to |kDefaultSlidesWidth| and
|
||||
// |ScrollingParams::source_height| must be equal to |kDefaultSlidesHeight|.
|
||||
// `VideoConfig::width` must be equal to `kDefaultSlidesWidth` and
|
||||
// `VideoConfig::height` must be equal to `kDefaultSlidesHeight` or if
|
||||
// `scrolling_params` are specified, then `ScrollingParams::source_width`
|
||||
// must be equal to `kDefaultSlidesWidth` and
|
||||
// `ScrollingParams::source_height` must be equal to `kDefaultSlidesHeight`.
|
||||
std::vector<std::string> slides_yuv_file_names;
|
||||
};
|
||||
|
||||
@ -128,7 +128,7 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// SVC support is limited:
|
||||
// During SVC testing there is no SFU, so framework will try to emulate SFU
|
||||
// behavior in regular p2p call. Because of it there are such limitations:
|
||||
// * if |target_spatial_index| is not equal to the highest spatial layer
|
||||
// * if `target_spatial_index` is not equal to the highest spatial layer
|
||||
// then no packet/frame drops are allowed.
|
||||
//
|
||||
// If there will be any drops, that will affect requested layer, then
|
||||
@ -154,11 +154,11 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// Specifies spatial index of the video stream to analyze.
|
||||
// There are 2 cases:
|
||||
// 1. simulcast encoder is used:
|
||||
// in such case |target_spatial_index| will specify the index of
|
||||
// in such case `target_spatial_index` will specify the index of
|
||||
// simulcast stream, that should be analyzed. Other streams will be
|
||||
// dropped.
|
||||
// 2. SVC encoder is used:
|
||||
// in such case |target_spatial_index| will specify the top interesting
|
||||
// in such case `target_spatial_index` will specify the top interesting
|
||||
// spatial layer and all layers below, including target one will be
|
||||
// processed. All layers above target one will be dropped.
|
||||
// If not specified than whatever stream will be received will be analyzed.
|
||||
@ -166,8 +166,8 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// network.
|
||||
absl::optional<int> target_spatial_index;
|
||||
|
||||
// Encoding parameters per simulcast layer. If not empty, |encoding_params|
|
||||
// size have to be equal to |simulcast_streams_count|. Will be used to set
|
||||
// Encoding parameters per simulcast layer. If not empty, `encoding_params`
|
||||
// size have to be equal to `simulcast_streams_count`. Will be used to set
|
||||
// transceiver send encoding params for simulcast layers. Applicable only
|
||||
// for codecs that support simulcast (ex. Vp8) and will be ignored
|
||||
// otherwise. RtpEncodingParameters::rid may be changed by fixture
|
||||
@ -220,7 +220,7 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// was captured during the test for this video stream on sender side.
|
||||
// It is useful when generator is used as input.
|
||||
absl::optional<std::string> input_dump_file_name;
|
||||
// Used only if |input_dump_file_name| is set. Specifies the module for the
|
||||
// Used only if `input_dump_file_name` is set. Specifies the module for the
|
||||
// video frames to be dumped. Modulo equals X means every Xth frame will be
|
||||
// written to the dump file. The value must be greater than 0.
|
||||
int input_dump_sampling_modulo = 1;
|
||||
@ -229,7 +229,7 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// output files will be appended with indexes. The produced files contains
|
||||
// what was rendered for this video stream on receiver side.
|
||||
absl::optional<std::string> output_dump_file_name;
|
||||
// Used only if |output_dump_file_name| is set. Specifies the module for the
|
||||
// Used only if `output_dump_file_name` is set. Specifies the module for the
|
||||
// video frames to be dumped. Modulo equals X means every Xth frame will be
|
||||
// written to the dump file. The value must be greater than 0.
|
||||
int output_dump_sampling_modulo = 1;
|
||||
@ -282,9 +282,9 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
std::string name = cricket::kVp8CodecName;
|
||||
// Map of parameters, that have to be specified on SDP codec. Each parameter
|
||||
// is described by key and value. Codec parameters will match the specified
|
||||
// map if and only if for each key from |required_params| there will be
|
||||
// map if and only if for each key from `required_params` there will be
|
||||
// a parameter with name equal to this key and parameter value will be equal
|
||||
// to the value from |required_params| for this key.
|
||||
// to the value from `required_params` for this key.
|
||||
// If empty then only name will be used to match the codec.
|
||||
std::map<std::string, std::string> required_params;
|
||||
};
|
||||
@ -351,7 +351,7 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
CapturingDeviceIndex capturing_device_index) = 0;
|
||||
// Set the list of video codecs used by the peer during the test. These
|
||||
// codecs will be negotiated in SDP during offer/answer exchange. The order
|
||||
// of these codecs during negotiation will be the same as in |video_codecs|.
|
||||
// of these codecs during negotiation will be the same as in `video_codecs`.
|
||||
// Codecs have to be available in codecs list provided by peer connection to
|
||||
// be negotiated. If some of specified codecs won't be found, the test will
|
||||
// crash.
|
||||
@ -416,9 +416,9 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
|
||||
// Invoked by framework after peer connection factory and peer connection
|
||||
// itself will be created but before offer/answer exchange will be started.
|
||||
// |test_case_name| is name of test case, that should be used to report all
|
||||
// `test_case_name` is name of test case, that should be used to report all
|
||||
// metrics.
|
||||
// |reporter_helper| is a pointer to a class that will allow track_id to
|
||||
// `reporter_helper` is a pointer to a class that will allow track_id to
|
||||
// stream_id matching. The caller is responsible for ensuring the
|
||||
// TrackIdStreamInfoMap will be valid from Start() to
|
||||
// StopAndReportResults().
|
||||
@ -433,14 +433,14 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
virtual ~PeerConnectionE2EQualityTestFixture() = default;
|
||||
|
||||
// Add activity that will be executed on the best effort at least after
|
||||
// |target_time_since_start| after call will be set up (after offer/answer
|
||||
// `target_time_since_start` after call will be set up (after offer/answer
|
||||
// exchange, ICE gathering will be done and ICE candidates will passed to
|
||||
// remote side). |func| param is amount of time spent from the call set up.
|
||||
// remote side). `func` param is amount of time spent from the call set up.
|
||||
virtual void ExecuteAt(TimeDelta target_time_since_start,
|
||||
std::function<void(TimeDelta)> func) = 0;
|
||||
// Add activity that will be executed every |interval| with first execution
|
||||
// on the best effort at least after |initial_delay_since_start| after call
|
||||
// will be set up (after all participants will be connected). |func| param is
|
||||
// Add activity that will be executed every `interval` with first execution
|
||||
// on the best effort at least after `initial_delay_since_start` after call
|
||||
// will be set up (after all participants will be connected). `func` param is
|
||||
// amount of time spent from the call set up.
|
||||
virtual void ExecuteEvery(TimeDelta initial_delay_since_start,
|
||||
TimeDelta interval,
|
||||
@ -452,15 +452,15 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
|
||||
// Add a new peer to the call and return an object through which caller
|
||||
// can configure peer's behavior.
|
||||
// |network_thread| will be used as network thread for peer's peer connection
|
||||
// |network_manager| will be used to provide network interfaces for peer's
|
||||
// `network_thread` will be used as network thread for peer's peer connection
|
||||
// `network_manager` will be used to provide network interfaces for peer's
|
||||
// peer connection.
|
||||
// |configurer| function will be used to configure peer in the call.
|
||||
// `configurer` function will be used to configure peer in the call.
|
||||
virtual void AddPeer(rtc::Thread* network_thread,
|
||||
rtc::NetworkManager* network_manager,
|
||||
rtc::FunctionView<void(PeerConfigurer*)> configurer) = 0;
|
||||
// Runs the media quality test, which includes setting up the call with
|
||||
// configured participants, running it according to provided |run_params| and
|
||||
// configured participants, running it according to provided `run_params` and
|
||||
// terminating it properly at the end. During call duration media quality
|
||||
// metrics are gathered, which are then reported to stdout and (if configured)
|
||||
// to the json/protobuf output file through the WebRTC perf test results
|
||||
|
||||
@ -23,7 +23,7 @@ class StatsObserverInterface {
|
||||
virtual ~StatsObserverInterface() = default;
|
||||
|
||||
// Method called when stats reports are available for the PeerConnection
|
||||
// identified by |pc_label|.
|
||||
// identified by `pc_label`.
|
||||
virtual void OnStatsReports(
|
||||
absl::string_view pc_label,
|
||||
const rtc::scoped_refptr<const RTCStatsReport>& report) = 0;
|
||||
|
||||
@ -44,7 +44,7 @@ class TimeController {
|
||||
// Creates a process thread.
|
||||
virtual std::unique_ptr<ProcessThread> CreateProcessThread(
|
||||
const char* thread_name) = 0;
|
||||
// Creates an rtc::Thread instance. If |socket_server| is nullptr, a default
|
||||
// Creates an rtc::Thread instance. If `socket_server` is nullptr, a default
|
||||
// noop socket server is created.
|
||||
// Returned thread is not null and started.
|
||||
virtual std::unique_ptr<rtc::Thread> CreateThread(
|
||||
@ -55,12 +55,12 @@ class TimeController {
|
||||
// thread.
|
||||
virtual rtc::Thread* GetMainThread() = 0;
|
||||
// Allow task queues and process threads created by this instance to execute
|
||||
// for the given |duration|.
|
||||
// for the given `duration`.
|
||||
virtual void AdvanceTime(TimeDelta duration) = 0;
|
||||
|
||||
// Waits until condition() == true, polling condition() in small time
|
||||
// intervals.
|
||||
// Returns true if condition() was evaluated to true before |max_duration|
|
||||
// Returns true if condition() was evaluated to true before `max_duration`
|
||||
// elapsed and false otherwise.
|
||||
bool Wait(const std::function<bool()>& condition,
|
||||
TimeDelta max_duration = TimeDelta::Seconds(5));
|
||||
@ -75,17 +75,17 @@ class ControlledAlarmClock {
|
||||
// Gets a clock that tells the alarm clock's notion of time.
|
||||
virtual Clock* GetClock() = 0;
|
||||
|
||||
// Schedules the alarm to fire at |deadline|.
|
||||
// An alarm clock only supports one deadline. Calls to |ScheduleAlarmAt| with
|
||||
// Schedules the alarm to fire at `deadline`.
|
||||
// An alarm clock only supports one deadline. Calls to `ScheduleAlarmAt` with
|
||||
// an earlier deadline will reset the alarm to fire earlier.Calls to
|
||||
// |ScheduleAlarmAt| with a later deadline are ignored. Returns true if the
|
||||
// `ScheduleAlarmAt` with a later deadline are ignored. Returns true if the
|
||||
// deadline changed, false otherwise.
|
||||
virtual bool ScheduleAlarmAt(Timestamp deadline) = 0;
|
||||
|
||||
// Sets the callback that should be run when the alarm fires.
|
||||
virtual void SetCallback(std::function<void()> callback) = 0;
|
||||
|
||||
// Waits for |duration| to pass, according to the alarm clock.
|
||||
// Waits for `duration` to pass, according to the alarm clock.
|
||||
virtual void Sleep(TimeDelta duration) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
// Instances of |TrackIdStreamInfoMap| provide bookkeeping capabilities that
|
||||
// Instances of `TrackIdStreamInfoMap` provide bookkeeping capabilities that
|
||||
// are useful to associate stats reports track_ids to the remote stream info.
|
||||
class TrackIdStreamInfoMap {
|
||||
public:
|
||||
@ -26,12 +26,12 @@ class TrackIdStreamInfoMap {
|
||||
// StatsObserverInterface::OnStatsReports is invoked.
|
||||
|
||||
// Returns a reference to a stream label owned by the TrackIdStreamInfoMap.
|
||||
// Precondition: |track_id| must be already mapped to stream label.
|
||||
// Precondition: `track_id` must be already mapped to stream label.
|
||||
virtual absl::string_view GetStreamLabelFromTrackId(
|
||||
absl::string_view track_id) const = 0;
|
||||
|
||||
// Returns a reference to a sync group name owned by the TrackIdStreamInfoMap.
|
||||
// Precondition: |track_id| must be already mapped to sync group.
|
||||
// Precondition: `track_id` must be already mapped to sync group.
|
||||
virtual absl::string_view GetSyncGroupLabelFromTrackId(
|
||||
absl::string_view track_id) const = 0;
|
||||
};
|
||||
|
||||
@ -72,9 +72,9 @@ class VideoQualityAnalyzerInterface : public StatsObserverInterface {
|
||||
~VideoQualityAnalyzerInterface() override = default;
|
||||
|
||||
// Will be called by framework before test.
|
||||
// |test_case_name| is name of test case, that should be used to report all
|
||||
// `test_case_name` is name of test case, that should be used to report all
|
||||
// video metrics.
|
||||
// |threads_count| is number of threads that analyzer can use for heavy
|
||||
// `threads_count` is number of threads that analyzer can use for heavy
|
||||
// calculations. Analyzer can perform simple calculations on the calling
|
||||
// thread in each method, but should remember, that it is the same thread,
|
||||
// that is used in video pipeline.
|
||||
@ -83,57 +83,57 @@ class VideoQualityAnalyzerInterface : public StatsObserverInterface {
|
||||
int max_threads_count) {}
|
||||
|
||||
// Will be called when frame was generated from the input stream.
|
||||
// |peer_name| is name of the peer on which side frame was captured.
|
||||
// `peer_name` is name of the peer on which side frame was captured.
|
||||
// Returns frame id, that will be set by framework to the frame.
|
||||
virtual uint16_t OnFrameCaptured(absl::string_view peer_name,
|
||||
const std::string& stream_label,
|
||||
const VideoFrame& frame) = 0;
|
||||
// Will be called before calling the encoder.
|
||||
// |peer_name| is name of the peer on which side frame came to encoder.
|
||||
// `peer_name` is name of the peer on which side frame came to encoder.
|
||||
virtual void OnFramePreEncode(absl::string_view peer_name,
|
||||
const VideoFrame& frame) {}
|
||||
// Will be called for each EncodedImage received from encoder. Single
|
||||
// VideoFrame can produce multiple EncodedImages. Each encoded image will
|
||||
// have id from VideoFrame.
|
||||
// |peer_name| is name of the peer on which side frame was encoded.
|
||||
// `peer_name` is name of the peer on which side frame was encoded.
|
||||
virtual void OnFrameEncoded(absl::string_view peer_name,
|
||||
uint16_t frame_id,
|
||||
const EncodedImage& encoded_image,
|
||||
const EncoderStats& stats) {}
|
||||
// Will be called for each frame dropped by encoder.
|
||||
// |peer_name| is name of the peer on which side frame drop was detected.
|
||||
// `peer_name` is name of the peer on which side frame drop was detected.
|
||||
virtual void OnFrameDropped(absl::string_view peer_name,
|
||||
EncodedImageCallback::DropReason reason) {}
|
||||
// Will be called before calling the decoder.
|
||||
// |peer_name| is name of the peer on which side frame was received.
|
||||
// `peer_name` is name of the peer on which side frame was received.
|
||||
virtual void OnFramePreDecode(absl::string_view peer_name,
|
||||
uint16_t frame_id,
|
||||
const EncodedImage& encoded_image) {}
|
||||
// Will be called after decoding the frame.
|
||||
// |peer_name| is name of the peer on which side frame was decoded.
|
||||
// `peer_name` is name of the peer on which side frame was decoded.
|
||||
virtual void OnFrameDecoded(absl::string_view peer_name,
|
||||
const VideoFrame& frame,
|
||||
const DecoderStats& stats) {}
|
||||
// Will be called when frame will be obtained from PeerConnection stack.
|
||||
// |peer_name| is name of the peer on which side frame was rendered.
|
||||
// `peer_name` is name of the peer on which side frame was rendered.
|
||||
virtual void OnFrameRendered(absl::string_view peer_name,
|
||||
const VideoFrame& frame) {}
|
||||
// Will be called if encoder return not WEBRTC_VIDEO_CODEC_OK.
|
||||
// All available codes are listed in
|
||||
// modules/video_coding/include/video_error_codes.h
|
||||
// |peer_name| is name of the peer on which side error acquired.
|
||||
// `peer_name` is name of the peer on which side error acquired.
|
||||
virtual void OnEncoderError(absl::string_view peer_name,
|
||||
const VideoFrame& frame,
|
||||
int32_t error_code) {}
|
||||
// Will be called if decoder return not WEBRTC_VIDEO_CODEC_OK.
|
||||
// All available codes are listed in
|
||||
// modules/video_coding/include/video_error_codes.h
|
||||
// |peer_name| is name of the peer on which side error acquired.
|
||||
// `peer_name` is name of the peer on which side error acquired.
|
||||
virtual void OnDecoderError(absl::string_view peer_name,
|
||||
uint16_t frame_id,
|
||||
int32_t error_code) {}
|
||||
// Will be called every time new stats reports are available for the
|
||||
// Peer Connection identified by |pc_label|.
|
||||
// Peer Connection identified by `pc_label`.
|
||||
void OnStatsReports(
|
||||
absl::string_view pc_label,
|
||||
const rtc::scoped_refptr<const RTCStatsReport>& report) override {}
|
||||
|
||||
@ -98,7 +98,7 @@ class VideoQualityTestFixtureInterface {
|
||||
InterLayerPredMode inter_layer_pred = InterLayerPredMode::kOn;
|
||||
// If empty, bitrates are generated in VP9Impl automatically.
|
||||
std::vector<SpatialLayer> spatial_layers;
|
||||
// If set, default parameters will be used instead of |streams|.
|
||||
// If set, default parameters will be used instead of `streams`.
|
||||
bool infer_streams = false;
|
||||
} ss[2];
|
||||
struct Logging {
|
||||
|
||||
Reference in New Issue
Block a user