Ejemplo n.º 1
0
        public DeviceMode(Device device, int modeIndex, int width, int height, float frameRate, long frameDuration, FieldMode fieldMode, string modeDesc, string pixelFormatDesc)
        {
            _device          = device;
            _modeIndex       = modeIndex;
            _width           = width;
            _height          = height;
            _frameRate       = frameRate;
            _fieldMode       = fieldMode;
            _frameDuration   = frameDuration;
            _modeDesc        = modeDesc;
            _pixelFormatDesc = pixelFormatDesc;
            _pixelFormat     = DeckLinkPlugin.GetPixelFormat(_pixelFormatDesc);
            _pitch           = GetPitch(_width, _pixelFormat);

            _fieldModeString = "p";
            switch (_fieldMode)
            {
            case FieldMode.Interlaced_UpperFirst:
            case FieldMode.Interlaced_LowerFirst:
                _fieldModeString = "i";
                break;

            case FieldMode.Progressive_Segmented:
                _fieldModeString = "PsF";
                break;
            }
        }