2084 Commits

Author SHA1 Message Date
andrewlewis
2906a2ea09 Simplify AudioTrack.handleBuffer's return value.
Position discontinuities are notified via AudioTrack.Listener.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144202048
2017-01-13 17:04:43 +00:00
olly
444811c010 Don't overflow when dealing with large segment numbers
Issue: #2311

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144182445
2017-01-13 17:03:41 +00:00
andrewlewis
ce03b8c246 Move AudioTrack initialization into handleBuffer.
Move initialization code from the audio renderers into handleBuffer. The audio
session id and tunneling enabled state can be altered using new setters.

This change is not intended to change the behavior of the audio renderers.
Before this change, the AudioTrack would always be reinitialized by the
renderers before calling handleBuffer.

Add a protected onAudioTrackUnderrun method for custom renderers that want to
implement custom handling of underruns.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144067149
2017-01-13 17:02:39 +00:00
eguven
5c89bbedb7 Fix leftover bytes in cached content index file
Extra calls to CipherOutputStream.close() causes each time extra 16 bytes written to the
underlying OutputStream. Prevented close() is called more than once and also discarded any
data in ReusableBufferedOutputStream buffer on reset().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144063120
2017-01-13 17:01:37 +00:00
WeiChungChang
cb0394b9cf 'improve_far_seek_of_chunkSampleStream' 2017-01-12 10:49:37 +08:00
meteoorkip
28e221f92e Fix vector drawable usage on API level 21 or above 2017-01-11 20:03:41 +01:00
olly
deefe50abc Handle ID3 frames that end with empty text field
Issue: #2309

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144061654
2017-01-10 10:52:42 +00:00
andrewlewis
bf65df1b35 Allow ClippingMediaPeriod to be used on its own.
ClippingMediaPeriod may be a useful component for other MediaSources too so
remove its dependency on ClippingMediaSource.

Also allow the clipping end point to be TIME_END_OF_SOURCE, in which case
the clipping window extends to the end of the wrapped period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144056285
2017-01-10 10:51:49 +00:00
olly
59ab0fa9f1 Introduce MetadataDecoderFactory
This is analogous to what we do for text/subtitles, and
adds support for playlists where the type of metadata
changes from one playlist item to the next.

Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143948307
2017-01-10 10:50:52 +00:00
olly
ae2e84df35 Set HLS period duration when live stream ends
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143776633
2017-01-06 16:59:29 +00:00
olly
1da9e31d68 Parse EMSG boxes in FragmentedMp4Extractor
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143776526
2017-01-06 16:58:36 +00:00
olly
f2634d11f5 Support emsg metadata decoding
Note: End to end emsg support is still non-functional.
There's some additional plumbing that still needs to
be done.

Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143775147
2017-01-06 16:57:35 +00:00
eguven
9d5c750fe9 Support offline drm key downloading and restoring
Renamed StreamingDrmSessionManager to DefaultDrmSessionManager and added functionality to download, restore, renew and release offline keys. Added a utility class, OfflineLicenseHelper, to facilitate use of DefaultDrmSessionManager for downloading, renewing and releasing offline keys.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143769955
2017-01-06 16:56:31 +00:00
andrewlewis
b2a153d568 Add a player test for renderers reading ahead.
Also move timeline, manifest and format verifications into the test* methods.

Issue: #2252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143761969
2017-01-06 16:55:09 +00:00
Drew Hill
0468a80d41 just use original plane width to calculate width proportion to use later as size and keep aspect ratio for height 2017-01-05 21:27:24 -05:00
olly
9d48d4e486 Support setting default headers on HttpDataSource.Factory's
Issue: #2166

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143703258
2017-01-05 21:57:36 +00:00
andrewlewis
a77bc8d457 Close DataSources quietly.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143672900
2017-01-05 21:56:34 +00:00
cdrolle
01d22f8123 Handle empty RawCC files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143667717
2017-01-05 21:54:15 +00:00
Oliver Woodman
8a0e76ba32 Make sure we don't read ahead of deferred enable/disable operations
Issue: #2290
2017-01-05 14:58:13 +00:00
Oliver Woodman
037aeaf764 Some minor cleanup 2017-01-05 14:57:31 +00:00
olly
1d9d68dd12 Assume samples are at start of mdat when offset is negative
We've seen this issue reported three times now, so it's
obviously not an isolated problem. Do you think anything
bad will happen to non-SmoothStreaming playback cases if
I do this? I suspect not, but if you feel strongly I can
easily add a FLAG_WORKAROUND_X flag for it, and enable
it for SmoothStreaming only.

