58 Commits

Author SHA1 Message Date
olly
920117b081 Drop prefix test- from test methods under v2/library
This CL removes the prefixes to the tests added after a6d0caaa3c.

This CL is generated by following command
$ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/  public void \L\1\E\2/' {}

PiperOrigin-RevId: 300547504
2020-03-19 00:46:48 +00:00
aquilescanta
1f202f0aee Make DataSource extend DataReader and upcast uses
This means DataSource.read now may throw InterruptedException.

PiperOrigin-RevId: 300523430
2020-03-19 00:45:59 +00:00
olly
0d230d517a Miscellaneous cleanup related to recent changes
PiperOrigin-RevId: 300067561
2020-03-11 16:26:41 +00:00
aquilescanta
47b62e8c02 DataReader: replace InterruptedException with InterruptedIOException
PiperOrigin-RevId: 299092243
2020-03-10 10:19:45 +00:00
tonihei
b5976a55ff Upgrade Kotlin annotations and fix gradle warnings
The new version fixes some warnings in Gradle builds. Also
add missing indirect compileOnly dependencies to fix some more warnings

Issue:issue:#7007
PiperOrigin-RevId: 298855510
2020-03-10 10:19:19 +00:00
kimvde
f204e4df7d Add setCoreFlacExtractorFlags on DefaultExtractory
PiperOrigin-RevId: 298816694
2020-03-10 10:18:21 +00:00
Oliver Woodman
06e1651612 Merge pull request #7026 from DolbyLaboratories:dev-v2-test-assets
PiperOrigin-RevId: 298317097
2020-03-10 10:16:35 +00:00
olly
a6d0caaa3c Drop prefix test- from test methods under v2/library
This is one step toward following the google3's test naming convention.
See go/java-testing/getting_started#basic-test-template for details
why prefix test isn't necessary.

This CL is generated by following command
$ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/  public void \L\1\E\2/' {}

and then manually modified following tests where test method names conflict with test target.
- VorbisUtilTest
- VorbisReaderTest
- UtilTest
- DownloadManagerDashTest
- DefaultOggSeekerTest
- OggPageHeaderTest
- HlsMasterPlaylistParserTest

PiperOrigin-RevId: 298074653
2020-03-10 10:15:43 +00:00
olly
67b29bbe39 Format.Builder: Finish migration
Issue: #5978
PiperOrigin-RevId: 297876336
2020-02-28 18:43:04 +00:00
olly
3730639c95 Don't set decoded bitrate on audio/flac format
PiperOrigin-RevId: 297864386
2020-02-28 18:42:39 +00:00
andrewlewis
1ca9a061b1 Split AAC utils out of CodecSpecificDataUtil
PiperOrigin-RevId: 297823929
2020-02-28 18:42:30 +00:00
olly
db97d0c37c Format.Builder: Migrate MatroskaExtractor
Selection flags and language tags appear to apply to all tracks
in MKV, so I think the change in output is correct.

PiperOrigin-RevId: 297646190
2020-02-28 18:41:04 +00:00
ybai001
40df646a07 Add AC3 and EAC3-JOC Test Assets 2020-02-28 19:32:01 +08:00
aquilescanta
a114a0ed7f Rename SampleDataReader to DataReader and move to common
PiperOrigin-RevId: 297603312
2020-02-27 17:16:53 +00:00
kim-vde
292942feb3 Merge pull request #6971 from DolbyLaboratories:dev-v2-ts-assets
PiperOrigin-RevId: 297591404
2020-02-27 17:16:20 +00:00
kim-vde
6946170d3e Merge pull request #6922 from phhusson:feature/ait
PiperOrigin-RevId: 297579733
2020-02-27 17:15:52 +00:00
andrewlewis
bd8ee155af Construct codecs string for AAC in MP4/TS/FLV
PiperOrigin-RevId: 297578984
2020-02-27 17:15:42 +00:00
olly
c6a6e0d6f3 Migrate various call sites to Format.Builder
PiperOrigin-RevId: 297562889
2020-02-27 17:15:34 +00:00
aquilescanta
bfd8474e83 Remove SampleDataReader.skip
In order to make DataSource extend SampleDataReader.

