Exemplo n.º 1
0
        /// <summary>
        /// Register to receive new frames if motion is detected. Do not process on this thread.
        /// </summary>
        /// <param name="consumerID"></param>
        /// <param name="chan"></param>
        /// <param name="callback"></param>
        public void RegisterToConsumeMotionDetectedFrames(int consumerID, int chan, NotificationOfNewFrameReady callback)
        {
            if (chan < 0 || chan > m_AppData.MAX_PHYSICAL_CHANNELS)
            {
                return;
            }

            lock (m_Channels)
            {
                ConsumerNotificationInfo consumer = new ConsumerNotificationInfo(callback, chan, consumerID);
                m_Channels[chan].m_MotionDetectedCallBackList.Add(consumer);
            }
        }
Exemplo n.º 2
0
 public ConsumerNotificationInfo(NotificationOfNewFrameReady cb, int channel, int consumer)
 {
     callback      = cb;
     portPairIndex = channel;
     consumerID    = consumer;
 }
Exemplo n.º 3
0
 public ConsumerNotificationInfo(NotificationOfNewFrameReady cb, int channel, int consumer)
 {
     callback = cb;
     portPairIndex = channel;
     consumerID = consumer;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Register to receive new frames if motion is detected. Do not process on this thread.
        /// </summary>
        /// <param name="consumerID"></param>
        /// <param name="chan"></param>
        /// <param name="callback"></param>
        public void RegisterToConsumeMotionDetectedFrames(int consumerID, int chan, NotificationOfNewFrameReady callback)
        {
            if (chan < 0 || chan > m_AppData.MAX_PHYSICAL_CHANNELS) return;

            lock (m_Channels)
            {
                ConsumerNotificationInfo consumer = new ConsumerNotificationInfo(callback, chan, consumerID);
                m_Channels[chan].m_MotionDetectedCallBackList.Add(consumer);
            }
        }