using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using On.Zorro.Recorder;
using Zorro.Recorder;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CWLiveLeak")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+9107025d8dc4a53272f219bdc2567215231b86e2")]
[assembly: AssemblyProduct("CWLiveLeak")]
[assembly: AssemblyTitle("CWLiveLeak")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace CWLiveLeak
{
[BepInPlugin("CWLiveLeak", "CWLiveLeak", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
private ConfigEntry<string> Icon;
public string pluginPath;
internal static ManualLogSource? LiveleakLogger;
private void Awake()
{
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected O, but got Unknown
LiveleakLogger = ((BaseUnityPlugin)this).Logger;
Icon = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Icon", "liveleak", "What Icon is shown, available choices are: liveleak, hypercam, spookycam ");
LiveleakLogger.LogInfo((object)"Plugin CWLiveLeak is loaded!");
Init();
FfmpegEncoder.RunFfmpeg += new hook_RunFfmpeg(FfmpegEncoderOnRunFfmpeg);
}
private void Init()
{
Assembly callingAssembly = Assembly.GetCallingAssembly();
pluginPath = Path.GetDirectoryName(callingAssembly.Location);
}
private IEnumerator FfmpegEncoderOnRunFfmpeg(orig_RunFfmpeg orig, FfmpegEncoder self, string arguments, bool displaywindow)
{
LiveleakLogger.LogInfo((object)("Adding " + Icon.Value + " In"));
displaywindow = true;
arguments = ((!(Icon.Value == "liveleak")) ? (arguments + " -i \"" + pluginPath + "\\" + Icon.Value.ToLower() + ".png\" -filter_complex \"[0:v][3:v] overlay=0:0:enable='between(t,0,20)'\"") : (arguments + " -i \"" + pluginPath + "\\" + Icon.Value.ToLower() + ".png\" -filter_complex \"[0:v][3:v] overlay=25:25:enable='between(t,0,20)'\""));
return orig.Invoke(self, arguments, displaywindow);
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "CWLiveLeak";
public const string PLUGIN_NAME = "CWLiveLeak";
public const string PLUGIN_VERSION = "1.0.1";
}
}