PiperOrigin-RevId: 297368181
2020-02-27 17:15:27 +00:00
kimvde
52825a272d Rename FLAC dump files based on output instead of language
PiperOrigin-RevId: 297336461
2020-02-27 17:15:11 +00:00
olly
42d4afe7b6 Make Format.Builder, peakBitrate and averageBitrate public
- Deprecate old Format.createXXX methods
- Deprecate most Format.copyXXX methods
- Stop using deprecated Format.copyXXX methods in the library

Note: Replacing library usages of Format.createXXX method
will be done in follow up CLs. These changes aren't purely
mechanical because we need to decide which out of peakBitrate
and averageBitrate to set in each case where currently a
single bitrate is provided.

Issue: #2863
PiperOrigin-RevId: 296450935
2020-02-25 21:23:21 +00:00
ibaker
94315ab757 Remove duplicate SCTE-35 format and add sample to TsExtractorTest
It's not clear why we're currently outputting the format in both init()
and consume() - it seems likely that this was accidentally introduced
in <unknown commit>
when we started outputting the format in consume() but didn't remove it
from init().

The SCTE-35 TsExtractorTest doesn't pass with the current code because
when it seeks back to the beginning of the file init() is not called
again so the second pass through only sees one sample (and
ExtractorAsserts checks that seeking back to 0 produces the same output
as reading the file from the beginning).

I generated the SCTE-35 sample using TSDuck's tsp command:
$ tsp --add-input-stuffing 1/10 \
   -I file testdata/src/test/assets/ts/sample.ts \
   -P pmt --service 1  --add-programinfo-id 0x43554549 --add-pid 600/0x86 \
   -P spliceinject --service 1 --files scte_35.xml --wait-first-batch \
   -P filter --negate --pid 0x1FFF \
   -O file testdata/src/test/assets/ts/sample_scte35.ts

This was adapted from the instructions in section 5.2.24.1 of the TSDuck
user manual: https://tsduck.io/download/docs/tsduck.pdf

PiperOrigin-RevId: 296217084
2020-02-25 21:22:40 +00:00
olly
47133f46cb Keep method signature together when overriding
Not important, but when overriding a method that can return null,
it seems preferable to put @Override first, followed by what it's
overriding (which includes the @Nullable).

Also remove explicit @NonNull use in the core library. @NonNull is
propagated by default, so this is redundant.

PiperOrigin-RevId: 296188379
2020-02-25 21:22:10 +00:00
olly
47ee1f2841 FLAC extractor documentation tweak
PiperOrigin-RevId: 295724578
2020-02-25 21:20:39 +00:00
Pierre-Hugues Husson
8e84fe55a1 Include a new TS sample, with ait, dsm-cc, eit 2020-02-18 16:09:41 +01:00
Pierre-Hugues Husson
28c5043dc1 Comment SectionPassthrough 2020-02-18 13:45:14 +01:00
Pierre-Hugues Husson
79bc160373 output is created at 'init', annotate it as lazyily initialized 2020-02-18 13:45:03 +01:00
kimvde
b1b6c8dfea Add test for seek map duration correction in MP3 index seeker
PiperOrigin-RevId: 295543916
2020-02-17 17:14:07 +00:00
kimvde
74443f47f0 Fix DefaultExtractorsFactory Javadoc
PiperOrigin-RevId: 295540885
2020-02-17 17:13:57 +00:00
olly
e606893ff8 Create a SampleDataReader interface for TrackOutput.sampleData().
Modify TrackOutput.sampleData() to accept SampleDataReader instead of ExtractorInput. SampleDataReader supports only read and skip calls, which all sampleData() implementations already restrict themselves to.

