public void startPlayback() {
   if (mIn != null) {
     mRun = true;
     if (thread == null) {
       thread = new MjpegViewThread(holder, saved_context);
     }
     thread.start();
   }
 }
 public void resumePlayback() {
   if (suspending) {
     if (mIn != null) {
       mRun = true;
       SurfaceHolder holder = getHolder();
       holder.addCallback(this);
       thread = new MjpegViewThread(holder, saved_context);
       thread.start();
       suspending = false;
     }
   }
 }
Example #3
0
 public void stopPlayback() {
   if (mRun) {
     suspending = true;
   }
   mRun = false;
   boolean retry = true;
   while (retry) {
     try {
       thread.join();
       retry = false;
     } catch (InterruptedException e) {
     }
   }
 }
 public void stopPlayback() {
   if (mRun) {
     suspending = true;
   }
   mRun = false;
   if (thread != null) {
     boolean retry = true;
     while (retry) {
       thread.interrupt();
       retry = false;
     }
     thread = null;
   }
   if (mIn != null) {
     try {
       mIn.close();
     } catch (IOException e) {
     }
     mIn = null;
   }
 }
 public void surfaceChanged(SurfaceHolder holder, int f, int w, int h) {
   if (thread != null) {
     thread.setSurfaceSize(w, h);
   }
 }
Example #6
0
 public void startPlayback() {
   if (mIn != null) {
     mRun = true;
     thread.start();
   }
 }