515 Commits

Author SHA1 Message Date
rohks
3709e90e34 Fix MP4 parser issue in reading length of URL array from esds boxes.
As per MP4 spec, the length of URL array is a 8 bit number.

#minor-release

PiperOrigin-RevId: 458421436
(cherry picked from commit 5095ff160bec2fdad21a51351373a03073236ffd)
2022-07-01 09:39:11 +00:00
olly
d86bc1078c Fix parsing H265 short term reference picture sets
Issue: google/ExoPlayer#10316
PiperOrigin-RevId: 456084302
2022-06-27 11:23:40 +01:00
olly
3727385555 Fix parsing H265 short term reference picture sets
Issue: google/ExoPlayer#10316
PiperOrigin-RevId: 456084302
(cherry picked from commit d86bc1078c8f95f8420253e8e8ad7550d09b03f1)
2022-06-20 16:46:15 +01:00
Marc Baechinger
1ca382d138 Merge pull request #9915 from dburckh:avi
PiperOrigin-RevId: 455094147
2022-06-15 15:04:32 +00:00
Marc Baechinger
a785fbe014 Merge pull request #9915 from dburckh:avi
PiperOrigin-RevId: 455094147
(cherry picked from commit 1ca382d138b30ecebe3d1ceab2442e0e53bdd388)
2022-06-15 16:51:04 +00:00
ibaker
27e0c80792 Permit duplicate Opus headers
This reinstates the permissive behaviour removed by
fe7e5b8181

Test file created by opening bear.opus in a hex editor and naively
duplicating the two header packets, starting at (and including) the
first `OggS` in the file and ending just before the third `OggS`.

#minor-release

Issue: google/ExoPlayer#10038
PiperOrigin-RevId: 452015662
(cherry picked from commit b6b282672c45263d0f9e2b6ece4f6de1083812cb)
2022-05-31 14:06:59 +00:00
ibaker
b6b282672c Permit duplicate Opus headers
This reinstates the permissive behaviour removed by
fe7e5b8181

Test file created by opening bear.opus in a hex editor and naively
duplicating the two header packets, starting at (and including) the
first `OggS` in the file and ending just before the third `OggS`.

#minor-release

Issue: google/ExoPlayer#10038
PiperOrigin-RevId: 452015662
2022-05-31 14:00:59 +00:00
hmzh
dce0db35f1 Refactor MIDI and Flac extractor loaders for deduplication
Add MIDI filetype information for use in the ExtractorsFactory

PiperOrigin-RevId: 447976272
2022-05-24 10:37:39 +01:00
ibaker
a0ac261873 Remove ExoPlayer's RawCcExtractor
RawCC is a Google-internal subtitle format, and is no longer used with
ExoPlayer.

PiperOrigin-RevId: 446950691
2022-05-06 12:05:37 +01:00
ibaker
c5ad28a96c Remove empty <p> tag from WebvttDecoder
PiperOrigin-RevId: 445217294
2022-05-09 11:10:58 +01:00
olly
825976c987 Reading AV1 initialization data.
We add an entire class like we do for parsing other codec initialization formats; it's currently not doing any parsing though (... initialization data is really simple for AV1 though: just the entire contents of the box).

For testing, we add the sample file, having been re-encoded with ffmpeg (and we also happen to have another av1 file, too).

PiperOrigin-RevId: 444890282
2022-05-09 10:40:44 +01:00
ibaker
91b0d55fb3 Fix calculations that may lose precision compared to their target type
PiperOrigin-RevId: 444861268
2022-05-09 10:30:39 +01:00
Ian Baker
925a907c5f Merge pull request #9967 from jruesga:cea708-handle-multiple-service-blocks
PiperOrigin-RevId: 444816821
2022-05-09 10:20:22 +01:00
Ian Baker
a8c0a1bdfd Merge pull request #10150 from egor-n:dev-v2-8435-outlinecolour
PiperOrigin-RevId: 444787307
2022-05-09 10:12:53 +01:00
olly
020e3ea5e2 Reading AV1 initialization data.
We add an entire class like we do for parsing other codec initialization formats; it's currently not doing any parsing though (... initialization data is really simple for AV1 though: just the entire contents of the box).

