protected virtual void OnPlaybackClipNameChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } PlaybackClipChanged?.Invoke(this, new PlaybackClipClipChangedEventArgs(message.Single().ToString(), message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnTemplateWidthChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var width = Convert.ToUInt32(message.ElementAtOrDefault(0)); TemplateWidthChanged?.Invoke(this, new TemplateWidthEventArgs(width, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnTemplatePathChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var path = message.ElementAtOrDefault(0)?.ToString(); TemplatePathChanged?.Invoke(this, new TemplatePathEventArgs(path, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnFlashBufferChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var buffer = Convert.ToInt32(message.ElementAtOrDefault(0)); FlashProducerBufferChanged?.Invoke(this, new BufferEventArgs(buffer, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnTemplateFpsChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var fps = (float)message.ElementAtOrDefault(0); TemplateFpsChanged?.Invoke(this, new TemplateFpsEventArgs(fps, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackLoopChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var isLoop = (bool)message.FirstOrDefault(); PlaybackLoopChanged?.Invoke(this, new PlaybackLoopEventArgs(isLoop, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackClipFrameRateChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var fps = (float)(message.ElementAtOrDefault(0)); PlaybackClipFrameRateChanged?.Invoke(this, new PlaybackClipFrameRateEventArgs(fps, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackClipWidthChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var width = Convert.ToInt32(message.ElementAtOrDefault(0)); PlaybackClipWidthChanged?.Invoke(this, new PlaybackClipWidthEventArgs((uint)width, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackClipFieldChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var isProgresive = ProgressiveValue.Equals(message.FirstOrDefault()?.ToString(), StringComparison.OrdinalIgnoreCase); PlaybackClipFieldChanged?.Invoke(this, new PlaybackClipFieldEventArg(isProgresive, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackClipVideoCodecChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var codec = message.FirstOrDefault()?.ToString(); PlaybackClipVideoCodecChanged?.Invoke(this, new PlaybackClipCodecEventArg(codec, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackClipAudioFrameRateChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var sampleRate = Convert.ToInt32(message.ElementAtOrDefault(0)); PlaybackClipAudioSampleRateChanged?.Invoke(this, new PlaybackClipAudioSampleRateEventArg((uint)sampleRate, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnLayerActiveFrameChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var frame = Convert.ToUInt32(message.ElementAtOrDefault(0)); LayerActiveFrameChanged?.Invoke(this, new LayerActiveFrameEventArgs(frame, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnLayerTypeChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var type = message.ElementAtOrDefault(0)?.ToString(); LayerTypeChanged?.Invoke(this, new LayerTypeEventArgs(type, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnPlaybackClipTimeChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var elapsed = (float)(message.ElementAtOrDefault(0)); var total = (float)(message.ElementAtOrDefault(1)); PlaybackClipTimeChanged?.Invoke(this, new PlaybackClipTimeEventArgs(elapsed, total, message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnStreamFramerateChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var fps = (float)(message.ElementAtOrDefault(0)); var streamId = uint.TryParse(message.GetNextAddressPartOf("file"), out uint outValue) ? (uint?)outValue : null; StreamFrameRateChanged?.Invoke(this, new StreamFramerateEventArgs(fps, streamId.GetValueOrDefault(0), message.IsBackground(), channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnLayerPaused(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var isPause = (bool?)message.ElementAtOrDefault(0); if (isPause == null) { return; } LayerPausedChanged?.Invoke(this, new LayerPausedEventArgs(isPause.Value, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnLayerActiveTimeChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var time = (float?)message.ElementAtOrDefault(0); if (time == null) { return; } LayerActiveTimeChanged?.Invoke(this, new LayerActiveTimeEventArgs(time.Value, channelLayer.Item1.Value, channelLayer.Item2.Value)); }
protected virtual void OnLayerProfilerChanged(OscMessage message) { var channelLayer = message.GetChannelAndLayer(); if (channelLayer.Item1 == null || channelLayer.Item2 == null) { return; } var actual = (float?)message.ElementAtOrDefault(0); var expected = (float?)message.ElementAtOrDefault(1); if (actual == null || expected == null) { return; } LayerProfilerChanged?.Invoke(this, new LayerProfilerEventArgs(actual.Value, expected.Value, channelLayer.Item1.Value, channelLayer.Item2.Value)); }