2008 Commits

Author SHA1 Message Date
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
andrewlewis
d657360341 Expose period information from MediaSources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128357449
2016-07-28 19:39:07 +01:00
andrewlewis
2a70a58f0a Fix non-DRM playback.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128353039
2016-07-28 19:38:30 +01:00
olly
eca3edb940 Small cleanup of Util constants.
- Remove null checks (never happens).
- Use "const".equals(Util.CONST) where possible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128351654
2016-07-28 19:37:48 +01:00
mishragaurav
1624135c20 Parse widevine tag in manifest for secure decryption.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128345063
2016-07-28 19:37:12 +01:00
olly
abcd10513a Do TODO in HlsChunkSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128190311
2016-07-22 22:41:36 +01:00
olly
9e9634a1a2 Delete disabled tests
The classes these tests are written for have changed
so much we'll have to write them again. We can refer
to V1 if we want to look at what the old tests did, so
there's no need to keep this file in the V2 tree at
the moment.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128189076
2016-07-22 22:41:36 +01:00
olly
ba0a4235a0 Consistent Javadoc for text package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128160177
2016-07-22 22:41:36 +01:00
olly
f0b73e5d5b Consistent Javadoc for upstream package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128159118
2016-07-22 22:41:36 +01:00
olly
692d756ee6 Simplification: Move common logic to TrackSelection
- TrackSelection now exposes the selected formats, ordered
  by decreasing bandwidth. This removes the need for DASH,
  SS and HLS to do the sorting individually.
- The change also removes the need to reconstruct TrackSelection
  instances with a different group index in various places
  (e.g. MergingMediaPeriod).
- This is also a step toward potentially packaging the
  FormatEvaluator inside of the TrackSelection (TBD).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128159064
2016-07-22 22:41:36 +01:00
olly
6f1b24f10f Add some missing Javadoc from the drm package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128085240
2016-07-22 22:41:36 +01:00
eguven
0909446133 Don't let renderer input buffer get too big if codec not available.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128082468
2016-07-22 22:41:36 +01:00
aquilescanta
68156ac7a4 Ignore sequence numbers when switching variants in HLS
According to the spec, there is no mandatory relation between segments'
sequence numbers of different variants. This CL ignores sequence numbers
when switching variants:

* In vod, the switching playback position is obtained by adding the
    duration of previous segments.
* In live playback this is not possible. It is assumed that the
    different live media playlists do not drift apart too much, so
    the playback position is obtained by subtracting the duration
    in reverse order.

In later CLs, the described mechanisms will become the fallback methods
by replacing them with the use of EXT-X-PROGRAM-DATE-TIME information
or more reliable sources.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128072663
2016-07-22 22:41:36 +01:00
aquilescanta
98c5b2b8d0 Treat empty stss boxes as absent
ISSUE: #1681

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128071668
2016-07-22 22:41:35 +01:00
olly
05187ad519 Add new buildout dirs to gitignore
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128060676
2016-07-22 22:41:35 +01:00
eguven
d785519ea0 Javadoc for FakeExtractorOutput.WRITE_DUMP.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128045581
2016-07-22 22:41:35 +01:00
sharjeel
2569c561d4 Make Android Studio on Mac OS X work
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128040579
2016-07-22 22:41:35 +01:00