205 Commits

Author SHA1 Message Date
eguven
d71400d280 Add DashDownloadActionTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169522830
2017-09-26 13:45:42 +01:00
olly
5b0e693419 Fix DefaultDashChunkSource.updateLiveEdgeTimeUs
Very subtle, but lastAvailableSegmentNum is shifted by
RepresentationHolder.segmentNumShift. When accessing the
index directly it's necessary to unshift. The easiest way
to do this is to call through the holder, which does this
for you.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169239928
2017-09-19 18:16:18 +01:00
hoangtc
5019da3e7b Update ABR logic in AdaptiveTrackSelection for live streaming case
In live streaming, if the playback position is very close to live edge,
the buffered duration will never reach minDurationForQualityIncreaseMs,
which prevents switching from ever happening. So we will provide the
durationToLiveEdgeUs to AdaptiveTrackSelection in live streaming case,
so it can handle this edge case.

GitHub: #3017

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168535969
2017-09-15 23:33:10 +01:00
olly
0adb4502f6 Ignore all-zero defaultKid
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168259911
2017-09-15 23:29:28 +01:00
andrewlewis
7c3fe19d3f Migrate remaining tests to Robolectric
Remaining instrumentation tests either use android.os.Handler or rely on assets.
In the latter case, the tests are difficult to migrate due to differences
between the internal and external build systems, and configuration needed in
Android Studio. In addition, SimpleCacheSpanTest remains as an instrumentation
test because it fails due to a problem with string encoding on the internal
build (and two other tests in its package are kept with it because they depend
on it).

This test removes a dependency from testutils on Mockito, as a different
version of Mockito needs to be used for instrumentation tests vs Robolectric
tests, yet both sets of tests need to rely on testutils. Mockito setup is now
done directly in the tests that need it.

Move OggTestData to testutils so it can be used from both instrumentation and
Robolectric tests.

It may be possible to simplify assertions further using Truth but this is left
for possible later changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167831435
2017-09-08 22:21:33 +01:00
olly
ca2bfbc56e DashManifestParser: Move schemeType up to DrmInitData
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167171407
2017-09-04 10:23:33 +01:00
olly
6bf0b7f3de Fix moe config II
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166916769
2017-08-29 23:56:36 +01:00
olly
b0df6dce98 Fix moe config
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166914821
2017-08-29 23:55:19 +01:00
olly
5bed2bf503 Don't copy primary-track format to non-primary tracks
This time plumbing the track type in from the other side.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166898172
2017-08-29 23:17:16 +01:00
olly
b2c245281a Parse SchemeData from urn:mpeg:dash:mp4protection:2011 element
Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166849631
2017-08-29 23:10:36 +01:00
olly
34960ad891 Tweak and add READMEs + remove refs to V1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518
2017-08-17 22:59:34 +01:00
olly
c94bce17b4 Make data sources private in SegmentDownloader
Also fix SegmentDownloader.remove to not return early

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165295432
2017-08-17 22:41:48 +01:00
olly
cf6534ea5b SegmentDownloader loadManifest cleanup.
- HlsDownloader.loadManifest (previously called getHlsPlaylist)
  suppressed errors for the offline case, where-as the DashUtil
  equivalent method did not. This change makes them consistent
  and moves both other to use ParsingLoadable.
- Enable GZIP for manifest loads in both cases.
- Use Uri rather than String to represent Uris. Previously the
  strings were parsed into Uris quite deep in the code, which
  isn't ideal if the parsing fails; you'd probably prefer the
  error to occur early at the top level.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165181398
2017-08-17 22:32:57 +01:00
olly
fb83872365 Remove unused method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165168924
2017-08-17 22:30:26 +01:00
Oliver Woodman
730d2dd18f Formatting cleanup 2017-08-11 15:46:49 +01:00
ojw28
2e950633c7 Merge pull request #3161 from DolbyLaboratories/dev-v2-eac3-7.1
Support 7.1 EAC3 in MP4, DASH and HLS formats
2017-08-11 15:43:43 +01:00
olly
40f34956a8 Bump minimum and target API levels + support lib version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164863447
2017-08-11 15:01:43 +01:00
ybai001
fc9a58529a Support 7.1 EAC3 in MP4, DASH and HLS formats 2017-08-11 07:38:43 +08:00
eguven
2d0044fee4 Generic DownloadManager and DownloadService
Downloader specific parameters and constructor is moved to DownloadAction class.

