diff --git a/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py b/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py index fa1b7509bab016fa1f643f564a45293a3da1cc0d..649de216ef36a0e24e93c89ac44bbe0c60359765 100644 --- a/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py +++ b/ivas_processing_scripts/audiotools/wrappers/networkSimulator.py @@ -31,6 +31,7 @@ # import os.path +import logging from pathlib import Path from typing import Optional, Union @@ -90,6 +91,7 @@ def network_simulator( out_bitstream: Union[str, Path], n_frames_per_packet: int, offset: int, + logger: Optional[logging.Logger] = None, ) -> None: """ Wrapper for networkSimulator_g192 binary to apply error patterns for the bitstream processing @@ -106,6 +108,8 @@ def network_simulator( Number of frames per paket [1,2] offset: Optional[int] delay offset + logger: Optional[logging.Logger] + logger """ # find binary @@ -133,7 +137,7 @@ def network_simulator( ] # run command - run(cmd) + run(cmd, logger=logger) return @@ -145,6 +149,7 @@ def apply_network_simulator( error_profile: Optional[int] = None, n_frames_per_packet: Optional[int] = None, offset: Optional[int] = 0, + logger: Optional[logging.Logger] = None, ) -> None: """ Function to apply a network simulator profile to a bitstreaam @@ -163,6 +168,8 @@ def apply_network_simulator( Number of frames per paket offset: Optional[int] delay offset + logger: Optional[logging.Logger] + logger """ if error_pattern is None: @@ -192,7 +199,7 @@ def apply_network_simulator( # apply error pattern network_simulator( - error_pattern, in_bitstream, out_bitstream, n_frames_per_packet, offset + error_pattern, in_bitstream, out_bitstream, n_frames_per_packet, offset, logger ) return diff --git a/ivas_processing_scripts/processing/chains.py b/ivas_processing_scripts/processing/chains.py index fc696d922dd1d6819be38b637db2c9d8f77dcf5f..7f54330d7c634d9839db5d33d177166966b2334d 100755 --- a/ivas_processing_scripts/processing/chains.py +++ b/ivas_processing_scripts/processing/chains.py @@ -256,7 +256,7 @@ def get_processing_chain( "type": cfg.tx.get("type", None), "error_pattern": cfg.tx.get("error_pattern", None), "error_profile": cfg.tx.get("error_profile", None), - "n_frames_per_packet": cfg.tx.get("n_frames_per_packet", 1), + "n_frames_per_packet": cfg.tx.get("n_frames_per_packet", None), } else: raise ValueError( diff --git a/ivas_processing_scripts/processing/ivas.py b/ivas_processing_scripts/processing/ivas.py index ddfbc20743efcfdce440e895b41d67982bc58879..b2cae46bf38d6ea0f720a19f3f48cae302ec117f 100755 --- a/ivas_processing_scripts/processing/ivas.py +++ b/ivas_processing_scripts/processing/ivas.py @@ -225,6 +225,7 @@ class IVAS(Processing): self.tx["error_pattern"], self.tx["error_profile"], self.tx["n_frames_per_packet"], + logger=logger, ) # add -voip cmdline option to the decoder # TODO: tracefile also?