https://github.com/google/ExoPlayer/issues/2292
https://github.com/google/ExoPlayer/issues/2101
https://github.com/google/ExoPlayer/issues/1152

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143583714
2017-01-04 23:07:58 +00:00
eguven
4a0f224e12 Add a new flag to DataSpec which permits content to be cached even if its length can not be resolved
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143560360
2017-01-04 23:07:58 +00:00
olly
5082d1f282 Some boilerplate for DASH EMSG support
- Parse EMSG leaf atoms during FMP4 extraction (although
  currently they're just discarded).
- Add readNullTerminatedString to ParsableByteArray.

Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143555965
2017-01-04 23:07:58 +00:00
olly
f735a86ebb Better handle inconsistent HLS timeline updates
Issue: #2249

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143555467
2017-01-04 23:07:58 +00:00
olly
44d6b1a271 Add some initial plumbing for DASH EMSG support
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143554094
2017-01-04 23:07:58 +00:00
olly
ae30fe496a Fix potential NPE if source is released without being prepared
Issue: #2264

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143550088
2017-01-04 23:07:57 +00:00
olly
2512bd6e77 Add test for decoding ID3 PRIV frame
I wrote this whilst investigating a user issue. It looks like
we don't need to do anything about the issue itself, but since
I wrote the test we may as well keep it!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143549697
2017-01-04 23:07:57 +00:00
olly
b774660989 Add multi-period ExoPlayer unit test
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143475824
2017-01-04 23:07:57 +00:00
olly
46245251e1 Fix bad indent + clean up Format formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143469714
2017-01-04 23:04:07 +00:00
olly
361241f81c Make SeekBar work properly with key events if focusable
This isn't perfect because it performs seeks whilst the
user is holding down L/R, rather than when they release
it. Performing the seek on release properly looks non
trivial, and would likely require extending SeekBar.

Issue: #2278

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143440580
2017-01-04 23:04:07 +00:00
andrewlewis
04968a6da5 Fix condition for re-enabling renderers to handle reading ahead.
Issue: #2252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143433510
2017-01-04 23:04:07 +00:00
olly
faff5ec910 Add masking to correctly select renderer
Issue: #2269

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143433012
2017-01-04 23:04:07 +00:00
eguven
39827fad27 Allow specifying a custom cacheKey to ExtractorMediaSource
Issue: #2201

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142772885
2017-01-04 23:04:07 +00:00
Oliver Woodman
0b141aeeee Revert "Improving handling of atoms with size less than header in FragmentedMp4Extractor."
This reverts commit 71186ef16ee2f3dc07a4f9d1d696c273b1c6ca87.
2017-01-04 22:32:28 +00:00
cblay
71186ef16e Improving handling of atoms with size less than header in FragmentedMp4Extractor.
These currently lead to cryptic ArrayIndexOutOfBoundsExceptions being thrown from System.arraycopy() so my proposal is to throw a more useful ParserException instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142087132
2017-01-04 22:26:58 +00:00
ojw28
da9c10a1b4 Merge pull request #2285 from colinrtwhite/dev-v2
Use vector drawables for the SimpleExoPlayer player control buttons.
2017-01-03 19:43:34 +00:00
Colin White
b1ea1873d3 Use Material Design drawables for the SimpleExoPlayer player control buttons. 2017-01-03 14:34:45 -05:00
meteoorkip
eda393ba82 Add default artwork support to SimpleExoPlayerView
Add support for a default artwork image that is displayed if no artwork can be found in the metadata.
2017-01-02 22:20:04 +01:00
drhill
8804ecded4 remove unneeded changes 2016-12-21 07:54:23 -05:00
Drew Hill
44b21f2e3b remove imagecue and add bitmap to cue with size_height, change to painter for displaying 2016-12-20 22:49:18 -05:00
Oliver Woodman
0d135d37b8 Add comment for workaround 2016-12-20 12:33:04 +00:00
ojw28
efc8f6fe42 Merge pull request #2134 from drhill/dev-v2_passthroughChannelFix
fix 6.1 channel passthrough failing
2016-12-20 12:26:19 +00:00
olly
a007d9a2e7 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142539314
2016-12-20 11:39:12 +00:00
olly
ab88821614 Fix large timestamps for HLS playbacks
- If there's no program-date-time then this change is
  a no-op.
- If there is a program-date-time this change considers
  the period as having started at the epoch rather than
  at the start of the content. The window is then set
  to start at the start of the content. This is a little
  weird, but is required so that the period sample
  timestamps match the start of the period. Note that
  this also brings the handling of on-demand in line
  with how the live case is handled, meaning there wont
  be weird changes if a live stream changes into an
  on-demand one.

Issue: #2224

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142442719
2016-12-19 15:12:55 +00:00
Drew Hill
47d8b7ff16 get source dimensions from plane stored in subs 2016-12-18 22:37:37 -05:00
Drew Hill
5d0501be82 less interfacy.. more classy 2016-12-17 14:43:07 -05:00
Drew Hill
8277999b16 add imageview into simpleexoplayerview to display subtitles that are image based 2016-12-17 13:39:47 -05:00
olly
4bb8793203 Deduplicate reported position discontinuities
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142257743
2016-12-16 16:21:16 +00:00
olly
e0586a48f0 Correctly offset subsample timestamps.
This has always been broken in V2, but the issue is now also
visible for the very first period in the timeline because we
offset if by 60s. Previously the issue would only have been
visible from the start of the second period.

Issue: #2208

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142252702
2016-12-16 16:21:16 +00:00
anjalibh
6c4795b496 Prevent frozen frames when the decoder is always late.
Create a MediaCodecVideoTrackRenderer.shouldDropFrame function that can be overriden by a child class. The YouTube override prevents a frame drop if we haven't rendered anything in the last 35 ms.

The YouTube override is off at the moment, I plan to use a server side flag to do a slow and controlled experiment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142190774
2016-12-16 16:21:16 +00:00