3505 Commits

Author SHA1 Message Date
olly
b7b0fef694 Split InfoQueue into its own class
It's pretty big as an inner class, and is going to get a
little more complicated. I think it makes sense to be
able to consider it in isolation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158393754
2017-06-12 10:22:21 +01:00
tonihei
cdad6a4ef1 Move playback test utils to testutils.
This allows other tests to reuse the util classes without having to link to playbacktests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158214560
2017-06-12 10:18:50 +01:00
olly
2439c582d4 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158153988
2017-06-06 18:13:02 +01:00
olly
1316445c00 Constraint buffered percentage to [0,100]
Issue: #2902

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158142754
2017-06-06 16:46:47 +01:00
aquilescanta
1637575d4b For HLS mode, pick the lowest PID track for each track type
This prevents strange behaviors for streams that changes the track declaration
order in the PMT.

NOTE: This should not change ANY behavior other than the one described above.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158140890
2017-06-06 16:44:30 +01:00
olly
a3ee684e27 Further cleanup of updateSelectedTrack
- Return early if the selection is unchanged.
- Remove unnecessary variables.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158138187
2017-06-06 16:43:20 +01:00
hoangtc
c1bfab3c23 Fix a minor bug with AdaptiveTrackSelection.
When updating track selection, we should only revert back from ideal
track selection to current track selection if the currently selected
track is not black-listed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158135644
2017-06-06 16:42:14 +01:00
eguven
5c2c3c5c63 Create a base class for DASH downloading related tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158129802
2017-06-06 16:41:09 +01:00
tonihei
edbc2046e2 Clean-up manifest merge attributes.
1. Remove tools:replace in manifest files. This attribute is only needed to establish priority when two manifests are merged and have the same attribute with different values.
As this is not happening here, the attributes can be removed.

2. Some BUILD files also define a deprecated manifest merge strategy different from the android default merge strategy. For consistency these are set to "android'.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158075128
2017-06-06 16:38:45 +01:00
aquilescanta
10c2d3156b Pick the lowest quality video when capabilities are exceeded
Issue:#2901

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158006727
2017-06-06 16:35:49 +01:00
andrewlewis
8dca0b9418 Add a null check in DummySurface static initializer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157958694
2017-06-06 16:34:41 +01:00
olly
35cc0d65cd Only update codecInfo when needed
This avoids calling getDecoderInfo repeatedly in the case
where shouldInitCodec return false (e.g. because we don't
have a surface and cannot instantiate a dummy surface).

Issue: #677

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157847702
2017-06-06 16:33:31 +01:00
andrewlewis
c5cf9090fc Assume CBR for MP3s with Info headers
Issue: #2895

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157841519
2017-06-06 16:32:16 +01:00
olly
e98bee6163 Add surface attach/detach to *WithRendererDisabling tests
This will cause the test to exercise the code path of
instantiating a DummySurface, rendering to it for 10
seconds, then re-targeting the real surface again. For
secure content tests the code path is only exercised if
DummySurface.SECURE_SUPPORTED is true. The logic for
checking this is within MediaCodecVideoRenderer itself,
rather than being part of the test.

Issue: #677

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157833026
2017-06-06 16:30:41 +01:00
olly
ba9114c9c7 Automatically use DummySurface when possible
Issue: #677

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157831796
2017-06-06 16:29:33 +01:00
olly
32b5a80291 Deprecate LoopingMediaSource for indefinite looping
ExoPlayer.setRepeatMode should be preferred. Deprecate
the constructor and update the relevant documentation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157829207
2017-06-06 16:28:22 +01:00
olly
ea21af2ce9 Move adaptation disabling workaround into MediaCodecUtil
This is necessary to make sure that the correct thing happens
where MediaCodecInfo.adaptive is queried directly (for example,
MediaCodecVideoRenderer uses the field to determine how to size
input buffers). Also disable adaptive on Nexus 10.

