internal FrameSet(IntPtr ptr)
        {
            m_instance = new HandleRef(this, ptr);
            object error;

            m_count = NativeMethods.rs2_embedded_frames_count(m_instance.Handle, out error);
        }
Ejemplo n.º 2
0
        internal override void Initialize()
        {
            object error;

            count = NativeMethods.rs2_embedded_frames_count(Handle, out error);
            enumerator.Reset();
            disposables.Clear();
        }
Ejemplo n.º 3
0
        internal FrameSet(IntPtr ptr)
            : base(ptr)
        {
            object error;

            count      = NativeMethods.rs2_embedded_frames_count(Handle, out error);
            enumerator = new Enumerator(this);
        }
Ejemplo n.º 4
0
        public IEnumerator <Frame> GetEnumerator()
        {
            object error;

            int deviceCount = NativeMethods.rs2_embedded_frames_count(m_instance.Handle, out error);

            for (int i = 0; i < deviceCount; i++)
            {
                var ptr = NativeMethods.rs2_extract_frame(m_instance.Handle, i, out error);
                yield return(CreateFrame(ptr));
            }
        }
Ejemplo n.º 5
0
 public FrameSet Get(IntPtr ptr)
 {
     lock (locker)
     {
         if (stack.Count != 0)
         {
             FrameSet f = stack.Pop();
             f.m_instance    = new HandleRef(f, ptr);
             f.disposedValue = false;
             object error;
             f.m_count = NativeMethods.rs2_embedded_frames_count(f.m_instance.Handle, out error);
             f.m_enum.Reset();
             //f.m_disposable = new EmptyDisposable();
             f.disposables.Clear();
             return(f);
         }
         else
         {
             return(new FrameSet(ptr));
         }
     }
 }