193 Commits

Author SHA1 Message Date
olly
eeec2b2e77 Final README updates
PiperOrigin-RevId: 402547071
2021-10-12 19:52:39 +01:00
christosts
4b3cbfd64f End to end test for WebVTT sideloaded subtitles
Enable subtitle output in the PlaybackOutput and disable the text
renderer in the MkvPlaybackTest. Add WebvttPlaybackTest to test the
output of side-loaded WebVTT subtitles.

PiperOrigin-RevId: 402526588
2021-10-12 19:48:48 +01:00
olly
e7c6ed5e7f Mechanical README cleanups
PiperOrigin-RevId: 401767060
2021-10-09 18:14:36 +01:00
olly
585b0bddcc DASH: Set MIME, width and height for image adaptation sets
Issue: #9500
PiperOrigin-RevId: 401091261
2021-10-06 20:55:10 +01:00
ibaker
c927bc8358 Add clearkey-based DRM playback emulator tests
These give some documentation-as-code for a clearkey integration with
ExoPlayer.

#exofixit

PiperOrigin-RevId: 398017708
2021-09-23 14:51:10 +01:00
olly
a34809bb9d Tweak use of TimestampAdjuster for seeking
- Fix use of getTimestampOffsetUs in TsExtractor where
  getFirstSampleTimestampUs should have been used.
- Don't reset TimestampAdjuster if it's in no-offset mode.
- Improve comment clarity

#minor-release