For testing, we add the sample file, having been re-encoded with ffmpeg (and we also happen to have another av1 file, too).

PiperOrigin-RevId: 439453823
2022-04-07 17:20:04 +01:00
olly
200ee68479 Reading average and peak bitrates from esds boxes.
This provides better compatibility with MediaExtractor, which does read these fields; we also need them for being able to mux file contents into another mp4 file.

Also, there is a minor refactor included so that we have an actual type for esds box contents instead of a pair.

PiperOrigin-RevId: 438673825
2022-04-07 16:14:43 +01:00
aquilescanta
202a82a915 Support seeking in un-intearleaved tracks in Mp4Extractor
A client can pass the id of the track on which they want to seek.

PiperOrigin-RevId: 437248055
2022-04-07 14:10:02 +01:00
Egor Neliuba
2bd348effd Consider BorderStyle value before applying OutlineColour as background 2022-04-04 18:26:31 +03:00
Egor Neliuba
388b8d1d88 Add support for SSA OutlineColour (only background)
OutlineColour should be treated as the background color if BorderStyle=3. Since currently BorderStyle is ignored, we can always treat OutlineColor as the background color.
2022-04-03 11:39:06 +03:00
aquilescanta
ce67fa92dc Simplify nullability in Mp4Extractor
PiperOrigin-RevId: 437002406
2022-03-24 15:38:20 +00:00
aquilescanta
2d025a2797 Add maxNumRefFrames to NalUnitUtil
Needed for AVI support.

PiperOrigin-RevId: 436991922
2022-03-24 14:41:28 +00:00
aquilescanta
3b9ab6aa9e Group NAL type constants in NalUnitUtil
To be shared with AviExtractor in a later CL.

PiperOrigin-RevId: 436430385
2022-03-22 10:32:35 +00:00
Jorge Ruesga
4230124335
Rename serviceBlockPacket to captionChannelPacketData
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2022-03-08 16:07:57 +00:00
olly
1bc4ba29f5 FMP4: Fix output of mixed v0 and v1 emsg samples
Issue: google/ExoPlayer#9996
#minor-release
PiperOrigin-RevId: 430773329
2022-03-01 09:46:31 +00:00
olly
d622598285 Add Matroska Extractor Test Sample For Opus
PiperOrigin-RevId: 429386479
2022-02-18 15:03:10 +00:00
olly
e32809cf08 Avoid Clearing Supplemental Data Flag In MatroskExtractor
PiperOrigin-RevId: 429368911
2022-02-18 15:03:02 +00:00
olly
bdcc9ea163 Libopus Support For WebM DiscardPadding
PiperOrigin-RevId: 429364728
2022-02-18 15:03:02 +00:00
Ian Baker
87d8ca0af2 Reformat some javadoc 2022-02-18 15:02:33 +00:00
Dustin
0b629e4be8 Simplified UnboundedIntArray
(cherry picked from commit b4cb20cd31e44fe641aac94fee7e69456e48356c)
2022-02-17 07:39:46 -07:00
olly
d5cb100762 Fix Sample Size For Supplemental Data In MatroskaExtractor
For when a track is both encrypted and has supplemental data, the sample size will be equal to `block sample size - encryption data size`.

