コード例 #1
0
 public void onPause() {
   if (DEBUG) Log.d(TAG, "onPause()");
   super.onPause();
   if (mv != null) {
     mv.stopPlayback();
   }
 }
コード例 #2
0
  public void playMovie(View view) {
    EditText editURL = (EditText) findViewById(R.id.mjpeg_movie_url);
    String url = editURL.getText().toString();

    if (url == null || url.isEmpty()) {
      Log.d(TAG, "URL is empty");
      return;
    }

    Log.d(TAG, "URL:" + url);

    MjpegView mjpegView = (MjpegView) findViewById(R.id.mjpeg_preview);
    mjpegView.setResolution(320, 240);

    new SetupMjpegStreamTask().execute(url);
  }
コード例 #3
0
 public void onResume() {
   if (DEBUG) Log.d(TAG, "onResume()");
   super.onResume();
   if (mv != null) {
     mv.resumePlayback();
   }
 }
コード例 #4
0
  public void onDestroy() {
    if (DEBUG) Log.d(TAG, "onDestroy()");

    if (mv != null) {
      mv.freeCameraMemory();
    }

    super.onDestroy();
  }
コード例 #5
0
 @Override
 protected void onPostExecute(MjpegInputStream result) {
   Log.d(TAG, "onPostExecute");
   MjpegView view = (MjpegView) findViewById(R.id.mjpeg_preview);
   view.setSource(result);
 }