343 Commits

Author SHA1 Message Date
Oliver Woodman
0744989db9 Merge pull request #9709 from Marksss:release-v2
PiperOrigin-RevId: 415272874
2021-12-10 16:50:34 +00:00
shenxl
c8fa51c7c8 length->bytesLeft 2021-12-07 10:03:00 +08:00
olly
0fdbff43e0 Fix 1 ErrorProneStyle finding
PiperOrigin-RevId: 413188534
2021-12-02 15:21:02 +00:00
Marksss
13eb9c5908 fix ArrayIndexOutOfBoundsException when playing flv 2021-12-01 16:56:42 +08:00
kimvde
dbec03b543 Fix inconsistency with spec in H.265 SPS nal units parsing
Issue: google/ExoPlayer#9719

#minor-release

PiperOrigin-RevId: 412424558
2021-11-26 16:19:51 +00:00
christosts
349160a5cf Populate ICY headers into MediaMetadata
Populate ICY headers into MediaMetadata so that they can
propagate to the app via AnalyticsListener#onMediaMetadataChanged().
This change copies IcyHeaders.name into MediaMetadata.description
and IcyHeaders.genre into MediaMetadata.genre.

Note: MediaItem.metadata maintain their precedence and overwrite any
ICY headers parsed.

Issue: google/ExoPlayer#9677

#minor-release

PiperOrigin-RevId: 410495676
2021-11-18 13:13:27 +00:00
tonihei
04517e17d4 Merge pull request #9543 from KasemJaffer:rf64
PiperOrigin-RevId: 408816643
2021-11-11 10:21:29 +00:00
kimvde
4082d8a63d WavExtractor: skip unknown chunks consistently
#minor-release

