2074 Commits

Author SHA1 Message Date
aquilescanta
a671ebd019 Add live media playlist refresh requests when live edge is reached
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131931868
2016-09-02 16:16:01 +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
ceebb4c561 Fix incorrect index in DefaultAllocator.trim
This could cause us to "lose" allocations backed by an
initial block, meaning they became unavailable for use
despite still being allocated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131931465
2016-09-02 16:14:35 +01:00
olly
894376fbe6 Fix third_party Android Studio / Gradle config
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131931329
2016-09-02 16:13:41 +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
c5114575fe Fix demo app when built using ASWB
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131853683
2016-09-02 16:09:31 +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
aquilescanta
50527c0a7d Add profile/level check support for AVC
Issue:#1772

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131812670
2016-08-31 15:26:02 +01:00
olly
d65feb682b Make public util method to get physical display size
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131810070
2016-08-31 15:26:02 +01:00
aquilescanta
f0c0b3efbf Decouple HlsSampleStream from HlsSampleStreamWrapper
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131731376
2016-08-31 15:26:02 +01:00
olly
797cd46e89 Detailed Javadoc for Timeline, Period and Window
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131715194
2016-08-31 15:26:02 +01:00
eguven
b88a5e1b12 Fix generateReleaseJavadoc "unmappable character for encoding ASCII" error.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131714051
2016-08-31 15:26:02 +01:00
eguven
bd7be1b5e7 Cache support unbounded requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131696858
2016-08-31 15:26:02 +01:00
olly
dfad7451ca Rename media samples asset
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131693969
2016-08-31 15:25:35 +01:00
olly
98919fe709 Add ExoMediaDrm/ExoMediaCrypto to V2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131693379
2016-08-31 15:25:35 +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
sharjeel
cf363f9e97 PSSH in MOOF support in Exo V2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131534334
2016-08-31 15:25:35 +01:00
olly
f8311a48ed Add some convenience constructors for Cronet in V2
- The need to pass a Clock is pretty much only for testing, so
  make the constructor that takes one package private + use
  the system clock for public constructors.
- Add default timeout values.
- Also make sure we set Content-Type in all license requests,
  since when using Cronet the stack requires it to be set.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131404298
2016-08-31 15:25:35 +01:00
aquilescanta
4f670addd2 Add support for AC-3 streams in HLS
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131398594
2016-08-31 15:25:35 +01:00
aquilescanta
e48462d564 Add codecs argument to createContainerFormat
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131398162
2016-08-31 15:25:35 +01:00
aquilescanta
d72e26ff35 Add CRC check for PMT
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131394778
2016-08-31 15:25:31 +01:00
aquilescanta
6528aef2bb Add automatic E-AC-3 detection to the Ac3Reader
This is done through the bitstream id field and allows removing
the isEac3 parameter from the constructor.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131393477
2016-08-31 15:25:31 +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
b53fa245ce Fix ID3 EOS detection for two-byte encodings
Issue: #1774

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131389528
2016-08-31 15:25:31 +01:00
aquilescanta
09c58004dc Add an AC3 bitstream extractor
Defined in ATSC Standard: Digital Audio Compression (AC-3, E-AC-3).
Link: http://atsc.org/wp-content/uploads/2015/03/A52-201212-17.pdf.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131294260
2016-08-31 15:25:31 +01:00
aquilescanta
af2b8fb7a6 Add CRC32 check for PAT section
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131294029
2016-08-31 15:25:25 +01:00
eguven
b6b6a3cbc3 Merge build*DataSourceFactory methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131291816
2016-08-31 15:25:25 +01:00
eguven
8b3f489bc9 Tweak Demo app code to facilitate overriding Application methods and change the used DataSourceFactory.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131288634
2016-08-31 15:25:25 +01:00
olly
0b6a93b468 Workaround missing data offsets in FMP4
If they're omitted, it's reasonable to assume it's because
they were uninteresting (i.e. sample data always tightly
packed at the start of the mdat). This is an issue for some
SmoothStreaming streams.