DownloadAction objects need to be serialized so they can be passed in Intents and can be stored to
filesystem (to be implemented). So  DownloadAction.Serializer is added. Didn't use Serializable interface
because of the concerns over incompabilities when the new versions of classes are used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164831115
2017-08-10 13:24:10 +01:00
olly
91adba5d1b Minimal change to expose segment indices in DefaultDashChunkSource
Issue: #3037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164614478
2017-08-10 13:12:49 +01:00
eguven
427411befb Disable test coverage again
https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164449443
2017-08-07 13:38:15 +01:00
eguven
2dc1870dd4 Simple Java style fix
Put space between ] and {.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163116816
2017-07-31 20:51:29 +01:00
tonihei
3ff9695a73 Move getBufferedPositionUs into SequenceableLoader.
All implementations of SequenceableLoader already implement this method.
Moreover, all composite media periods contained an exact copy of an
implementation that now moved to CompositeSequencableLoader.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162349083
2017-07-19 14:08:59 +01:00
olly
387720d182 Allow module registrations + log player release
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162223981
2017-07-17 23:21:34 +01:00
olly
da79dec6c1 Make it a bit easier to sideload a subtitle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162221516
2017-07-17 23:20:20 +01:00
andrewlewis
1f815db367 Switch the IMA extension to use in-period ads
This also adds support for seeking in periods with midroll ads.

Remove Timeline.Period.isAd.

Issue: #2617

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160510702
2017-06-30 16:35:14 +01:00
olly
4a59c7cf40 Make it easier to use ExoPlayer modules in other projects II
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:

gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')

You can optionally add a prefix onto ExoPlayer's module names
by adding:

gradle.ext.exoplayerModulePrefix = 'prefix'

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
2017-06-28 22:26:05 +01:00
olly
2a8eb5a2a1 Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
2017-06-28 22:26:05 +01:00
andrewlewis
675756d32d Create MediaPeriods based on an identifier not an index
This will allow MediaSources to provide MediaPeriods that correspond to ad
breaks in a timeline period rather than content for a timeline period, in a
future change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160267841
2017-06-28 22:26:05 +01:00
olly
c448463a05 Move DashMediaSource and SsMediaSource to new SampleQueue methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160130540
2017-06-26 17:07:56 +01:00
aquilescanta
317a994499 Add type to DrmInitData.SchemeData
At the moment, only CENC-defined scheme types are known values.
This will allow having more information about the encryption
scheme through the format, which in turn will allow more informed
decisions on format support.

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

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159538907
2017-06-22 20:04:26 +01:00
andrewlewis
4e006a9616 Move positionUs parameter from createPeriod to prepare
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158494794
2017-06-12 10:25:49 +01:00
olly
1b06ce7407 Fix ArrayIndexOutOfBoundsException in DashMediaPeriod
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158269662
2017-06-12 10:21:09 +01:00
olly
5908d2d7e2 Update handled schemes for timing element resolution.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158269487
2017-06-12 10:19:59 +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
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
olly
122b2a1a31 Use single TrackGroup for switchable adaptation sets
Issue: #2431

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157236031
2017-05-31 11:38:45 +01:00
olly
9737046e53 Parse SupplementalProperty elements in DASH adaptation sets
This will be used to merge adaptation sets that are marked for
seamless switching into single TrackGroups in DashMediaSource.

Issue: #2431

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157209358
2017-05-31 11:30:30 +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
olly
f0a72c4908 Fix playback of DASH/VP9/SegmentList DASH content
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154077149
2017-04-24 21:37:33 +01:00
olly
8be85d4d2f Consolidate version codes in root gradle file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=153453768
2017-04-18 19:42:27 +01:00
eguven
42e4100c05 Add DashDownloaderService which downloads DASH streams at the background
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=153446615
2017-04-18 19:41:16 +01:00
sxp
1a22a4be5f Automated g4 rollback of changelist 152815185.
*** Reason for rollback ***

The force submit broke GVR: []

*** Original change description ***

Add DashDownloaderService which downloads DASH streams at the background

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152877808
2017-04-18 19:32:18 +01:00
eguven
5a6a1af441 Add DashDownloaderService which downloads DASH streams at the background
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152815185
2017-04-18 19:31:04 +01:00
eguven
dd2914f580 Generalize manifest parser parameters in DASH and SmoothStreaming MediaSources
This allows custom parsers to be used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152005477
2017-04-06 18:50:44 +01:00
Oliver Woodman
9a06b77b8a Delete stray test 2017-03-31 19:26:36 +01:00
eguven
103c3b631b Add DashDownloader helper class to download dash streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151456161
2017-03-31 19:07:59 +01:00
eguven
2f9e082fe1 Enable gradle test code coverage for the library modules that aren't affected by 'stuck in endless loop' issue
'library-core' is still affected by https://code.google.com/p/android/issues/detail?id=226070

Code coverage report can be generated for the rest of the modules by:
./gradlew :[module name]:createDebugCoverageReport
Report is generated under:
[module folder]/buildout/reports/coverage/debug

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151448536
2017-03-31 19:06:58 +01:00
olly
e7a4c28dde Fix missing NonNull annotations for overriding methods
If the super method has the annotation on an argument, then
the overriding method should have it too.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151440313
2017-03-31 19:05:54 +01:00
andrewlewis
9d20a8d41c Add a custom time bar view.
Also add an isAd flag to Timeline.Period so that periods can be declared as
containing ads. The times of these periods are indicated using ad markers in
the new TimeBar.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151116208
2017-03-31 18:57:42 +01:00