ReCast is a multi platform restreaming tool, you can stream with one servers to multiple services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

59 lines
1.4 KiB

<?php
namespace App\Command;
use App\Component\Nginx\ConfigGenerator;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Class GenerateConfigCommand
* @author Soner Sayakci <shyim@posteo.de>
*/
class GenerateConfigCommand extends Command
{
/**
* @var ConfigGenerator
*/
private $configGenerator;
/**
* GenerateConfigCommand constructor.
* @param null|string $name
* @param ConfigGenerator $configGenerator
* @author Soner Sayakci <shyim@posteo.de>
*/
public function __construct(?string $name = null, ConfigGenerator $configGenerator)
{
parent::__construct($name);
$this->configGenerator = $configGenerator;
}
/**
* @author Soner Sayakci <shyim@posteo.de>
*/
public function configure()
{
$this
->setName('recast:generate')
->setDescription('Regenerates rtmp config');
}
/**
* @param InputInterface $input
* @param OutputInterface $output
* @return int|null|void
* @author Soner Sayakci <shyim@posteo.de>
*/
public function execute(InputInterface $input, OutputInterface $output)
{
$this->configGenerator->generate();
$io = new SymfonyStyle($input, $output);
$io->success('Configs generated');
}
}