PiperOrigin-RevId: 388682711
2021-08-04 18:40:45 +01:00
apodob
8cddd4d80d Add font-size support to WebVTT CssParser.
This CL addresses the github issue [#8946](https://github.com/google/ExoPlayer/issues/8964). That issue requests support for `font-size` CSS property in WebVTT subtitle format. This CL:
* Adds support for `font-size` property by extending capabilities of WebVTT `CssParser`. Implementation of `font-size` property value parsing is based on the one in `TtmlDecoder`.
* Adds unit test along with test file containing WebVTT subtitles with all currently supported `font-size` units.

#minor-release

PiperOrigin-RevId: 388423859
2021-08-03 15:35:21 +01:00
bachinger
3f9093cc02 Add BaseUrlExlusionList and use it to select base URLs
Issues: #771 and #7654
PiperOrigin-RevId: 386850707
2021-07-27 12:23:34 +01:00
bachinger
f9162c07c2 Merge pull request #9207 from dlafayet:ruby-position
PiperOrigin-RevId: 386836747
2021-07-27 12:19:29 +01:00
Denise LaFayette
27576cfc73 Fix bug where rubyPosition in text node is not applied
Also fix bug where rubyPosition in ruby container style is not applied
2021-07-20 12:14:59 -04:00
andrewlewis
7d05f20493 Signal container MIME type for JPEGs
Before this change the `Format` on the image track output by the
`JpegExtractor` doesn't have a MIME type.

PiperOrigin-RevId: 381015819
2021-06-30 13:19:00 +01:00
bachinger
b48b618bce Parse multiple BaseURL elements
After this change, multiple BaseURL elements are parsed, but the player still only uses the first BaseURL element appearing in the manifest and its corresponding availabilityTimeOffsetUs.

PiperOrigin-RevId: 380775256
2021-06-30 13:11:25 +01:00
bachinger
f609fecf9b Parse BaseURL element including DVB attributes in DASH manifest
This change parses the entire BaseURL element including DVB extension attributes, stores it in an instance of new BaseUrl class and puts it in a list of base URLs of the resulting Representation. The base url handling itself is still the same, which means that only the first base url is taken into account, just as before this change.

PiperOrigin-RevId: 380609495
2021-06-21 22:28:17 +01:00
claincly
b05e8f5090 Add RTP streaming test to playback test.
The test prepare_withSupportedTrack_playsTrackUntilEnded

- sets up the supported AAC track with the RTSP server;
- uses RtpPacketTransmitter to send RTP packets from the server to the client;
- runs the player until the playback has ended, and
- asserts on the data RTSP has received and queued to the SampleQueue.

In the test, it was necessary to create a FakeUdpDataSourceRtpDataChannel. The
reason we cannot reuse TransferRtpDataChannel is, we rely on BlockingQueue.poll
timeout to identify the end of an RTSP stream, but the time out mechanism is
unstable in Robolectric. For example, when the timeout is set to 8,000 ms, the
actual timeout occasionally happens after 2,000,000 ms (in FakeClock).

PiperOrigin-RevId: 380528710
2021-06-21 22:20:47 +01:00
claincly
8cc1328d89 Allow customizing the RtspServer using RtspServerResponseProvider.
PiperOrigin-RevId: 379282201
2021-06-15 18:31:58 +01:00
claincly
1dddb8eb1e Allow RtspServer read a RTP dump file.
#minor-release

PiperOrigin-RevId: 377001305
2021-06-02 18:11:27 +01:00
aquilescanta
85e4137b81 Add test for ColorInfo in MP4
PiperOrigin-RevId: 375992816
2021-05-27 10:44:50 +01:00
Kei Murayama
f05197c4d5 Support parsing MPEG-H 3D Audio
First intention to support parsing MPEG-H 3D Audio in ExoPlayer is to
take advantage of parsing capability from MediaParser API in AOSP.
Just with this change ExoPlayer does't support decoding MPEG-H 3D Audio
but can support decoding either by adding decoder with an extension or
by using Android OS which has decoder capability with MediaCodec API.
2021-05-10 17:55:03 +09:00
dlafayet
8c7d6447c0 Merge #8858: Support ebutts:multiRowAlign in TTML text renderer
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/8858

Fix bug in text alignment inheritance where child does not correctly inherit ancestor's setting

@icbaker
Merge 70eb4bceb73b3f07e2f8d545b4fa7961189ac52a into 45616f916b28c9187b3e0f0dd18797464a079cdc

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/ExoPlayer/pull/8877 from dlafayet:multirowalign-cue d942b50a40525fea5d11b35a33d3bbc512550960
PiperOrigin-RevId: 371306966
2021-04-30 18:54:13 +01:00
bachinger
99492902c0 Merge pull request #8877 from dlafayet:textAlign
PiperOrigin-RevId: 371306900
2021-04-30 18:53:54 +01:00
ibaker
f56c1a1253 SSA: Add a test with a present but empty "Style" line
PiperOrigin-RevId: 370897451
2021-04-28 17:32:56 +01:00
Denise LaFayette
5ef0ba4171 Fix bug in TTML inherited text alignment
Fix bug where child does not correctly inherit ancestor's text
alignment setting.

Make it so that alignment is only applied on a P node.
https://www.w3.org/TR/2018/REC-ttml2-20181108/#style-attribute-textAlign
2021-04-27 11:29:37 -07:00
Abel Jimenez
852101a43f initial commit for underline and strikeout 2021-04-21 18:19:38 -07:00
ibaker
84282d7c32 Parse DASH forced_subtitle role
#minor-release

Issue: #8781
PiperOrigin-RevId: 368212289
2021-04-13 18:01:20 +01:00
ibaker
9e0e937c31 Remove pipelining from MetadataRenderer
This reverts
<unknown commit>

Which was a temporary workaround for Issue: #1874

Also add a loop to ensure we process as many metadata items as
applicable in each render() call.

PiperOrigin-RevId: 366965504
2021-04-06 16:14:36 +01:00
ibaker
af926deb7a Use outputStreamEnded for MetadataRenderer#isEnded
Issue: #8710
#minor-release
PiperOrigin-RevId: 366051836
2021-04-01 16:06:09 +01:00
ibaker
056ef5c914 Use Metadata.Entry.toString in PlaybackOutput test logging if possible
Add an allowlist of Metadata.Entry implementations with stable toString
overrides.

PiperOrigin-RevId: 366037505
2021-04-01 16:05:44 +01:00
ibaker
c02288452b Add test for emsg near to end of DASH period
The dumped output should include metadata, but doesn't because of
Issue: #8710. The fix is in a follow-up change.
PiperOrigin-RevId: 366028303
2021-04-01 16:05:27 +01:00
Oliver Woodman
6603c6bbcf Merge pull request #8720 from dlafayet:tts-shear-block
PiperOrigin-RevId: 365998615
2021-04-01 16:05:00 +01:00
Denise LaFayette
4be774aaac Support tts:shear in TTML parser and WebView output 2021-03-24 12:39:44 -07:00
kimvde
2c76bc5a4c JpegExtractor: support JFIF segment preceding Exif segment
#minor-release

PiperOrigin-RevId: 364561115
2021-03-24 18:06:16 +00:00
Ian Baker
6c688891e3 Merge pull request #8653 from dlafayet:textemphasis
PiperOrigin-RevId: 364363882
2021-03-24 18:05:46 +00:00
Ian Baker
c3e3b19ad2 Merge pull request #8654 from abeljim:dev-v2-8435-bolditalic
PiperOrigin-RevId: 361767801
2021-03-12 10:40:58 +00:00
Denise LaFayette
4ad6454713 Address code review comments
- Refactor TextEmphasis class to support different ordering of styles
- Merge RubySpan.Position and TextEmphasisSpan.Position
- Remove TTML constructs from Spanned classes
2021-03-04 15:49:28 -08:00
Ian Baker
d80d548503
Merge branch 'dev-v2' into dev-v2-8435-bolditalic 2021-03-04 09:41:39 +00:00
ibaker
34d76a793b Make SsaDecoder robust against absent Format items
Suggested in a comment on PR Issue: #8615

PiperOrigin-RevId: 359522217
2021-03-02 17:02:15 +00:00
Abel Jimenez
ec69977a1c ssa bold and italic 2021-03-01 15:55:34 -08:00
Abel Jimenez
71409c440a ssa bold and italic 2021-03-01 15:52:24 -08:00
Denise LaFayette
fcda8d47ff Support tts:textEmphasis in TTML parser and WebView output 2021-03-01 14:21:22 -08:00
marcbaechinger
4ed36e19cf Merge pull request #8615 from szaboa:dev-v2-8435-ssa-font-size
PiperOrigin-RevId: 359244236
2021-02-24 15:46:44 +00:00
Arnold Szabo
9c35d76184 Parse font size into float, and fallback to Cue.DIMEN_UNSET instead of null. 2021-02-22 20:33:12 +01:00
kimvde
da52de669c Avoid skipping the first decoder output buffers after speed change
#minor-release

PiperOrigin-RevId: 355652144
2021-02-04 18:14:35 +00:00
andrewlewis
c3bce234ca Improve format propagation in transformer
- Store output format in `MediaCodecAdapterWrapper` when we get a format from
  the codec, instead of creating it on demand.
- Make format building code not audio-specific.
- Remove `MediaCodecAdapterWrapper.getConfigFormat` and instead keep track of
  the input/output formats in the renderer. This will mean that the code still
  works if an audio processor changes the audio format in future.
- Make exceptions thrown during audio rendering use the same (input) renderer
  format.
- Misc other minor cleanup.

#minor-release

PiperOrigin-RevId: 354556619
2021-02-01 18:11:04 +00:00
andrewlewis
afb41123c2 Switch transformer tests to use dump files
Add an interface to muxers to allow tests to pass a dumpable muxer.

#minor-release

PiperOrigin-RevId: 354543388
2021-02-01 18:10:55 +00:00
Oliver Woodman
c9fce083f3 Merge pull request #8490 from szaboa:dev-2-8435-ssa-color
PiperOrigin-RevId: 354293679
2021-02-01 18:10:35 +00:00
Arnold Szabo
28a3921a6a Add color decoding tests to SsaDecoderTest, remove SubStation Alpha colors" from media.exolist.json. 2021-01-26 22:57:10 +01:00
kimvde
0d85958a76 Fix parsing of Vorbis codec private
- Fix comparison between a byte and 0xFF to avoid conversion of 0xFF to
  byte and to int again (due to numeric promotion).
- Fix addition of int and byte with most significant bit set. The byte
  was incorrectly promoted to an int negative value.

Issue:#8496
#minor-release
PiperOrigin-RevId: 353865751
2021-01-26 15:59:41 +00:00
tonihei
737630740c Add WAV playback tests.
The output dumps are intentionally empty because the playback
is using bypass modes.

Still adding a AUDIO_RAW decoder to the ShadowMediaCodecConfig to
ensure that we would output samples if bypass mode were disabled.

PiperOrigin-RevId: 352794959
2021-01-22 16:20:44 +00:00
andrewlewis
981826555c Add support for playing JPEG motion photos
PiperOrigin-RevId: 352413375
2021-01-18 22:00:36 +00:00
olly
4359016145 Fix disabling of bypass
PiperOrigin-RevId: 352403189
2021-01-18 22:00:28 +00:00