PiperOrigin-RevId: 294905155
2020-02-13 15:46:13 +00:00
kimvde
f5025bfce4 Share seek tests between FLAC extractors
PiperOrigin-RevId: 294893303
2020-02-13 15:46:05 +00:00
kimvde
7a8ab7ce68 FakeTrackOutput: test all the formats sent
PiperOrigin-RevId: 294621946
2020-02-13 15:44:47 +00:00
kimvde
bdfd24290f Share FLAC extractor tests between both extractors
PiperOrigin-RevId: 294614958
2020-02-13 15:44:29 +00:00
olly
1cbe3f72e6 DataSpec: Deprecate most constructors
Keeping (Uri) and (Uri, position, length) to avoid needing
Builder for the trivial case.

PiperOrigin-RevId: 294530226
2020-02-13 15:43:54 +00:00
ybai001
397aafb3ce Add EAC3 and AC-4 test assets 2020-02-13 09:47:18 +08:00
kim-vde
fed0acc253 Merge pull request #6949 from DolbyLaboratories:dev-v2-assets
PiperOrigin-RevId: 294441610
2020-02-11 17:12:55 +00:00
kimvde
b69918a21e Move assets from extractor to testdata module
PiperOrigin-RevId: 293608745
2020-02-11 17:09:39 +00:00
kimvde
cbaa4a7c57 Avoid sending duplicate formats in AC3 extractor
PiperOrigin-RevId: 293582663
2020-02-11 17:09:31 +00:00
kimvde
011efcc522 Move FLAC assets from extractor to testdata module
PiperOrigin-RevId: 293552271
2020-02-11 17:09:00 +00:00
kimvde
a9507a0064 Make FakeExtractorOutput dump additional seek points
PiperOrigin-RevId: 293337032
2020-02-11 17:08:00 +00:00
aquilescanta
0f6bf1525d Remove unused test asset
Unused since [Internal ref: <unknown commit>].

PiperOrigin-RevId: 292932188
2020-02-11 17:07:44 +00:00
kimvde
a6f22cd96c BinarySeachSeeker: mark seek finished after reading input
This allows to continue the seek in case an error is thrown when reading
from the input.

PiperOrigin-RevId: 292924295
2020-02-11 17:07:33 +00:00
olly
b23940dc61 Clean up Vorbis header
The functional change is to set the bitrate fields to Format.NO_VALUE
in the case that they're non-positive in the header data. Else it's
very easy to to take the fields and copy them directly into Format as
incorrect values.

Issue #2863

PiperOrigin-RevId: 292920141
2020-02-11 17:07:10 +00:00
kimvde
ed88f4f1dd Add possibility to update ExtractorOutput duration
PiperOrigin-RevId: 292912511
2020-02-11 17:06:48 +00:00
ybai001
35930623bd Add eac3 test assets and cases 2020-02-06 09:56:46 +08:00
olly
3a702cf53a Change Format.createTextSampleFormat for common uses cases
PiperOrigin-RevId: 292863614
2020-02-03 11:20:56 +00:00
olly
0be3451c39 Change Format.createImageSampleFormat for common use case
PiperOrigin-RevId: 292570360
2020-02-03 11:20:40 +00:00
olly
d287e13d9e Add Format.createSampleFormat for common use case
PiperOrigin-RevId: 292562678
2020-01-31 17:52:51 +00:00
olly
ff822ff9fd HLS: Fix key rotation
Passing EXT-X-KEY DrmInitData through the FragmentedMp4Extractor
doesn't work for streams with key rotation, because an extractor
instance is used for multiple segments, but is only passed the
EXT-X-KEY DrmInitData corresponding to the first segment.

This change removes passing DrmInitData through the extractor,
and instead passes it via FormatAdjustingSampleQueue. This is
in-line with how manifest DrmInitData is handled during DASH
playbacks.

Issue: #6903
PiperOrigin-RevId: 292323429
2020-01-30 19:30:58 +00:00
kimvde
427db0b532 Update mp3 test files to test more common use cases
PiperOrigin-RevId: 292110291
2020-01-30 19:30:04 +00:00