Esempio n. 1
0
        private void EnumModes()
        {
            int numModes = DeckLinkPlugin.GetNumVideoInputModes(_deviceIndex);

            for (int modeIndex = 0; modeIndex < numModes; modeIndex++)
            {
                int    width, height;
                float  frameRate;
                string modeDesc;
                string pixelFormatDesc;
                long   frameDuration;
                int    fieldMode;
                if (DeckLinkPlugin.GetVideoInputModeInfo(_deviceIndex, modeIndex, out width, out height, out frameRate, out frameDuration, out fieldMode, out modeDesc, out pixelFormatDesc))
                {
                    DeviceMode mode = new DeviceMode(this, modeIndex, width, height, frameRate, frameDuration, (DeviceMode.FieldMode)fieldMode, modeDesc, pixelFormatDesc);
                    _inputModes.Add(mode);
                }
            }

            numModes = DeckLinkPlugin.GetNumVideoOutputModes(_deviceIndex);
            for (int modeIndex = 0; modeIndex < numModes; modeIndex++)
            {
                int    width, height;
                float  frameRate;
                string modeDesc;
                string pixelFormatDesc;
                long   frameDuration;
                int    fieldMode;
                if (DeckLinkPlugin.GetVideoOutputModeInfo(_deviceIndex, modeIndex, out width, out height, out frameRate, out frameDuration, out fieldMode, out modeDesc, out pixelFormatDesc))
                {
                    DeviceMode mode = new DeviceMode(this, modeIndex, width, height, frameRate, frameDuration, (DeviceMode.FieldMode)fieldMode, modeDesc, pixelFormatDesc);
                    _outputModes.Add(mode);
                }
            }
        }