2514 Commits

Author SHA1 Message Date
cdrolle
65490f52f8 Added support for handling window/cue priority and fill color to Cue and SubtitlePainter.
Cue has been modified to optionally accept a fill color and a toggle specifying when to use the fill color. When the fill color toggle is set, then SubtitlePainter will use the fill color value instead of the color specified by the device's Accessibility settings. Cea708Decoder has also been modified to propagate that value, as well as cleaned up (in terms of documentation) to prepare it for inclusion in the open-source project.

There is also a new Cea708Cue, extending Cue, which holds the Cue's priority, which is used to sort potentially overlapping cues/windows.

Note that I've left the @ClosedSource annotation and logging in this CL. I intend to start testing the 608 and 708 functionality in the Fiber app to ensure that it works as expected on a wide-range of channels (as opposed to the single channel in ExoPlayer Demo) before removing these.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142173264
2016-12-16 16:21:16 +00:00
kylealexander
72097432bd Adding Widevine subsample VP9 clips
These are the new subsample clips used by the android-drm-team.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142162918
2016-12-16 16:21:16 +00:00
olly
04992fdaac Move AudioTrack.SESSION_ID_NOT_SET to C
It's a nicer place for it to live once it starts being passed
around more widely (e.g. through the video renderer, for
tunneling)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142158460
2016-12-16 16:21:16 +00:00
olly
588124da76 Test playback of empty timeline completes successfully
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142157778
2016-12-16 16:21:16 +00:00
olly
5bb1d5dc99 Add tunneling functionality to AudioTrack
Although the underlying platform AudioTrack is capable of
writing the AV sync header from M onward, I've opted not
to use the functionality since it appears to allocate an
unnecessary (and large) number of ByteBuffers. We can swap
over from O if this is addressed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142138988
2016-12-16 16:21:16 +00:00
olly
2c3ce7fee3 Fix playback of media with >1MB preparation data
Also clarify when getNextLoadPositionUs and continueLoading
can be called.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142124497
2016-12-16 16:21:16 +00:00
cblay
37317520f4 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
2016-12-16 16:21:16 +00:00
Oliver Woodman
47ea5c909a Delete CS classes 2016-12-14 23:01:51 +00:00
Oliver Woodman
86adc64403 Delete CS classes 2016-12-14 23:00:10 +00:00
Oliver Woodman
b7d118fda4 Merge branch 'dev-v2' of persistent-https://github.com/google/ExoPlayer into dev-v2 2016-12-14 18:30:03 +00:00
olly
d422d2e6e6 Add missing # chars to release notes!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142028608
2016-12-14 18:28:08 +00:00
ojw28
fefef0f941 Merge pull request #2183 from WeiChungChang/proposal-fix
Fix the issue when the sequence of PTS is out of order by bidirectional prediction for skipToKeyframeBefore()
2016-12-14 18:06:52 +00:00
Oliver Woodman
10fa8e44af Merge branch 'release-v2' of persistent-https://github.com/google/ExoPlayer into release-v2 2016-12-14 17:08:41 +00:00
Oliver Woodman
e6778c90a1 Merge branch 'dev-v2-r2.1.0' into release-v2 2016-12-14 17:08:03 +00:00
Oliver Woodman
8853050caa Merge branch 'release-v2' into dev-v2-r2.1.0 2016-12-14 17:07:31 +00:00
Oliver Woodman
e65110e1ed Remove ClippingMediaSource from release 2016-12-14 17:00:46 +00:00
olly
42c7ea422d Update SDK_INT
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142016285
2016-12-14 16:22:48 +00:00
olly
88d2a6a348 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142015031
2016-12-14 16:22:48 +00:00
eguven
d5ac93f426 Move playback tests to androidTest folder
This change makes Android Studio recognize tests as "android test" and run them on device by default.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142008012
2016-12-14 14:23:38 +00:00
olly
31e2fa8597 Add hook for modifying or cancelling a user invoked seek
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142007001
2016-12-14 14:23:38 +00:00
eguven
fc93940463 Fix widevine playback tests
Passes drmSessionManager to DebugMediaCodecVideoRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141997225
2016-12-14 14:23:38 +00:00
andrewlewis
f276eb2ce7 Add ClippingMediaSource.
ClippingMediaSource wraps a single period/window video-on-demand source and
exposes a specified time range within it.

Issue: #1988

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141991215
2016-12-14 14:23:38 +00:00
aquilescanta
8a7628cb26 Remove playlist adjustment on chunk loads
This is particularly problematic for subtitle tracks where adjustment
can be broken. Now, the primary url can change when clients ask for a
variant snapshot, instead of happening on chunk load as before.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141933689
2016-12-14 14:23:38 +00:00
andrewlewis
48072f2155 Improve binary search functionality and javadoc.
Define what element is returned if inclusive is true and there are multiple
elements equal to the input value.

Clarify/fix javadoc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141891741
2016-12-14 14:23:38 +00:00
andrewlewis
41d078ca4b Reset readEndOfStream in resetPosition.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141870244
2016-12-14 14:23:38 +00:00
aquilescanta
0b1a6fe9b1 Ignore discontinuities in TSs for HLS
Issue:#1921
Issue:#1978
Issue:#2163
Issue:#2172

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141797474
2016-12-14 14:23:38 +00:00
olly
2a79931ec5 Fix onTimelineChanged call (timeline should never be null).
Issue: #2186

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141790023
2016-12-14 14:23:38 +00:00
ojw28
ac9813729f Merge pull request #2193 from luoser/patch-1
Change Sink to Source in license header
2016-12-13 19:37:30 +00:00
Lisa Luo
7e66ec5841 Change Sink to Source in license header 2016-12-13 14:29:15 -05:00
olly
759cb32315 Try exceeding renderer capabilities by default
Not sure what I think about this, but we're getting quite
a lot of issues reported where streams play fine but capabilities
indicate they wont. It's probably best just to cross our fingers
and hope for the best in such cases, as was the case in V1 when
using ExtractorSampleSource.

