1667 Commits

Author SHA1 Message Date
aquilescanta
45d5d308b4 Add transport error indicator support to TsExtractor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132307448
2016-09-08 16:29:48 +01:00
[]inger
7c48028fe7 Add support to render video onto a TextureView with SimpleExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132306954
2016-09-08 16:29:48 +01:00
aquilescanta
12b7bbf803 Improve HLS master playlist parsing
Adds a few unused fields to HlsUrl and moves things towards the Hls
reimplementation we are looking for. Also fixes a bug related to
asuming every getNextChunk().loadable == null being related to
reaching the live edge.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132305206
2016-09-08 16:29:48 +01:00
olly
5f39b93d30 Properly release sample streams for DASH
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132301223
2016-09-08 16:29:48 +01:00
olly
e296d10c3f Start moving ExoPlayerImpl to use windows not periods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132248872
2016-09-08 16:29:48 +01:00
aquilescanta
32867217a3 Improve profile/level check support for AVC
Issue:#1772

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132078273
2016-09-08 16:29:48 +01:00
Santiago Seifert
520e6caa60 Fixed style things from pull request 2016-09-08 12:59:21 +01:00
Sergio Moreno Mozota
e2722dee39 TsExtractor support for language code in the audio tracks. 2016-09-07 07:43:23 +02:00
olly
f8c05ebd93 Better selection of default start position for live
If the live window has a small duration, we currently
end up setting the default start position to be right
at the start of the window. This increases the chance
of a BehindLiveWindowException.

With this change we impose a minimum 5s gap between
the start of the window and the default start position.
If the window is *really* small (<10s) then doing this
would push the default start position too close to the
end of the window. We don't have much time to play with
in either direction in this case, so we put the default
start position in the middle of the window and hope for
the best.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132054802
2016-09-02 16:20:44 +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
olly
884bcb649e Support looping with LoopingMediaSource
Now you can do cool things (if you really want to!) like
play a video twice, then play a second video, then loop
the whole thing, all seamlessly.

new LoopingMediaSource(
  new LoopingMediaSource(firstVideoSource, 2),
  secondVideoSource));

You can also just loop, which is probably more useful :).

Issue: #490

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132049599
2016-09-02 16:19:27 +01:00
aquilescanta
fa500791c5 Rename Variant to HlsUrl and move into HlsMasterPlaylist
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132049545
2016-09-02 16:18:47 +01:00
olly
bd76ec8b13 Support duplicate entries in ConcatenatingMediaSource
People will inevitably try and do it, and it's pretty
easy to handle properly, so why not...

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132047019
2016-09-02 16:18:04 +01:00
olly
d48bf94145 MergingMediaSource fixes
- Don't send a timeline to the listener until all children
  have reported their timelines.
- Propagate a proper merge error if merging fails.
- The PlayerActivity hack is necessary due to the way Andorid's
  MediaController widget attaches to the window :(. It'll go
  away once we get our own player controls.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131958169
2016-09-02 16:17:23 +01:00
aquilescanta
a964da7922 Add support for PATs spread across multiple packets
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131946543
2016-09-02 16:16:41 +01:00
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
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
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
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
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
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
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
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