Tabnine Logo
Log
Code IndexAdd Tabnine to your IDE (free)

How to use
Log
in
io.vov.vitamio.utils

Best Java code snippets using io.vov.vitamio.utils.Log (Showing top 20 results out of 315)

origin: curtis2/SuperVideoPlayer

 @Override
 public void onSeekComplete(MediaPlayer mp) {
  Log.d("onSeekComplete");
  if (mOnSeekCompleteListener != null)
   mOnSeekCompleteListener.onSeekComplete(mp);
 }
};
origin: curtis2/SuperVideoPlayer

public static int getVersionCode(Context ctx) {
  int version = 0;
  try {
    version = ctx.getPackageManager().getPackageInfo(ctx.getApplicationInfo().packageName, 0).versionCode;
  } catch (Exception e) {
    Log.e("getVersionInt", e);
  }
  return version;
}
origin: curtis2/SuperVideoPlayer

public static String getLocale() {
 Locale locale = Locale.getDefault();
 if (locale != null) {
  String lo = locale.getLanguage();
  Log.i("getLocale " + lo);
  if (lo != null) {
   return lo.toLowerCase();
  }
 }
 return "en";
}
origin: curtis2/SuperVideoPlayer

public void scanDirectories(String[] directories) {
 try {
  long start = System.currentTimeMillis();
  prescan(null);
  long prescan = System.currentTimeMillis();
  for (int i = 0; i < directories.length; i++) {
   if (!TextUtils.isEmpty(directories[i])) {
    directories[i] = ContextUtils.fixLastSlash(directories[i]);
    processDirectory(directories[i], MediaFile.sFileExtensions);
   }
  }
  long scan = System.currentTimeMillis();
  postscan(directories);
  long end = System.currentTimeMillis();
  Log.d(" prescan time: %dms", prescan - start);
  Log.d("    scan time: %dms", scan - prescan);
  Log.d("postscan time: %dms", end - scan);
  Log.d("   total time: %dms", end - start);
 } catch (SQLException e) {
  Log.e("SQLException in MediaScanner.scan()", e);
 } catch (UnsupportedOperationException e) {
  Log.e("UnsupportedOperationException in MediaScanner.scan()", e);
 } catch (RemoteException e) {
  Log.e("RemoteException in MediaScanner.scan()", e);
 }
}
origin: curtis2/SuperVideoPlayer

public void handleStringTag(String name, byte[] valueBytes, String valueEncoding) {
 String value;
 try {
  value = new String(valueBytes, valueEncoding);
 } catch (Exception e) {
  Log.e("handleStringTag", e);
  value = new String(valueBytes);
 }
 Log.i("%s : %s", name, value);
 if (name.equalsIgnoreCase("title")) {
  mTitle = value;
 } else if (name.equalsIgnoreCase("artist")) {
  mArtist = value.trim();
 } else if (name.equalsIgnoreCase("albumartist")) {
  if (TextUtils.isEmpty(mArtist))
   mArtist = value.trim();
 } else if (name.equalsIgnoreCase("album")) {
  mAlbum = value.trim();
 } else if (name.equalsIgnoreCase("language")) {
  mLanguage = value.trim();
 } else if (name.equalsIgnoreCase("duration")) {
  mDuration = parseSubstring(value, 0, 0);
 } else if (name.equalsIgnoreCase("width")) {
  mWidth = parseSubstring(value, 0, 0);
 } else if (name.equalsIgnoreCase("height")) {
  mHeight = parseSubstring(value, 0, 0);
 }
}
origin: curtis2/SuperVideoPlayer

 @Override
 public boolean onInfo(MediaPlayer mp, int what, int extra) {
  Log.d("onInfo: (%d, %d)", what, extra);
   
    if(MediaPlayer.MEDIA_INFO_UNKNOW_TYPE == what){
     Log.e(" VITAMIO--TYPE_CHECK  stype  not include  onInfo mediaplayer unknow type ");
   } 
   
   if(MediaPlayer.MEDIA_INFO_FILE_OPEN_OK == what){
     long buffersize=mMediaPlayer.audioTrackInit(); 
     mMediaPlayer.audioInitedOk(buffersize);
   }
  Log.d("onInfo: (%d, %d)", what, extra);
  if (mOnInfoListener != null) {
   mOnInfoListener.onInfo(mp, what, extra);
  } else if (mMediaPlayer != null) {
   if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) {
    mMediaPlayer.pause();
    if (mMediaBufferingIndicator != null)
     mMediaBufferingIndicator.setVisibility(View.VISIBLE);
   } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) {
    mMediaPlayer.start();
    if (mMediaBufferingIndicator != null)
     mMediaBufferingIndicator.setVisibility(View.GONE);
   }
  }
  return true;
 }
};
origin: curtis2/SuperVideoPlayer

 return;
