Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }
Пример #4
0
        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));
        }
Пример #5
0
        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));
        }
Пример #6
0
        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));
        }
Пример #7
0
        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));
        }
Пример #8
0
        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));
        }
Пример #9
0
        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));
        }
Пример #10
0
        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));
        }
Пример #11
0
        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));
        }
Пример #12
0
        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));
        }
Пример #13
0
        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));
        }
Пример #14
0
        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));
        }
Пример #15
0
        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));
        }
Пример #16
0
        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));
        }
Пример #17
0
        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));
        }
Пример #18
0
        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));
        }