Issue: #2806

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157583473
2017-05-31 15:57:15 +01:00
olly
b1fd99baab Constraint seeks within bounds for ConstantBitrateSeeker
We do this everywhere for index based seeking already.

Issue: #2876

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157568788
2017-05-31 11:43:30 +01:00
andrewlewis
27fc82f0ad Make repeatMode private
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157226768
2017-05-31 11:37:35 +01:00
aquilescanta
cf6f1d7bf2 Move Period and Window to the top of timeline to match Exoplayer style
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157223090
2017-05-31 11:36:23 +01:00
olly
2c20689237 Don't fail if we find a track is unsupported
Use AUDIO_UNKNOWN instead. This is in line with our handling
of video tracks with VIDEO_UNKNOWN.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157209428
2017-05-31 11:31:44 +01:00
eguven
5092efe301 Add a comment to record the reason for restoring licenses before releasing
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157204373
2017-05-31 11:28:07 +01:00
olly
c4f7a2d62d Correctly transition to ended state
This fixes transitioning into the ended state if we see
endOfStream from the chunk source whilst in the pending
reset state. Prior to this fix we'd still be pending a
reset, and so readData would never allow EOS to be read
by the consuming renderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157101755
2017-05-25 15:04:24 +01:00
andrewlewis
eb3a31c881 Fix default position masking period index calculation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157095116
2017-05-25 15:03:14 +01:00
aquilescanta
f16967cdfe Flexibilize Util.parseXsDateTime to allow single digit hour
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156999955
2017-05-25 15:00:51 +01:00
olly
695347c26b Don't select more than one audio/video/text track by default
Issue: #2618

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156986606
2017-05-24 15:49:41 +01:00
olly
3a448f3a0e Bump version and update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156872383
2017-05-23 17:50:46 +01:00
ojw28
dbc0cf8002 Merge pull request #2820 from sillywab8/support_avclevel52
Add support for AVC Level 5.2
2017-05-23 15:21:04 +01:00
eguven
72dcfd19c8 Automated g4 rollback of changelist 156712385.
*** Reason for rollback ***

This change may silently introduce bugs where both parameters are acceptable in both places. It's decided that the gain isn't worth the risk.

*** Original change description ***

Make the error messages the first parameter in Assertions methods to match JUnit methods

Reverse parameter order creates a slight confusion.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156844728
2017-05-23 15:19:55 +01:00
andrewlewis
88fddb42ec Provide video frame timestamps to subclasses
Expose the stream offset to BaseRenderer subclasses.

