Ejemplo n.º 1
0
        protected virtual void OnOutputTypePortChanged(OscMessage message)
        {
            var channel = message.GetChannel();

            if (channel == null)
            {
                return;
            }

            var type = message.ElementAtOrDefault(0)?.ToString();
            var port = message.GetNextAddressPartOf(Port).TryParseNullable();

            OutputPortChanged?.Invoke(this, new OutputPortTypeEventArgs(type, port.GetValueOrDefault(0), channel.Value));
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
0
        protected virtual void OnConsumerFrameCreatedChanged(OscMessage message)
        {
            var channel = message.GetChannel();

            if (channel == null)
            {
                return;
            }

            var usedFrames      = Convert.ToInt32(message.ElementAtOrDefault(0));
            var availableFrames = Convert.ToInt32(message.ElementAtOrDefault(1));
            var port            = message.GetNextAddressPartOf(Port).TryParseNullable();

            ConsumerFrameCreatedChanged?.Invoke(this, new ConsumerFrameCreatedEventArgs(usedFrames, availableFrames, port.GetValueOrDefault(0), channel.Value));
        }