We actually already play such streams successfully, but
that's only due to another bug to be fixed in a following CL.
The same is true for V1, but given the low impact nature,
the fix will be V2 only.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131191975
2016-08-31 15:25:25 +01:00
olly
abaa4f1aad Don't update currentTrackBundle until end of block
If currentTrackBundle is updated at the start of the
block and then something goes wrong in the middle (e.g.
one of the skipFully calls) then the extractor wont
resume from the correct place.

This would be caught by our extractor tests if we had
a test sample that requires skipping to the sample data.
I'll try and construct one of those.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131191174
2016-08-31 15:25:25 +01:00
olly
42efb5413a SmoothStreaming fixes
- The -1 needs to be a 0. My bad.
- Create AAC CSD if not defined in manifest, like in V1.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131190995
2016-08-31 15:25:25 +01:00
aquilescanta
fd3d7be9c0 Fix data_offset not present bug in FragmentedMp4Extractor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131183033
2016-08-31 15:25:25 +01:00
olly
ef7dd697b1 Fix ContentDataSource handling of AssetFileDescriptor
Also tweak how the null checks happen in a few DataSource
implementations (should be no-op changes, but allow you
to look at close() and be happy it does the right thing
without having to loop at the open() implementations).

Issue: #1759

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131172427
2016-08-31 15:25:25 +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
298464ebe7 Fix broken documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131164881
2016-08-31 15:25:25 +01:00
andrewlewis
85915f2ac1 Fix live window calculation and transition from VOD.
Fix the calculation of the seek window for multi-period DASH.

Snap the default initial position back to the start of its segment, to ensure
that the first sample provided when transitioning to a DASH live source is a
key-frame.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131052912
2016-08-31 15:25:25 +01:00
olly
458c7bfc05 Simplify ExoPlayerImplInternal
- Remove playingPeriodEndPositionUs. It doesn't look like it's
  required.
- Rename time variables to make it clearer what they are.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131027164
2016-08-31 15:25:24 +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
fb55254f90 Fix a bunch more Javadoc
Also inline a few methods/classes where they can be made
private and therefore be removed from the public API.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130935090
2016-08-31 15:25:24 +01:00
eguven
e003c5b6dc Javadoc for FakeExtractorOutput.assertOutput()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130933435
2016-08-31 15:25:24 +01:00
aquilescanta
abdb8ddb6e Remove 1 track per type limitation in TsExtractor
Mainly, this allows the extractor to expose multiple audio tracks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130928152
2016-08-31 15:25:18 +01:00
olly
d5607cfc47 Make Javadoc compile with Java8
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130922558
2016-08-31 15:25:18 +01:00
olly
9f1fc274c9 Add SimpleExoPlayer.getVolume API
Issue: #1754

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130780466
2016-08-31 15:25:18 +01:00
olly
2c84f016fe Parse and expose proj and st3d/stereo_mode
As described in:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130776689
2016-08-31 15:25:18 +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
andrewlewis
725337dab3 Fix VOD to live transitions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130755346
2016-08-31 15:25:18 +01:00
olly
f2ee7ef07b Fix formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130662159
2016-08-31 15:25:18 +01:00
olly
83e466d129 Toward API finalization
- Remove getNewPlayingPeriodIndex from MediaSource
- Remove all absolute references to period indices from
  Window. Their existence prevents ConcatenatingMediaSource
  from being able to efficiently handle children with
  large numbers of entries (e.g. a cursor backed source),
  since it would copy all windows into its merged timeline.
- Fix ExoPlayerImplInternal to attempt a restart in the
  case that the loading (but not yet prepared) period is
  removed, in absence of a playing period.
- Implement logic for finding the "next" period in the old
  timeline when attempting a retry.

Removing some of the nasty US<->MS conversions left as a
virtual TODO.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130659973
2016-08-31 15:25:18 +01:00
andrewlewis
eff82e920e Fix DASH multi-period transitions and manifest updates.
Period transitions can either be to new windows (in which case the default
position for the new window should be loaded) or to the next period of the
current window (in which case the the new period should be played from zero).
Fix the logic for calculating the new period index to load to implement this.

In processManifest, periodsById may contain periods that have been removed from
the manifest, which are still being used by the player (it releases periods on
receiving the source info refresh after processManifest returns). Ignore
periods that have been removed from the manifest when calling updateManifest.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130626441
2016-08-31 15:25:18 +01:00