PiperOrigin-RevId: 427807612
2022-02-17 10:42:28 +00:00
Dustin
e14617fc32 Merged Robo and non-Robo tests into one file 2022-02-15 10:39:20 -07:00
Dustin
4f09fc36f9 Changed readable values to hex to follow Exo standard 2022-02-15 10:34:24 -07:00
Dustin
1a616b4e00 Added /* package */ to package level variables. 2022-02-15 10:32:43 -07:00
Dustin
f604ee59d1 Changed constants to literals. 2022-02-15 10:31:37 -07:00
Dustin
ac96a2be65 Removed commented code. 2022-02-15 10:30:53 -07:00
Dustin
3886f5f0b6 Code Review Changes
(cherry picked from commit 135e103faa1bd829df0542a7062e67ebcfc8638f)
2022-02-14 14:36:20 -07:00
Jorge Ruesga
9ceba909da
Cea708Decoder: Handle multiple service blocks
When a asset contains multiple cc embedded tracks, current Cea708Decoder service
block parsing logic is discarding all the data in that frame.

For example, a manifest with 2 embedded CEA-708 close captions tracks:

<Accessibility schemeIdUri="urn:scte:dash:cc:cea-708:2015" value="1=lang:eng;2=lang:spa"/>

when the spanish track is selected (service number 2), when processing the
following CEA-708 frame:

FC9420FD2062FF0829FE8CFCFE9818FEE332FE731FFE1042FE2062FE0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000

the frame can be descomposed as:

FF0829 FE8CFC FE9818 FEE332 FE731F FE1042 FE2062 FE0000
  08 (00 001000) 0 (sequence) 8 (frame size)
  298CFC9818E332731F10 422062 0000
  =====
    29 (001 01001) 1 (service number) 9 (service block length)
    8CFC9818E332731F10

    42 (010 00010) 2 (service number) 2 (service block length)
    2062

    0000 Null block service

The current processCurrentPacket logic will discard the whole frame is discarded
because the first service number found in the frame belongs to service number 1,
which is not the one we are currently looking for.

This commit modifies the processCurrentPacket decoding logic, to take into
account all service blocks available in the frame, by iteraring over the
full frame data and skipping those service blocks we are not interesting in.

Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2022-02-10 15:24:54 +00:00
tonihei
17050e8b59 Fix the position of IntDefs to match TYPE_USE
#minor-release

PiperOrigin-RevId: 427131569
2022-02-08 12:34:06 +00:00
olly
2db8807aac Revert of b19ced30c4c2853b09af3382b86f84c31b3a5af5
PiperOrigin-RevId: 426996878
2022-02-08 12:33:53 +00:00
Ian Baker
60d9ae4758 Merge pull request #9924 from jruesga:cea708-decoder-honor-service-block-size
PiperOrigin-RevId: 426953267
2022-02-08 10:56:39 +00:00
ibaker
b19ced30c4 Fix the position of IntDefs to match TYPE_USE
#minor-release

PiperOrigin-RevId: 426855255
2022-02-07 11:17:31 +00:00
ibaker
75932a0216 Mark all public 'rarely used' IntDefs as only TYPE_USE
This is a breaking change if the annotation itself is in use in Kotlin
code. It's judged that the IntDefs in this commit are unlikely to be
referred to often in Kotlin code. This is because they're either:
- Related to esoteric parts of the library, or
- In a common part of the library but only returned from methods (and
  never passed to callback methods).

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426410237
2022-02-07 11:10:11 +00:00
Dustin
05db1717c0 Remove method I didn't end up needing 2022-02-06 06:22:41 -07:00
Dustin
e7cbb3d50a Add yet another Divx FourCC variant. 2022-02-06 06:22:15 -07:00
Dustin
71f094f259 MpegAudioChunkHandler seek fixes 2022-02-05 10:19:26 -07:00
Dustin
247b57692e MpegAudioChunkHandler cleanup and Tests 2022-02-05 09:32:19 -07:00
Dustin
3a9f1f9a34 Improved comments, improved naming consistency. 2022-02-05 07:09:29 -07:00
Dustin
14c842e503 Add coverage for max ref frames 2022-02-05 07:06:58 -07:00
Dustin
84d3f62e88 Fix DefaultExtractorsFactoryTest 2022-02-05 07:06:25 -07:00
Dustin
ba0b991d76 Optimize AvcChunkHandler to use normal ChunkClock if no B Frames. 2022-02-04 19:52:10 -07:00