Пример #1
0
 protected void SetVolumeSink(System.UInt32 InstanceID, DvRenderingControl.Enum_A_ARG_TYPE_Channel Channel, System.UInt16 DesiredVolume)
 {
     if (ID_Table.ContainsKey(InstanceID) == false)
     {
         throw(new UPnPCustomException(802, InstanceID.ToString() + " is not a valid InstanceID"));
     }
     else
     {
         AVConnection c = (AVConnection)ID_Table[InstanceID];
         c._SetVolume(Channel, DesiredVolume);
     }
 }
Пример #2
0
        protected void SelectPresetSink(System.UInt32 InstanceID, DvRenderingControl.Enum_A_ARG_TYPE_PresetName PresetName)
        {
            if (ID_Table.ContainsKey(InstanceID) == false)
            {
                throw(new UPnPCustomException(802, InstanceID.ToString() + " is not a valid InstanceID"));
            }
            else
            {
                AVConnection c  = (AVConnection)ID_Table[InstanceID];
                bool         OK = false;
                foreach (string preset in c.Presets)
                {
                    if (preset == DvRenderingControl.Enum_A_ARG_TYPE_PresetName_ToString(PresetName))
                    {
                        OK = true;
                        break;
                    }
                }
                if (OK == true)
                {
                    c.CurrentPreset = DvRenderingControl.Enum_A_ARG_TYPE_PresetName_ToString(PresetName);

                    c._SetBlueVideoBlack(100);
                    c._SetBlueVideoGain(100);
                    c._SetBrightness(100);
                    c._SetContrast(100);
                    c._SetGreenVideoBlack(100);
                    c._SetGreenVideoGain(100);
                    c._SetRedVideoBlack(100);
                    c._SetRedVideoGain(100);
                    c._SetSharpness(100);

                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.B, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.CF, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LF, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LFC, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LFE, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LS, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.MASTER, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.RF, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.RFC, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.RS, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.SD, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.SL, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.SR, false);
                    c._SetMute(DvRenderingControl.Enum_A_ARG_TYPE_Channel.T, false);

                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.B, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.CF, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LF, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LFC, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LFE, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.LS, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.MASTER, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.RF, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.RFC, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.RS, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.SD, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.SL, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.SR, 100);
                    c._SetVolume(DvRenderingControl.Enum_A_ARG_TYPE_Channel.T, 100);
                }
                else
                {
                    throw(new UPnPCustomException(701, DvRenderingControl.Enum_A_ARG_TYPE_PresetName_ToString(PresetName) + " is not a supported preset"));
                }
            }
        }