コード例 #1
0
 public synchronized void release() {
   if (player != null) {
     player.removePlayerListener(this);
     player.close();
   }
   player = null;
 }
 private void releaseResources() {
   if (player != null) {
     try {
       player.stop();
       player.close();
     } catch (Exception e) {
     }
   }
 }
コード例 #3
0
ファイル: Notify.java プロジェクト: fin-nick/fj
 private void closePlayer() {
   if (null != player) {
     try {
       player.stop();
     } catch (Exception e) {
     }
     try {
       player.close();
     } catch (Exception e) {
     }
     player = null;
   }
 }
コード例 #4
0
  public void capture() {
    try {
      // Get the image.
      byte[] raw = mVideoControl.getSnapshot(null);
      Image image = Image.createImage(raw, 0, raw.length);

      Image thumb = ImageUtility.createThumbnail(image);

      // Place it in the main form.
      if (mMainForm.size() > 0 && mMainForm.get(0) instanceof StringItem) mMainForm.delete(0);
      mMainForm.append(thumb);

      // Flip back to the main form.
      mDisplay.setCurrent(mMainForm);

      // Shut down the player.
      mPlayer.close();
      mPlayer = null;
      mVideoControl = null;
    } catch (MediaException me) {
      handleException(me);
    }
  }