743 Commits

Author SHA1 Message Date
Oliver Woodman
02c7525ff7 Remove custom VTT logic. 2015-08-11 18:16:56 +01:00
Oliver Woodman
dbaeecc4da Improve DASH manifest parsing.
- Parse all attributes that may exist in either the AdaptationSet or
  in the child Representation elements at both levels.
- Correctly infer TYPE_TEXT for Representation elements whose mimeType
  is application/mp4 and whose codecs attribute indicates a known text
  codec type.

Issue: #689
2015-08-11 18:12:43 +01:00
Oliver Woodman
d6152dc36a Use MediaFormat.language in hashCode and equals. 2015-08-11 18:11:35 +01:00
Oliver Woodman
7d306ae593 Add language to MediaFormat + parse it from mdhd box.
+ Move conversion from framework -> exo format to FrameworkSampleSource.
+ Improve MediaFormat conversion test.
2015-08-11 18:10:46 +01:00
Oliver Woodman
b2206866f0 Use audio passthrough if possible, falling back to on-device codecs.
Remove MPEG TS stream filtering based on AudioCapabilities.

Pass AudioCapabilities to MediaCodecAudioTrackRenderer so it can choose between
passthrough/raw and decoding for AC-3 tracks.
2015-08-11 18:08:23 +01:00
Oliver Woodman
6085d185fa Internal plumbing for multi-track support.
- Generalize rendererEnabledFlags to be selected track indices through
  ExoPlayerImpl/ExoPlayerImplInternal.
- Selecting an out-of-bound track index (e.g. -1) is equivalent to
  disabling a renderer prior to the generalization.
- A prepared TrackRenderer that exposes 0 tracks is equivalent to a
  TrackRenderer in the STATE_IGNORE state prior to the generalization.

Issue #514.
2015-08-11 18:06:21 +01:00
Oliver Woodman
13f4a3e3bd Common base class for SampleSource based TrackRenderers.
This will allow multi-track support when consuming from a SampleSource to
be added in a single class, rather than in 6. Prep for Issue #514.
2015-08-11 18:04:00 +01:00
Oliver Woodman
150b3cdb19 Call AudioTrack.flush() before AudioTrack.release().
On NVIDIA Shield, recreated passthrough AudioTracks have incorrect playback head
positions, due to shared state with the previously destroyed passthrough
AudioTrack. Calling AudioTrack.flush() before AudioTrack.release() ensures this
state is cleared.

This is a safe change so I have not made it a device-specific workaround. The
combined time for flush and release is less than 10 ms (with flush normally
taking less than two ms).
2015-08-11 18:00:42 +01:00
Oliver Woodman
f129812b70 Clean up AudioCapabilities. 2015-08-11 17:59:24 +01:00
Oliver Woodman
adf98b0fcc Make seekTo(currentPosition) a no-op in ExoPlayer.
- Also avoid boxing when passing the seek position to the background
  thread.

Issue: #654
2015-08-11 17:55:19 +01:00
Oliver Woodman
ce26e601ed Fix typo in H265Reader.
See H.265/HEVC specification subsection 7.3.4.
2015-08-11 17:47:02 +01:00
Oliver Woodman
ab3f623767 Workaround broken devices.
Issue #464
Issue #665
2015-08-07 17:28:03 +01:00
Oliver Woodman
a7d843f90d Increment version to 1.4.2 2015-08-04 16:07:54 +01:00
Oliver Woodman
039cddd6c0 Don't require comma in EXTINF tags 2015-08-04 13:50:15 +01:00
Oliver Woodman
d3ce56f9bc Fix commented code 2015-08-03 15:18:23 +01:00
Oliver Woodman
574e554e01 Make classes/methods final to prevent uncontrolled extension. 2015-08-03 15:18:09 +01:00
Oliver Woodman
ed51b58242 Fix backoff for SingleSampleSource. 2015-07-30 17:16:19 +01:00
Oliver Woodman
5f51a4ff83 Cleanup - Make RollingSampleBuffer append methods more consistent. 2015-07-30 17:13:24 +01:00
Oliver Woodman
0d42032ada Aes128DataSource should be final. 2015-07-30 10:05:54 +01:00
Oliver Woodman
a56c00268d Remove ability to disable frame accurate seek.
Everything I've seen that uses ExoPlayer sets it to true, and
setting it to false is poorly supported / likely to result in
bad initial A/V sync after each seek.
2015-07-30 10:05:04 +01:00
Oliver Woodman
e90ad9c47d Make Aes128DataSource private to the HLS package.
Issue: #662
2015-07-29 22:35:48 +01:00
Oliver Woodman
1f0e6a5c46 Simplify subtitle loading with a SingleSampleSource.
Issue: #587
2015-07-29 21:58:59 +01:00
Oliver Woodman
98ecc209be Improvements to Mp4Extractor and FragmentedMp4Extractor.
- Make Mp4Extractor more robust when resuming from read failures.
- Made FragmentedMp4Extractor handle atoms with extended sizes.