case MEDIA_ERROR:
 Log.e("Error (%d, %d)", msg.arg1, msg.arg2);
 boolean error_was_handled = false;
 if (mOnErrorListener != null)
 return;
case MEDIA_INFO:
 Log.i("Info (%d, %d)", msg.arg1, msg.arg2);
 if (mOnInfoListener != null)
  mOnInfoListener.onInfo(mMediaPlayer, msg.arg1, msg.arg2);
 mData = msg.getData();
 if (mData.getInt(MEDIA_SUBTITLE_TYPE) == SUBTITLE_TEXT) {
  Log.i("Subtitle : %s", mData.getString(MEDIA_SUBTITLE_STRING));
  if (mOnTimedTextListener != null)
   mOnTimedTextListener.onTimedText(mData.getString(MEDIA_SUBTITLE_STRING));
 } else if (mData.getInt(MEDIA_SUBTITLE_TYPE) == SUBTITLE_BITMAP) {
  Log.i("Subtitle : bitmap");
  if (mOnTimedTextListener != null)
   mOnTimedTextListener.onTimedTextUpdate(mData.getByteArray(MEDIA_SUBTITLE_BYTES), msg.arg1, msg.arg2);
  return;
default:
 Log.e("Unknown message type " + msg.what);
 return;
origin: curtis2/SuperVideoPlayer

private static byte[] generateKey(String input) {
  try {
    byte[] bytesOfMessage = input.getBytes("UTF-8");
    MessageDigest md = MessageDigest.getInstance("SHA256");
    return md.digest(bytesOfMessage);
  } catch (Exception e) {
    Log.e("generateKey", e);
    return null;
  }
}
origin: curtis2/SuperVideoPlayer

private static int getCachedFeature() {
  if (cachedFeatureString == null) {
    StringBuffer sb = new StringBuffer();
    if ((cachedFeature & FEATURE_ARM_V5TE) > 0)
      sb.append("V5TE ");
    if ((cachedFeature & FEATURE_ARM_V6) > 0)
      sb.append("V6 ");
    if ((cachedFeature & FEATURE_ARM_VFP) > 0)
      sb.append("VFP ");
    if ((cachedFeature & FEATURE_ARM_V7A) > 0)
      sb.append("V7A ");
    if ((cachedFeature & FEATURE_ARM_VFPV3) > 0)
      sb.append("VFPV3 ");
    if ((cachedFeature & FEATURE_ARM_NEON) > 0)
      sb.append("NEON ");
    if ((cachedFeature & FEATURE_X86) > 0)
      sb.append("X86 ");
    if ((cachedFeature & FEATURE_MIPS) > 0)
      sb.append("MIPS ");
    cachedFeatureString = sb.toString();
  }
  Log.d("GET CPU FATURE: %s", cachedFeatureString);
  return cachedFeature;
}
origin: curtis2/SuperVideoPlayer

  Log.e("getCPUFeature", e);
} finally {
  try {
      bis.close();
  } catch (IOException e) {
    Log.e("getCPUFeature", e);
  Log.d("%s:%s", key, cpuinfo.get(key));
  try {
    int i = StringUtils.convertToInt(val);
    Log.d("CPU architecture: %s", i);
    if (i >= 7) {
      hasARMv6 = true;
    Log.e("getCPUFeature", ex);
origin: curtis2/SuperVideoPlayer

@Override
public void onTimedTextUpdate(byte[] pixels, int width, int height) {
 Log.i("onSubtitleUpdate: bitmap subtitle, %dx%d", width, height);
 if (mOnTimedTextListener != null)
  mOnTimedTextListener.onTimedTextUpdate(pixels, width, height);
}
origin: curtis2/SuperVideoPlayer

private void setupCrypto(SecretKey key) {
  byte[] iv = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f };
  AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv);
  try {
    ecipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
  } catch (Exception e) {
    ecipher = null;
    Log.e("setupCrypto", e);
  }
}
origin: curtis2/SuperVideoPlayer

   public void onCompletion(MediaPlayer mp) {
  Log.d("onCompletion");
  mCurrentState = STATE_PLAYBACK_COMPLETED;
  mTargetState = STATE_PLAYBACK_COMPLETED;
  if (mMediaController != null)
   mMediaController.hide();
  if (mOnCompletionListener != null)
   mOnCompletionListener.onCompletion(mMediaPlayer);
 }
};
origin: curtis2/SuperVideoPlayer

    bitmap = BitmapFactory.decodeByteArray(sThumbBuf, 0, sThumbBuf.length);
    if (bitmap == null)
     Log.d("couldn't decode byte array.");
    bitmap = BitmapFactory.decodeByteArray(sThumbBuf, 0, sThumbBuf.length);
    if (bitmap == null)
     Log.d("couldn't decode byte array.");
 Log.e("getThumbnail", ex);
} finally {
 if (c != null)
origin: curtis2/SuperVideoPlayer

public void setMimeType(String mimeType) {
 Log.i("setMimeType: %s", mimeType);
 mMimeType = mimeType;
 mFileType = MediaFile.getFileTypeForMimeType(mimeType);
}
origin: curtis2/SuperVideoPlayer

@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public void setWindowLayoutType() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    try {
      mAnchor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
      Method setWindowLayoutType = PopupWindow.class.getMethod("setWindowLayoutType", new Class[]{int.class});
      setWindowLayoutType.invoke(mWindow, WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG);
    } catch (Exception e) {
      Log.e("setWindowLayoutType", e);
    }
  }
}
origin: curtis2/SuperVideoPlayer

