com.google.android.exoplayer2.util.Log类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.google.android.exoplayer2.util.Log类的一些代码示例,展示了Log类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log类的具体详情如下:
包路径:com.google.android.exoplayer2.util.Log
类名称:Log

Log介绍

[英]Wrapper around android.util.Log which allows to set the log level.
[中]android的包装器。util。允许设置日志级别的日志。

代码示例

代码示例来源:origin: google/ExoPlayer

/**
 * Logs an error message and exception.
 *
 * @param msg The message to log.
 * @param tr The exception to log.
 */
protected void loge(String msg, @Nullable Throwable tr) {
 Log.e(tag, msg, tr);
}

代码示例来源:origin: google/ExoPlayer

/**
 * Logs a debug message.
 *
 * @param msg The message to log.
 */
protected void logd(String msg) {
 Log.d(tag, msg);
}

代码示例来源:origin: google/ExoPlayer

@Override
public void onInvalidLatency(long latencyUs) {
 Log.w(TAG, "Ignoring impossibly large audio latency: " + latencyUs);
}

代码示例来源:origin: google/ExoPlayer

/** @see android.util.Log#d(String, String, Throwable) */
public static void d(String tag, String message, @Nullable Throwable throwable) {
 if (!logStackTraces) {
  d(tag, appendThrowableMessage(message, throwable));
 }
 if (logLevel == LOG_LEVEL_ALL) {
  android.util.Log.d(tag, message, throwable);
 }
}

代码示例来源:origin: google/ExoPlayer

/** @see android.util.Log#w(String, String, Throwable) */
public static void w(String tag, String message, @Nullable Throwable throwable) {
 if (!logStackTraces) {
  w(tag, appendThrowableMessage(message, throwable));
 }
 if (logLevel <= LOG_LEVEL_WARNING) {
  android.util.Log.w(tag, message, throwable);
 }
}

代码示例来源:origin: google/ExoPlayer

/** @see android.util.Log#i(String, String, Throwable) */
public static void i(String tag, String message, @Nullable Throwable throwable) {
 if (!logStackTraces) {
  i(tag, appendThrowableMessage(message, throwable));
 }
 if (logLevel <= LOG_LEVEL_INFO) {
  android.util.Log.i(tag, message, throwable);
 }
}

代码示例来源:origin: google/ExoPlayer

