2074 Commits

Author SHA1 Message Date
andrewlewis
cdb706bac8 Fix period durations for single period and concatenated timelines.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129748865
2016-08-10 20:08:31 +01:00
andrewlewis
88bf1d0739 Expose the seekable window.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129747377
2016-08-10 20:07:56 +01:00
olly
39482f244b Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129733571
2016-08-10 20:07:20 +01:00
olly
300ddc2aef Cronet extension project setup
- Add build test to [] so it runs in presubmit
- Tweak README.md instructions
- Use symlinks to make the extension usable in Android
  Studio internally, without taking any special action
- Remove unnecessary dependencies
- Simplify setup instructions in README.md

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129733466
2016-08-10 20:06:43 +01:00
eguven
bd37216902 CacheSpan and Util.un/escapeFileName tests.
Fixed CacheSpan regexp for line breaks characters in key.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129631446
2016-08-10 20:06:06 +01:00
olly
b15ceba780 Enhance DefaultTrackSelector part 2
- Support specifying a preferred text language.
- Score based selection for text/audio/other tracks.
- Prefer default tracks to non-default ones.
- Allow overriding of base select*Track methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129626994
2016-08-10 20:05:31 +01:00
andrewlewis
95f4113456 Fix seeking into a different period that has been prepared.
When seekToPeriodPosition found that the seek destination period was already
prepared, it would not disable/re-enable renderers. This was fine if the
playing period wasn't changing, but in other cases the renderers would be left
reading the incorrect streams (and the underlying periods may have been
released).

Also, transition to the buffering state before re-enabling renderers, so that
the renderers are not started until leaving the buffering state.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129625632
2016-08-10 20:04:56 +01:00
olly
5783272444 Fix missing generics
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129624395
2016-08-10 20:04:19 +01:00
olly
a7cb98d991 Pass source to TransferListener events
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129622239
2016-08-10 20:03:30 +01:00
andrewlewis
3ef837341e Don't use OMX.qcom.audio.decoder.mp3 on LGE Optimus API 16.
Issue: #1714

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129600348
2016-08-08 11:53:30 +01:00
aquilescanta
52d9539878 Fix NPE in track selection view
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129336905
2016-08-08 11:53:30 +01:00
andrewlewis
c2c41558e5 Merge the internal timeline into ExoPlayerImplInternal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129325922
2016-08-08 11:53:30 +01:00
olly
ee565300cb Enhance DefaultTrackSelector part 1
- Enforce viewport constraints for fixed video track selection.
- Select best fixed video track, not the first one.
- Better handling of video tracks with unknown dimensions.
- Mini bug fix.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129226593
2016-08-08 11:53:30 +01:00
olly
2395f13682 Tweak project structure
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129212987
2016-08-08 11:53:22 +01:00
olly
e26f72d454 Update @return to Returns where appropriate
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129201483
2016-08-08 11:16:33 +01:00
olly
490c5fea78 Further improve codec reconfiguration
- Only setup a codec to allow adaptation to other compatible
  formats in the stream. If something like the mimeType is
  changing adaptation will never be possible, so there's no
  point.
- Incorporate maxInputSize into the reconfiguration logic.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129088464
2016-08-08 11:15:44 +01:00
eguven
bd7c8fed1b While buffering check for errors even if renderes are ready.
On an edge case, player may get stuck when the renderers are ready but the buffer doesn't get full enough because of a fatal error in data source. An example state can be created by starting a live DASH stream and switching between normal and slow network connections.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129084824
2016-08-08 11:15:06 +01:00
olly
9a272068b4 Allow resetting of position when setting source
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129083335
2016-08-08 11:14:18 +01:00
olly
90ceade08f Add option to manually replace manifest URI
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129081694
2016-08-08 11:13:39 +01:00
olly
af8f1b8387 Fix multi-period transitions with track selection overrides
An override applies across periods provided they expose the
same track groups according to .equals, but the formats in
the override are then compared against the period's formats
according to ==. Use .equals consistently to fix.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129081591
2016-08-08 11:13:01 +01:00
olly
1bea48f249 Suppress noop format changes
For self-initializing segments, DefaultTrackOutput receives
a null format and then the actual format. This broke the
deduplication logic in InfoQueue.format, since there were
two transitions: FormatX->Null and Null->FormatX. This CL
allows deduplication to succeed in this case.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129081583
2016-08-08 11:12:22 +01:00
olly
5345702ec5 Improve formatting in demo app track selector
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129080823
2016-08-08 11:11:40 +01:00
olly
02a79f8c51 Improve video canReconfigureCodec accuracy
The codec cannot be reconfigured if the format rotation
changes, or if the format dimensions exceed the current
decoder's configured maximum dimensions.

Issue #1707

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129004187
2016-08-08 11:10:59 +01:00
olly
ced7906737 Make track selection dialog d-pad friendly
This wont help much until the buttons to get the dialogs
to display are focusable! Use of MediaController seems to
make that tricky (to be continued...).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128989328
2016-08-08 11:10:19 +01:00
olly
17014e6264 Fix concat media source premature listener invocation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128987095
2016-08-08 11:09:36 +01:00
andrewlewis
c1729b640c Allow seeking to a default position in a period.
When seeking to the default position in a period, the containing source may
actually return a position in another period. Multi-period live sources can do
this to seek the player to the live edge.

