Java 类com.google.android.exoplayer.ExoPlayer.ExoPlayerComponent 实例源码

项目:miku    文件:ExoPlayerImplInternal.java   
public synchronized void blockingSendMessage(ExoPlayerComponent target, int messageType,
    Object message) {
  if (released) {
    Log.w(TAG, "Sent message(" + messageType + ") after release. Message ignored.");
    return;
  }
  int messageNumber = customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
  while (customMessagesProcessed <= messageNumber) {
    try {
      wait();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
项目:miku    文件:ExoPlayerImplInternal.java   
private <T> void sendMessageInternal(int what, Object obj)
    throws ExoPlaybackException {
  try {
    @SuppressWarnings("unchecked")
    Pair<ExoPlayerComponent, Object> targetAndMessage = (Pair<ExoPlayerComponent, Object>) obj;
    targetAndMessage.first.handleMessage(what, targetAndMessage.second);
  } finally {
    synchronized (this) {
      customMessagesProcessed++;
      notifyAll();
    }
  }
  if (state != ExoPlayer.STATE_IDLE && state != ExoPlayer.STATE_PREPARING) {
    // The message may have caused something to change that now requires us to do work.
    handler.sendEmptyMessage(MSG_DO_SOME_WORK);
  }
}
项目:ExoPlayer-Demo    文件:ExoPlayerImplInternal.java   
public synchronized void blockingSendMessage(ExoPlayerComponent target, int messageType,
    Object message) {
  if (released) {
    Log.w(TAG, "Sent message(" + messageType + ") after release. Message ignored.");
    return;
  }
  int messageNumber = customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
  while (customMessagesProcessed <= messageNumber) {
    try {
      wait();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
项目:ExoPlayer-Demo    文件:ExoPlayerImplInternal.java   
private <T> void sendMessageInternal(int what, Object obj)
    throws ExoPlaybackException {
  try {
    @SuppressWarnings("unchecked")
    Pair<ExoPlayerComponent, Object> targetAndMessage = (Pair<ExoPlayerComponent, Object>) obj;
    targetAndMessage.first.handleMessage(what, targetAndMessage.second);
    if (state != ExoPlayer.STATE_IDLE && state != ExoPlayer.STATE_PREPARING) {
      // The message may have caused something to change that now requires us to do work.
      handler.sendEmptyMessage(MSG_DO_SOME_WORK);
    }
  } finally {
    synchronized (this) {
      customMessagesProcessed++;
      notifyAll();
    }
  }
}
项目:android-exoplayer    文件:ExoPlayerImplInternal.java   
public synchronized void blockingSendMessage(ExoPlayerComponent target, int messageType,
    Object message) {
  if (released) {
    Log.w(TAG, "Sent message(" + messageType + ") after release. Message ignored.");
    return;
  }
  int messageNumber = customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
  while (customMessagesProcessed <= messageNumber) {
    try {
      wait();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
项目:android-exoplayer    文件:ExoPlayerImplInternal.java   
private <T> void sendMessageInternal(int what, Object obj)
    throws ExoPlaybackException {
  try {
    @SuppressWarnings("unchecked")
    Pair<ExoPlayerComponent, Object> targetAndMessage = (Pair<ExoPlayerComponent, Object>) obj;
    targetAndMessage.first.handleMessage(what, targetAndMessage.second);
  } finally {
    synchronized (this) {
      customMessagesProcessed++;
      notifyAll();
    }
  }
  if (state != ExoPlayer.STATE_IDLE && state != ExoPlayer.STATE_PREPARING) {
    // The message may have caused something to change that now requires us to do work.
    handler.sendEmptyMessage(MSG_DO_SOME_WORK);
  }
}
项目:Exoplayer_VLC    文件:ExoPlayerImplInternal.java   
public synchronized void blockingSendMessage(ExoPlayerComponent target, int messageType,
    Object message) {
  if (released) {
    Log.w(TAG, "Sent message(" + messageType + ") after release. Message ignored.");
    return;
  }
  int messageNumber = customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
  while (customMessagesProcessed <= messageNumber) {
    try {
      wait();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
项目:Exoplayer_VLC    文件:ExoPlayerImplInternal.java   
private <T> void sendMessageInternal(int what, Object obj)
      throws ExoPlaybackException {
    try {
      @SuppressWarnings("unchecked")
      Pair<ExoPlayerComponent, Object> targetAndMessage = (Pair<ExoPlayerComponent, Object>) obj;
      targetAndMessage.first.handleMessage(what, targetAndMessage.second);
    } finally {
      synchronized (this) {
        customMessagesProcessed++;
        notifyAll();
      }
    }
    if (state != ExoPlayer.STATE_IDLE && state != ExoPlayer.STATE_PREPARING) {
System.out.println("ExoPlayerImplInternal.sendMessageInternal()   send MSG_DO_SOME_WORK ***");
      // The message may have caused something to change that now requires us to do work.
      handler.sendEmptyMessage(MSG_DO_SOME_WORK);
    }
  }
项目:edx-app-android    文件:ExoPlayerImplInternal.java   
private <T> void sendMessageInternal(int what, Object obj)
    throws ExoPlaybackException {
  try {
    @SuppressWarnings("unchecked")
    Pair<ExoPlayerComponent, Object> targetAndMessage = (Pair<ExoPlayerComponent, Object>) obj;
    targetAndMessage.first.handleMessage(what, targetAndMessage.second);
  } finally {
    synchronized (this) {
      customMessagesProcessed++;
      notifyAll();
    }
  }
  if (state != ExoPlayer.STATE_IDLE && state != ExoPlayer.STATE_PREPARING) {
    // The message may have caused something to change that now requires us to do work.
    handler.sendEmptyMessage(MSG_DO_SOME_WORK);
  }
}
项目:ExoPlayer    文件:ExoPlayerImplInternal.java   
public synchronized void blockingSendMessage(ExoPlayerComponent target, int messageType,
    Object message) {
  if (released) {
    Log.w(TAG, "Sent message(" + messageType + ") after release. Message ignored.");
    return;
  }
  int messageNumber = customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
  while (customMessagesProcessed <= messageNumber) {
    try {
      wait();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
项目:ExoPlayer    文件:ExoPlayerImplInternal.java   
private <T> void sendMessageInternal(int what, Object obj)
    throws ExoPlaybackException {
  try {
    @SuppressWarnings("unchecked")
    Pair<ExoPlayerComponent, Object> targetAndMessage = (Pair<ExoPlayerComponent, Object>) obj;
    targetAndMessage.first.handleMessage(what, targetAndMessage.second);
  } finally {
    synchronized (this) {
      customMessagesProcessed++;
      notifyAll();
    }
  }
  if (state != ExoPlayer.STATE_IDLE && state != ExoPlayer.STATE_PREPARING) {
    // The message may have caused something to change that now requires us to do work.
    handler.sendEmptyMessage(MSG_DO_SOME_WORK);
  }
}
项目:edx-app-android    文件:ExoPlayerImplInternal.java   
public synchronized void blockingSendMessage(ExoPlayerComponent target, int messageType,
    Object message) {
  int messageNumber = customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
  while (customMessagesProcessed <= messageNumber) {
    try {
      wait();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
}
项目:miku    文件:ExoPlayerImplInternal.java   
public void sendMessage(ExoPlayerComponent target, int messageType, Object message) {
  customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
}
项目:ExoPlayer-Demo    文件:ExoPlayerImplInternal.java   
public void sendMessage(ExoPlayerComponent target, int messageType, Object message) {
  customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
}
项目:android-exoplayer    文件:ExoPlayerImplInternal.java   
public void sendMessage(ExoPlayerComponent target, int messageType, Object message) {
  customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
}
项目:Exoplayer_VLC    文件:ExoPlayerImplInternal.java   
public void sendMessage(ExoPlayerComponent target, int messageType, Object message) {
  customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
}
项目:edx-app-android    文件:ExoPlayerImplInternal.java   
public void sendMessage(ExoPlayerComponent target, int messageType, Object message) {
  customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
}
项目:ExoPlayer    文件:ExoPlayerImplInternal.java   
public void sendMessage(ExoPlayerComponent target, int messageType, Object message) {
  customMessagesSent++;
  handler.obtainMessage(MSG_CUSTOM, messageType, 0, Pair.create(target, message)).sendToTarget();
}