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); }
public void SetCaptureListener(CaptureListener i_listener) { //キャプチャ中は切り替えられない。 if (this.m_graphi_active) { throw new Exception(); } this.m_cap_listener = i_listener; }
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; }
/// <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); }
public void SetCaptureListener(CaptureListener i_listener) { //キャプチャ中は切り替えられない。 if (this.m_graphi_active) { throw new Exception(); } this.m_cap_listener=i_listener; }