コード例 #1
0
        void tx_InputStreamChange(uint src, EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            if (args.EventId == EndpointInputStreamEventIds.SyncDetectedFeedbackEventId)
            {
                switch (inputStream.StreamType)
                {
                case eDmStreamType.Hdmi:
                    var hdmiStream = inputStream as EndpointHdmiInput;
                    _sourceAvailable[src] = hdmiStream.SyncDetectedFeedback.BoolValue;
                    if (_sourceAvailable[src])
                    {
                        CrestronConsole.PrintLine("HDMI detected on source {0}", src);
                    }
                    else
                    {
                        CrestronConsole.PrintLine("HDMI not detected on source {0}", src);
                    }
                    break;

                case eDmStreamType.Vga:
                    var vgaStream = inputStream as EndpointVgaInput;
                    _sourceAvailable[src] = vgaStream.SyncDetectedFeedback.BoolValue;
                    if (_sourceAvailable[src])
                    {
                        CrestronConsole.PrintLine("VGA detected on source {0}", src);
                    }
                    else
                    {
                        CrestronConsole.PrintLine("VGA not detected on source {0}", src);
                    }
                    break;
                }
                AutoRouteVideo();
            }
        }
コード例 #2
0
        void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());

            if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId)
            {
                if (inputStream == Tx.HdmiInputs[1])
                {
                    HdmiIn1HdcpCapabilityFeedback.FireUpdate();
                }
                else if (inputStream == Tx.HdmiInputs[2])
                {
                    HdmiIn2HdcpCapabilityFeedback.FireUpdate();
                }
            }
            else if (args.EventId == EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId)
            {
                if (inputStream == Tx.HdmiInputs[1])
                {
                    HdmiIn1HdcpCapabilityFeedback.FireUpdate();
                }
                else if (inputStream == Tx.HdmiInputs[2])
                {
                    HdmiIn2HdcpCapabilityFeedback.FireUpdate();
                }
            }
        }
コード例 #3
0
        void DisplayPortInputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());

            switch (args.EventId)
            {
            case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                DisplayPortVideoSyncFeedback.FireUpdate();
                break;
            }
        }
コード例 #4
0
        private void VgaInputOnInputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            switch (args.EventId)
            {
            case EndpointInputStreamEventIds.FreeRunFeedbackEventId:
                FreeRunEnabledFeedback.FireUpdate();
                break;

            case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                VgaVideoSyncFeedback.FireUpdate();
                break;
            }
        }
コード例 #5
0
        void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            Debug.Console(2, "{0} event {1} stream {2}", Tx.ToString(), inputStream.ToString(), args.EventId.ToString());

            switch (args.EventId)
            {
            case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
                HdmiInHdcpCapabilityFeedback.FireUpdate();
                break;

            case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
                HdmiInHdcpCapabilityFeedback.FireUpdate();
                break;

            case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                HdmiVideoSyncFeedback.FireUpdate();
                break;
            }
        }
コード例 #6
0
        private void OnLaptopHDMI(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            var hdmiStream = inputStream as EndpointHdmiInput;
            var switcher   = _switcher as AirMediaSwitcher;

            switch (args.EventId)
            {
            case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                if (hdmiStream.SyncDetectedFeedback.BoolValue)
                {
                    switcher.Switch(AirMediaInputs.DM);
                }
                else
                {
                    switcher.Switch(AirMediaInputs.AirMedia);
                }

                break;
            }
        }
コード例 #7
0
        void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            Debug.Console(2, "{0} event {1} stream {2}", this.Tx.ToString(), inputStream.ToString(), args.EventId.ToString());

            switch (args.EventId)
            {
            case EndpointInputStreamEventIds.HdcpSupportOffFeedbackEventId:
                if (inputStream == Tx.HdmiInputs[1])
                {
                    HdmiIn1HdcpCapabilityFeedback.FireUpdate();
                }
                if (inputStream == Tx.HdmiInputs[2])
                {
                    HdmiIn2HdcpCapabilityFeedback.FireUpdate();
                }
                break;

            case EndpointInputStreamEventIds.HdcpSupportOnFeedbackEventId:
                if (inputStream == Tx.HdmiInputs[1])
                {
                    HdmiIn1HdcpCapabilityFeedback.FireUpdate();
                }
                if (inputStream == Tx.HdmiInputs[2])
                {
                    HdmiIn2HdcpCapabilityFeedback.FireUpdate();
                }
                break;

            case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                if (inputStream == Tx.HdmiInputs[1])
                {
                    Hdmi1VideoSyncFeedback.FireUpdate();
                }
                if (inputStream == Tx.HdmiInputs[2])
                {
                    Hdmi2VideoSyncFeedback.FireUpdate();
                }
                break;
            }
        }
