5060 Commits

Author SHA1 Message Date
Oliver Woodman
5d1052f6ec Allow specifying the AudioTrack's stream type.
Issue: #755
2015-09-07 13:58:54 +01:00
Oliver Woodman
ab2aac9d3f Infer mime types from DASH manifest. 2015-09-07 13:58:31 +01:00
Oliver Woodman
9592a8a4ff Fix IFR parsing 2015-09-07 13:57:45 +01:00
Oliver Woodman
8c3f93d6bf Start to fix media mime types.
- Admit we don't know the mime type (using unknown mime types) rather
  than passing the container mime type.
- Pass the correct mime type for opus, vp9 and vp8, and remove the incorrect
  container checks in the corresponding extensions.
2015-09-07 13:56:54 +01:00
Oliver Woodman
4104a8def9 Handle raw TTML in DASH correctly. 2015-09-07 13:55:35 +01:00
Oliver Woodman
0c968703c8 Add playback tests (work in progress).
All valid Android devices should pass these tests.
2015-09-01 14:29:47 +01:00
Oliver Woodman
e6a93a08de Update instructions for building with latest libvpx.
- Fix building with APP_ABI=all by configuring for all architectures.
- Keep vpx_dsp which is required for building successfully.
- Use perl -pi -e not sed, for building on Macs.
2015-09-01 14:24:46 +01:00
Oliver Woodman
7a0f00ce41 No-op setting volume to current volume. 2015-09-01 14:23:35 +01:00
Oliver Woodman
3c65df92c2 Allow multiple sources for text.
Issue #753
2015-09-01 14:23:10 +01:00
Oliver Woodman
ecd48da1de Multi-track support for DASH.
- With this change, you can select from the individual video formats in
the demo app, as well as the regular "auto" (adaptive) track.
- DashRendererBuilder no longer needs to create MultiTrackChunkSource
instances for the multiple tracks to be exposed.
2015-09-01 14:22:18 +01:00
Oliver Woodman
6cf261aed7 Move default SmoothStreaming track selection to library. 2015-09-01 14:20:23 +01:00
Oliver Woodman
4b2991267e Some renaming to make format use slightly clearer. 2015-09-01 14:19:40 +01:00
Oliver Woodman
fae6c65367 Be robust against manifests that don't define top level duration explicitly.
I think such manifests are invalid, and I haven't seen any examples,
but given it's trivial to fill in the duration if the periods define
durations, it seems worth being robust.
2015-09-01 14:19:06 +01:00
Oliver Woodman
2f4c96781d Refactor handling of period start times and durations.
- It's not possible to determine a period's duration just from the
corresponding Period element in a DASH manifest. It's necessary
to look at the start time of the next period (or the duration of the
manifest for the last period) to determine how long a period is. We
don't currently do this in the parser, and hence set duration incorrectly.
We also set period start times incorrectly because we don't set it to
equal to sum of the durations of prior periods in the case where it's
not explicitly defined.

- We're currently propagating these (incorrect) values all over the place
through data-structures that we build when parsing the Period element.

- This CL removes this redundancy, storing only the start time of each
period in Period elements, and not propagating it elsewhere. It's then
used when required in DashChunkSource.
2015-09-01 14:18:28 +01:00
Oliver Woodman
cb85dc25aa Clean up max dimension handling. 2015-09-01 14:17:21 +01:00
Oliver Woodman
4a9ff7b094 Correctly propagate END_OF_STREAM through Opus decoder. 2015-09-01 14:16:36 +01:00
Oliver Woodman
a953e7217f Fix naming/documentation for SmoothStreaming. 2015-09-01 14:16:02 +01:00
Oliver Woodman
a704b3d338 Tweak video renderer. 2015-09-01 14:15:20 +01:00
Oliver Woodman
39babb779f Magic tests fix... 2015-09-01 14:14:46 +01:00
Oliver Woodman
f8824ac390 Support dynamic TimeRange for DASH live. 2015-09-01 14:14:10 +01:00
Oliver Woodman
d5f8d1a1b1 Don't crash updating a representation without an index. 2015-09-01 14:13:22 +01:00
Oliver Woodman
ebeafe23c0 Refactor multi-period Period updates.
The main change here is to add PeriodHolder.updatePeriod, which is
analogous to RepresentationHolder.updateRepresentation.
2015-09-01 14:12:52 +01:00
Oliver Woodman
b55a80dbf9 Fixed potential issue in which a live-edge latency greater than the duration of the manifest would result in the latest available time being lower than the earliest available time. 2015-09-01 14:12:22 +01:00
Oliver Woodman
476cefa7cc Remove extra constructors. 2015-09-01 14:11:50 +01:00
Oliver Woodman
35a744a5d4 Use perl for in-place substitution. 2015-09-01 14:11:01 +01:00
Oliver Woodman
96734144ba Extract DTS samples in DASH, MP4 and Matroska. 2015-09-01 14:07:28 +01:00
Oliver Woodman
bca2d16cc1 Specify locale when using String.format. 2015-09-01 14:06:16 +01:00
Oliver Woodman
adf82c7f5e Correctly read mimeType for ISO 13818-7 objectTypeIndication values.
Issue: #731
2015-09-01 14:05:43 +01:00
Oliver Woodman
83568ca52f Support MKV embedded SubRip captions. 2015-09-01 14:04:58 +01:00
Oliver Woodman
009d4d0c2c Fix retries if failure occurrs when reading seek map.
The following sequence was problematic:

1. See start of a cluster having not output a seek map. Decide
   to seek for the cues. Enter CUES_STATE_BUILDING state.
2. Error occurs before seek map is output.
3. ExtractorSampleSource isn't prepared yet, so restarts from the
   start of the stream.
4. See start of the same cluster having not output a seek map.
   This time cuesState is CUES_STATE_BUILDING, so we just carry
   on. We then fill the buffer with sample data, despite the
   source not being prepared, at which point we get stuck.

It's unclear to me why cuesState needed three states, so I've rm'd
the BUILDING state. Step (4) above will now do the same thing as
in step (1). If the failure repeats, we'll eventually fail, which
is WAI.
2015-09-01 14:03:45 +01:00
Oliver Woodman
b3ba7e16c1 Close DefaultHttpDataSource connections quietly. 2015-09-01 14:02:16 +01:00
Oliver Woodman
10badcc430 Support multi-track in MKV/WebM extractor.
Issue: #514
2015-09-01 14:01:43 +01:00
Oliver Woodman
e07c35815e Don't move to next subtitle too soon.
Second time lucky. We should just move to the next subtitle
when it's started. Simples.
2015-09-01 14:01:06 +01:00
Oliver Woodman
530aa265ff Fix playback of MKV audio tracks that use default channel/frequency vals.
Also do some significant cleanup to the extractor.
2015-09-01 14:00:37 +01:00
Oliver Woodman
64c0e5c997 Use XING headers without size/table of contents.
These MP3s are unseekable but allow calculating the VBR duration correctly.

Treat streams as live only if they are unseekable and lack a duration.

Issue: #713
2015-09-01 13:59:34 +01:00
Oliver Woodman
6799d6dad0 Fixed issue where calling valueAt on a SparseArray with an index greater than the size of the SparseArray would sometimes return the class' internal DELETED object and cause a ClassCastException. 2015-09-01 13:58:57 +01:00
Oliver Woodman
7bf1d89168 Fixed overlapping captions. 2015-09-01 13:58:22 +01:00
Oliver Woodman
9231520ee8 Some misc cleanup.
- Remove unused method in DashChunkSource.
- Remove inputEncoding parameter for subtitle parsers. We're
  ignoring it in all but one of the parsers, and for the one
  that does use it, it'll only ever receive null, since that's
  all we're passing.
- Make TextTrackRenderer advance to the next subtitle even if
  the current one hasn't finished, in the case that they overlap.
  This shouldn't ever really happen, but it seems best to trust
  the start time of the new sample rather than the last event
  time of the previous one.
2015-09-01 13:57:51 +01:00
Oliver Woodman
eb3829c7c8 Always show track language if we have it.
May as well. Also specifically fixes showing the language
for subtitle tracks that have application/* mime types.
2015-09-01 13:56:40 +01:00
Oliver Woodman
8e9aadc5e5 Workaround for vorbis EOS flush bug (23361053).
I'm assuming this will be fixed in API level 24.
2015-09-01 13:56:10 +01:00
Oliver Woodman
879da81218 Expose more sensible HLS track information.
- Video track is always marked as adaptive, the resolution is
  stripped out (since it's otherwise just set to whatever the
  resolution of the first selected variant is), and the max
  dimensions are set.

Issue #514
2015-09-01 13:55:02 +01:00
Oliver Woodman
0efaec59b8 Implemented limited support for multi-period DASH manifests.
Limitation: Successive periods must expose the same adaptation
sets and representations.

GitHub Issue: #557
2015-09-01 13:54:00 +01:00
Oliver Woodman
f69f948991 Fixed issue in which ContainerMediaChunk would throw an NPE for self-initializing chunks. 2015-09-01 13:52:30 +01:00
ojw28
01a037f496 Merge pull request #741 from pakerfeldt/unfinal-streamingdrmsessionmanager
Enable override of open/close in StreamingDrmSessionManager
2015-08-27 10:58:46 +01:00
Patrik Åkerfeldt
c373800492 Enable override of open/close in StreamingDrmSessionManager
Make it so that extensions of StreamingDrmSessionManager may override open/close.
2015-08-27 09:20:57 +02:00
Yu-Hsuan Lin
0df29a6497 Add an extension that provide DataSource using OkHttp 2015-08-24 00:49:41 +08:00
Oliver Woodman
25fe9db5d1 Set the sync flag on all audio samples in WebM.
Issue: #690
2015-08-19 16:35:32 +01:00
Oliver Woodman
cde1c27e2b Make Opus codec-specific data match the platform.
Issue: #690
2015-08-19 16:34:59 +01:00
Oliver Woodman
02f1efd118 Add bitrate to MediaFormat.
Issue: #514
2015-08-19 16:34:20 +01:00
Oliver Woodman
ff201db981 Allow renderers to pull tracks from multiple sample sources.
This is needed for several use cases:

- ExtractorSampleSource with option to play both embedded and out-of-band
  subtitles.
- HLS multi-audio and out-of-band-webvtt.
2015-08-19 16:33:01 +01:00