PiperOrigin-RevId: 408550935
2021-11-09 15:09:42 +00:00
kimvde
9e247d287f WavExtractor: split header reading state into 2 states
This refactoring is the basis to support RF64 (see
Issue: google/ExoPlayer#9543).

#minor-release

PiperOrigin-RevId: 407301056
2021-11-03 15:57:39 +00:00
aquilescanta
be4ea151c4 Parse HDR static metadata from MP4 files
#minor-release

PiperOrigin-RevId: 407136922
2021-11-03 15:57:11 +00:00
kimvde
1139399193 WavExtractor: split header reading state into 2 states
This refactoring is the basis to support RF64 (see
Issue: google/ExoPlayer#9543).

#minor-release

PiperOrigin-RevId: 407301056
2021-11-03 15:21:28 +00:00
aquilescanta
41e338229a Parse HDR static metadata from MP4 files
#minor-release

PiperOrigin-RevId: 407136922
2021-11-03 15:07:30 +00:00
tonihei
4803ab3bd1 Fix rounding error in fMP4 presentation time calculation
The presentation time in fMP4 is calculated by adding and subtracting
3 values. All 3 values are currently converted to microseconds first
before the calculation, leading to rounding errors. The rounding errors
can be avoided by doing the conversion to microseconds as the last step.

For example:
In timescale 96000:  8008+8008-16016 = 0
Rounding to us first: 83416+83416-166833=-1

#minor-release

PiperOrigin-RevId: 406809844
2021-11-01 17:36:49 +00:00
tonihei
c05a5a162f Fix rounding error in fMP4 presentation time calculation
The presentation time in fMP4 is calculated by adding and subtracting
3 values. All 3 values are currently converted to microseconds first
before the calculation, leading to rounding errors. The rounding errors
can be avoided by doing the conversion to microseconds as the last step.

For example:
In timescale 96000:  8008+8008-16016 = 0
Rounding to us first: 83416+83416-166833=-1

#minor-release

PiperOrigin-RevId: 406809844
2021-11-01 16:43:48 +00:00
kimvde
fa98935c06 WavExtractor: split read stages into states
This refactoring is the basis to support RF64 (see
Issue: google/ExoPlayer#9543).

#minor-release

PiperOrigin-RevId: 406377924
2021-11-01 10:05:11 +00:00
christosts
8acce1b5c2 DefaultExtractorsFactory: lazily load flac extension
PiperOrigin-RevId: 406332026
2021-10-29 12:56:35 +01:00
ibaker
1c824561c6 Migrate callers of deprecated C.java methods to Util.java
#minor-release

PiperOrigin-RevId: 406166670
2021-10-29 11:31:50 +01:00
ibaker
39639f8df0 Allow missing full_range_flag in colr box with type=nclx
Test file produced with:
$ MP4Box -add "sample.mp4#video:colr=nclc,1,1,1" -new sample_18byte_nclx_colr.mp4

And then manually changing the `nclc` bytes to `nclx`.

This produces an 18-byte `colr` box with type `nclx`. The bitstream of
this file does not contain HDR content, so the file itself is invalid
for playback with a real decoder, but adding the box is enough to test
the extractor change in this commit.

(aside: MP4Box will let you pass `nclx`, but it requires 4 parameters, i.e. it
requires the full_range_flag to be set, resulting in a valid 19-byte colr box)

#minor-release
Issue: #9332
PiperOrigin-RevId: 405842520
2021-10-27 13:25:27 +01:00
aquilescanta
383bad80ce Generalize findEsdsPosition to support other types
- This CL does not introduce functional changes.
- This change will allow searching for the clli box while
  parsing the mdcv box in order to construct the HDR
  static info contained in ColorInfo.

#minor-release

PiperOrigin-RevId: 405656499
2021-10-27 13:08:23 +01:00
andrewlewis
0ad1cdbfa1 Tidy READMEs
PiperOrigin-RevId: 405598530
2021-10-26 14:08:21 +01:00
olly
23b46d2e0c Move NAL unit utils to extractor module
PiperOrigin-RevId: 405473686
2021-10-25 21:39:11 +01:00
olly
101b94f874 Remove dependency from opus module to extractor module
PiperOrigin-RevId: 405429757
2021-10-25 21:35:39 +01:00
olly
37b5847681 Get decoder buffers into the right place
PiperOrigin-RevId: 404876228
2021-10-21 23:16:02 +01:00
olly
ce17f61899 Add decoder module
PiperOrigin-RevId: 404810682
2021-10-21 18:41:33 +01:00
olly
ea2013948a Finalize text package
PiperOrigin-RevId: 404277755
2021-10-19 17:32:24 +01:00
olly
2ef2206041 Move text classes that don't need to live in common.
PiperOrigin-RevId: 404079772
2021-10-18 23:52:28 +01:00
olly
d601875452 Rename releaseArtifact to releaseArtifactId
PiperOrigin-RevId: 404059404
2021-10-18 22:45:47 +01:00
olly
dd23cb13da Fix moving of DataReader
PiperOrigin-RevId: 403965543
2021-10-18 16:24:57 +01:00
olly
80286b42d6 Move metadata classes that don't need to live in common.
PiperOrigin-RevId: 403945085
2021-10-18 15:45:36 +01:00
olly
a242aa221e Move DataReader to common
PiperOrigin-RevId: 403928449
2021-10-18 15:34:37 +01:00
olly
18cf01cda6 Move DataSource utils into a DataSourceUtil class
PiperOrigin-RevId: 403910535
2021-10-18 15:25:43 +01:00
Kasem SAEED
69b2dd0fbf Change condition to not log warning for RF64 files 2021-10-15 08:48:41 -07:00
Kasem
8501e997e0 Fix wrong RF64 data size and add unit test 2021-10-14 19:21:30 -07:00
olly
b2bf9f4d0f Fix missing import
PiperOrigin-RevId: 403113286
2021-10-14 23:23:57 +01:00
kim-vde
059dfaef7c Merge pull request #9496 from DolbyLaboratories:dev-v2-truehd
PiperOrigin-RevId: 403081883
2021-10-14 16:16:05 +01:00
christosts
a18e281275 SubtitleExtractor: optimize calls to ExtractorInput.read()
When ExtractorInput.getLength() returns a defined length, the
SubtitleExtractor will create a buffer of the same length, call
ExtractorInput.read() until it has read the input bytes, plus one more
time where ExtractorInput.read() returns RESULT_END_OF_INPUT. The last
call to ExtractorInput.read() however will make the SubtitleExtractor to
increase its buffer (including a copy) unnecessarily.

This change makes the SubtitleExtractor avoid calling
ExtractorInput.read() if the expected number of bytes have already
been read, so that the internal buffer does not grow.

PiperOrigin-RevId: 402583610
2021-10-12 20:04:46 +01:00
christosts
a56af3d0e0 SubtitleExtractor: mark the limit of the input buffer
Before this change, the SubtitleExtractor did not mark the limit
of the input buffer, thus the SubtitleDecoder attempted to decode
more bytes. If the subtitle file had a new line at the end, this
bug would make the SubtitleDecoder append an line break after the
last subtitle.

PiperOrigin-RevId: 402523039
2021-10-12 19:44:46 +01:00
olly
8a9dcadef3 README updates for misc modules
PiperOrigin-RevId: 402292139
2021-10-12 19:40:44 +01:00
olly
69f2692389 Register modules with common
PiperOrigin-RevId: 402267733
2021-10-11 14:18:37 +01:00
Kasem SAEED
55a86b8a00 Add support for RF64 wave files 2021-10-07 08:41:12 -07:00
kimvde
84881739ee Map TS stream type 0x80 to H262
Issue: #9472
PiperOrigin-RevId: 400715255
2021-10-04 15:43:47 +01:00
bachinger
014ee8f5d8 Remove fully qualified class names in link tags
PiperOrigin-RevId: 400224459
2021-10-04 11:53:39 +01:00
glass
d6bc49cc54 Add Dolby TrueHD extraction test for MP4 files.
Signed-off-by: glass <glass@dolby.com>
2021-09-30 16:17:57 +02:00
glass
13f4c832da Add MP4 extraction of Dolby TrueHD samples
Extract 16 access units per readSample call to align
with what's done in MKV extraction.

Signed-off-by: glass <glass@dolby.com>
2021-09-30 16:17:56 +02:00
bachinger
6d014cbfd2 Move SubtitleExtractor to text package
PiperOrigin-RevId: 399661676
2021-09-30 11:20:44 +01:00
bachinger
3e7b2d06c1 Move SubtitleExtractor to text package
PiperOrigin-RevId: 399400909
2021-09-28 16:41:08 +01:00
Oliver Woodman
9108dc5b0e Merge pull request #9421 from MarcusWichelmann:hevc-sps-parsing
PiperOrigin-RevId: 398749045
2021-09-24 18:13:01 +01:00
bachinger
4fec4b8f6a Move format specific metadata packages to lib-extractor
PiperOrigin-RevId: 398262695
2021-09-23 15:13:10 +01:00
bachinger
f2a027e068 Move text classes from lib-exoplayer to lib-extractor and lib-common
PiperOrigin-RevId: 398247348
2021-09-23 15:09:07 +01:00
ibaker
ad99a44083 Add empty sdk-version node to all AndroidManifest.xml files
PiperOrigin-RevId: 397772916
2021-09-21 14:17:33 +01:00