コード例 #8
0
ファイル: ControlSystem.cs プロジェクト: RBSystems/SIMPLSharp
        /// <summary>
        /// Method to handle hdmi input events on the Dm Tx.
        /// </summary>
        /// <param name="inputStream">Reference to the input raising this event.</param>
        /// <param name="args">Information about the event being raised.</param>
        void HdmiInput_InputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            // determine what event has been raised
            switch (args.EventId)
            {
                // sync event, could be detected or lost
                case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                    // update fusion with the sync status for this input
                    xPanelUi.BooleanInput[(uint)eXpanelFeedbacks.BoolHdmiSync].BoolValue = dmTx.HdmiInput.SyncDetectedFeedback.BoolValue;

                    // determine if sync was detected
                    if (dmTx.HdmiInput.SyncDetectedFeedback.BoolValue)
                    {
                        // determine what state the system is in
                        switch (SystemState)
                        {
                            case eSystemStates.PoweredOff:
                            case eSystemStates.WaitingForInput:
                                CrestronConsole.PrintLine("hdmi sync has been detected, switching to that input");

                                if (SystemState == eSystemStates.PoweredOff)
                                    SetDisplayPower(true);

                                SetSystemState(eSystemStates.InUse);
                                dmTx.VideoSource = BaseDmTx401.eSourceSelection.HDMI;
                                break;

                            case eSystemStates.InUse:
                                CrestronConsole.PrintLine("hdmi sync has been detected, but another input is active");
                                break;

                            default:
                                break;
                        }
                        break;
                    }
                    else // sync was lost
                    {
                        switch (SystemState)
                        {
                            case eSystemStates.InUse:
                                // check to see if this input the active input
                                if (dmTx.VideoSourceFeedback == BaseDmTx401.eSourceSelection.HDMI)
                                {
                                    CrestronConsole.PrintLine("hdmi sync has been lost while it was the active input");
                                    // if it was the active input, check the next logical input for sync and switch if found
                                    if (dmTx.HdmiInput.SyncDetectedFeedback.BoolValue)
                                        dmTx.VideoSource = BaseDmTx401.eSourceSelection.DisplayPort;
                                    else if (dmTx.VgaInput.SyncDetectedFeedback.BoolValue)
                                        dmTx.VideoSource = BaseDmTx401.eSourceSelection.VGA;
                                    else
                                    {
                                        // no other inputs had sync, start timer
                                        dmTx.VideoSource = BaseDmTx401.eSourceSelection.Disabled;
                                        SetSystemState(eSystemStates.WaitingForInput);
                                    }
                                }
                                else
                                {
                                    CrestronConsole.PrintLine("hdmi sync has been lost, but another input is active");
                                }
                                break;

                            case eSystemStates.WaitingForInput:
                            case eSystemStates.PoweredOff:
                            default:
                                break;
                        }
                    }

                    break;

                default:
                    break;
            }
        }
コード例 #9
0
ファイル: ControlSystem.cs プロジェクト: RBSystems/SIMPLSharp
        /// <summary>
        /// Method to handle DM input events on the RMC Scaler device.
        /// </summary>
        /// <param name="inputStream">Reference to the device raising this event.</param>
        /// <param name="args">Information about the event being raised.</param>
        void DmRmc_InputStreamChange(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
        {
            switch (args.EventId)
            {
                case EndpointInputStreamEventIds.SyncDetectedFeedbackEventId:
                    CrestronConsole.PrintLine("video sync at the dm rmc has been {0}",
                            dmRmc.DmInput.SyncDetectedFeedback.BoolValue ? "received" : "lost");
                    break;

                default:
                    break;
            }
        }