com.google.android.exoplayer.util.VerboseLogUtil Java Examples

The following examples show how to use com.google.android.exoplayer.util.VerboseLogUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PlayerActivity.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 6 votes vote down vote up
public void showVerboseLogPopup(View v) {
    PopupMenu popup = new PopupMenu(this, v);
    Menu menu = popup.getMenu();
    menu.add(Menu.NONE, 0, Menu.NONE, R.string.logging_normal);
    menu.add(Menu.NONE, 1, Menu.NONE, R.string.logging_verbose);
    menu.setGroupCheckable(Menu.NONE, true, true);
    menu.findItem((VerboseLogUtil.areAllTagsEnabled()) ? 1 : 0).setChecked(true);
    popup.setOnMenuItemClickListener(new OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem item) {
            if (item.getItemId() == 0) {
                VerboseLogUtil.setEnableAllTags(false);
            } else {
                VerboseLogUtil.setEnableAllTags(true);
            }
            return true;
        }
    });
    popup.show();
}
 
Example #2
Source File: PlayerActivity.java    From Exoplayer_VLC with Apache License 2.0 6 votes vote down vote up
public void showVerboseLogPopup(View v) {
  PopupMenu popup = new PopupMenu(this, v);
  Menu menu = popup.getMenu();
  menu.add(Menu.NONE, 0, Menu.NONE, R.string.logging_normal);
  menu.add(Menu.NONE, 1, Menu.NONE, R.string.logging_verbose);
  menu.setGroupCheckable(Menu.NONE, true, true);
  menu.findItem((VerboseLogUtil.areAllTagsEnabled()) ? 1 : 0).setChecked(true);
  popup.setOnMenuItemClickListener(new OnMenuItemClickListener() {
    @Override
    public boolean onMenuItemClick(MenuItem item) {
      if (item.getItemId() == 0) {
        VerboseLogUtil.setEnableAllTags(false);
      } else {
        VerboseLogUtil.setEnableAllTags(true);
      }
      return true;
    }
  });
  popup.show();
}
 
Example #3
Source File: EventLogger.java    From AndroidTvDemo with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, long length, int type, int trigger, Format format,
    long mediaStartTimeMs, long mediaEndTimeMs) {
  loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId + ", " + type
        + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
  }
}
 
Example #4
Source File: EventLogger.java    From AndroidTvDemo with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format,
     long mediaStartTimeMs, long mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs) {
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
    Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
        + "]");
  }
}
 
Example #5
Source File: EventLogger.java    From ShareBox with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, long length, int type, int trigger, Format format,
    long mediaStartTimeMs, long mediaEndTimeMs) {
  loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId + ", " + type
        + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
  }
}
 
Example #6
Source File: EventLogger.java    From ShareBox with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format,
     long mediaStartTimeMs, long mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs) {
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
    Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
        + "]");
  }
}
 
Example #7
Source File: EventLogger.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, long length, int type, int trigger, Format format,
    long mediaStartTimeMs, long mediaEndTimeMs) {
  loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId + ", " + type
        + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
  }
}
 
Example #8
Source File: EventLogger.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format,
     long mediaStartTimeMs, long mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs) {
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
    Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
        + "]");
  }
}
 
Example #9
Source File: EventLogger.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, long length, int type, int trigger, Format format,
    long mediaStartTimeMs, long mediaEndTimeMs) {
  loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId + ", " + type
        + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
  }
}
 
Example #10
Source File: EventLogger.java    From Android-Example-HLS-ExoPlayer with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format,
     long mediaStartTimeMs, long mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs) {
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
    Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
        + "]");
  }
}
 
Example #11
Source File: EventLogger.java    From iview-android-tv with MIT License 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, long length, int type, int trigger, Format format,
                          int mediaStartTimeMs, int mediaEndTimeMs) {
    loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
    if (VerboseLogUtil.isTagEnabled(TAG)) {
        Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId + ", " + type
                + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
    }
}
 
Example #12
Source File: EventLogger.java    From iview-android-tv with MIT License 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format,
                            int mediaStartTimeMs, int mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs) {
    if (VerboseLogUtil.isTagEnabled(TAG)) {
        long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
        Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
                + "]");
    }
}
 
Example #13
Source File: EventLogger.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, String formatId, int trigger, boolean isInitialization,
    int mediaStartTimeMs, int mediaEndTimeMs, long length) {
  loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId
        + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
  }
}
 
Example #14
Source File: EventLogger.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded) {
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
    Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " + downloadTime
        + "]");
  }
}
 
Example #15
Source File: EventLogger.java    From Mobilyzer with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadStarted(int sourceId, String formatId, int trigger, boolean isInitialization,
    int mediaStartTimeMs, int mediaEndTimeMs, long length) {
  loadStartTimeMs[sourceId] = SystemClock.elapsedRealtime();
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    Log.v(TAG, "loadStart [" + getSessionTimeString() + ", " + sourceId
        + ", " + mediaStartTimeMs + ", " + mediaEndTimeMs + "]");
  }
}
 
Example #16
Source File: EventLogger.java    From Mobilyzer with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadCompleted(int sourceId, long bytesLoaded) {
  if (VerboseLogUtil.isTagEnabled(TAG)) {
    long downloadTime = SystemClock.elapsedRealtime() - loadStartTimeMs[sourceId];
    Log.v(TAG, "loadEnd [" + getSessionTimeString() + ", " + sourceId + ", " +
        downloadTime + "]");
  }
}