Issue #652
2015-07-29 21:49:19 +01:00
Oliver Woodman
2f0aec43ec Don't print warning if we get a SeekMap when reading DASH chunks.
Both FragmentedMp4Extractor and WebmExtractor now invoke seekMap() with
SeekMap.UNSEEKABLE if there isn't an index in the stream, so DASH playbacks
will end up printing this warning every 5 seconds or so. This is obviously
not desirable, so this CL just removes the warning! The alternative would
have been to print a warning if the value is anything other than UNSEEKABLE,
but it doesn't really seem worth it.
2015-07-29 21:48:17 +01:00
Oliver Woodman
48826836d1 Put tests where they belong + bump bintray-release version.
Issue: #651
2015-07-27 16:32:55 +01:00
Oliver Woodman
08dc691ff7 Allow playback of unseekable fmp4 media.
This is useful to allow playback of individual segments from a
DASH stream as regular fmp4 files. These segments don't typically
contain a segment index. For playback to start, we need to invoke
seekMap with the UNSEEKABLE index. We do this if we haven't seen
a segment index when we encounter an mdat box (if one were present,
it would have been located earlier than this point).
2015-07-27 16:20:40 +01:00
Oliver Woodman
9e0ca9e7f0 Add support for reading MPEG 4 SP in matroska streams.
Issue: #641
2015-07-23 14:50:57 +01:00
Oliver Woodman
03305c92cf Modified timing of manifest fetches to compensate for drift due to fetch time. 2015-07-23 13:44:52 +01:00
Oliver Woodman
7ea199638e Content/Asset data sources - Handle >2^31 byte files correctly.
Issue #641
2015-07-23 13:44:11 +01:00
Oliver Woodman
b57b80f723 Multiple small fixes for subtitles/mp4.
1. [Cleanup] Remove unused Track types, including TYPE_TIME_CODE.
2. Add subtitle track type, which is different to the existing text type.
3. Set duration on the media formats for text and subtitle tracks. This
   was causing the player to report unknown media duration for mp4 files
   containing such tracks.
4. Make TextTrackRenderer do the right thing when not started.

Issue: #635
2015-07-23 13:43:48 +01:00
Oliver Woodman
b44de0d250 Improve sniffer error reporting.
- Make UnrecognizedInputFormatException public so the app can more easily handle
  it when it is propagated to onPlayerError.
- Format the description using the simple class names for the extractors.
- Don't retry loading after it's thrown, but just throw immediately.
2015-07-23 13:14:06 +01:00
Oliver Woodman
4c1fb0c977 Don't catch API 19 exception from newInstance. 2015-07-23 13:12:57 +01:00
Oliver Woodman
a44a78c72d Fix some HEVC and H.263 nits. 2015-07-23 13:12:01 +01:00
Oliver Woodman
9dc1bfbbe7 Support POST requests with DefaultHttpDataSource/DataSpec 2015-07-23 13:10:59 +01:00
Oliver Woodman
6b03e6a17c Fix MP4+MKV sniffing to handle empty atoms / EBML elements.
Issue: #641
2015-07-22 18:46:46 +01:00
ojw28
648f224d98 Merge pull request #639 from IanDBird/mkv-hevc
Add support for HEVC video in Matroska files
2015-07-22 16:14:11 +01:00
ood_tsen
cf2e539a31 add support s263 2015-07-22 21:08:38 +08:00
Oliver Woodman
85e0bca33d Add support for choosing an extractor based on sniffing the container.
- ExtractorSampleSource takes an array of extractors to test for suitability.
- Extractors now implement a sniff() method that returns whether they can
  extract samples in the input stream's format.
- Switch demo app samples to use format detection.

Issue: #438
2015-07-21 17:39:38 +01:00
Oliver Woodman
87daa912d7 Remove dead code (failed==false in all cases) 2015-07-21 17:36:07 +01:00
Oliver Woodman
3b34b0682c Handle the last MP3 sample being truncated without throwing.
Issue: #599
2015-07-21 17:35:09 +01:00
Oliver Woodman
ed2b65654c Cleanup UdpDataSource. 2015-07-21 17:34:37 +01:00
Ian Bird
646b39622f Add support for HEVC video in Matroska files 2015-07-21 15:24:35 +01:00
Oliver Woodman
a2f10399e7 Improve error propagation 2015-07-21 10:07:49 +01:00
Oliver Woodman
5df6854fea Noop tweak to DefaultHttpDataSource 2015-07-21 10:05:22 +01:00
Oliver Woodman
e7950555d3 Generalize MulticastDataSource to UdpDataSource 2015-07-21 10:05:04 +01:00
Oliver Woodman
eb4920bb2a Better compatibility with MKV test streams.
1. Fix seeking in test2.mkv by handling non-default timescale
   after duration.
2. Fix handling of missing cues in test6.mkv by allowing playback
   to continue (but all seeks will reset to t=0).

Issue #631
2015-07-21 10:01:15 +01:00
Oliver Woodman
7bc1241e06 Reflect subtitle parsers. 2015-07-21 09:59:22 +01:00
Oliver Woodman
6082bb6769 Always use timed video frame release on V21+. 2015-07-21 09:58:38 +01:00
Oliver Woodman
508e1cabe1 Always null inputStream, even if closing it failed. 2015-07-21 09:57:51 +01:00
Oliver Woodman
d8c874f7d8 Correct grammar 2015-07-17 12:01:32 +01:00