示例#1
0
        public EventSubscription(VideoDevice videoDevice)
        {
            device = videoDevice.file;

            eEventType[] eventTypes = new eEventType[]
            {
                eEventType.EndOfStream,
                eEventType.SourceChange,
            };

            foreach (var e in eventTypes)
            {
                // Subscribe for the events
                sEventSubscription evt = new sEventSubscription()
                {
                    type = e
                };
                device.call(eControlCode.SUBSCRIBE_EVENT, ref evt);
            }
        }
示例#2
0
        void IDisposable.Dispose()
        {
            sEventSubscription events = default;

            device.call(eControlCode.UNSUBSCRIBE_EVENT, ref events);
        }