304 Commits

Author SHA1 Message Date
tonihei
87cd644d00 Add remaining proguard config tests.
This ensures we have full test coverage for proguard configs now.
The only configs not covered by tests are:
 - IMA and OkHttp which copy recommended configs from the respective
   library. I couldn't reproduce failures by removing them (and thus
   couldn't write a test that ensures they are correct).
 - Some dontwarn lines that just suppress warnings.

In addition, this change fixes a couple of related issues:
 - Moved AV1 proguard config to correct module.
 - Removed mentioning of deprecated ExtractorMediaSource from README
 - Suppressed warning from IMA code that prevent proguarding under
   strict rules
 - Fixed wrong proguard exclusion in VP9 module.
 - Moved FLAC exclusion (DefaultExtractorsFactory) to correct module.
 - Added AlertDialog suppression for de-jetified code.
 - Removed unusued dependency from UI module that causes large APK
   size increase.

#exofixit
#minor-release

PiperOrigin-RevId: 344427532
2020-11-27 11:08:34 +00:00
ibaker
3aa17bfb9b Switch extractor tests to single-parameter parameterized syntax
This is simpler than instantiating a single-element string array for
every parameter.

#exofixit

PiperOrigin-RevId: 344237475
2020-11-27 11:06:51 +00:00
kim-vde
1cd08519f1 Merge pull request #8257 from xufuji456:dev-v2
PiperOrigin-RevId: 344057097
2020-11-24 16:04:04 +00:00
olly
f04941ed91 Fix 2 ErrorProneStyle findings:
* These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
  (see http://go/bugpattern/UnnecessaryParentheses) (2 times)

This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Suggest a fix on the CL (go/how-to-suggest-fix).
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.

This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/exoplayer/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/exoplayer/METADATA.
Anything wrong with the signup? File a bug at go/clrobot-bug.

#codehealth

PiperOrigin-RevId: 344053269
2020-11-24 16:03:54 +00:00
kimvde
7a7d3d1b07 Add FMP4 extractor test with sideloaded track
#exofixit

PiperOrigin-RevId: 344052500
2020-11-24 16:03:46 +00:00
tonihei
d4e1904604 Rollback of 483a350e84
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

LSC: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:342788973:BASE:342817196:1605636478036:6c558c0c

***

PiperOrigin-RevId: 343895651
2020-11-24 16:02:45 +00:00
ibaker
31166d41c4 Remove FLAG_SIDELOADED from FragmentedMp4Extractor
This isn't used any more, the last usage was removed in
<unknown commit>

PiperOrigin-RevId: 343266553
2020-11-19 17:13:11 +00:00
tonihei
e5fd2eb088 Rollback of db8356a17c
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

LSC: go/checker-lsc

Tested:
    tap_presubmit: http://test/OCL:342788975:BASE:342885903:1605667635149:7731b723
    Some tests failed; test failures are believed to be unrelated to this CL

***

PiperOrigin-RevId: 343251530
2020-11-19 17:12:33 +00:00
olly
db8356a17c Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
LSC: go/checker-lsc

Tested:
    tap_presubmit: http://test/OCL:342788975:BASE:342885903:1605667635149:7731b723
    Some tests failed; test failures are believed to be unrelated to this CL
PiperOrigin-RevId: 343129490
2020-11-19 17:12:16 +00:00
xufuji456
6682e6235c Compat video coding with mpeg1video in Mp4Extractor 2020-11-19 19:31:43 +08:00
tonihei
f13ffb4390 Rollback of 5d9c2d7b6a
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

***

PiperOrigin-RevId: 343086403
2020-11-18 18:40:30 +00:00
olly
3c91ba14b3 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 343003559
2020-11-18 18:40:17 +00:00
olly
483a350e84 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 342999390
2020-11-18 18:40:06 +00:00
samrobinson
e832a4e0fc Adjust SEF reader times to long.
PiperOrigin-RevId: 342642410
2020-11-16 16:51:09 +00:00
samrobinson
55afddf05c Adjust SEF slow motion parsing to base data type off name.
PiperOrigin-RevId: 342050008
2020-11-13 14:55:10 +00:00
samrobinson
a038b421dd Add additional SEF data types.
PiperOrigin-RevId: 342034166
2020-11-13 14:54:51 +00:00
ibaker
1e776a864b Fix some typos
PiperOrigin-RevId: 341573964
2020-11-11 09:50:30 +00:00
olly
9d3875a860 Matroska: Support additional PCM codec modes
- Support 32-bit A_PCM/FLOAT/IEEE PCM
- Support 8-bit and 16-bit A_PCM/INT/BIG PCM

#minor-release
Issue: #8142
PiperOrigin-RevId: 340264679
2020-11-02 23:02:06 +00:00
samrobinson
2c746c6b6b Generalise the SlowMotion Metadata.Entry naming.
PiperOrigin-RevId: 339352447
2020-11-02 22:57:56 +00:00
samrobinson
c0a0708fc3 Extract SEF slow motion cues as Metadata
PiperOrigin-RevId: 339307746
2020-11-02 22:57:47 +00:00
kimvde
80a37c7ed1 Rename MotionPhoto to MotionPhotoMetadata
This make it clear that this class does not contain any photo/video
data.

PiperOrigin-RevId: 339045203
2020-11-02 22:56:11 +00:00
samrobinson
7ccbf572c7 Add a Metadata Entry class for SEF Slow motion data.
PiperOrigin-RevId: 338695793
2020-11-02 22:55:34 +00:00
kimvde
521a220728 Avoid throwing for still photo metadata retrieval
PiperOrigin-RevId: 338497163
2020-10-23 13:54:31 +01:00
samrobinson
1191820429 Allow additional entries in MetadataUtil.setFormatMetadata.
The primary use of this currently will be for appending SEF metadata.

PiperOrigin-RevId: 338475948
2020-10-23 13:54:21 +01:00
kimvde
175b8eb69e Read Google Photos motion photo metadata
PiperOrigin-RevId: 338436906
2020-10-22 12:37:41 +01:00
Oliver Woodman
3abaef5593 Merge pull request #8088 from xufuji456:dev-v2
PiperOrigin-RevId: 338024866
2020-10-20 14:52:01 +01:00
kimvde
021d725c0a Add motion photo metadata entry
PiperOrigin-RevId: 337863184
2020-10-20 14:51:09 +01:00
xufuji456
af4028f30e Fix MOV with pcm_alaw/pcm_mulaw which is fixedSampleSize 2020-10-19 20:49:29 +08:00
ibaker
2371b024dd Switch to an 'api' dependency on Guava
The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.

Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
2020-10-17 01:34:15 +01:00
kimvde
58ddfe046f Add SVC layer count to MP4 metadata
This is necessary to implement SEF video flattening.

PiperOrigin-RevId: 337048264
2020-10-17 01:33:47 +01:00
kimvde
6f66e7d0ba Small fix in IndexSeekMap
This change was meant to be in 2e5f2f12ad but
was not added my mistake.

PiperOrigin-RevId: 337041686
2020-10-17 01:33:09 +01:00
kim-vde
2e5f2f12ad Merge pull request #7378 from shenwill:dev-v2
PiperOrigin-RevId: 336875300
2020-10-13 16:30:01 +01:00
ibaker
d2db0bb74a Ensure ParsableByteArray is large enough when appending in VorbisReader
PiperOrigin-RevId: 336643621
2020-10-13 16:27:48 +01:00
kimvde
53f50f7c0e Ignore negative payload size in TS PesReader
Issue: #8005
PiperOrigin-RevId: 335625992
2020-10-06 14:31:59 +01:00
kimvde
6ed371aaf3 Add search bytes parameter to TsExtractor
Context: Issue: #7988
PiperOrigin-RevId: 335608610
2020-10-06 14:31:41 +01:00
ibaker
ae0d9b1359 Preserve limit when resetting ParsableByteArray in OggPacket#populate
When I moved ParsableByteArray#data behind a getter I replaced some
assignments with calls to reset(byte[]):
ce2e6e2fd6

reset(byte[]) deliberately sets `limit` to `data.length`, in order to
handle cases that were reassigning `data` but not updating `limit`.
However OggPacket was already using `limit` to track where to write
'new' data into the array, so changing `limit` to `data.length` caused
us to try and write new data beyond the end of the array.

I looked at other uses of reset(byte[]) in ce2e6e2fd6
and condluded the only other usage in MatroskaExtractor is legit and
shouldn't be updated like this (because MatroskaExtractor previously
*wasn't* correctly updating/maintaining `limit`).

Issue: #7992
PiperOrigin-RevId: 334601586
2020-10-06 14:30:01 +01:00
Will
34ef9b2042 Add tests for the FlvExtractor seek map. Fix an EOF seeking issue. 2020-09-26 15:30:58 +08:00
kimvde
908785b701 Parse TLEN duration in Mp3Extractor
Issue: #7949
PiperOrigin-RevId: 333733615
2020-09-25 16:34:46 +01:00
samrobinson
851ca20cc0 Add support for mp2 boxes.
Issue: #7967
PiperOrigin-RevId: 333709003
2020-09-25 16:33:52 +01:00
ibaker
c76bc43de6 Delete sample_cbs.adts test asset
This seems to be an exact copy of sample.adts. Update the test to use
the same sample but just output to a different dump file.

PiperOrigin-RevId: 333469714
2020-09-25 16:31:20 +01:00
andrewlewis
69ca49f939 Add support for 'mett' sample description
PiperOrigin-RevId: 333272292
2020-09-25 16:31:02 +01:00
andrewlewis
a196fb0778 Remove unused MP4 atom type
PiperOrigin-RevId: 333051018
2020-09-25 16:30:34 +01:00
Will
989a97ebbd Get frame rate from mkv. Get frame rate from AvcConfig. 2020-09-19 11:30:14 +08:00
Will
8bed008934 Merge remote-tracking branch 'upstream/dev-v2' into dev-v2 2020-09-19 02:23:33 +08:00
olly
cdcb30ed21 Exclude Guava transitive annotation dependencies
PiperOrigin-RevId: 331148067
2020-09-11 16:01:15 +01:00
olly
b2b08ade99 Make User-Agent optional
PiperOrigin-RevId: 330593247
2020-09-09 09:41:51 +01:00
tonihei
bfe17aee3e Support ExtractorFactory in DefaultMediaSourceFactory.
This allows to customize extractor flags more easily when setting up the player.

In addition, we need to provide a way to pass in the ExtractorFactory through
the constructor chain starting in SimpleExoPlayer so that removing the
DefaultExtractorsFactory is possible for R8.

PiperOrigin-RevId: 330472935
2020-09-09 09:41:42 +01:00
kim-vde
bcad98b9ff Merge pull request #7667 from willtrking:dev-v2-mkv-dovi
PiperOrigin-RevId: 328536503
2020-08-26 16:40:35 +01:00
kimvde
6960dde8a8 Add nullness annotations to FragmentedMp4Extractor
PiperOrigin-RevId: 327797428
2020-08-26 16:39:07 +01:00
William King
b7739283e0 add back removed tests 2020-08-18 21:25:48 -07:00