Issue: #2267

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156837514
2017-05-23 15:19:55 +01:00
olly
e892e3a5c7 Fix TTML positioning
Issue: #2824

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156781252
2017-05-23 15:19:55 +01:00
andrewrice
78c4cb74ea Fixes incorrectly-ordered arguments to calls to assertEquals
([]
This change has been automatically generated by an Error Prone check that
detects incorrect argument ordering on calls to assertEquals-style methods. See
[]

Cleanup change automatically generated by javacflume/refactory
Refactoring: third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects:AssertEqualsArgumentOrderChecker_refactoring

Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156739144
2017-05-23 15:19:55 +01:00
eguven
1687f1653e Make the error messages the first parameter in Assertions methods to match JUnit methods
Reverse parameter order creates a slight confusion.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156712385
2017-05-23 15:19:55 +01:00
tonihei
1594e71917 Test for changing repeat mode during playback
(Related to GitHub Issue #2577)

Added test to ExoPlayerTest which changes the repeat mode during playback.
Test verifies that ExoPlayer shows the periods in the intended order.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156168166
2017-05-17 16:48:07 +01:00
olly
8e0bf6cd2f Clear the correct buffer in MediaCodecRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156131086
2017-05-17 16:48:07 +01:00
olly
72ba736a7f Clear up BaseRenderer.disable
- Call onDisabled last. onDisabled really shouldn't be doing
  anything with the stream, so pretty sure this is fine (and
  guarantees the stream is cleared properly even if onDisabled
  throws a RTE).
- Remove super.onDisabled calls from Text/Metadata renderers.
  This is just for consistency; we don't make such calls in
  other direct descendants of BaseRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156130640
2017-05-17 16:48:07 +01:00
andrewlewis
9a7306a4cc Remove unnecessary throws clause
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156061458
2017-05-17 16:48:07 +01:00
andrewlewis
929ef172a0 Fix handling of removed periods
If a timeline update removed periods at the end of the timeline which
had been buffered, handleSourceInfoRefreshed would call
getNextPeriodIndex and get back -1 for the last period holder in the
new timeline. Then isLastPeriod(-1) could throw.

Fix this behavior so that the remainder of the timeline is discarded.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156061016
2017-05-17 16:48:07 +01:00
bachinger
f335fb936d Enlarge size of data array of parsable packetArray if ogg packet size exceeds
the current size.

https://github.com/google/ExoPlayer/issues/2782

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156018137
2017-05-17 16:48:07 +01:00
tonihei
3dd2f4af57 Tests for timeline repeat mode support.
Checking the expected next/previous window indices and if the correct window
or period gets returned.

TimelineTest defines mock classes and verification methods used by the specific
implementation tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155727385
2017-05-17 16:48:07 +01:00
sillywab8
ed65958e5d Add support for AVC Level 5.2 2017-05-12 08:24:40 -05:00
ojw28
17cee63544 Merge pull request #2794 from mofneko/fix-unused-variable
Fix unused variable
2017-05-10 21:59:05 -07:00
tonihei
c0d16ea2cb Possible NullPointerException in ExoPlayerImplInternal.setRepeatModeInternal
When readingPeriodHolder and playingPeriodHolder are both null, a
NullPointerException is thrown when trying to reassign readingPeriodHolder.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155635846
2017-05-11 05:53:20 +01:00
tonihei
02c51ee01c Update period holders in ExoPlayerImplInternal when repeat mode changes.
(Relating to GitHub issue #2577)

Changing the repeat mode during playback may require to discard or rebuffer
certain periods because the requested order of playback changed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155600910
2017-05-11 05:53:20 +01:00
tonihei
8a210becef Add repeat mode support to Timeline implementations.
(Relating to GitHub Issue #2577)

The Timeline base class provides the default implementation.

Timeline wrappers (e.g. ClippingTimeline, ConcatatedTimeline) forward all
requests to the respective inner timelines. Some like ConcatenatedTimeline add
their own additional logic to bridge between the child timelines.

In addition, ConcatenatedTimeline and LoopingTimeline now have a common
abstract base class as they share most of their code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155509269
2017-05-11 05:53:20 +01:00
aquilescanta
4abf64b7ef Make MODE_SINGLE_PMT the default mode
Even though this is not strictly spec compliant, this will make exoplayer
behave like it used to before multiple program support. Developers
who want to take advantage of the multiple program support are probably
less than the ones who only want their stream to "just work". This is
particularly useful for streams obtained after a filtering component,
like a tv tuner.

Issue:#2757

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155486122
2017-05-11 05:53:20 +01:00
aquilescanta
1f43fb1998 Introduce CryptoData parameter object
This will allow supporting more encryption schemes. Including some
that require more encryption data, like the encryption pattern.

Issue:#1661
Issue:#1989
Issue:#2089

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155481889
2017-05-11 05:53:20 +01:00
arakawa_yusuke
86ac913df6 Fix unused variable 2017-05-09 21:20:57 +09:00
ojw28
0302fd6b4d Merge pull request #2765 from AOrobator/dev-v2
Dev v2
2017-05-08 23:14:14 +01:00
ojw28
f302d528f8 Merge pull request #2787 from mofneko/remove-fully-qualified-name
Remove fully-qualified name
2017-05-08 23:14:03 +01:00