Commit 5e014d86 authored by bayers's avatar bayers
Browse files

small code beautification

parent bfbf367f
Loading
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -45,7 +45,18 @@ def validate_network_simulator(
        error_pattern: Optional[Union[Path, str]] = None,
        error_profile: Optional[int] = None,
        n_frames_per_paket: Optional[int] = None,
    ):
) -> None:
    """Validate settings for the network simulator

    Parameters
    ----------
    error_pattern: Optional[Union[Path, str]]
        Path to existing error pattern
    error_profile: Optional[int]
        Index of existing error pattern
    n_frames_per_paket: Optional[int]
        number of frames per paket
    """
    if find_binary("networkSimulator_g192") is None:
        raise FileNotFoundError(
            "The network simulator binary was not found! Please check the configuration."
@@ -69,6 +80,9 @@ def validate_network_simulator(
            f"n_frames_per_paket is {n_frames_per_paket}. Should be 1 or 2. Please check your configuration."
        )

    return


def network_simulator(
    error_pattern: Union[str, Path],
    in_bitstream: Union[str, Path],
+3 −2
Original line number Diff line number Diff line
@@ -81,8 +81,9 @@ class IVAS(Processing):
        # TODO: if tx_fer or tx_jbm test for existence of bitstream processing binaries and
        # existence of error pattern files (if given) already here
        if self.tx_jbm is not None:
            validate_network_simulator(self.tx_jbm["error_pattern"],self.tx_jbm["error_profile"], self.tx_jbm["n_frames_per_paket"])

            validate_network_simulator(self.tx_jbm["error_pattern"],
                                       self.tx_jbm["error_profile"],
                                       self.tx_jbm["n_frames_per_paket"])

    def process(
        self, in_file: Path, out_file: Path, in_meta, logger: logging.Logger