2514 Commits

Author SHA1 Message Date
olly
e56cf49038 Fix BuildConfig generation for internal builds
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140210128
2016-11-25 20:18:32 +00:00
aquilescanta
c3c176d93c Move HLS extractor construction to HlsMediaChunk
This allows ID3 PRIV timestamp extraction and Extractor Sniffing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140209568
2016-11-25 20:18:32 +00:00
olly
2e3ffe1e94 Assume support for vertical video if rotated resolution supported
Issue: #2034

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140209306
2016-11-25 20:18:32 +00:00
olly
ee9b7be2fa Fix issue with seeking before timeline available
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140204054
2016-11-25 20:18:32 +00:00
andrewlewis
76c58a34d3 Clarify createPeriod javadoc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140202942
2016-11-25 20:18:32 +00:00
aquilescanta
9c612f94c5 Chose timestamp adjustment master based on track selection
Select the timestamp master depending on track availability. If
a variant is being loaded, then that is the timestmap master.
Otherwise, if an audio track is being loaded, then the responsible
chunk source is the timestmap master. If no variant or audio
rendition is enabled, then a subtitle chunk source is selected as
timestamp master. This CL will become specially relevant once
ID3 PRIV timestamps are used for audio renditions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140201385
2016-11-25 20:18:32 +00:00
olly
ce9ec79e59 Make Timeline always non-null from ExoPlayer
Note that we still have null timelines in ExoPlayerImplInternal.
This is deliberate; and is likely necessary to distinguish between
the no-timeline-yet and timeline-is-empty cases (we want to try
and process a pending seek for the latter, but not the former).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140200980
2016-11-25 20:18:32 +00:00
aquilescanta
97a23ce572 Fix main thread playlist refreshes in HlsPlaylistTracker
The refresh handler in HlsPlaylistTracker was being instantiated in the
same thread as the MediaSource (i.e. Main thread).

Issue:#2108

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140197553
2016-11-25 20:18:32 +00:00
olly
894ae1a310 Improve SimpleExoPlayer flexibility
- Allow extension and overriding of renderer creation.
  Several developers have asked for this, so that they
  can use their own renderers (typically extensions to
  the core ones) without losing the ability to use
  SimpleExoPlayer.
- Add option to not attempt extension renderer creation,
  for efficiency.
- Align build variants for internal and external demo
  apps. This is slightly unfortunate, but convergence
  seems necessary for useExtensionRenderers.
- Fix DASH playback tests to use the debug video
  renderer.

Issue #2102

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140140915
2016-11-25 20:18:32 +00:00
mgersh
cbf5988803 Switch to Cronet 56_0_2924_0
This is the second CL in the 3 CL process to switch Cronet versions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140074017
2016-11-25 20:18:32 +00:00
cchiappini
ba49f51380 Cronet README fix
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140043801
2016-11-25 20:18:32 +00:00
olly
62bdb1b93a Fix failure when a seek is performed with no enabled tracks
This issue affects ExtractorMediaSource only. We shouldn't
start loading in the case that we're prepared and have no
enabled tracks, since there's nothing that we need to load.
This was causing an assertion failure in startLoading.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140030650
2016-11-25 20:18:32 +00:00
aquilescanta
a7dff14d3c Keep TS packets with no continuity counter increase and no payload
This behavior is defined in ISO-13818-1, section 2.4.3.3(continuity_counter).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140029161
2016-11-25 20:18:32 +00:00
olly
eb62d00ea4 ExoPlayerImplInternal cleanup
- Fix handling of the currently playing period being
  removed. This didn't do the right thing at all.
- Relax rule on seekToPeriodPosition re-using an
  existing holder.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140014791