contentLength = Long.parseLong(contentLengthHeader);
} catch (NumberFormatException e) {
 Log.e(TAG, "Unexpected Content-Length [" + contentLengthHeader + "]");
   Log.w(TAG, "Inconsistent headers [" + contentLengthHeader + "] [" + contentRangeHeader
     + "]");
   contentLength = Math.max(contentLength, contentLengthFromRange);
  Log.e(TAG, "Unexpected Content-Range [" + contentRangeHeader + "]");

代码示例来源:origin: google/ExoPlayer

String message =
  "Test failed to start. Display may be turned off or keyguard may be present.";
Log.e(TAG, message);
fail(message);
 Log.d(TAG, "Checking test pass conditions.");
 hostedTest.onFinished();
 Log.d(TAG, "Pass conditions checked.");
} else {
 String message = "Test force stopped. Activity may have been paused whilst "
   + "test was in progress.";
 Log.e(TAG, message);
 fail(message);
runOnUiThread(hostedTest::forceStop);
String message = "Test timed out after " + timeoutMs + " ms.";
Log.e(TAG, message);
if (failOnTimeout) {
 fail(message);

代码示例来源:origin: google/ExoPlayer

/** @see android.util.Log#e(String, String, Throwable) */
public static void e(String tag, String message, @Nullable Throwable throwable) {
 if (!logStackTraces) {
  e(tag, appendThrowableMessage(message, throwable));
 }
 if (logLevel <= LOG_LEVEL_ERROR) {
  android.util.Log.e(tag, message, throwable);
 }
}

代码示例来源:origin: google/ExoPlayer

Log.i(TAG, "Ignoring unsupported tag: " + xmlParser.getName());
 unsupportedNodeDepth++;
} else if (TtmlNode.TAG_HEAD.equals(name)) {
  Log.w(TAG, "Suppressing parser error", e);

代码示例来源:origin: google/ExoPlayer

cronetEngineSource = SOURCE_UNKNOWN;
 Log.d(TAG, "CronetEngine built using " + providerName);
} catch (SecurityException e) {
 Log.w(TAG, "Failed to build CronetEngine. Please check if current process has "
   + "android.permission.ACCESS_NETWORK_STATE.");
} catch (UnsatisfiedLinkError e) {
 Log.w(TAG, "Failed to link Cronet binaries. Please check if native Cronet binaries are "
   + "bundled into your app.");
Log.w(TAG, "Cronet not available. Using fallback provider.");

代码示例来源:origin: google/ExoPlayer

@Override
public void release() {
 Log.i(TAG, "Release " + Integer.toHexString(System.identityHashCode(this)) + " ["
   + ExoPlayerLibraryInfo.VERSION_SLASHY + "] [" + Util.DEVICE_DEBUG_INFO + "] ["
   + ExoPlayerLibraryInfo.registeredModules() + "]");
 mediaSource = null;
 internalPlayer.release();
 eventHandler.removeCallbacksAndMessages(null);
}

代码示例来源:origin: google/ExoPlayer

contentLength = Long.parseLong(contentLengthHeader);
} catch (NumberFormatException e) {
 Log.e(TAG, "Unexpected Content-Length [" + contentLengthHeader + "]");
  Log.w(TAG, "Inconsistent headers [" + contentLengthHeader + "] [" + contentRangeHeader
    + "]");
  contentLength = Math.max(contentLength, contentLengthFromRange);
 Log.e(TAG, "Unexpected Content-Range [" + contentRangeHeader + "]");

代码示例来源:origin: google/ExoPlayer

String message =
  "Test failed to start. Display may be turned off or keyguard may be present.";
Log.e(TAG, message);
fail(message);
 Log.d(TAG, "Checking test pass conditions.");
 hostedTest.onFinished();
 Log.d(TAG, "Pass conditions checked.");
} else {
 String message = "Test force stopped. Activity may have been paused whilst "
   + "test was in progress.";
 Log.e(TAG, message);
 fail(message);
runOnUiThread(hostedTest::forceStop);
String message = "Test timed out after " + timeoutMs + " ms.";
Log.e(TAG, message);
if (failOnTimeout) {
 fail(message);

代码示例来源:origin: google/ExoPlayer

} else {
  Log.w(TAG, "Unexpected ad count in LOADED, " + adCount + ", expected " + oldAdCount);
 Log.w(
   TAG,
   "Expected ad group index "
Map<String, String> adData = adEvent.getAdData();
String message = "AdEvent: " + adData;
Log.i(TAG, message);
if ("adLoadError".equals(adData.get("type"))) {
 handleAdGroupLoadError(new IOException(message));

代码示例来源:origin: google/ExoPlayer

/**
 * Executes the action and schedules the next.
 *
 * @param player The player to which the action should be applied.
 * @param trackSelector The track selector to which the action should be applied.
 * @param surface The surface to use when applying actions.
 * @param handler The handler to use to pass to the next action.
 * @param nextAction The next action to schedule immediately after this action finished.
 */
public final void doActionAndScheduleNext(
  SimpleExoPlayer player,
  DefaultTrackSelector trackSelector,
  Surface surface,
  HandlerWrapper handler,
  ActionNode nextAction) {
 if (description != null) {
  Log.i(tag, description);
 }
 doActionAndScheduleNextImpl(player, trackSelector, surface, handler, nextAction);
}

代码示例来源:origin: google/ExoPlayer

/**
 * Closes the current connection quietly, if there is one.
 */
private void closeConnectionQuietly() {
 if (connection != null) {
  try {
   connection.disconnect();
  } catch (Exception e) {
   Log.e(TAG, "Unexpected error while disconnecting", e);
  }
  connection = null;
 }
}

代码示例来源:origin: google/ExoPlayer

private static int parsePositionAnchor(String s) {
 switch (s) {
  case "start":
   return Cue.ANCHOR_TYPE_START;
  case "center":
  case "middle":
   return Cue.ANCHOR_TYPE_MIDDLE;
  case "end":
   return Cue.ANCHOR_TYPE_END;
  default:
   Log.w(TAG, "Invalid anchor value: " + s);
   return Cue.TYPE_UNSET;
 }
}

代码示例来源:origin: google/ExoPlayer

private void logAssumedSupport(String message) {
 Log.d(TAG, "AssumedSupport [" + message + "] [" + name + ", " + mimeType + "] ["
   + Util.DEVICE_DEBUG_INFO + "]");
}

代码示例来源:origin: google/ExoPlayer

MAX_DROPPED_VIDEO_FRAME_COUNT_TO_NOTIFY);
 out.add(extensionRendererIndex++, renderer);
 Log.i(TAG, "Loaded LibvpxVideoRenderer.");
} catch (ClassNotFoundException e) {

相关文章

微信公众号

最新文章

更多