Exemple #1
0
        public Device(string modelName, string name, int index)
        {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            IsStreamingAudio = false;
            IsStreaming      = false;
            IsPaused         = true;
            IsPicture        = false;
            _name            = name;
            _modelName       = modelName;
            _deviceIndex     = index;
            _genlockOffset   = 0;
            _supportsInputModeAutoDetection = DeckLinkPlugin.SupportsInputModeAutoDetection(_deviceIndex);
            _supportsInternalKeying         = DeckLinkPlugin.SupportsInternalKeying(_deviceIndex);
            _supportsExternalKeying         = DeckLinkPlugin.SupportsExternalKeying(_deviceIndex);
            _maxSupportedAudioChannels      = DeckLinkPlugin.GetMaxSupportedAudioChannels(_deviceIndex);
            _supportsFullFrameGenlockOffset = DeckLinkPlugin.SupportsFullFrameGenlockOffset(_deviceIndex);
            _supportsConfigurableDuplex     = DeckLinkPlugin.ConfigurableDuplexMode(_deviceIndex);
            _inputModes      = new List <DeviceMode>(256);
            _outputModes     = new List <DeviceMode>(256);
            _formatConverter = new FormatConverter();

            _ancPacketsBufferHandle = GCHandle.Alloc(_ancPackets, GCHandleType.Pinned);
            _ancPacketsBufferPtr    = _ancPacketsBufferHandle.AddrOfPinnedObject();
            _ancDataBufferHandle    = GCHandle.Alloc(_ancData, GCHandleType.Pinned);
            _ancDataBufferPtr       = _ancDataBufferHandle.AddrOfPinnedObject();

            _fullDuplexSupported = DeckLinkPlugin.FullDuplexSupported(_deviceIndex);
            EnumModes();
#if AVPRODECKLINK_UNITYFEATURE_NONPOW2TEXTURES
            DeckLinkPlugin.SetPotTextures(_deviceIndex, SystemInfo.npotSupport == NPOTSupport.None);
            DeckLinkPlugin.SetGammaSpace(_deviceIndex, QualitySettings.activeColorSpace == ColorSpace.Gamma);
#endif
#endif
        }
Exemple #2
0
        public Device(string modelName, string name, int index)
        {
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
            IsStreamingAudio = false;
            IsStreaming      = false;
            IsPaused         = true;
            IsPicture        = false;
            _name            = name;
            _modelName       = ModelName;
            _deviceIndex     = index;
            _genlockOffset   = 0;
            _supportsInputModeAutoDetection = DeckLinkPlugin.SupportsInputModeAutoDetection(_deviceIndex);
            _supportsInternalKeying         = DeckLinkPlugin.SupportsInternalKeying(_deviceIndex);
            _supportsExternalKeying         = DeckLinkPlugin.SupportsExternalKeying(_deviceIndex);
            _maxSupportedAudioChannels      = DeckLinkPlugin.GetMaxSupportedAudioChannels(_deviceIndex);
            _supportsFullFrameGenlockOffset = DeckLinkPlugin.SupportsFullFrameGenlockOffset(_deviceIndex);
            _supportsConfigurableDuplex     = DeckLinkPlugin.ConfigurableDuplexMode(_deviceIndex);
            _inputModes          = new List <DeviceMode>(32);
            _outputModes         = new List <DeviceMode>(32);
            _formatConverter     = new FormatConverter();
            _fullDuplexSupported = DeckLinkPlugin.FullDuplexSupported(_deviceIndex);
            EnumModes();
#endif
        }