2016-11-25 20:18:32 +00:00
olly
b3726cf761 Support DASH multi-segment fetches
Note that multi-segment fetching is only possible in the
case that segments in a representation are defined to have
the same Uri and adjacent ranges (this is very rarely true
for live streams, but is quite often true for on-demand).
In the case that merging is requested but not possible,
the implementation will request one at a time.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140012443
2016-11-25 20:18:32 +00:00
eguven
b29ff0cf51 Make CacheDataSink use ReusableBufferedOutputStream
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140010664
2016-11-25 20:18:32 +00:00
eguven
fa3d129b14 Fix some of the issues pointed by android lint tool
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139915885
2016-11-25 20:18:32 +00:00
aquilescanta
6101450302 Merge initialization chunk into HlsMediaChunk
This will allow creating the extractor in the HlsMediaChunk.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139915713
2016-11-25 20:18:32 +00:00
aquilescanta
9ac7f64c84 Fix search to end of stream in HLS
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139905590
2016-11-25 20:18:32 +00:00
andrewlewis
77715fbfbe Fix some analysis warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139901449
2016-11-25 20:18:32 +00:00
eguven
e84fa5835d Use ReusableBufferedOutputStream for cache index file write operation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139889957
2016-11-25 20:18:32 +00:00
olly
42fadfe083 Allow SsMediaSource to take an optional SsManifest
Also allow custom SsManifestParser injection.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139813660
2016-11-25 20:18:32 +00:00
olly
81ce6bba7a Allow DashMediaSource to take an optional DashManifest
Also allow custom DashManifestParser injection, to
support parsing of custom elements and attributes that
service providers may wish to include in their manifests
(e.g. #2058).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139813108
2016-11-25 20:18:32 +00:00
ojw28
90e0919d09 Update ISSUE_TEMPLATE 2016-11-24 19:30:15 +00:00
ojw28
971bf768ff Update ISSUE_TEMPLATE 2016-11-24 19:29:15 +00:00
ojw28
a3ca5c48b3 Update ISSUE_TEMPLATE 2016-11-24 19:28:24 +00:00
olly
4f3ab7b22d ExoPlayerImplInternal: Some more minor cleanup
- This should be a no-op change
- Inline attemptRestart
- Clean up processing of pending seeks

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139804630
2016-11-21 19:15:13 +00:00
olly
9d7d8adc9c Allow changing of video scaling mode
Issue #2016

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139803888
2016-11-21 19:14:39 +00:00
olly
4846146827 Fix internal build to use new Cronet jars
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139803684
2016-11-21 19:14:06 +00:00
andrewlewis
ae0ac55b8d Add support for resetting the AudioTrack stream type.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139797714
2016-11-21 19:13:34 +00:00
olly
060ca4aecc ExoPlayerImplInternal cleanup
- Make handleSourceInfoRefreshed clearer.
- Remove bufferAheadPeriodCount. Seems error prone.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139774580
2016-11-21 19:13:02 +00:00
dsantoro
adc9dd1c75 Add null checks to closeQuietly calls.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139738429
2016-11-21 19:12:26 +00:00
ccwu
6dbfdecbe0 Let the mp4 extractor support "camm" metadata tracks.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139626848
2016-11-21 19:11:43 +00:00
olly
4a30dff524 Fix NPE in TextTrackRenderer
Issue: #2081

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139566990
2016-11-18 12:54:36 +00:00
aquilescanta
cafe603694 Allow regressing media sequence numbers in HLS media playlists
This is techically not allowed by the spec[1] but might still occur in
certain scenarios. New playlists with older media sequence numbers are
ignored.

[1]: HLS draft version 20, section-6.2.1

Issue:#2059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139564889
2016-11-18 12:54:03 +00:00
olly
d890c2f48f Fix infinite loop -> ANR at end of HLS playbacks
continueLoading shouldn't return true unless it's done
something. Always returning true if endOfStream was
causing CompositeSequenceableLoader.continueLoading to
loop forever.

It looks like the same issue exists in ChunkSampleStream
as well, although I can't seem to provoke DASH or SS
playbacks into doing anything bad as a result.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139559834
2016-11-18 12:53:24 +00:00
eguven
35054f8f7c Added ReusableBufferedOutputStream.
ReusableBufferedOutputStream is a subclass of BufferedOutputStream with a reset(OutputStream) that allows an instance to be re-used with another underlying output stream.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139505999
2016-11-18 12:52:46 +00:00
andrewlewis
1a62dad980 Remove TODO in ffmpeg extension README.md.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139453745
2016-11-18 12:52:05 +00:00
olly
f57434006f Fix potential NPE in ExoPlayerImplInternal
I'll have a more thorough refactor of some of this class
fairly soon!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139451693
2016-11-18 12:51:22 +00:00
olly
61c9c16954 Make sure we report video size after Surface is set
Issue: #2077

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139451511
2016-11-18 12:50:41 +00:00
eguven
051be5c588 Use buffers to speed up cache index file io.
Use BufferedOutputStream and BufferedInputStream while writing / reading.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139446039
2016-11-18 12:50:04 +00:00
aquilescanta
a8a2ef4a24 Blacklist HLS media playlists that return 4xx error codes
Issue:#87

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139443476
2016-11-18 12:49:24 +00:00
yutingtseng
2add12d5f7 Update CacheDataSink to optionally use a BufferedOutputStream for writing
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139381958
2016-11-18 12:48:41 +00:00
cblay
92d34cd877 Add flag to CacheDataSource to disable caching unset length requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139377417
2016-11-18 12:48:09 +00:00
aquilescanta
d6eb9cb79f Allow playlists of different size in HlsPlaylistTracker playlist adjustment
Issue:#2059

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139331670
2016-11-18 12:47:36 +00:00
andrewlewis
0effffb89f Add support for reading .mp3 boxes in stsd.
This is used by Quicktime for MP3 tracks.

Issue: #2066

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139209989
2016-11-18 12:47:02 +00:00
aquilescanta
21e3361dfe Move 3 private methods to the end of the class
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139204000
2016-11-18 12:46:31 +00:00
andrewlewis
348b58021d Move underrun detection into AudioTrack.
This removes duplication from SimpleDecoderAudioRenderer and
MediaCodecAudioRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139187254
2016-11-18 12:45:58 +00:00
hoangtc
74383716a6 Update exoplayerv2 vp9 extension.
Reset RenderedFirstFrame when setting OuputBufferRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139100783
2016-11-18 12:45:24 +00:00
aquilescanta
6d5d054b45 Fix lint in FlacExtractor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139064912
2016-11-18 12:44:53 +00:00