ExoPlayerImplInternal uses the same functionality when the playback position
reaches the end of a period to determine what period/position to play next.
This means that when playback transitions to a multi-period live source from
some other source (playing a concatenation of those two sources), the player
will play the live edge rather than the beginning of the earliest period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128984355
2016-08-08 11:08:50 +01:00
olly
abd5653dc4 Add Util.getUtf8Bytes to avoid warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128980489
2016-08-08 11:08:11 +01:00
olly
3604d589c1 Deduplication AVC/HEVC config parsing + other TODOs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128979671
2016-08-08 11:07:29 +01:00
andrewlewis
8d122a101d Use new import ordering.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128967776
2016-08-08 11:06:48 +01:00
andrewlewis
f89e170054 Remove --disable-vp10 from vp9 extension configuration.
The option was removed in
67edc5e83b%5E%21/#F2.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128801977
2016-08-08 11:05:29 +01:00
olly
846f8e1d46 Enable track blacklisting for DASH and SmoothStreaming
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128721068
2016-07-28 20:04:41 +01:00
olly
f66b90e34b Eliminate cruft from the demo apps's PlayerActivity
Useful functionality promoted to core library:

1. Management of SurfaceHolder.Callback lifecycle
   promoted to SimpleExoPlayer
2. Ability to determine whether audio/video tracks
   exist but are all unsupported promoted to
   MappingTrackSelector.TrackInfo
3. Read external storage permissions check promoted
   to Util
4. SubtitleView given ability to act directly as a
   TextRenderer.Output to remove layer of indirection
5. SubtitleView given ability to configure itself to
   user's platform wide caption styling
6. KeyCompatibleMediaController promoted to library's
   UI package.

Relocation of boring stuff:

1. ID3 frame logging moved to EventLogger.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128714230
2016-07-28 20:04:41 +01:00
olly
3501332dd3 Converge track selection to a single place.
This change merges the duties of FormatEvaluator into
TrackSelection classes, so that both the static and
dynamic parts of track selection are implemented in a
single place.

New feature: Demo app now allows you to enable random
adaptation in the track selection dialog.

Notes:

- It should be quite easy to allow application side
track blacklisting in addition to source side, as an
extension to this. That would effectively allow
applications to do seamless/deferred track selection
by creating a TrackSelection with all tracks enabled,
and then toggling the blacklist flags to select the
ones they want to be active.

- It should be trivial to implement format blacklisting
for DASH and SS as an extension to this. Will do in a
follow up CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128707517
2016-07-28 20:04:40 +01:00
olly
5eb6190682 Fix branch documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128707067
2016-07-28 20:04:40 +01:00
eguven
2040615cc8 Support for added and removed DASH periods.
Logic and some code is copied from V1.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128706688
2016-07-28 20:04:40 +01:00
olly
c82a3db5ac Enable next/prev seeking in demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128682992
2016-07-28 20:04:40 +01:00
olly
2f20fd7c03 Simple language + Javadoc consistency
- Invoked --> Called
- Gets --> Returns
- "True if X. False otherwise." --> "Whether X."
- Removed some @returns where the Javadoc is in "Returns X" form

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128678638
2016-07-28 20:04:40 +01:00
andrewlewis
dfdb3bbc95 Count buffer ahead periods rather than using their indices.
This is in preparation for allowing MediaSources to skip over periods when one
period ends, which is needed for starting to play a multi-period live stream
that is concatenated on to another period at the live edge.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128674659
2016-07-28 20:04:40 +01:00
aquilescanta
5818409f4e Add viewport size filtering to the DefaultTrackSelector
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128590422
2016-07-28 20:04:40 +01:00
olly
242bdffc80 Fix a few warnings.
- Suppress spurious resource type warnings.
- Make AS happy by making private method non-final.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128584391
2016-07-28 20:04:40 +01:00
olly
ac59bde2be Fix up a bunch more Javadoc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128565942
2016-07-28 20:04:40 +01:00
olly
3cb5862621 Only pass "throwing" part of Loader to MediaSource children
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128492613
2016-07-28 20:04:40 +01:00
cdrolle
47346c39c1 Fixed minor error that occurred when the manifest was updated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128472884
2016-07-28 20:04:39 +01:00
olly
dae87b66dd MediaPeriod.getDurationUs must report duration when known.
As per the spec of MediaPeriod.getDurationUs, when a live
stream ends we need to start returning the correct final
duration.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128471183
2016-07-28 20:04:39 +01:00
olly
c5aa376bc4 Rename only part of FormatEvaluator/TrackSelection merge
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128471102
2016-07-28 20:04:39 +01:00
olly
bf0bdd8d7c Move SsMediaPeriod in its own file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128465118
2016-07-28 20:04:39 +01:00
olly
1722019e0c Move SmoothStreaming manifest refresh to source level.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128461778
2016-07-28 20:04:39 +01:00
cdrolle
1d79c26b34 Added support for RawCC (i.e. out-of-band EIA-608)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128397367
2016-07-28 20:04:31 +01:00
olly
75e2aee92e Fix janky post-track-selection behavior for HLS
We were forgetting to reset renderers during track
selections where muxed media is used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128391816
2016-07-28 19:40:54 +01:00
olly
0b4284d060 Remove TrackGroup.adaptive flag.
It's only "needed" for HLS, and this requirement will
go away soon. It's safe to remove the flag ahead of
this because a TrackSelector can/should not attempt to
adapt between multiple audio/text tracks.

Also remove unnecessary restrictions on TrackGroups
being non-empty and only of known types.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128376601
2016-07-28 19:40:15 +01:00