From d4c45861f49c943836f8bae6300358bee34a32ad Mon Sep 17 00:00:00 2001 From: olly Date: Mon, 7 Aug 2017 01:51:26 -0700 Subject: [PATCH] Clean up extension READMEs Issue: #1157 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=164434768 --- extensions/cronet/README.md | 33 ++++++++++++++++++++++++++----- extensions/ffmpeg/README.md | 2 +- extensions/flac/README.md | 6 +++--- extensions/gvr/README.md | 2 +- extensions/mediasession/README.md | 4 ++-- extensions/okhttp/README.md | 29 +++++++++++++++++++++++++-- extensions/opus/README.md | 6 +++--- extensions/rtmp/README.md | 4 ++-- extensions/vp9/README.md | 6 +++--- 9 files changed, 70 insertions(+), 22 deletions(-) diff --git a/extensions/cronet/README.md b/extensions/cronet/README.md index 30409fa99e..2287c4c19b 100644 --- a/extensions/cronet/README.md +++ b/extensions/cronet/README.md @@ -1,15 +1,13 @@ -# ExoPlayer Cronet Extension # +# ExoPlayer Cronet extension # ## Description ## -[Cronet][] is Chromium's Networking stack packaged as a library. - -The Cronet Extension is an [HttpDataSource][] implementation using [Cronet][]. +The Cronet extension is an [HttpDataSource][] implementation using [Cronet][]. [HttpDataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer/upstream/HttpDataSource.html [Cronet]: https://chromium.googlesource.com/chromium/src/+/master/components/cronet?autodive=0%2F%2F -## Build Instructions ## +## Build instructions ## To use this extension you need to clone the ExoPlayer repository and depend on its modules locally. Instructions for doing this can be found in ExoPlayer's @@ -33,3 +31,28 @@ gradle.ext.exoplayerIncludeCronetExtension = true; [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md [here]: https://console.cloud.google.com/storage/browser/chromium-cronet/android + +## Using the extension ## + +ExoPlayer requests data through `DataSource` instances. These instances are +either instantiated and injected from application code, or obtained from +instances of `DataSource.Factory` that are instantiated and injected from +application code. + +If your application only needs to play http(s) content, using the Cronet +extension is as simple as updating any `DataSource`s and `DataSource.Factory` +instantiations in your application code to use `CronetDataSource` and +`CronetDataSourceFactory` respectively. If your application also needs to play +non-http(s) content such as local files, use +``` +new DefaultDataSource( + ... + new CronetDataSource(...) /* baseDataSource argument */); +``` +and +``` +new DefaultDataSourceFactory( + ... + new CronetDataSourceFactory(...) /* baseDataSourceFactory argument */); +``` +respectively. diff --git a/extensions/ffmpeg/README.md b/extensions/ffmpeg/README.md index ab3e5ffb94..b4514effbc 100644 --- a/extensions/ffmpeg/README.md +++ b/extensions/ffmpeg/README.md @@ -1,4 +1,4 @@ -# FfmpegAudioRenderer # +# ExoPlayer FFmpeg extension # ## Description ## diff --git a/extensions/flac/README.md b/extensions/flac/README.md index a35dac7858..9db2e5727d 100644 --- a/extensions/flac/README.md +++ b/extensions/flac/README.md @@ -1,14 +1,14 @@ -# ExoPlayer Flac Extension # +# ExoPlayer Flac extension # ## Description ## -The Flac Extension is a [Renderer][] implementation that helps you bundle +The Flac extension is a [Renderer][] implementation that helps you bundle libFLAC (the Flac decoding library) into your app and use it along with ExoPlayer to play Flac audio on Android devices. [Renderer]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/Renderer.html -## Build Instructions ## +## Build instructions ## To use this extension you need to clone the ExoPlayer repository and depend on its modules locally. Instructions for doing this can be found in ExoPlayer's diff --git a/extensions/gvr/README.md b/extensions/gvr/README.md index ad28569121..7e072d070c 100644 --- a/extensions/gvr/README.md +++ b/extensions/gvr/README.md @@ -1,4 +1,4 @@ -# ExoPlayer GVR Extension # +# ExoPlayer GVR extension # ## Description ## diff --git a/extensions/mediasession/README.md b/extensions/mediasession/README.md index 7515cf9eef..3acf8e4c79 100644 --- a/extensions/mediasession/README.md +++ b/extensions/mediasession/README.md @@ -1,8 +1,8 @@ -# ExoPlayer MediaSession Extension # +# ExoPlayer MediaSession extension # ## Description ## -The MediaSession Extension mediates between an ExoPlayer instance and a +The MediaSession extension mediates between an ExoPlayer instance and a [MediaSession][]. It automatically retrieves and implements playback actions and syncs the player state with the state of the media session. The behaviour can be extended to support other playback and custom actions. diff --git a/extensions/okhttp/README.md b/extensions/okhttp/README.md index 52d5fabf38..b10c4ba629 100644 --- a/extensions/okhttp/README.md +++ b/extensions/okhttp/README.md @@ -1,8 +1,8 @@ -# ExoPlayer OkHttp Extension # +# ExoPlayer OkHttp extension # ## Description ## -The OkHttp Extension is an [HttpDataSource][] implementation using Square's +The OkHttp extension is an [HttpDataSource][] implementation using Square's [OkHttp][]. [HttpDataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html @@ -24,3 +24,28 @@ locally. Instructions for doing this can be found in ExoPlayer's [top level README][]. [top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md + +## Using the extension ## + +ExoPlayer requests data through `DataSource` instances. These instances are +either instantiated and injected from application code, or obtained from +instances of `DataSource.Factory` that are instantiated and injected from +application code. + +If your application only needs to play http(s) content, using the OkHttp +extension is as simple as updating any `DataSource`s and `DataSource.Factory` +instantiations in your application code to use `OkHttpDataSource` and +`OkHttpDataSourceFactory` respectively. If your application also needs to play +non-http(s) content such as local files, use +``` +new DefaultDataSource( + ... + new OkHttpDataSource(...) /* baseDataSource argument */); +``` +and +``` +new DefaultDataSourceFactory( + ... + new OkHttpDataSourceFactory(...) /* baseDataSourceFactory argument */); +``` +respectively. diff --git a/extensions/opus/README.md b/extensions/opus/README.md index ae42a9c310..e5f5bcb168 100644 --- a/extensions/opus/README.md +++ b/extensions/opus/README.md @@ -1,14 +1,14 @@ -# ExoPlayer Opus Extension # +# ExoPlayer Opus extension # ## Description ## -The Opus Extension is a [Renderer][] implementation that helps you bundle +The Opus extension is a [Renderer][] implementation that helps you bundle libopus (the Opus decoding library) into your app and use it along with ExoPlayer to play Opus audio on Android devices. [Renderer]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/Renderer.html -## Build Instructions ## +## Build instructions ## To use this extension you need to clone the ExoPlayer repository and depend on its modules locally. Instructions for doing this can be found in ExoPlayer's diff --git a/extensions/rtmp/README.md b/extensions/rtmp/README.md index 2cfa6b8ff4..042d7078dc 100644 --- a/extensions/rtmp/README.md +++ b/extensions/rtmp/README.md @@ -1,8 +1,8 @@ -# ExoPlayer RTMP Extension # +# ExoPlayer RTMP extension # ## Description ## -The RTMP Extension is a [DataSource][] implementation for playing [RTMP][] +The RTMP extension is a [DataSource][] implementation for playing [RTMP][] streams using [LibRtmp Client for Android][]. [DataSource]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/upstream/DataSource.html diff --git a/extensions/vp9/README.md b/extensions/vp9/README.md index 8bdfe652e6..87c5c8d54f 100644 --- a/extensions/vp9/README.md +++ b/extensions/vp9/README.md @@ -1,14 +1,14 @@ -# ExoPlayer VP9 Extension # +# ExoPlayer VP9 extension # ## Description ## -The VP9 Extension is a [Renderer][] implementation that helps you bundle libvpx +The VP9 extension is a [Renderer][] implementation that helps you bundle libvpx (the VP9 decoding library) into your app and use it along with ExoPlayer to play VP9 video on Android devices. [Renderer]: https://google.github.io/ExoPlayer/doc/reference/com/google/android/exoplayer2/Renderer.html -## Build Instructions ## +## Build instructions ## To use this extension you need to clone the ExoPlayer repository and depend on its modules locally. Instructions for doing this can be found in ExoPlayer's