async def _get_tshark_process(self, packet_count=None, stdin=None):
        """Returns a new tshark process with previously-set parameters."""
        self._verify_capture_parameters()

        output_parameters = []
        if self.use_json or self._use_ek:
            if not tshark_supports_json(self._get_tshark_version()):
                raise TSharkVersionException(
                    "JSON only supported on Wireshark >= 2.2.0")

        if self.use_json:
            output_type = "json"
            if tshark_supports_duplicate_keys(self._get_tshark_version()):
                output_parameters.append("--no-duplicate-keys")
        elif self._use_ek:
            output_type = "ek"
        else:
            output_type = "psml" if self._only_summaries else "pdml"
        parameters = [self._get_tshark_path(), "-l", "-n", "-T", output_type] + \
            self.get_parameters(packet_count=packet_count) + output_parameters

        self._log.debug(
            "Creating TShark subprocess with parameters: " + " ".join(parameters))
        self._log.debug("Executable: %s", parameters[0])
        tshark_process = await asyncio.create_subprocess_exec(*parameters,
                                                              stdout=subprocess.PIPE,
                                                              stderr=subprocess.PIPE,
                                                              stdin=stdin)
        self._create_stderr_handling_task(tshark_process.stderr)
        self._created_new_process(parameters, tshark_process)
        return tshark_process
Returns a new tshark process with previously-set parameters.
src/pyshark/capture/capture.py