Пример #1
0
 public override void OnActivityCreated(Bundle savedInstanceState)
 {
     base.OnActivityCreated(savedInstanceState);
     mFile                     = new File(Activity.GetExternalFilesDir(null), "pic.jpg");
     mCaptureCallback          = new CaptureListener(this);
     mOnImageAvailableListener = new ImageAvailableListener(activity, context, this);
 }
Пример #2
0
 public void SetCaptureListener(CaptureListener i_listener)
 {
     //キャプチャ中は切り替えられない。
     if (this.m_graphi_active)
     {
         throw new Exception();
     }
     this.m_cap_listener = i_listener;
 }
Пример #3
0
 public void SetCaptureListener(CaptureListener i_listener)
 {
     //キャプチャ中は切り替えられない。
     if (this.m_graphi_active)
     {
         throw new Exception();
     }
     if (this.CaptureListenerList != null && !this.CaptureListenerList.Contains(i_listener))
     {
         this.CaptureListenerList.Add(i_listener);
     }
     //this.m_cap_listener=i_listener;
 }
Пример #4
0
        /// <summary> buffer callback, COULD BE FROM FOREIGN THREAD. </summary>
        int ISampleGrabberCB.BufferCB(double SampleTime, IntPtr pBuffer, int BufferLen)
        {
            // Note that we depend on only being called once per call to Click.  Otherwise
            // a second call can overwrite the previous image.
            if (this.CaptureListenerList != null)
            {
                for (int i = 0; i < this.CaptureListenerList.Count; i++)
                {
                    CaptureListener oListener = this.CaptureListenerList[i];
                    if (oListener != null)
                    {
                        oListener.OnBuffer(this, SampleTime, pBuffer, BufferLen);
                    }
                }
            }


            return(0);
        }
Пример #5
0
 public void SetCaptureListener(CaptureListener i_listener)
 {
     //キャプチャ中は切り替えられない。
     if (this.m_graphi_active)
     {
         throw new Exception();
     }
     this.m_cap_listener=i_listener;
 }