Java 类com.google.android.exoplayer.upstream.TransferListener 实例源码

项目:FriendsCameraSDK-android    文件:CameraDataSource.java   
/**
 * @param listener An optional listener.
 * @param maxPacketSize The maximum datagram packet size, in bytes.
 * @param socketTimeoutMillis The socket timeout in milliseconds. A timeout of zero is interpreted
 *     as an infinite timeout.
 */
public CameraDataSource(TransferListener listener, int maxPacketSize, int socketTimeoutMillis) {
    this.listener = listener;
    this.socketTimeoutMillis = socketTimeoutMillis;
    packetBuffer = new byte[maxPacketSize];
    packet = new DatagramPacket(packetBuffer, 0, maxPacketSize);
}
项目:danish-media-license    文件:OkHttpDataSource.java   
/**
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a {@link HttpDataSource.InvalidContentTypeException}
 *                             is thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 * @param cacheControl         An optional {@link CacheControl} which sets all requests'
 *                             Cache-Control header. For example, you could force the network
 *                             response for all requests.
 */
private OkHttpDataSource(String userAgent, Predicate<String> contentTypePredicate,
                         TransferListener listener, CacheControl cacheControl) {
  DmlApplication.getInstance().getBackendComponent().inject(this);
  Assertions.checkNotNull(callFactory);
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.cacheControl = cacheControl;
  this.requestProperties = new HashMap<>();
}
项目:danish-media-license    文件:HlsRendererBuilder.java   
private static UriDataSource createDataSource(Context context, String userAgent,
                                              TransferListener transferListener) {
  return new DefaultUriDataSource(
      context,
      transferListener,
      new OkHttpDataSource(userAgent, null, transferListener)
  );
}
项目:FriendsCameraSDK-android    文件:CameraDataSource.java   
/**
 * @param listener An optional listener.
 */
public CameraDataSource(TransferListener listener) {
    this(listener, DEFAULT_MAX_PACKET_SIZE);
}
项目:luxunPro    文件:RenderBuilder.java   
protected OkHttpDataSource createDataSource(OkHttpClient okHttpClient
        , TransferListener transferListener, String userAgent) {
    return new OkHttpDataSource(okHttpClient, userAgent, null, transferListener);
}
项目:ExoCacheDataSource    文件:OkHttpDataSource.java   
/**
 * @param client               An {@link OkHttpClient} for use by the source.
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a
 *                             {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *                             thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 * @param cacheControl         An optional {@link CacheControl} which sets all requests' Cache-Control
 *                             header. For example, you could force the network response for all requests.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener,
                        CacheControl cacheControl) {
    this.okHttpClient = Assertions.checkNotNull(client);
    this.userAgent = Assertions.checkNotEmpty(userAgent);
    this.contentTypePredicate = contentTypePredicate;
    this.listener = listener;
    this.cacheControl = cacheControl;
    this.requestProperties = new HashMap<>();
}
项目:ExoPlayer-Demo    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
 *     header. For example, you could force the network response for all requests.
 *
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
    Predicate<String> contentTypePredicate, TransferListener listener,
    CacheControl cacheControl) {
  this.okHttpClient = Assertions.checkNotNull(client);
  this.userAgent = Assertions.checkNotEmpty(userAgent);
  this.contentTypePredicate = contentTypePredicate;
  this.listener = listener;
  this.cacheControl = cacheControl;
  this.requestProperties = new HashMap<>();
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
 *     header. For example, you could force the network response for all requests.
 *
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener,
                        CacheControl cacheControl) {
    this.okHttpClient = Assertions.checkNotNull(client);
    this.userAgent = Assertions.checkNotEmpty(userAgent);
    this.contentTypePredicate = contentTypePredicate;
    this.listener = listener;
    this.cacheControl = cacheControl;
    this.requestProperties = new HashMap<>();
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
 *     header. For example, you could force the network response for all requests.
 *
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener,
                        CacheControl cacheControl) {
    this.okHttpClient = Assertions.checkNotNull(client);
    this.userAgent = Assertions.checkNotEmpty(userAgent);
    this.contentTypePredicate = contentTypePredicate;
    this.listener = listener;
    this.cacheControl = cacheControl;
    this.requestProperties = new HashMap<>();
}
项目:FriendsCameraSDK-android    文件:CameraDataSource.java   
/**
 * @param listener An optional listener.
 * @param maxPacketSize The maximum datagram packet size, in bytes.
 */
public CameraDataSource(TransferListener listener, int maxPacketSize) {
    this(listener, maxPacketSize, DEAFULT_SOCKET_TIMEOUT_MILLIS);
}
项目:ExoCacheDataSource    文件:OkHttpDataSource.java   
/**
 * @param client               An {@link OkHttpClient} for use by the source.
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a
 *                             {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *                             thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
    this(client, userAgent, contentTypePredicate, listener, null);
}
项目:ExoPlayer-Demo    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
    Predicate<String> contentTypePredicate, TransferListener listener) {
  this(client, userAgent, contentTypePredicate, listener, null);
}
项目:danish-media-license    文件:OkHttpDataSource.java   
/**
 * @param userAgent            The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *                             predicate then a {@link HttpDataSource.InvalidContentTypeException}
 *                             is thrown from {@link #open(DataSpec)}.
 * @param listener             An optional listener.
 */
public OkHttpDataSource(String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
  this(userAgent, contentTypePredicate, listener, null);
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link com.google.android.exoplayer.upstream.HttpDataSource.InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
    this(client, userAgent, contentTypePredicate, listener, null);
}
项目:luxunPro    文件:OkHttpDataSource.java   
/**
 * @param client An {@link OkHttpClient} for use by the source.
 * @param userAgent The User-Agent string that should be used.
 * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
 *     predicate then a
 *     {@link InvalidContentTypeException} is
 *     thrown from {@link #open(DataSpec)}.
 * @param listener An optional listener.
 */
public OkHttpDataSource(OkHttpClient client, String userAgent,
                        Predicate<String> contentTypePredicate, TransferListener listener) {
    this(client, userAgent, contentTypePredicate, listener, null);
}
项目:exoplayer-textureview    文件:DataSourceCreator.java   
DataSource create(Context context, TransferListener listener, String userAgent);