Пример #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);
            }
        }
Пример #2
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);
            }
        }