178 Commits

Author SHA1 Message Date
olly
2cf339e095 Bump version to 2.0.2 + document inclusion of OkHttp extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135260806
2016-10-05 21:20:34 +01:00
olly
1b90b7c12c Factor out common variables for publishing
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135215320
2016-10-05 18:07:13 +01:00
olly
b3c6f1caae Finish cleaning DataSource implementations.
- Enfroce read returns 0 if readLength==0 everywhere.
- Fixes and simplifications for CronetDataSource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135138232
2016-10-04 23:42:55 +01:00
olly
f8ed4cfdee Clean up some DataSource implementations
- Make read return 0 if readLength==0
- Return RESULT_END_OF_INPUT properly in the case that
  bytesRemaining is unset (this was broken previously,
  but only applies for assets > 2^31 bytes, so it's
  unlikely anyone ever hit this issue)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135136541
2016-10-04 23:42:20 +01:00
olly
7838a16dd8 Publish OkHttp extension to Bintray.
It'll be a TODO to clean up some of the commonality between
publishing this and the core library (e.g. the version number
should really be spec'd in one place only). Just getting this
submitted for now so that we don't lose track of how I created
https://bintray.com/google/exoplayer/extension-okhttp

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135102459
2016-10-04 23:41:36 +01:00
olly
eaf8218855 Fix shutter open/close behavior
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134389619
2016-09-28 11:26:12 +01:00
falhassen
f2cf086d76 Fix content length calculation for gzipped files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134011959
2016-09-28 11:25:34 +01:00
mgersh
e20d7034c7 Switch to Cronet 55_0_2860_0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133850026
2016-09-28 11:24:55 +01:00
olly
20757a1980 Update some documentation for V2 + Rm extra blank line
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132985566
2016-09-13 17:46:27 +01:00
olly
f2229d920b Move FlacJni to FlacDecoderJni
If/when we add the ability to query version information,
such methods will go into FlacLibrary for consistency with
the other extensions. The difference for Flac is that
since the decoder JNI is used by the extractor too, it
needs splitting into a separate from from FlacDecoder.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132904665
2016-09-13 17:44:55 +01:00
olly
de67fa5017 Allow replacement of libraries for Opus/Flac/Ffmpeg too
- Also make some of the naming more concise + misc style cleanup.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132899979
2016-09-13 17:44:10 +01:00
benm
45a5331e30 Add support to VP9 extension for overriding the native library names
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132874777
2016-09-13 17:40:41 +01:00
olly
04c28c6d7d Minimal change to fix seeking before prepare + finalize API
- This change fixes seeking before the prepare (or more
  accurately, before the timeline is set). The fix a minimal
  one to fix the behavior. It's inefficient compared to
  posting the pending seek onto the playback thread, which
  will be the long term solution.
- As of this change, I think we can call V2 "done". There are
  some loose ends to tie up, but the API is effectively
  finalized and the implementation is in a state where you
  can take it, use it and expect it to work.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132468107
2016-09-08 16:29:48 +01:00
benm
36df5bcd84 Fix a warning in libvpxJNI
v2/extensions/vp9/src/main/jni/vpx_jni.cc:63:31: warning: missing field 'w' initializer [-Wmissing-field-initializers]
  vpx_codec_dec_cfg_t cfg = {0};
                              ^

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132461351
2016-09-08 16:29:48 +01:00
eguven
06a644eccd DataSourceException: Used to specify a DataSource error.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132053698
2016-09-02 16:20:06 +01:00
eguven
860c6588c0 created DefaultHttpDataSourceFactory
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131931668
2016-09-02 16:15:18 +01:00
olly
a779eabdc5 Update SDK / Tools.
- Centralise compileSdkVersion, targetSdkVersion and
  buildToolsVersion in a single place for gradle.
- Bump compileSdkVersion and targetSdkVersion to 24.
- Bump com.android.tools.build version to re-enable
  instant start.
- Bump targetSdkVersion in manifests (needed for
  internal builds).
- Use standard expandable_list_item from Android in
  the demo app, since ours doesn't look right when
  targeting API level 24. We were also setting the
  theme on the wrong element in the manifest, so I'm
  removing that line.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131929216
2016-09-02 16:12:55 +01:00
olly
962b5940c2 Update ExoPlayer documentation + tweak method naming
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131843222
2016-09-02 16:08:45 +01:00
olly
9adce6b007 Make sure Cronet extension/tests are pushed to GitHub
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131825185
2016-09-02 16:08:00 +01:00
olly
1fbe62c662 Update Opus decoder, move init ouput buffer to native code
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131692317
2016-08-31 15:25:35 +01:00
cchiappini
4df63314d4 Create Cronet extension in v2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131393395
2016-08-31 15:25:31 +01:00
olly
5f1a2c71f0 Finalize V2 ExoPlayer API
There's still some internal to clean up to do, and in particular
it remains a TODO to be able to handle seek calls before the
timeline is set (for this CL, such calls are dropped). This change
does however finalize the API.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131171318
2016-08-31 15:25:25 +01:00
olly
94c908e89c Rename Window->MediaWindow, Timline->MediaTimeline
Window is potentially confusing with Android's Window class.
Once Window is renamed, it makes sense to rename Timeline too.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130938392
2016-08-31 15:25:24 +01:00
olly
1579b68cf6 Sanitize constants
- Use a single constant for unset/unknown times across
  all time bases. Note also that this moves away from
  use of -1 for unset/unknown times in ms, which was a
  bad choice (it might conflict with real times, such
  as a time representing being just behind the start
  of a live window).
- Add a few other unset constants, and use them.
- Fix some hardcoding of -1 where existing constants
  should have been used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130775594
2016-08-31 15:25:18 +01:00
olly
e35f9addaf Remove playWhenReadyCommitted.
This was always a bit of a hack; for Play Movies. It may well
no longer be necessary, and if not I'd like to think of a nicer
or more general way of doing it. We can always bring it back
if needed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130373433
2016-08-31 15:25:06 +01:00
olly
1a909fd163 Change SeekWindow -> Window, and add window duration.
- This avoids the need to have to use the timeline to
  calculate a window duration, which can be awkward.
- Window now represents a window of availability with
  an isSeekable flag, rather than a window of
  seekability.
- Promoted Timeline and Window to top package; they're
  pretty important :).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130278509
