Exemplo n.º 1
0
 public static Process CreateFFmpeg(FFmpegArguments args)
 {
     return(Process.Start(new ProcessStartInfo
     {
         FileName = "ffmpeg",
         Arguments = args.CommandLineArguments,
         UseShellExecute = false,
         RedirectStandardOutput = args.PipedOutput,
         RedirectStandardInput = args.PipedInput,
         RedirectStandardError = true,
     }));
 }
Exemplo n.º 2
0
        public TeamspeakService(DiscordSocketClient client, IConfigService config)
            : base(config)
        {
            this.client = client;
            this.config = config;

            ffmpegArguments = new FFmpegArguments().WithOutputFormat("s16le").WithPipedOutput();

            Enabled = bool.Parse(File.ReadAllText(stateFile));

            if (Enabled)
            {
                _ = Enable();
            }
        }
Exemplo n.º 3
0
        public AlarmService(SchedulerService scheduler, DiscordSocketClient client, Random random, IConfigService config)
            : base(config)
        {
            this.client    = client;
            this.random    = random;
            this.scheduler = scheduler;

            ffmpegArguments = new FFmpegArguments().WithOutputFormat("s16le").WithPipedOutput();

            DateTime dateTime = DateTime.Parse("6:00am");

            scheduler.ScheduleRecurringTask(dateTime, "AlarmRescheduler", RescheduleAlarms);

            //Schedule the alarms in case bot is restarted mid school day
            RescheduleAlarms(null);
        }
Exemplo n.º 4
0
 public MusicService()
 {
     youtube         = new YoutubeClient();
     fFmpegArguments = new FFmpegArguments().WithInputFile("test").WithPipedOutput().WithOutputFormat("s16le");
 }