using System; using Cpp2IlInjected; using UnityEngine; using UnityEngine.Experimental.Rendering; namespace VRPanorama { // Token: 0x0200075C RID: 1884 [Token(Token = "0x200075C")] [AddComponentMenu("FFmpegOut/Camera Capture")] [RequireComponent(typeof(Camera))] public class CameraCapture : MonoBehaviour { // Token: 0x060036A8 RID: 13992 RVA: 0x000E0B78 File Offset: 0x000DED78 [Token(Token = "0x60036A8")] [Address(RVA = "0x1314F80", Offset = "0x1313F80", VA = "0x181314F80")] private void OnValidate() { float startTime = this._startTime; int num = 0; float num2 = Mathf.Max(startTime, (float)num); this._startTime = num2; float num3 = Mathf.Max(this._recordLength, 0.01f); this._recordLength = num3; } // Token: 0x060036A9 RID: 13993 RVA: 0x000E0BB8 File Offset: 0x000DEDB8 [Token(Token = "0x60036A9")] [Address(RVA = "0x1314C70", Offset = "0x1313C70", VA = "0x181314C70")] private void OnEnable() { if (!NIDKJCCHGOI.KDDANBBDHFG) { Debug.LogError("ffmpeg isn't configured right, if you are using MAC OSX, please check your credentials"); int num = 0; base.enabled = num != 0; return; } } // Token: 0x060036AA RID: 13994 RVA: 0x000E0BE4 File Offset: 0x000DEDE4 [Token(Token = "0x60036AA")] [Address(RVA = "0x1314C60", Offset = "0x1313C60", VA = "0x181314C60")] private void OnDisable() { if (this.KIKFDOLBKGN != (ulong)0L) { this.DMDEMGIEBBD(); return; } } // Token: 0x060036AB RID: 13995 RVA: 0x000E0C04 File Offset: 0x000DEE04 [Token(Token = "0x60036AB")] [Address(RVA = "0x1314C60", Offset = "0x1313C60", VA = "0x181314C60")] private void OnDestroy() { if (this.KIKFDOLBKGN != (ulong)0L) { this.DMDEMGIEBBD(); return; } } // Token: 0x060036AC RID: 13996 RVA: 0x000E0C24 File Offset: 0x000DEE24 [Token(Token = "0x60036AC")] [Address(RVA = "0x1315010", Offset = "0x1314010", VA = "0x181315010")] private void Start() { Material material = new Material(this._shader); this.ABINOGPBGOE = material; } // Token: 0x060036AD RID: 13997 RVA: 0x000E0C44 File Offset: 0x000DEE44 [Token(Token = "0x60036AD")] [Address(RVA = "0x1315080", Offset = "0x1314080", VA = "0x181315080")] private void Update() { float deltaTime = Time.deltaTime; float startTime = this._startTime; this.IIPKIEFLBDD = deltaTime; if (startTime > deltaTime) { if (this.KIKFDOLBKGN == (ulong)0L) { this.LEICMJMGNKI(); return; } } else if (this.KIKFDOLBKGN != (ulong)0L) { this.DMDEMGIEBBD(); } } // Token: 0x060036AE RID: 13998 RVA: 0x000E0C90 File Offset: 0x000DEE90 [Token(Token = "0x60036AE")] [Address(RVA = "0x1314CF0", Offset = "0x1313CF0", VA = "0x181314CF0")] private void OnRenderImage(RenderTexture DIEPOPNJNCO, RenderTexture IKAFBCDJOCL) { if (this.KIKFDOLBKGN != (ulong)0L) { GraphicsFormat graphicsFormat = DIEPOPNJNCO.graphicsFormat; int num = (int)graphicsFormat; int num2 = (int)graphicsFormat; RenderTexture temporary = RenderTexture.GetTemporary(num, num2); Material abinogpbgoe = this.ABINOGPBGOE; int num3 = 0; int num4 = 0; Graphics.Blit(DIEPOPNJNCO, temporary, abinogpbgoe, num4); GraphicsFormat graphicsFormat2 = DIEPOPNJNCO.graphicsFormat; int num5 = (int)graphicsFormat2; int num6 = (int)graphicsFormat2; Texture2D texture2D = new Texture2D(num5, num6, TextureFormat.RGBA32, num3 != 0); texture2D.name = "CameraCaptureTemp"; GraphicsFormat graphicsFormat3 = DIEPOPNJNCO.graphicsFormat; int num7 = 0; int num8 = 0; int num9 = 0; texture2D.ReadPixels(num7, num9, num8, num3 != 0); texture2D.Apply(); DOCPGIDFFDO kikfdolbkgn = this.KIKFDOLBKGN; byte[] rawTextureData = texture2D.GetRawTextureData(); kikfdolbkgn.EAOKIOGMEEO(rawTextureData); global::UnityEngine.Object.Destroy(texture2D); RenderTexture.ReleaseTemporary(temporary); } Graphics.Blit(DIEPOPNJNCO, IKAFBCDJOCL); } // Token: 0x060036AF RID: 13999 RVA: 0x000E0D5C File Offset: 0x000DEF5C [Token(Token = "0x60036AF")] [Address(RVA = "0x1314980", Offset = "0x1313980", VA = "0x181314980")] private void LEICMJMGNKI() { if (this.KIKFDOLBKGN == (ulong)0L) { Camera component = base.GetComponent(); int num = this._width; int num2 = this._height; if (!this._setResolution) { num = component.pixelWidth; num2 = component.pixelHeight; } RenderTexture temporary = RenderTexture.GetTemporary(num, num2, 24); this.DOEGCJPKLCH = temporary; component.targetTexture = temporary; Type[] padahclgbke = Blitter.PADAHCLGBKE; GameObject gameObject = new GameObject("Blitter", padahclgbke); gameObject.hideFlags = HideFlags.HideInHierarchy; Camera component2 = gameObject.GetComponent(); int num3 = 0; component2.cullingMask = num3; int targetDisplay = component.targetDisplay; component2.targetDisplay = targetDisplay; Blitter component3 = gameObject.GetComponent(); RenderTexture targetTexture = component.targetTexture; component3.DCCHGLDOEKG = targetTexture; this.GGKEMNLPEBM = gameObject; string name = base.name; int frameRate = this._frameRate; DOCPGIDFFDO.CAICLJMGOBH preset = this._preset; DOCPGIDFFDO docpgidffdo = new DOCPGIDFFDO(name, num, num2, frameRate, preset); this.KIKFDOLBKGN = docpgidffdo; int frameRate2 = this._frameRate; int num4 = 0; if ((this._allowSlowDown ? 1 : 0) == num4) { Application.targetFrameRate = frameRate2; } Time.captureFramerate = frameRate2; string k__BackingField = this.KIKFDOLBKGN.k__BackingField; Debug.Log("Capture started (" + k__BackingField + ")"); } } // Token: 0x060036B0 RID: 14000 RVA: 0x000E0E9C File Offset: 0x000DF09C [Token(Token = "0x60036B0")] [Address(RVA = "0x1314700", Offset = "0x1313700", VA = "0x181314700")] private void DMDEMGIEBBD() { Camera component = base.GetComponent(); GameObject ggkemnlpebm = this.GGKEMNLPEBM; int num = 0; if (ggkemnlpebm != num) { global::UnityEngine.Object.Destroy(this.GGKEMNLPEBM); this.GGKEMNLPEBM = (ulong)0L; } RenderTexture doegcjpklch = this.DOEGCJPKLCH; int num2 = 0; if (doegcjpklch != num2) { RenderTexture doegcjpklch2 = this.DOEGCJPKLCH; RenderTexture targetTexture = component.targetTexture; if (doegcjpklch2 == targetTexture) { int num3 = 0; component.targetTexture = num3; RenderTexture.ReleaseTemporary(this.DOEGCJPKLCH); this.DOEGCJPKLCH = (ulong)0L; } } DOCPGIDFFDO kikfdolbkgn = this.KIKFDOLBKGN; if (kikfdolbkgn != 0) { string k__BackingField = kikfdolbkgn.k__BackingField; Debug.Log("Capture ended (" + k__BackingField + ")"); this.KIKFDOLBKGN.IKBEAIHJLPP(); string k__BackingField = this.KIKFDOLBKGN.k__BackingField; if (typeof(CameraCapture).TypeHandle == 0) { string k__BackingField2 = this.KIKFDOLBKGN.k__BackingField; Debug.LogWarning("ffmpeg returned with a warning or an error message. See the following lines for details:\n" + k__BackingField2); } this.KIKFDOLBKGN = (ulong)0L; int num4 = 0; if ((this._allowSlowDown ? 1 : 0) != num4) { Time.captureFramerate = 0; return; } Application.targetFrameRate = -1; } } // Token: 0x060036B1 RID: 14001 RVA: 0x000E0FBC File Offset: 0x000DF1BC [Token(Token = "0x60036B1")] [Address(RVA = "0x13150F0", Offset = "0x13140F0", VA = "0x1813150F0")] public CameraCapture() { } // Token: 0x04002D6E RID: 11630 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4002D6E")] public bool _setResolution = true; // Token: 0x04002D6F RID: 11631 [FieldOffset(Offset = "0x1C")] [Token(Token = "0x4002D6F")] public int _width = (int)((ulong)1280L); // Token: 0x04002D70 RID: 11632 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4002D70")] public int _height = (int)((ulong)720L); // Token: 0x04002D71 RID: 11633 [FieldOffset(Offset = "0x24")] [Token(Token = "0x4002D71")] public int _frameRate = (int)((ulong)30L); // Token: 0x04002D72 RID: 11634 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4002D72")] public bool _allowSlowDown = true; // Token: 0x04002D73 RID: 11635 [FieldOffset(Offset = "0x2C")] [Token(Token = "0x4002D73")] public DOCPGIDFFDO.CAICLJMGOBH _preset; // Token: 0x04002D74 RID: 11636 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4002D74")] public float _startTime; // Token: 0x04002D75 RID: 11637 [FieldOffset(Offset = "0x34")] [Token(Token = "0x4002D75")] public float _recordLength = 5f; // Token: 0x04002D76 RID: 11638 [FieldOffset(Offset = "0x38")] [Token(Token = "0x4002D76")] [HideInInspector] [SerializeField] private Shader _shader; // Token: 0x04002D77 RID: 11639 [FieldOffset(Offset = "0x40")] [Token(Token = "0x4002D77")] private Material ABINOGPBGOE; // Token: 0x04002D78 RID: 11640 [FieldOffset(Offset = "0x48")] [Token(Token = "0x4002D78")] private DOCPGIDFFDO KIKFDOLBKGN; // Token: 0x04002D79 RID: 11641 [FieldOffset(Offset = "0x50")] [Token(Token = "0x4002D79")] private float IIPKIEFLBDD; // Token: 0x04002D7A RID: 11642 [FieldOffset(Offset = "0x58")] [Token(Token = "0x4002D7A")] private RenderTexture DOEGCJPKLCH; // Token: 0x04002D7B RID: 11643 [FieldOffset(Offset = "0x60")] [Token(Token = "0x4002D7B")] private GameObject GGKEMNLPEBM; // Token: 0x04002D7C RID: 11644 [Token(Token = "0x4002D7C")] private static int HBCKGDCDNDC; } }