Issue: #2157
Issue: #2034
Issue: #2007

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141758070
2016-12-12 16:15:38 +00:00
olly
1055c520cc Remove side effects from SeekMap.getPosition implementations
Issue: #2167

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141451444
2016-12-12 16:15:38 +00:00
andrewlewis
f45751872d Move track sample index updates out of getPosition(long).
This requires knowing the seek time in Extractor.seek, so that it's possible to
pick the latest synchronization sample at/before the seek time for each track
(rather than the earliest synchronization sample after the seek position).

Also remove the STATE_AFTER_SEEK state which should no longer be needed.

Issue: #2167

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141432598
2016-12-12 16:15:38 +00:00
aquilescanta
2fce364936 Ignore Splice Info in HLS TS media chunks
Issue:#2070

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141335458
2016-12-12 16:15:38 +00:00
olly
1518927e12 Fix seeking backward from end of last period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141299172
2016-12-12 16:15:38 +00:00
aquilescanta
1cbc0fc678 Allow HlsPlaylistTracker to change the primaryHlsUrl
When the primary url is blacklisted (due to a 404, for example) or
the selected variant is different from primary url, allow the tracker
to change the url.

Issue:#87

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141291435
2016-12-12 16:15:38 +00:00
WeiChungChang
63966a3736 Fix the issue when the sequence of PTS is out of order by bidirectional prediction for skipToKeyframeBefore() 2016-12-12 20:34:09 +08:00
Oliver Woodman
8765b1981c Revert: Rm newline 2016-12-06 21:09:44 +00:00
Oliver Woodman
847e371ae7 Rm newline 2016-12-06 21:08:14 +00:00
aquilescanta
a66b4a9bad Parse ID3 sample timestamp for HLS audio chunks
Pending improvement:

* Peek just the required priv frame. Avoid decoding all id3 information.
* Sniff the used container format instead of using the extension.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141181781
2016-12-06 20:06:37 +00:00
olly
e5bc00ea94 Fix DataSourceInputStream + add unit test
Issue: #2162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141177715
2016-12-06 20:06:04 +00:00
olly
2db7c50d7c Fix test.
The definition of negative line indices was intentionally shifted
by one because the way VTT defines them doesn't appear to allow for
cues to be positioned at the very bottom of the screen in the case
that ANCHOR_TYPE_END is used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141168028
2016-12-06 20:05:23 +00:00
olly
4db6f1e495 Expose whether decoders support tunneling
This is a first step toward supporting tunneled playback

Issue: #1688

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167501
2016-12-06 20:04:44 +00:00
olly
99957bbae7 Correctly handle dynamic playlist modifications
- Fix bug where we'd try and call replaceStream having already
  notified the renderer that the current stream is final. This
  could occur if a period was added to the end of the playlist.
- If the current period being played is removed and a new period
  to play cannot be resolved, assume we've gone off the end of
  the playlist and transition to the ended state. This allows
  the current source to be re-used (unlike the previous behavior
  of considering it an error). Treat valid seeks that cannot be
  resolved due to concurrent timeline update similarly.
- Add seek sanity check back to ExoPlayerImpl. Meh. It's probably
  best to keep this, since it stops the exposed window index
  being invalid w.r.t the exposed timeline.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167151
2016-12-06 20:04:01 +00:00
olly
9ea8b02083 Correctly handle reading of an empty string without a terminating NUL byte
Issue: #2152

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141159330
2016-12-06 20:03:21 +00:00
olly
e86bfd6dbe Improvements for 608 positioning
- Infer likely left/center/right alignment for pop-on captions.
  This makes the rendering much better in practice, particularly
  when the captions were intended to be center aligned.
- Fix line anchoring.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141156222
2016-12-06 20:02:42 +00:00
cdrolle
88c0695bd0 Added safe-area adjustment (i.e. padding) to CEA-608 captions and fixed minor issue with rollup.
CEA-608 specifies a "safe-area" in which the captions should be rendered. This change adjusts all of the cue positions so they are within that safe area. It also fixes a minor issue in which roll up captions would drift towards the last row if a preamble address code had the "next row toggle" bit set.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141077433
2016-12-06 20:01:57 +00:00
aquilescanta
931670957f Add support for multiple table sections in PSI section
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141073182
2016-12-06 20:01:13 +00:00
olly
db215ff156 Make invalid seek positions fail on playback thread only
Seeks are permitted when there's no timeline, and in this
case playback necessarily fails on the playback thread when
the timeline becomes known. Pushing failure to the same
place when the timeline is known means there's only one
failure path for this case. A later CL will likely introduce
an InvalidSeekPositionException for this case.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141037708
2016-12-06 20:00:24 +00:00
olly
88fc682dde Expose manual playback control hiding from SimpleExoPlayerView
Issue #2146

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141036866
2016-12-06 19:59:41 +00:00
andrewlewis
01acc0e201 Remove unnecessary final.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141031900
2016-12-06 19:58:56 +00:00