-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathProgram.cs
59 lines (53 loc) · 2.06 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using FlyleafLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Serilog;
namespace opentuner
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Console()
.WriteTo.File("logs\\ot_log_" + DateTime.Now.ToString("yyyy-dd-M--HH-mm-ss") + ".txt")
.CreateLogger();
Log.Information("Starting OT");
try
{
Engine.Start(new EngineConfig()
{
FFmpegPath = @"ffmpeg\",
FFmpegDevices = false, // Prevents loading avdevice/avfilter dll files. Enable it only if you plan to use dshow/gdigrab etc.
//LogLevel = LogLevel.Debug,
//LogOutput = ":console",
//LogOutput = @"C:\temp2\ffmpeg.log",
/*
UIRefresh = true, // Required for Activity, BufferedDuration, Stats in combination with Config.Player.Stats = true
UIRefreshInterval = 250, // How often (in ms) to notify the UI
UICurTimePerSecond = false, // Whether to notify UI for CurTime only when it's second changed or by UIRefreshInterval
*/
});
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm(args));
}
catch (Exception ex)
{
Log.Error(ex, "Uncaught Exception");
}
finally
{
Log.CloseAndFlush();
}
}
}
}