20289 Commits

Author SHA1 Message Date
cdrolle
d9421f4fb9 Fixed issue when VOD-style period is present in a dynamic manifest
A VOD-style period in a dynamic manifest would result in a NullPointerException.
Also fix another issue in which an unrecognized mime type would also result in
NullPointerException.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138075137
2016-11-10 21:13:28 +00:00
aquilescanta
aaf38adc26 Add support for HLS live seeking
In order to expose the live window, it is necessary (unlike before) to refresh
the live playlists being played periodically so as to know where the user can
seek to. For this, the HlsPlaylistTracker is added, which is basically a map
from HlsUrl's to playlist. One of the playlists involved in the playback will
be chosen to define the live window. The playlist tracker it periodically.
The rest of the playilst will be loaded lazily. N.B: This means that for VOD,
playlists are not refreshed at all. There are three important features missing
in this CL(that will be added in later CLs):

* Blacklisting HlsUrls that point to resources that return 4xx response codes.
    As per [Internal: b/18948961].
* Allow loaded chunks to feed timestamps back to the tracker, to fix any
    drifting in live playlists.
* Dinamically choose the HlsUrl that points to the playlist that defines the
    live window.

Other features:
--------------

The tracker can also be used for keeping track of discontinuities. In the case
of single variant playlists, this is particularly useful. Might also work if
there is a that the live playlists are aligned (but this is more like working
around the issue, than actually solving it). For this, see [Internal: b/32166568]
and [Internal: b/28985320].

Issue:#87

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138054302
2016-11-10 20:54:03 +00:00
olly
7b3690a0a6 Fix onLoad* event media times for multi-period case
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137932100
2016-11-10 20:53:20 +00:00
olly
488c2d8270 Fixes for Issue #1962
- Use A/V tracks only for buffering position when available
  in ExtractorMediaPeriod.
- Fix layering of exo_simple_player_view so that subtitles
  are above album art. The test stream provided has both.
- Make album art in SimpleExoPlayer view respect the resize
  mode, like we do for video.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137698473
2016-10-31 19:49:54 +00:00
aquilescanta
daf7b948a1 Fix buffering state when selecting VTT track with no cues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137697023
2016-10-31 19:49:54 +00:00
olly
ee969b738e Load all exolist.json asset files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137406773
2016-10-31 19:49:42 +00:00
andrewlewis
70cc98bb99 Fix broken log call
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137392736
2016-10-31 19:49:28 +00:00
ojw28
ced03e9ad5 Merge pull request #2008 from google/dev-v2-id3
Merge ID3 support into dev-v2
2016-10-27 15:05:06 +01:00
Oliver Woodman
c4b4e84579 Add artwork support to SimpleExoPlayerView + misc improvements 2016-10-27 12:47:26 +01:00
Oliver Woodman
0c8f3c7270 Merge branch 'dev-v2' into dev-v2-id3 2016-10-27 12:37:29 +01:00
Oliver Woodman
8a89abcbf1 Merge branch 'dev-v2-id3' into dev-v2 2016-10-27 12:37:22 +01:00
olly
2c54363204 Report track groups and selections through ExoPlayer
TrackSelector no longer has a listener. Instead, tracks
change events are reported through ExoPlayer.EventListener.
Applications interested in retrieving the selection info
should retrieve it directly from the TrackSelector by
calling an exposed getter.

Pretty sure the ref'd issue is fixed as a side effect of
this change.

Issue: #1942

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137183073
2016-10-27 12:27:55 +01:00
aquilescanta
0b8e9754ca Pass initialization parameters to section readers
Unlike with PesReaders, sections don't have a standard way
of providing timestmaps or even generating tracks. We need
to pass this information so that readers decide what to do
with it.

Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137162494
2016-10-27 12:27:21 +01:00
aquilescanta
1809836c21 Provide a method for creating a reader for a particular PID
This allows the user to create section readers(usually) for reserved pids,
like SDT, EIT, CAT, etc.

Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137150853
2016-10-27 12:26:32 +01:00
[]inger
8b3025d450 Make control view layout resource customizable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137145209
2016-10-27 12:25:52 +01:00
andrewlewis
ba6368a07a Don't try to access the caption manager when in edit mode.
Issue: #1991

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137131819
2016-10-27 12:25:10 +01:00
Oliver Woodman
8caaf0b5d9 Big cleanup of mp4 metadata extraction 2016-10-26 23:45:50 +01:00
Oliver Woodman
1b39d21ed4 Fix indentation and missing javadoc 2016-10-24 19:22:41 +01:00
Oliver Woodman
6dbce88102 Merge branch 'dev-v2-id3' of persistent-https://github.com/google/ExoPlayer into dev-v2-id3 2016-10-24 18:50:35 +01:00
Oliver Woodman
929620c189 Merge branch 'dev-v2' into dev-v2-id3 2016-10-24 18:49:43 +01:00
olly
99503e6e3a Fix playback of OGG with only a single payload page
Issue: #1976

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137044583
2016-10-24 18:43:49 +01:00
olly
5c83c28a1f Blacklist another non-OMX decoder
Issue: #1986

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137035576
2016-10-24 18:43:15 +01:00
olly
790e5fd2a1 Update gradle wrapper
Code coverage is disabled in V2 to workaround
https://code.google.com/p/android/issues/detail?id=226070

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137032839
2016-10-24 18:42:37 +01:00
olly
819ebf703a Assign track type TEXT for CEA708
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137011920
2016-10-24 18:42:02 +01:00
Oliver Woodman
00f9fc6728 Don't propagate GaplessInfoHolder when parsing mp4 metadata 2016-10-24 18:01:48 +01:00
aquilescanta
6e69b98517 Avoid throwing an exception when an ID3 header is not found
Issue:#1966

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136836332
2016-10-24 11:44:49 +01:00
aquilescanta
eeb37d73e7 Create the SectionPayloadReader interface
SectionPayloadReaders are provided to a SectionReader to
get whole sections(crc checked). This allows the injection
of custom section readers. E.G: SCTE35 messages.

Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136816612
2016-10-24 11:44:49 +01:00
andrewlewis
a0fe258e8d Fix/suppress some analysis warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136710546
2016-10-24 11:44:49 +01:00
aquilescanta
862552c2ed Convert ElementaryStreamReaderFactory into TsPayloadReaderFactory
In this CL:

* PesReader moves out of TsExtractor and becomes public.
* ElementaryStreamReaderFactory becomes TsPayloadReaderFactory and is
    moved to TsPayloadReader.
* The TsPayloadReaderFactory is in charge of wrapping any
    ElementaryStreamReaders with a PesReader.

Incoming:
* Extract SectionReader supperclass (analog to PesReader, but for
    sections) from Pat and Pmt readers.
* Add a ScteReader, wrapped by a section reader, and include it in
    the DefaultTsPayloadReaderFactory.

Issue:#726

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136707706
2016-10-24 11:44:49 +01:00
olly
0cff74dc70 Clean up okhttp extension Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136702598
2016-10-24 11:41:52 +01:00
Santiago Seifert
e4bafd964d Merge pull request #1979 from vitekn/dev-v2
Fix NPE in TsExtractor when ElementaryStreamReaderFactory returns null
2016-10-21 11:45:21 +01:00
vitekn
b2222f8cb7 Null pointer exception fixed
pesPayloadReader can be null here because DefaultStreamReader.init() can return null on unknown streamId. If we have a junk transport stream in our content an exception will be thrown.
2016-10-21 13:07:08 +03:00
ojw28
6673483aca Merge pull request #1971 from google/dev-v2
Update dev-v2-id3
2016-10-20 12:43:38 +01:00
ojw28
d79f8f64de Merge pull request #1970 from google/dev-v2-r2.0.4
r2.0.4
2016-10-20 12:33:44 +01:00
olly
c7824c4660 Bump version to r2.0.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136697697
2016-10-20 12:22:46 +01:00
aquilescanta
8e0e0ca0dd Fix NPE when trying to play H265 in Ts files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136607848
2016-10-20 12:22:25 +01:00
Oliver Woodman
924a041743 Merge branch 'dev-v2' of persistent-https://github.com/google/ExoPlayer into dev-v2 2016-10-20 12:20:45 +01:00
olly
f56b05f0d7 Bump version to r2.0.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136697697
2016-10-20 12:20:10 +01:00
aquilescanta
bebbf29a78 Fix NPE when trying to play H265 in Ts files
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136607848
2016-10-20 12:20:10 +01:00
Oliver Woodman
aa660acf03 Fix typo in comments 2016-10-20 12:00:35 +01:00
olly
75b0075340 Add explicit TargetApi annotation to remove lint error
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136597149
2016-10-20 11:43:45 +01:00
olly
0d679dad0d Fix use of API level 19 method
Issue: #1965

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136595233
2016-10-20 11:43:16 +01:00
Oliver Woodman
3e3248d712 Yet more misc ID3 improvements 2016-10-19 17:18:17 +01:00
olly
586e6257cd Add explicit TargetApi annotation to remove lint error
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136597149
2016-10-19 17:00:33 +01:00
olly
3a5cb43541 Fix use of API level 19 method
Issue: #1965

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136595233
2016-10-19 17:00:33 +01:00
olly
aa1002a0d6 Rollback "Add REQUIRE_HTTPS flag"
*** Reason for rollback ***

Flag doesn't enforce what it says it enforces, due to redirects

*** Original change description ***

Add REQUIRE_HTTPS flag

Note that it's not possible for the library to enforce that
the flag is adhered to, since it's possible for applications
to inject custom implementations of DataSource (there's no
requirement they even extend HttpDataSource for network
requesting implementations). It's possible for applications
to replace pretty much anything in the library, so there's
no other place we could put the flag where we could make
this guarantee. Hence this is a best-effort that will work
when...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136583459
2016-10-19 17:00:03 +01:00
aquilescanta
aecbbdd36c Replace IndexOutOfBounds Exception for BehindLiveWindowException
This is a problem when two invocations of getNextChunk that retrieve
chunks (i.e. not playlists) occur too apart in time. In that case
the last loaded chunk has a media sequence that is behind the current
playlist.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136501291
2016-10-19 17:00:03 +01:00
olly
1cfc432bb8 Add REQUIRE_HTTPS flag
Note that it's not possible for the library to enforce that
the flag is adhered to, since it's possible for applications
to inject custom implementations of DataSource (there's no
requirement they even extend HttpDataSource for network
requesting implementations). It's possible for applications
to replace pretty much anything in the library, so there's
no other place we could put the flag where we could make
this guarantee. Hence this is a best-effort that will work
when using HttpDataSource implementations that we provide.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136500947
2016-10-19 17:00:03 +01:00
kapishnikov
d3f78e4808 Deprecate call to new UrlRequest.Builder(...)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136399474
2016-10-19 16:59:38 +01:00
eguven
06fb29c939 Support caching of multi segment DASH, HLS and Smooth Streaming.
Use sha1 of content uri if a custom cache key or content id isn't provided.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136351830
2016-10-19 16:58:09 +01:00