public void suspend() {
 if (isInPlaybackState()) {
  release(false);
  mCurrentState = STATE_SUSPEND_UNSUPPORTED;
  Log.d("Unable to suspend video. Release MediaPlayer.");
 }
}
origin: curtis2/SuperVideoPlayer

  mMediaPlayer.setOnTimedTextListener(mTimedTextListener);
  Log.d(" set user optional --------  ");
  HashMap<String, String> options = new HashMap<String, String>();
  options.put("rtsp_transport", "tcp"); // udp
  attachMediaController();
} catch (IOException ex) {
  Log.e("Unable to open content: " + mUri, ex);
  mCurrentState = STATE_ERROR;
  mTargetState = STATE_ERROR;
  return;
} catch (IllegalArgumentException ex) {
  Log.e("Unable to open content: " + mUri, ex);
  mCurrentState = STATE_ERROR;
  mTargetState = STATE_ERROR;
origin: curtis2/SuperVideoPlayer

 @Override
 public void onTimedText(String text) {
  Log.i("onSubtitleUpdate: %s", text);
  if (mOnTimedTextListener != null)
   mOnTimedTextListener.onTimedText(text);
 }
};
origin: curtis2/SuperVideoPlayer

private PublicKey readKeyFromStream(InputStream keyStream) throws IOException {
  ObjectInputStream oin = new ObjectInputStream(new BufferedInputStream(keyStream));
  try {
    PublicKey pubKey = (PublicKey) oin.readObject();
    return pubKey;
  } catch (Exception e) {
    Log.e("readKeyFromStream", e);
    return null;
  } finally {
    oin.close();
  }
}
io.vov.vitamio.utilsLog

Most used methods

  • d
  • e
  • i

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now