
- Move nearly all logic onto the calling thread (i.e. the thread calling open/read/close), to make threading correctness more obvious. - Document which variables are read/written from which thread, and why the call sequences are safe. - Fix thread safety issue that I think could probably cause data corruption in the case of a read timeout followed by another request into the DataSource. Also: - Relaxed content length checking to be consistent with the other http DataSource implementations, and avoided parsing the headers where they're not used. - Fixed missing generics in CronetDataSourceFactory. - Added TODO to work with servers that don't support partial range requests. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135702217
ExoPlayer OkHttp Extension
Description
The OkHttp Extension is an HttpDataSource implementation using Square's OkHttp.
Using the extension
The easiest way to use the extension is to add it as a gradle dependency. You
need to make sure you have the jcenter repository included in the build.gradle
file in the root of your project:
repositories {
jcenter()
}
Next, include the following in your module's build.gradle
file:
compile 'com.google.android.exoplayer:extension-okhttp:rX.X.X'
where rX.X.X
is the version, which must match the version of the ExoPlayer
library being used.