protected virtual void OnEnable() { LoadSettings(); _baseCapture = (CaptureBase)this.target; _propCaptureOnStart = serializedObject.FindProperty("_captureOnStart"); _propCaptureKey = serializedObject.FindProperty("_captureKey"); _propListCodecsOnStart = serializedObject.FindProperty("_listVideoCodecsOnStart"); _propIsRealtime = serializedObject.FindProperty("_isRealTime"); _propIsStartPaused = serializedObject.FindProperty("_startPaused"); _propMinimumDiskSpaceMB = serializedObject.FindProperty("_minimumDiskSpaceMB"); _propOutputType = serializedObject.FindProperty("_outputType"); _propOutputFolderType = serializedObject.FindProperty("_outputFolderType"); _propOutputFolderPath = serializedObject.FindProperty("_outputFolderPath"); _propAutoGenerateFileName = serializedObject.FindProperty("_autoGenerateFilename"); _propAutoFileNamePrefix = serializedObject.FindProperty("_autoFilenamePrefix"); _propFileNameExtension = serializedObject.FindProperty("_autoFilenameExtension"); _propForceFileName = serializedObject.FindProperty("_forceFilename"); _propVideoCodecPriority = serializedObject.FindProperty("_videoCodecPriority"); _propForceVideoCodecIndex = serializedObject.FindProperty("_forceVideoCodecIndex"); _propUseMediaFoundationH264 = serializedObject.FindProperty("_useMediaFoundationH264"); _propAudioCodecPriority = serializedObject.FindProperty("_audioCodecPriority"); _propForceAudioCodecIndex = serializedObject.FindProperty("_forceAudioCodecIndex"); _propForceAudioDeviceIndex = serializedObject.FindProperty("_forceAudioDeviceIndex"); _propNoAudio = serializedObject.FindProperty("_noAudio"); _propUnityAudioCapture = serializedObject.FindProperty("_audioCapture"); _propDownScale = serializedObject.FindProperty("_downScale"); _propMaxVideoSize = serializedObject.FindProperty("_maxVideoSize"); _propFrameRate = serializedObject.FindProperty("_frameRate"); _propFlipVertically = serializedObject.FindProperty("_flipVertically"); _propSupportAlpha = serializedObject.FindProperty("_supportAlpha"); _propUseMotionBlur = serializedObject.FindProperty("_useMotionBlur"); _propMotionBlurSamples = serializedObject.FindProperty("_motionBlurSamples"); _propMotionBlurCameras = serializedObject.FindProperty("_motionBlurCameras"); _propStopMode = serializedObject.FindProperty("_stopMode"); _propStopFrames = serializedObject.FindProperty("_stopFrames"); _propStopSeconds = serializedObject.FindProperty("_stopSeconds"); _propAllowVsyncDisable = serializedObject.FindProperty("_allowVSyncDisable"); _propSupportTextureRecreate = serializedObject.FindProperty("_supportTextureRecreate"); _isTrialVersion = false; if (Application.isPlaying) { _isTrialVersion = IsTrialVersion(); } }
// Use this for initialization void Awake() { movieCapture = GetComponent <CaptureFromCamera>(); //启动Microsoft H.264解码编辑器 movieCapture._useMediaFoundationH264 = true; SetCaptureMode(false); SetDefinition(CaptureBase.DownScale.Original); SetResolution(CaptureBase.Resolution.SD_800x600); SetFrameRate(CaptureBase.FrameRate.Thirty); SetSavePath("DownVideo", "123", "mp4"); }
public bool AddCapture(CaptureBase cb) { try { MongoHelper.UserCapture = MongoHelper.database.GetCollection <CaptureBase>("WindowsCapture"); MongoHelper.UserCapture.InsertOne(cb); return(true); } catch (Exception ex) { return(false); } }
public void Init(VimeoRecorder r) { _recorder = r; if (_recorder.encoderType == EncoderType.MediaEncoder) { #if MEDIA_ENCODER_SUPPORT _vimeoEncoder = gameObject.AddComponent <RecorderController>(); _vimeoEncoder.Init(_recorder); #endif } else if (_recorder.encoderType == EncoderType.AVProCapture) { #if VIMEO_AVPRO_CAPTURE_SUPPORT _avproEncoder = r.avproEncoder; #endif } }
public void Init(VimeoRecorder r) { _recorder = r; if (_recorder.encoderType == EncoderType.MediaEncoder) { #if MEDIA_ENCODER_SUPPORT _vimeoEncoder = gameObject.AddComponent <RecorderController>(); _vimeoEncoder.Init(_recorder); #else Debug.LogError("[Vimeo] Recording is only avaialabe in 2017.2 or higher."); #endif } else if (_recorder.encoderType == EncoderType.AVProMovieCapture) { #if VIMEO_AVPRO_CAPTURE_SUPPORT _avproEncoder = r.avproEncoder; #endif } }
//CREA CAPTURAS DE PANATALLA DE LOS USUARIOS public object CreateCapture(CaptureModel o) { Response rp = new Response(); try { cp = tvh.getprincipal(Convert.ToString(o.token)); if (cp != null) { string empresa = cp.Claims.Where(c => c.Type == ClaimTypes.GroupSid).Select(c => c.Value).SingleOrDefault(); CaptureBase cb = new CaptureBase(); o.IdCompany = empresa; Copier.CopyPropertiesTo(o, cb); if (cb != null) { bool response = opc.AddCapture(cb); if (response) { rp.response_code = GenericErrors.SaveOk.ToString(); } else { rp = autil.ReturnMesagge(ref rp, (int)GenericErrors.GeneralError, string.Empty, null, HttpStatusCode.InternalServerError); } List <CaptureBase> getimage = opc.GeImage(empresa); } } } catch (Exception ex) { //error general rp = autil.ReturnMesagge(ref rp, (int)GenericErrors.GeneralError, ex.Message + " " + ex.InnerException, null, HttpStatusCode.InternalServerError); return(rp); } return(rp); }
public override bool RequiresConstantRepaint() { CaptureBase capture = (this.target) as CaptureBase; return(Application.isPlaying && capture.isActiveAndEnabled && capture.IsCapturing() && !capture.IsPaused()); }
void setFields() { thisBase = this.GetComponentInParent <CaptureBase>(); thisBase.BaseBuilder = this.transform.Find("BaseBuilder").gameObject; }
protected virtual void OnEnable() { LoadSettings(); _baseCapture = (CaptureBase)this.target; _propCaptureOnStart = serializedObject.FindProperty("_captureOnStart"); _propCaptureKey = serializedObject.FindProperty("_captureKey"); _propListCodecsOnStart = serializedObject.FindProperty("_listVideoCodecsOnStart"); _propPersistAcrossSceneLoads = serializedObject.FindProperty("_persistAcrossSceneLoads"); _propIsRealtime = serializedObject.FindProperty("_isRealTime"); _propIsStartPaused = serializedObject.FindProperty("_startPaused"); _propMinimumDiskSpaceMB = serializedObject.FindProperty("_minimumDiskSpaceMB"); _propOutputType = serializedObject.FindProperty("_outputType"); _propImageSequenceFormat = serializedObject.FindProperty("_imageSequenceFormat"); _propImageSequenceStartFrame = serializedObject.FindProperty("_imageSequenceStartFrame"); _propImageSequenceZeroDigits = serializedObject.FindProperty("_imageSequenceZeroDigits"); _propOutputFolderType = serializedObject.FindProperty("_outputFolderType"); _propOutputFolderPath = serializedObject.FindProperty("_outputFolderPath"); _propAppendFilenameTimestamp = serializedObject.FindProperty("_appendFilenameTimestamp"); _propFileNamePrefix = serializedObject.FindProperty("_filenamePrefix"); _propAllowManualFileExtension = serializedObject.FindProperty("_allowManualFileExtension"); _propFileNameExtension = serializedObject.FindProperty("_filenameExtension"); _propNamedPipePath = serializedObject.FindProperty("_namedPipePath"); _propVideoCodecPriority = serializedObject.FindProperty("_videoCodecPriority"); _propForceVideoCodecIndex = serializedObject.FindProperty("_forceVideoCodecIndex"); _propUseMediaFoundationH264 = serializedObject.FindProperty("_useMediaFoundationH264"); _propAudioCodecPriority = serializedObject.FindProperty("_audioCodecPriority"); _propForceAudioCodecIndex = serializedObject.FindProperty("_forceAudioCodecIndex"); _propForceAudioDeviceIndex = serializedObject.FindProperty("_forceAudioDeviceIndex"); _propNoAudio = serializedObject.FindProperty("_noAudio"); _propUnityAudioCapture = serializedObject.FindProperty("_audioCapture"); _propDownScale = serializedObject.FindProperty("_downScale"); _propMaxVideoSize = serializedObject.FindProperty("_maxVideoSize"); _propFrameRate = serializedObject.FindProperty("_frameRate"); _propTimelapseScale = serializedObject.FindProperty("_timelapseScale"); _propFlipVertically = serializedObject.FindProperty("_flipVertically"); _propSupportAlpha = serializedObject.FindProperty("_supportAlpha"); _propForceGpuFlush = serializedObject.FindProperty("_forceGpuFlush"); _propWaitForEndOfFrame = serializedObject.FindProperty("_useWaitForEndOfFrame"); _propUseMotionBlur = serializedObject.FindProperty("_useMotionBlur"); _propMotionBlurSamples = serializedObject.FindProperty("_motionBlurSamples"); _propMotionBlurCameras = serializedObject.FindProperty("_motionBlurCameras"); _propStopMode = serializedObject.FindProperty("_stopMode"); _propStopFrames = serializedObject.FindProperty("_stopFrames"); _propStopSeconds = serializedObject.FindProperty("_stopSeconds"); _propPostFastStartMp4 = serializedObject.FindProperty("_postCaptureSettings.writeFastStartStreamingForMp4"); _propAllowVsyncDisable = serializedObject.FindProperty("_allowVSyncDisable"); _propSupportTextureRecreate = serializedObject.FindProperty("_supportTextureRecreate"); _isTrialVersion = false; if (Application.isPlaying) { _isTrialVersion = IsTrialVersion(); } }
/// <summary> /// 指定したオブジェクトインスタンスと等値比較を行います。 /// </summary> /// <param name="obj">比較対象のオブジェクトインスタンスを指定します。</param> /// <returns>指定した object が CaptureBase<TCapture> 型であって、 /// 更にこのインスタンスと内容が一致した場合に true を返します。 /// それ以外の場合に false を返します。</returns> public override bool Equals(object obj) { CaptureBase <TCapture> r = obj as CaptureBase <TCapture>; return(r != null && r == this); }
/// <summary> /// CaptureBase のインスタンスを初期化します。 /// </summary> /// <param name="baseRange">作成する Capture 全体の Range を指定します。</param> /// <param name="index">baseRange の Range 番号を指定します。</param> protected internal CaptureBase(CaptureBase <TCapture> baseRange, int index) { this.data = baseRange.data; this.icapt = index; this.groups = new GroupCollection <TCapture>((TCapture)this); }