426 Commits

Author SHA1 Message Date
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
eguven
ff77d1e72c Add index file to hold header information for cached content.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138373878
2016-11-10 21:14:29 +00:00
aquilescanta
e685edc179 Make interface implementation consistent among ExtractorOutputs
The method track(int id) currently has different behaviours across
implementations. This CL maps ids to track outputs, which means
that successive calls with the same id will return the same
TrackOutput instance. Also fixes TsExtractor inconsistent behavior
after a seek.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136026721
2016-10-14 10:42:43 +01:00
andrewlewis
1546da899b Use @IntDef where possible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133932812
2016-09-28 11:25:02 +01:00
andrewlewis
6a099f1c57 Clean up MP3 synchronization and fix handling < 4 frames.
Also add a test MP3 stream with one frame.

Make FakeExtractorInput's end of input detection to apply also for peekFully, and
make its skip and read methods read at least one byte.

Issue: #1732

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133241641
2016-09-16 18:52:42 +01:00
eguven
06a644eccd DataSourceException: Used to specify a DataSource error.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132053698
2016-09-02 16:20:06 +01:00
olly
a779eabdc5 Update SDK / Tools.
- Centralise compileSdkVersion, targetSdkVersion and
  buildToolsVersion in a single place for gradle.
- Bump compileSdkVersion and targetSdkVersion to 24.
- Bump com.android.tools.build version to re-enable
  instant start.
- Bump targetSdkVersion in manifests (needed for
  internal builds).
- Use standard expandable_list_item from Android in
  the demo app, since ours doesn't look right when
  targeting API level 24. We were also setting the
  theme on the wrong element in the manifest, so I'm
  removing that line.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131929216
2016-09-02 16:12:55 +01:00
eguven
bd7be1b5e7 Cache support unbounded requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131696858
2016-08-31 15:26:02 +01:00
eguven
e003c5b6dc Javadoc for FakeExtractorOutput.assertOutput()
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130933435
2016-08-31 15:25:24 +01:00
olly
1579b68cf6 Sanitize constants
- Use a single constant for unset/unknown times across
  all time bases. Note also that this moves away from
  use of -1 for unset/unknown times in ms, which was a
  bad choice (it might conflict with real times, such
  as a time representing being just behind the start
  of a live window).
- Add a few other unset constants, and use them.
- Fix some hardcoding of -1 where existing constants
  should have been used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130775594
2016-08-31 15:25:18 +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
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
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
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
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
olly
722e05b8ba Some brevity/consistency renaming in source package
SmoothStreaming -> Ss
MediaPresentationDescription -> DashManifest
DashSingleSegmentIndex -> SingleSegmentIndex

Moved DASH and Ss manifest classes to matching
manifest packages for consistency. For Hls the
package is called playlist still, since that's
what they're widely known as.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127925961
2016-07-22 22:41:35 +01:00
olly
dbb43567a3 Finalize v2 directory + package name
- The package is renamed to avoid conflicts with v1, should any
app wish to include both v1 and v2 for a period of time. This is
similar to the approach used by some other open source projects
(e.g. okhttp).
- Copyright year is updated everywhere for completeness.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126895326
2016-07-08 12:12:09 +01:00
eguven
adc7ecec09 Support MPEG-TS streams that start/end with an incomplete TS packet or lost sync.
Issue: #1332
Issue: #1101
Issue: #1083
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125659191
2016-07-07 20:25:59 +01:00
olly
ec4c7d3acf Remove Eclipse support. Simplify manifests.
It looks like the manifests are essentially pointless,
but various tools are unhappy if I delete them.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124976509
2016-06-15 20:26:37 +01:00
eguven
4279e22138 TestUtil.assertOutput() also tests seeking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124556278
2016-06-15 19:42:58 +01:00
eguven
1afe480a30 FakeExtractorOutput: add option to write dump files to external storage.
So dump files can be created easily.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124455709
2016-06-15 19:42:58 +01:00
eguven
b206cff98c FakeExtractorInput: Fix exception type
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124446331
2016-06-15 19:42:42 +01:00
eguven
80b10b5fc1 TestUtil.consumeTestData(): Make sure extractor doesn't use the position holder out of purpose.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124335837
2016-06-15 19:42:09 +01:00
eguven
98b7e7f4e2 AdtsExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124335597
2016-06-15 19:42:09 +01:00
eguven
cec658d573 ExtractorInput.setRetryPosition(): Called when reading fails and the required retry position is different from the last position.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124242428
2016-06-15 19:42:04 +01:00
eguven
ebd37cfb8e Moved testutils package to a seperate module so it can be accessed by the tests in other modules.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123964784
2016-06-15 19:42:03 +01:00