2016-08-31 15:25:06 +01:00
andrewlewis
23981a6fc4 Hide the shutter view when no video is being rendered.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129849825
2016-08-10 20:10:14 +01:00
andrewlewis
88bf1d0739 Expose the seekable window.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129747377
2016-08-10 20:07:56 +01:00
olly
5783272444 Fix missing generics
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129624395
2016-08-10 20:04:19 +01:00
olly
a7cb98d991 Pass source to TransferListener events
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129622239
2016-08-10 20:03:30 +01:00
olly
e26f72d454 Update @return to Returns where appropriate
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129201483
2016-08-08 11:16:33 +01:00
andrewlewis
8d122a101d Use new import ordering.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128967776
2016-08-08 11:06:48 +01:00
andrewlewis
f89e170054 Remove --disable-vp10 from vp9 extension configuration.
The option was removed in
67edc5e83b%5E%21/#F2.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128801977
2016-08-08 11:05:29 +01:00
olly
242bdffc80 Fix a few warnings.
- Suppress spurious resource type warnings.
- Make AS happy by making private method non-final.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128584391
2016-07-28 20:04:40 +01:00
olly
ac59bde2be Fix up a bunch more Javadoc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128565942
2016-07-28 20:04:40 +01:00
andrewlewis
d657360341 Expose period information from MediaSources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128357449
2016-07-28 19:39:07 +01:00
mishragaurav
1624135c20 Parse widevine tag in manifest for secure decryption.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128345063
2016-07-28 19:37:12 +01:00
olly
ba0a4235a0 Consistent Javadoc for text package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128160177
2016-07-22 22:41:36 +01:00
eguven
0909446133 Don't let renderer input buffer get too big if codec not available.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128082468
2016-07-22 22:41:36 +01:00
olly
5360ddc519 Allow injection of custom FormatEvaluators
This was possible previously, but now we support things
like multi-period DASH we need to do the injection in
the form of factories rather than concrete instances.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127735816
2016-07-22 22:20:32 +01:00
olly
e7d95aff34 Update Renderer documentation
- Cleaned up documentation
- Removed getIndex from Renderer interface
- Renamed reset to be positionReset

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127731006
2016-07-22 22:19:56 +01:00
olly
dcc1ac56df Make Renderer an interface
In V1 we received complaints that Renderer was too locked down.
In particular, it wasn't possible to implement a Renderer that
wrapped another Renderer, since most of the methods were package
private and final (e.g. enable).

This change defines Renderer as a proper interface, removing
this limitation. A method-reordering-only change will follow
this one, to get things into a nice consistent/sane order in
each of the Renderer classes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127527995
2016-07-15 18:19:23 +01:00
olly
2d8b51a709 Convert extractor factory classes to static final objects
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127415273
2016-07-15 18:16:18 +01:00
olly
f758082d40 Big (and hopefully near-final) rename.
1. Rename "extensions" package to "decoder". It's used by both
   text and (should be used by) metadata, so it's no longer just
   for extensions.
2. Move Buffer objects move into the decoder package.
3. Rename SubtitleParser and MetadataParser to SubtitleDecoder
   and MetadataDecoder respectively, since they extend Decoder.
   Ditto for all subclasses.
4. Subtitle and Metadata decoders now throw their own exception
   types rather than ParserException.
5. Move MediaCodec classes into a mediacodec package, with the
   exception of the concrete audio and video renderers.
6. Create an audio package to hold the two audio renderer classes
   plus related util classes.
7. Create a video package to hold the one video renderer class
   plus related util classes.

After this change the following nice properties hold:

1. Want a video renderer? Look in the video package. Ditto for
   audio, text and metadata.
2. All TrackRenderer implementations use a decoder of some kind
   to decode buffers received from the source, so we have
   consistent terminology there.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127326805
2016-07-15 18:14:55 +01:00
olly
62ebcaf853 Remove unnecessary res placeholder files
I think these were needed for Eclipse only.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127232262
2016-07-15 18:11:05 +01:00
vigneshv
6b4918fa9b vp9: Expose libvpx build configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127216536
2016-07-15 18:09:49 +01:00
olly
d4d1640808 Use extension rather than composition for track selection
It doesn't look like TrackSelectionPolicy is going to be
useful other than with DefaultTrackSelector, and it's kinda
confusing dealing with both "selector" and "policy"
terminology. This change does the following:

DefaultTrackSelector -> selector.MappingTrackSelector
DefaultTrackSelectionPolicy -> selector.DefaultTrackSelector
TrackSelectionPolicy -> [deleted]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127196326
2016-07-15 18:08:36 +01:00
olly
de27b2e043 TrackStream -> source.SampleStream
Also addded result constants to C to remove the dependency
on TrackStream from extractor.DefaultTrackOutput.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127192488
2016-07-15 18:06:48 +01:00
olly
4e86c55361 Introduce source package for sources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127073630
2016-07-15 18:02:31 +01:00
andrewlewis
b8fef7bf99 Delete Eclipse .cproject files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127073328
2016-07-15 18:01:51 +01:00