169 Commits

Author SHA1 Message Date
olly
f6fdcee9b3 Parse stz2 Atoms during mp4 extraction.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129892143
2016-08-10 20:16:05 +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
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
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
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
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
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
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
74b43e26bd Allow injection of custom ChunkSources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127737169
2016-07-22 22:21:06 +01:00
olly
f758082d40 Big (and hopefully near-final) rename.
1. Rename "extensions" package to "decoder". It's used by both
   text and (should be used by) metadata, so it's no longer just
   for extensions.
2. Move Buffer objects move into the decoder package.
3. Rename SubtitleParser and MetadataParser to SubtitleDecoder
   and MetadataDecoder respectively, since they extend Decoder.
   Ditto for all subclasses.
4. Subtitle and Metadata decoders now throw their own exception
   types rather than ParserException.
5. Move MediaCodec classes into a mediacodec package, with the
   exception of the concrete audio and video renderers.
6. Create an audio package to hold the two audio renderer classes
   plus related util classes.
7. Create a video package to hold the one video renderer class
   plus related util classes.

After this change the following nice properties hold:

1. Want a video renderer? Look in the video package. Ditto for
   audio, text and metadata.
2. All TrackRenderer implementations use a decoder of some kind
   to decode buffers received from the source, so we have
   consistent terminology there.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127326805
2016-07-15 18:14:55 +01:00
olly
62ebcaf853 Remove unnecessary res placeholder files
I think these were needed for Eclipse only.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127232262
2016-07-15 18:11:05 +01:00
olly
4e86c55361 Introduce source package for sources
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127073630
2016-07-15 18:02:31 +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
olly
85741ff2d3 TTML: Parse and use frameRate/Multiplier + tickRate
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126792535
2016-07-07 20:48:17 +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
4c434005d4 Remove/simplify some extractor tests.
We have our snazzy new file-based extractor tests now,
and the other ones have historically proven way more
hassle than they're worth (e.g. I spent a good few hours
once just trying to work out how to fix the Mp4 extractor
test, having established it was the test and not the
code that was broken!).

I think some more can go from the ogg package, but leaving
in place for now because it's a bit less clear what to
get rid of.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125330072
2016-07-07 20:11:18 +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
172bc4e8d8 Increase mkv test sample file seek granularity to have better seek results.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124724113
2016-06-15 19:43:17 +01:00
andrewlewis
7ae9bf409b Play a sequence of sources (playlists #3).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124713796
2016-06-15 19:42:58 +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
aquilescanta
461751b194 Add codec profiles for video container/sample formats.
This allows better decoding support checking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124550351
2016-06-15 19:42:58 +01:00
eguven
544d88ca56 PsExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124355441
2016-06-15 19:42:12 +01:00
eguven
110c819939 FragmentedMp4ExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124346810
2016-06-15 19:42:12 +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
57d6c49e73 TsExtractorTest: Speed up the test with a smaller test sample file.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124333753
2016-06-15 19:42:09 +01:00
olly
cb9a64da33 Merge ID3 parsing improvements from GitHub.
- Parse APIC and TextInformation frames.
- In MPEG-TS, don't mind if packets contain end padding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124079930
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
eguven
94fa2ecfe5 WavExtractorTest and TsExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123848524
2016-06-15 19:42:02 +01:00
eguven
ecad3bb396 MatroskaExtractorTest: removed unused local variables.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123847017
2016-06-15 19:42:02 +01:00
eguven
d99679a960 flv, mkv and mp4 extractor sample tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123845660
2016-06-15 19:42:02 +01:00
eguven
7aae5805b8 Added Mp3ExtractorTest and modified Mp3Extractor to pass the test.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123640738
2016-06-15 19:42:02 +01:00
eguven
5a4d82c7c2 TestUtil.assertOutput() uses "*.unklen.dump" file if only it exists and simulateUnknownLength is true.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123638992
2016-06-15 19:41:53 +01:00
eguven
430985322d TestUtil.assertOutput() uses ExtractorFactory to create a new instance of the Extractor for each combination of simulation parameters.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123506162
2016-06-15 19:41:53 +01:00
eguven
651237ac4f Moved/renamed OggExtractorFileTests.parseFile(...) methods to TestUtil.assertOutput(...).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123410374
2016-06-15 19:41:53 +01:00
eguven
ccfb6beb30 FakeExtractorOutput dump() and assertEquals(..., String dumpFile) methods to facilitate extractor test writing.
Changed OggExtractorFileTests to use dump files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123407516
2016-06-15 19:41:52 +01:00
eguven
17f8ac8adf Validate Extractor behavior when load position is reset to 0 following an error.
Added a new method TestUtil.consumeTestData() to emulate
the exact behaviour and modified OggExtractorFileTests to
use it. Rest of the test will be fixed in follow up CLs.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123320538
2016-06-15 19:41:35 +01:00
eguven
b6755c145e DefaultOggSeeker loop fix.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123191416
2016-06-15 19:41:34 +01:00
eguven
9981a83c05 Fix Ogg/Flac sync exception.
Restores input position after flac block size read.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122978325
2016-06-15 19:41:33 +01:00
eguven
731d4283ab Ogg/Opus and Ogg/Flac search seeking
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122977123
2016-06-15 19:41:33 +01:00
aquilescanta
fce17e7ffc Added a trackSelectionFlags field to format.
This field will allow us to flexibly add information provided by the container
or streaming manifests related to the tracks that must be selected.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122559858
2016-06-15 19:41:33 +01:00
olly
9e65693e91 Misc cleanup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122506577
2016-06-15 19:41:32 +01:00
andrewlewis
51cf8bed29 Fix UUID constant reference.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122412543
2016-06-15 19:41:32 +01:00
olly
d689a8fdfd Make Format implement Parcelable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122407769
2016-06-15 19:41:31 +01:00
olly
ea8d0a7aef Move UUID constants to C, and make C an interface.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122242006
2016-06-15 19:41:31 +01:00
eguven
9ee3030b79 Opus initialization data should be in native order.
http://developer.android.com/reference/android/media/MediaCodec.html#CSD
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121957004
2016-06-15 19:41:30 +01:00
eguven
3674f9598e ogg't'opus reader
Support for opus content in ogg container.
TODO: Sample duration and seeking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121940392
2016-06-15 19:41:29 +01:00
olly
9f2707cfa3 Push DrmInitData into Format.
- This means DrmInitData is propagated through sample queues (i.e.
  is effectively attached to every sample, so we can see when it
  changes when reading from the queue).
- It also allows different DrmInitData per track, which is possible
  in muxed MKV/WebM, and per Representation for DASH, although we
  wont be able to seamlessly adapt in the latter case.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121821928
2016-06-15 19:40:39 +01:00
olly
99c0ba005a Add support for TTML Regions extent
This allows limiting the horizontal extension of the cues.
NOTE: So far, we only support percentages for size magnitudes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121682404
2016-06-15 19:40:39 +01:00
olly
1fea3fe3c0 Add support for TTML regions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121564959
2016-06-15 19:40:38 +01:00