Commit graph

1405 commits

Author SHA1 Message Date
andrewlewis
8571c81076 Move resetting the peek position to ExtractorSampleSource.
This fixes an issue where the PsExtractor would start reading
unsynchronized if sniff was called.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117958077
2016-06-15 19:39:03 +01:00
andrewlewis
1175f50fb8 Partially merge InputBuffer and SampleHolder.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117908518
2016-06-15 19:39:03 +01:00
ccwu
0d1ae1dd67 Change the signature of onQueuedInputBuffer
Expose the input buffer for Exoplayer V2. This allows subclasses to
parse the input buffer before it is decoded. One particular usage
of this is to allow parsing user data stored in the tracks
(e.g. SEI in H264), and incorporate the user data into the rendering.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117865971
2016-06-15 19:38:07 +01:00
andrewlewis
8353463bf5 Detect sample boundaries in H.264 TSs without AUDs.
Issue: #1263
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117813106
2016-06-15 19:38:06 +01:00
andrewlewis
fc716b5711 Signal end of stream in SampleHolder flags.
Also use MediaCodec buffer flag constants instead of those on MediaExtractor.

This is in preparation for merging InputBuffer and SampleHolder.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117810136
2016-06-15 19:38:06 +01:00
olly
733f2ccd1c Add WavExtractor for extracting samples from WAV files.
This version only supports 16-bit uncompressed PCM. A follow-up CL will
add support for other sample bit depths.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117809475
2016-06-15 19:38:06 +01:00
olly
a49c8dc86d Added loadErrorNotification to SingleSampleSource.
Also hooked up DemoPlayer to ExtractorSampleSource events.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117809051
2016-06-15 19:38:06 +01:00
olly
27ab1a2e65 Merge updates from GitHub.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117808998
2016-06-15 19:38:06 +01:00
olly
5b06bfd5a8 Fixed TS+H262 playback when no pts is available
If this situation is encountered, we assume that the encoder has a good reason to
do this and use the last pts + frameDuration as new pts.

Issue: #1295
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117808961
2016-06-15 19:38:06 +01:00
olly
1ca5378cda Track input/output cleanup.
- Remove special DefaultTrackOutput.sampleData method, and have
  SingleSampleMediaChunk use the regular one instead.
- Make DummyTrackOutput behave correctly is allowEndOfInput is
  false.
- Simplify progress tracking in ExtractorSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117808659
2016-06-15 19:38:06 +01:00
aquilescanta
60ba7823e0 Add Css styles in the WebVTT parser
This is the first version and is still not linked to the WebVTT parser nor
does it support all the intended features, but it was left this way to
ease the review a little bit.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117722492
2016-06-15 19:38:06 +01:00
olly
e7a27245e7 Use new-style for loops specifically for arrays.
As per: http://developer.android.com/training/articles/perf-tips.html
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117716743
2016-06-15 19:38:06 +01:00
olly
2469f631ae Restore SampleSource.disable API
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117701759
2016-06-15 19:38:06 +01:00
cdrolle
14c5114049 Fixed issue in which unknown sample mime types would cause MediaPresentationDescription to throw an NPE.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117560114
2016-06-15 19:38:06 +01:00
olly
d870f37878 Always use same Format objects during DASH live playbacks.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117558066
2016-06-15 19:38:06 +01:00
olly
0dc0d70397 Use SimpleDecoder for subtitles.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117543706
2016-06-15 19:38:05 +01:00
olly
ed4f83979e Add extensions package to V2.
- Not doing any renaming for now. It'll be easier to wait
  until after the extensions themselves are brought across.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117438338
2016-06-15 19:38:05 +01:00
olly
3c5a509af8 Remove unused method.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117338990
2016-06-15 19:38:05 +01:00
olly
1eff6cf210 Bring back multi-audio and VTT support for HLS.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117338865
2016-06-15 19:38:05 +01:00
andrewlewis
1d4305cb91 Remove redundant modifiers in ExoPlayer.java.
Based on

http://docs.oracle.com/javase/specs/jls/se7/html/jls-9.html#jls-9.3
http://docs.oracle.com/javase/specs/jls/se7/html/jls-9.html#jls-9.5
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117338783
2016-06-15 19:38:05 +01:00
olly
a067bd0965 Make OggVorbisExtractor seekable.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117252304
2016-06-15 19:38:05 +01:00
olly
4ffa3556dd Fix parsing of expandable class size.
Issue #1351
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117252069
2016-06-15 19:38:05 +01:00
olly
378b76363d Support non-square pixels in MKV.
Issue: #1360
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117251799
2016-06-15 19:38:05 +01:00
olly
8b22333ee9 Make default audio capabilities public + update extractor list.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117251647
2016-06-15 19:38:05 +01:00
olly
9777945ce2 Fix the 0 sample count ctts entry bug
When the ctts contained an entry that had a 0-valued entry count, the
parser would miss every other entry, failing the final assertion.
The standard does not seem to prevent the value 0 in the sample_count
field, so we need to allow it.

Issue: #1326
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117241945
2016-06-15 19:38:05 +01:00
olly
f04e412a1c Improve unsupported edts handling
When the edited sample sequence does not contain any sync sample Exoplayer does not provide
support. This CL changes the ArrayIndexOutOfBoundsException for a more explicative
ParserException.

Issue: #1336
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117241805
2016-06-15 19:38:05 +01:00
olly
f5b7ea676d Consider udta box as leaf
The MP4 standard considers the udta box as a regular container box. Quicktime, however,
considers it as a container (of only leaf atoms) that can have a terminating 32 bit
integer with value 0. Since this breaks the principle of not having content in container
boxes, this CL considers the udta box as a leaf box that contains other boxes and does
the parsing manually.

Issue: #1315
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117237255
2016-06-15 19:38:05 +01:00
olly
bbceb459fd Add loading error notification to ExtractorSampleSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117237109
2016-06-15 19:38:04 +01:00
olly
6fc8057146 Fix empty container box bug for fMP4 extractor
This fix derives from issue #1308, which came up in unfragmented mp4 files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117236416
2016-06-15 19:38:04 +01:00
olly
eeddd6d8df Allow multiple renderers with MediaClock as long as only one is enabled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117236319
2016-06-15 19:38:04 +01:00
olly
d0fa6bdbcc Fix handling of self initializing segments in DASH
The parsing of multiple moov boxes for a single ExtractorOutput incurred in
an assertion failure due to repeated track declarations. This CL makes each
new moov box replace any previous one. This change is transparent to the
client, no flags are provided to allow this feature.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117236246
2016-06-15 19:38:04 +01:00
olly
5f3fa3955b Set default max input size for H.263 and MPEG-4 video.
The minimum compression ratio matches the Nexus 5X MPEG-4 video decoder.

Issue: #1290
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117234657
2016-06-15 19:38:04 +01:00
olly
9d5aa0f983 Fix the build.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117234408
2016-06-15 19:38:04 +01:00
olly
7208819018 Count input buffers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117228451
2016-06-15 19:38:04 +01:00
olly
0135aaa122 Migrate ExoCache CacheSpan filenames from v1 to v2
V2 supports encoding special characters while on disk.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117228319
2016-06-15 19:37:51 +01:00
olly
1ca32cced8 Fix empty container box bug
If a container box is empty, it is never removed
from the container box stack, breaking the extractor.

Issue: #1308
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117228211
2016-06-15 19:37:45 +01:00
olly
37e00c8c6f Support multiplexed fMP4.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117228173
2016-06-15 19:37:45 +01:00
olly
d20ce3fa16 Added FLAC to the Webm list of known types.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117226935
2016-06-15 19:37:45 +01:00
olly
9a40a4c77d Clean up enabled renderers + processing of resets.
- Made enabledRenderers an array to avoid loads of method calls.
- Made if so that enabled renderers are always called in a consistent
  order, rather than their order changing if they're enabled/disabled
  over time. This is likely to make performance more predictable.
- Split out reading of resets into a separate method. This method is
  now called directly after seeking on the source, so as to ensure
  instant propagation of the new position from source->renderers in
  the common case.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117225639
2016-06-15 19:37:45 +01:00
olly
9b467b7c1b DASH: Ignore stream defined index if manifest defines one.
Issue: #1287
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117225449
2016-06-15 19:37:45 +01:00
olly
ae2e858978 Fix incorrect playback speed of mono audio on MTK/JB devices.
Issue #801
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117225377
2016-06-15 19:37:45 +01:00
olly
8447781a44 Add workaround to discard NAL units up to the first SPS.
Some devices fail to decode an avc3 stream that doesn't start with an SPS (for
example, if an access unit delimiter appears first). Workaround the issue by
discarding input sample data up to the first SPS on those devices.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117224602
2016-06-15 19:37:45 +01:00
olly
fb1d2d9ee8 Add hooks for timestamp checking in MediaCodecTrackRenderer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117224468
2016-06-15 19:37:44 +01:00
olly
26ad44248a Fix a bug where ID3 data was read as sample data.
When reading unknown duration files with CBR seeking, the Mp3Extractor could
try to read sample data from 0. This happened because synchronization did not
skip over the ID3 data when it immediately found valid frames. When the invalid
sample data is read, the extractor tries to resynchronize from the next byte
(at offset 1), and this fails because the ID3 data at the start of the file is
longer than the synchronization search distance.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117224270
2016-06-15 19:37:44 +01:00
olly
d9d6b8540d HLS: Ignore AAC/H264 streams if we know they don't exist.
This is needed to support fully demuxed audio in HLS. For the
sample I have the video (only) variant still declares an AAC
stream. I suspect there's at least one toolchain out there that
hardcodes H264 and AAC streams in TS output.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117224224
2016-06-15 19:37:44 +01:00
olly
9cfff0b028 Merge cleaned version of https://github.com/google/ExoPlayer/pull/1234.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117224172
2016-06-15 19:37:44 +01:00
olly
a1fc0a6b00 Set max input size for H.265/HEVC.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220851
2016-06-15 19:37:44 +01:00
olly
b1c356fbab Simplify (i.e. remove) waiting for first sync frame.
The upstream source (or its stream) should always provide data
starting from a sync frame, so this logic shouldn't be necessary.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220759
2016-06-15 19:37:44 +01:00
olly
b37e9f6980 For both alignment cue setting value and position cue setting alignment value,
allow "center".
This value (and not "middle") is listed in
https://w3c.github.io/webvtt/ ( WebVTT: The Web Video Text Tracks Format, Draft
Community Group Report, 21 December 2015).

Leaving the behavior for "middle" unchanged.
It was the value listed in older drafts, e.g.
https://www.w3.org/TR/2014/WD-webvtt1-20141113/ ( W3C First Public Working
Draft 13 November 2014 )
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220612
2016-06-15 19:37:44 +01:00
olly
16f57e3919 Ignore repeated control characters in EIA608 subtitles.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220536
2016-06-15 19:37:44 +01:00
olly
a1c74cb259 Give a calculation for H.264 level picture size limits.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220482
2016-06-15 19:37:44 +01:00
olly
5a6d1435ab Fix overzealous ContentProtection filtering.
Failing to parse a UUID from a ContentProtection should only
result in filtering if there was actually a cenc:pssh element
there for us to get it from.

Issue: #1256
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220417
2016-06-15 19:37:44 +01:00
olly
bccffb017d Cleanup - Make PesReader classes static.
This avoids accessing PtsTimestampAdjuster through a thunk method,
and allows the PesReader classes to be static, which is nice in
general.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220139
2016-06-15 19:37:44 +01:00
olly
a1a48abe92 Apply gapless playback metadata for MP3/MP4 playback using MediaCodec.
Issue: #497
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117219944
2016-06-15 19:37:43 +01:00
olly
ba88091c7b Added MPEG2-Program Stream extractor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117219856
2016-06-15 19:37:43 +01:00
olly
2b4dcbef3f Fix parsing of version 1 pssh boxes, and ignore version 2+.
Issue: #1195
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117155301
2016-06-15 19:37:43 +01:00
olly
64d7f2f846 Deduplicate functions for parsing hex strings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117149421
2016-06-15 19:37:43 +01:00
olly
554817cca6 Extract gapless playback data in MP4 files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117148015
2016-06-15 19:37:43 +01:00
olly
2380857bf2 Clip the skip length in DefaultExtractorInput.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117141509
2016-06-15 19:37:43 +01:00
olly
a6ba84ade6 Update Mpd parser duration calculation.
Set the duration to the sum of the final period's start
+ duration (if available) if MPD@mediaPresentationDuration
isn't set in the manifest.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117141391
2016-06-15 19:36:30 +01:00
olly
61adcf98d2 Fix issue seeking backward when using SingleSampleSource.
Issue: #1193
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117136800
2016-06-15 19:36:30 +01:00
olly
c98f7e8348 Fixed the Mp4 embedded WebVTT playback
Issue: #1185
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117136646
2016-06-15 19:36:29 +01:00
olly
028ce2582c Fix handling of extended ID3 tags in MPEG-TS/HLS.
Issue #1181
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117136370
2016-06-15 19:36:29 +01:00
olly
b76db7acd2 Fix Javadoc typo.
Issue: #1235
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117131149
2016-06-15 19:36:29 +01:00
olly
9d732d8c27 Robustness fixes for WebM extractor.
- readFully calls when reading a string or varint may have 0 length.
  The behavior of a 0 length read isn't well defined either at the
  ExtractorInput or DataSource level, particularly when the read may
  also coincide with EOS. We'll work on defining these cases properly
  going forward, but in the meantime this fix avoids attempting 0
  length reads.
- [Aside] UTF8 the is guaranteed default charset on Android.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117130356
2016-06-15 19:36:29 +01:00
olly
9f4e46bd3c Discard CSD buffers from the raw decoder in passthrough mode.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117129870
2016-06-15 19:36:29 +01:00
olly
835a9e9abe Use a separate MIME type for DTS Express.
DTS Express (which is DTS LBR according to http://www.mp4ra.org/codecs.html) is
not supported for passthrough playback currently. Associate a different MIME
type with it so that we don't try to use DTS passthrough for playing DTS
Express.

The MIME type for DTS Express is just vnd.dts.hd, with a profile parameter
indicating that it's DTS Express rather than one of the other formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117129583
2016-06-15 19:36:29 +01:00
olly
e116125c40 DashChunkSource: Handle minor timing differences
Handle minor timing difference between the different media content
and the available range values as specified in the MPD.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117127112
2016-06-15 19:06:46 +01:00
olly
c2eb9d5598 Disable funky FRC on L on nVidia shield.
The logic in the platform was causing captions and the reported
playback position to gradually drift out of sync with respect to
audio and video.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117126970
2016-06-15 18:54:51 +01:00
olly
8ef4af1358 Fix incorrect position calculation in VBRI seeker.
Issue: #1197
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117125081
2016-06-15 18:54:51 +01:00
olly
d3d63101d1 [Refactor - Step #5] Introduce TrackSelector
Notes:

- The way this works is that every time the player needs to
  select some tracks it invokes the TrackSelector. When a
  track selection is actually activated (i.e. "hits the
  screen") it gets passed back to the TrackSelector, which
  allows it to expose the current tracks through an API that
  it may choose to define. Since playlist support doesn't exist
  yet, it's currently the case that the pass-back always occurs
  immediately.
- A TrackSelector can invalidate its previous selections if its
  selection criteria changes. This will force the player to invoke
  it again to make a new selection. If the new selection is the
  same as the previous one for a renderer then the player handles
  this efficiently (i.e. turns it into a no-op).
- DefaultTrackSelector supports disabling/enabling of renderers.
  Separately, it supports overrides to select specific formats.
  Since formats may change (playlists/periods), overrides are
  specific to not only the renderer but also the set of formats
  that are available to it. If the formats available to a renderer
  change then the override will no longer apply. If the same set
  of formats become available at some point later, it will apply
  once more. This will nicely handle cases like ad-insertion where
  the ads have different formats, but all segments of main content
  use the same set of formats.
- In general, in  multi-period or playlist cases, the preferred
  way of selecting formats will be via constraints (e.g. "don't play
  HD", "prefer higher quality audio") rather than explicit format
  selections. The ability to set various constraints on
  DefaultTrackSelector is future work.

Note about the demo app:

- I've removed the verbose log toggle. I doubt anyone has
  ever used it! I've also removed the background audio option.
  Without using a service it can't be considered a reference
  implementation, so it's probably best to leave developers to
  figure this one out. Finally, listening to AudioCapabilities
  has also gone. This will be replaced by having the player
  detect and handle the capabilities change internally in a
  future CL. This will work by allowing a renderer to invalidate
  the track selections when its capabilities change, much like
  how a selector is able to invalidate the track selections in
  this CL.
- It's now possible to enable ABR with an arbitrary subset of
  tracks.
- Unsupported tracks are shown grayed out in the UI. I'm not
  showing tracks that aren't associated to any renderer, but we
  could optionally add that later.
- Every time the tracks change, there's logcat output showing
  all of the tracks and which ones are enabled. Unassociated
  tracks are displayed in this output.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117122202
2016-06-15 18:54:51 +01:00
olly
9c98c4bb10 Make Track[Group|GroupArray|Selection] consistent.
- I don't think the length is useful in hashCode; if the length
  is different then Arrays.hashCode should account for that.
- "this." just for consistency across these classes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116641142
2016-06-15 18:54:51 +01:00
olly
00191848f7 Make TrackSelection implement equals/hashCode.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=116638211
2016-06-15 18:54:51 +01:00
olly
73400907fc Introduce TrackGroupArray.
This change replaces TrackGroup[] with TrackGroupArray. This is
to allow equality based hashCode and equals implementations.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=115563146
2016-06-15 18:54:51 +01:00
olly
d1cb4bc1af Fix hasSampleFormat in experimental version. Oops!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=115561885
2016-06-15 18:54:51 +01:00
olly
1208d8ec75 Allow more precise reporting of format support.
This change allows a TrackRenderer to distinguish between the
"I don't support this type at all" case and the "I am a general
purpose renderer of this type, but cannot support the specific
subtype" case.

Bug=26622675
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=115454950
2016-06-15 18:54:51 +01:00
olly
6ba4fa3b51 Make SampleSource interfaces right for TrackSelector.
The TrackSelector API will look like:

TrackSelection[] selectTrack(
    TrackRenderer[] renderers, TrackGroup[] trackGroups);

In this CL:

- SampleSources return TrackGroup[], so that the result can be easily
  passed to the selector.
- TrackStream gets its own file to sit alongside other Track* classes.
- A TrackSelection object is introduced to encapsulate group and track
  indices.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=115251331
2016-06-15 18:54:51 +01:00
olly
39a924451a Return format and adaptation support from single method.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114963314
2016-06-15 18:54:51 +01:00
olly
0e60335064 Add structure to ExoPlaybackException.
- Add a top level failure type (source/renderer/unexpected),
  and convenience methods for retrieving the underlying cause
  without needing to cast.
- Also add renderer index in the case of renderer failures.
- setIndex/getIndex is a little . . . unclean, but alternatives
  involve either having the top line of the stack trace be a
  non-interesting line, or loads of try/catch blocks in
  ExoPlayerImplInternal.

Issue: #777
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114763073
2016-06-15 18:54:51 +01:00
olly
c48dd4f3e3 Use FormatEvaluator for HLS.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114743795
2016-06-15 18:54:51 +01:00
olly
a7adcce018 One Format object to rule them all.
- Format can represent both container and sample formats.
  If a container contains a single track (as is true in
  DASH and SmoothStreaming) then the container Format can
  also contain sufficient information about the samples
  to allow for track selection. This avoids the Format to
  MediaFormat conversions that we were previously doing in
  ChunkSource implementations.

- One important result of this change is that adaptive
  format evaluation and static format selection now use the
  same format objects, which is a whole lot less confusing
  for someone who wants to implement both initial selection
  and subsequent adaptation logic. It's not in the V2 doc,
  but it may well make sense if the TrackSelector not only
  selects the tracks to enable for an adaptive playback, but
  also injects a FormatEvaluator when enabling them that will
  control the subsequent adaptive selections. That would make
  it so that all format selection logic originates from the
  same place.

- As part of this change, the adaptiveX variables are removed
  from the format object; they don't really correspond to a
  single format. This also saves on having to inject the max
  video dimensions through a bunch of classes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114546777
2016-06-15 18:54:50 +01:00
olly
362d0400cd Don't pass chunk list to ChunkSource.disable().
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114545827
2016-06-15 18:54:50 +01:00
olly
782817d524 Remove durationUs from MediaFormat.
Duration was originally included in MediaFormat to match the
framework class, but it actually doesn't make much sense. In
many containers there's no such thing as per-stream duration,
and in any case we don't really care. Setting the duration on
each format required excessive piping.

This change moves duration into SeekMap instead, which seems
to make a lot more sense because it's at the container level,
and because being able to seek is generally couplied with
knowing how long the stream is.

This change is also a step toward merging Format and MediaFormat
into a single class (because Format doesn't have a duration),
which is coming soon.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114428500
2016-06-15 18:54:50 +01:00
olly
ebf87a3619 Simplify codec configuration.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114427767
2016-06-15 18:54:50 +01:00
olly
335bb0aff2 Implement decoder capability checks in MediaCodecTrackRenderers.
[Step 4 - Partial, of []

- The capabilities checks previously performed in VideoFormatSelectorUtil
  are now performed in MediaCodecVideoTrackRenderer. This means they'll be
  useful for non-chunk use cases (e.g. when using ExtractorSampleSource).
- Added capabilities checks for audio in MediaCodecAudioTrackRenderer. We
  didn't check audio capabilities previously.
- Added functionality to allow a TrackRenderer to indicate the extent of
  its adaptive support.

The idea here is that a TrackSelector (to be introduced) will have access to:

(a) TrackGroups from the SampleSource that indicate whether they support
adaptive playbacks and the formats of each individual track.
(b) TrackRenderers that indicate whether they support adaptive playbacks as
well as how capable they are of rendering formats of individual tracks.

This is everything that a TrackSelector needs from the player components in
order to decide how to wire things up. Note that a TrackSelector may opt to
treat FORMAT_EXCEEDS_CAPABILITIES as FORMAT_HANDLED at its own risk, if it
thinks that it (or the user) knows better. This is a request that we've seen
from third parties for better handling cases where capabilities aren't
accurately reported by the underlying platform.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114427428
2016-06-15 18:54:50 +01:00
cblay
6bc52262db Minor tweaks/fixes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113868179
2016-06-15 18:54:38 +01:00
olly
43e1e7e83a ExoPlayer V2 Refactor - Misc
Delete SingleSampleChunkSource. I don't think it's really
useful for anything, now we have SingleSampleSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113259289
2016-06-15 18:54:38 +01:00
olly
ce324f1ca9 ExoPlayer V2 Refactor - Step 7 (partial)
This change removes the need for SourceBuilders to load their
manifests before building their sources. This is done by pushing
initial manifest loads into the ChunkSource classes. This simplifies
the SourceBuilders a lot, and also DemoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113259259
2016-06-15 18:54:38 +01:00
olly
be47148940 ExoPlayer V2 Refactor - Step 4
Notes:
1. The logic in ExoPlayerImplInternal is very temporary, until we
   have proper TrackSelector implementations. Ignore the fact that
   it's crazy and has loads of nesting.
2. This change removes all capabilities checking. TrackRenderer
   implementations will be updated to perform these checks in a
   subsequent CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113151233
2016-06-15 18:54:26 +01:00
olly
6cb20525cb ExoPlayer V2 Refactor - Step 3
Move binding of tracks<->renderers to ExoPlayerImplInternal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113046018
2016-06-15 18:54:26 +01:00
olly
cdae9ac5d2 ExoPlayer V2 Refactor - Steps 1/2.
GitHub note - Apologies for the cryptic change descriptions,
they relate to a design doc that's not externally visible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113043764
2016-06-15 18:53:40 +01:00
Oliver Woodman
61d581fe44 Prepare for 2.x push 2016-06-15 13:36:09 +01:00
Oliver Woodman
39a7cea987 Bump version to 1.5.4 2016-01-22 16:07:16 +00:00
andrewlewis
a9720457d8 Add support for playing DTS in HLS.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112774678
2016-01-22 13:37:31 +00:00
olly
7bf8080950 ExoPlayer: Remove deprecated methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112736771
2016-01-22 12:11:16 +00:00
olly
d804446b34 Implement seeking via a single code path.
When a seek is performed, renderers currently perform the
actions that they need to take in two places: Some changes
are performed in seekTo implementations. Other changes are
performed when discontinuities are read from the source.

In HLS we need to perform what is effectively a seek
originating in the source. To support this, this CL allows
discontinuities read from the source to modify the playback
position. All actions that renderers perform as a result
of a seek are moved to be performed when a discontinuity is
received.

Best way to understand CL:
- Look at SampleSource interface change and then at the
  concrete implementations, to make sure they've been
  changed properly.
- Look at SampleSourceTrackRenderer change.
- Look at concrete renderers. The general pattern is that
  code previously performed in seekTo and READ_DISCONTINUITY
  is merged into onDiscontinuity().

Note: This will be further untangled in V2.

Issue #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112720746
2016-01-22 12:11:16 +00:00
andrewlewis
3f0244e214 Read gapless playback metadata in files with Xing metadata.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112699916
2016-01-22 12:11:16 +00:00
andrewlewis
9d89d48f56 Fix ParsableByteArrayTest.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112693523
2016-01-22 12:11:16 +00:00
andrewlewis
588d5a6e55 Parse encoder delay and padding from ID3 metadata in MP3.
Based on AOSP's MP3Extractor.cpp and ID3.cpp.

Issue: #497
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112685664
2016-01-22 12:11:15 +00:00
andrewlewis
25fb2a826e Merge MP3 sniffing/synchronization functionality.
As part of this change, Extractor.sniff may read/skip (not just peek) if it
returns true. This allows Extractors to avoid parsing the input a second time in
read.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112683272
2016-01-22 12:11:15 +00:00
andrewlewis
e6637c50c2 Fix a couple of compilation warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112676296
2016-01-22 12:11:15 +00:00
Oliver Woodman
89ce1ccedf OggVorbisExtractor (WIP - Seeking not yet enabled) 2016-01-22 11:46:37 +00:00
Oliver Woodman
88fa1495c4 Use consistent naming for Xing headers/tags.
Also fix a couple of style nits.
2016-01-22 11:40:27 +00:00
Oliver Woodman
cef1f12f1d Add readString to ParsableByteArray 2016-01-22 11:40:02 +00:00
Oliver Woodman
eda8ac4e01 Add eventSourceId to onAvailableRangeChange events 2016-01-22 11:38:06 +00:00
andrewlewis
783467b8fb Work around broken MP3 decoder.
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112412961
2016-01-18 19:22:47 +00:00
olly
a049382cd7 Treat seeks in HLS live to be at t=0, as in ExtractorSampleSource.
This makes sense until we need to support seeking in the live window.

Issue: #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112402026
2016-01-18 19:22:47 +00:00
olly
cef0f7a0b1 Apply flush workaround on S5 Mini devices with Exynos chipset.
Also apply the workaround for the secure variant of OMX.SEC.avc.dec.
Note that it's not necessary to do the same for the RK decoder in
the method below, since that workaround is targeted at SDK_INT<=17
and secure decoders only came along in 18.

Issue: #603
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112395376
2016-01-18 19:22:47 +00:00
ojw28
c01d0096ab Merge pull request #1155 from bartsidee/1095-dev
link track language attribute in Smoothstream parser
2016-01-16 15:37:07 +00:00
Bart van den Ende
8e1f14cbc3 resolve #1095 get language for all types, not just audio 2016-01-16 12:35:32 +01:00
Bart van den Ende
d5425bb64a resolve #1095 store the language as normalised attribute so we can access it from the track parser 2016-01-16 12:35:23 +01:00
Bart van den Ende
19cf24234c resolve #1095 map the audio track language to the element parser instead of the track parser 2016-01-16 12:35:04 +01:00
Oliver Woodman
9ab6c96169 Make TtmlColorParser comment a little clearer. 2016-01-15 19:18:19 +00:00
Oliver Woodman
c60dac7c46 Further tweaks to TTML color parsing. 2016-01-15 19:13:58 +00:00
Oliver Woodman
7974a61476 Fix TtmlColorParser test.
Also simplify the implementation slightly.
2016-01-15 19:06:27 +00:00
Oliver Woodman
b5c8595655 Resolve merge conflict 2016-01-15 18:53:30 +00:00
andrewlewis
284b7e7f28 Comment (e-)AC-3/DTS descriptor tags.
Also, use terminology from ATSC spec in Ac3Util comment.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112254908
2016-01-15 18:49:03 +00:00
andrewlewis
0900c53564 Set the passthrough buffer size based on encoded format bit rates.
After this change, AC-3 uses about 20 KB and DTS uses 49 KB.

For comparison, 'normal' PCM playbacks use by default (depending on the device
and input format) about 45 KB. For passthrough, the following buffer sizes were
used before this change:
- Nexus Player AC-3: 23 KB
- Nexus Player DTS: 25 KB
- NVIDIA Shield AC-3: 15 KB
- NVIDIA Shield DTS: 16 KB (caused underruns in some DTS-HD playbacks)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112254836
2016-01-15 18:48:24 +00:00
andrewlewis
9bb124a011 Use uppercase for hex literals.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112252404
2016-01-15 18:47:43 +00:00
aquilescanta
5baf55176b Add support for Cue Settings and Spanned text in MP4WebVTT
Using the provided methods by the previous refactors, it is now possible to use all of the WebVTT features already available.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112243172
2016-01-15 18:47:00 +00:00
olly
d45f0b8b6d Reflow comments in Util.java
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112163984
2016-01-15 18:46:15 +00:00
aptly-io
e6132ed742 Fix RGBA color tuple parsing
The TTML 1 spec. defines an exact RGBA color tuple as #rrggbbaa
See https://www.w3.org/TR/ttml1/#style-value-color

Android's internal representation is ARGB.
The correct parsing therefore requires a bit of extra byte shuffling ...
2016-01-14 23:11:57 +01:00
olly
df7a96a7c4 Map SDK_INT for dev devices.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112162208
2016-01-14 18:14:00 +00:00
olly
e3da2cfb40 Treat .vtt as Webvtt as well as .webvtt.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112161960
2016-01-14 18:13:21 +00:00
olly
949317a41a Minor tweaks to merged pull requests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112161860
2016-01-14 18:12:28 +00:00
olly
be2aedbd53 Don't consider switching tracks as "joining".
I'm not really sure how best to document this in TrackRenderer;
it's a bit of a weird feature. For now, I've gone with the vague
approach.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112150939
2016-01-14 17:13:32 +00:00
olly
2690f569af Enable track selection + WebVTT for HLS.
See the documentation of buildTracks for the gory details.

Issue: #151
Issue: #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112149293
2016-01-14 17:13:32 +00:00
aquilescanta
b6b97a8683 Expose cue settings parser
This CL exposes the cue settings parser in order to allow its usage from the MP4Webvtt extractor. Also fixes a few mistakes from the previous related CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112145806
2016-01-14 17:13:32 +00:00
olly
6b9a1b16f1 Fix issues playing FLV content.
* AudioTagPayloadReader was strangely parsing an audioSpecificConfig
  itself, using the parsed values to build a new audioSpecificConfig,
  then passing the newly constructed instance to be parsed by
  CodecSpecificDataUtil. Unfortunately the translation was lossy ;).
* Treat Duration=0 as an unknown duration.

Issue #1137
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112143569
2016-01-14 17:13:32 +00:00
olly
bc1d76a3eb Fix ParsableByteArray.readLine + discard BOM at start of line.
- I think \r and \n are handled the wrong way around?
- We only expect to encounter a BOM sequence at the start of a
  file, but it feels fine to automatically discard it in all
  cases for simplicity. A BOM sequence doesn't mean anything in
  UTF-8. See https://en.wikipedia.org/wiki/Byte_order_mark. Note
  that I think the advice not to remove it on that page relates
  only to the case where the file is being edited + saved.

Issue #1136
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112143407
2016-01-14 17:13:32 +00:00
andrewlewis
5ef1123391 Clarify @param bufferSizeContribution documentation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112127698
2016-01-14 17:13:32 +00:00
olly
59cf3e02f5 HlsChunkSource: Expose stuff for WebVtt/Variant selection.
Issue: #151
Issue: #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111945466
2016-01-14 17:13:32 +00:00
olly
2a9eeaa893 Fix HlsSampleSource use of LoadControl.
There are multiple issues with HlsSampleSource's use of
LoadControl that become apparent when you attempt to use
the same LoadControl for loads by another source.

* In the "limbo" state HlsSampleSource doesn't start any
  new loads, but doesn't update the LoadControl to tell
  it that it doesn't want to load anything either. This
  can prevent another source from starting the loads that
  it needs to make to complete preparation, causing
  playback to become stuck.
* The LoadControl isn't updated properly when the EOS is
  reached. This can cause playback to become stuck near
  the end of the media.
* If HlsSampleSource is released from being in the "limbo"
  state, it doesn't unregister itself with the control.

Issue: #151
Issue: #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111942009
2016-01-14 17:13:32 +00:00
olly
43fcb36924 Use APPLICATION_M3U8 as the mimeType for media playlists.
Given we need to do this in HlsPlaylistParser in the normal
case (i.e. not MEDIA_TAG), we may as well just be consistent
and do it everywhere.

Issue: #151
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111941335
2016-01-14 17:13:32 +00:00
eguven
8c8794878d Fixed demo-misc-vp9-opus-sw DASH check
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111839055
2016-01-14 17:13:32 +00:00
andrewlewis
b7d5ce366a Add a comment to explain the input size calculation.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111833857
2016-01-14 17:13:31 +00:00
rileya
c6cdf7e083 Add limited support for edit lists in fragmented MP4s.
Currently only supports a single offset to the full media timeline
(indicated by a duration of 0). This is most often used to fix the
non-zero starting presentation timestamp introduced when B-frames
are present.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111816916
2016-01-14 17:13:31 +00:00
cblay
aec9657c76 Internal refactor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111746825
2016-01-14 17:13:08 +00:00
olly
ab9e3bac46 Introduce HlsTrackSelector.
This is equivalent to DashTrackSelector and SmoothStreamingTrackSelector.
This is a step toward allowing HlsChunkSource to expose multiple tracks,
which is a requirement for supporting WebVtt.

This change also enables WebVtt extractor instantiation.

Issue: #151
Issue: #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111698833
2016-01-14 17:08:25 +00:00
olly
00f8deda3d Introduce PtsTimestampAdjusterProvider for HLS WebVTT.
This allows the same adjusters to be used by multiple
HlsChunkSource instances. This is necessary because
WebVTT chunks will be loaded by a second chunk source
to the one loading audio/video. In both cases the same
timestamp adjustments will need to be applied.

Each source may transition from one discontinuity sequence
to the next at a slightly different time, so it's necessary
to maintain a separate adjuster for each sequence.

An adjuster can only be initialized correctly using audio/video
and not WebVTT, because the start time in a WebVTT file in
HLS doesn't necessarily correspond to the chunk start time,
which means the timestamp offset calculated by the adjuster
could end up being incorrect. Hence sources providing WebVTT
chunks will set isMasterSource to false. Lovely, right :(?

Issue: #151
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111693126
2016-01-14 17:08:25 +00:00
olly
b9ec51dbed SmoothStreaming track selector feature parity with DASH.
This gives DefaultSmoothStreamingTrackSelector feature parity
with DefaultDashTrackSelector. Note that the code duplication
across these classes will go away eventually, when we rework
track selection as described in Github Issue #1121.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111688784
2016-01-14 17:08:25 +00:00
olly
00e903b32e Don't pass maxWidth/Height for non-video streams.
This is a no-op change for clarity only. maxWidth/maxHeight
don't mean anything for AAC/MP3, so it makes sense to pass
MediaFormat.NO_VALUE in all cases.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111619832
2016-01-07 22:52:51 +00:00
aquilescanta
651996983b Refactored the Webvtt parsing classes
Moved the behaviors related to Cue's to the WebvttCueParser class.
This way, the parsing methods will be more easily accessible to
other classes, such as the MP4Webvtt parser. This class also has
some methods that require state to avoid repetitive avoidable
allocations. The method visibility is subject to changes in
further CLs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111616824
2016-01-07 22:52:34 +00:00
olly
0aa4d3d209 Remove dead code.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111613354
2016-01-07 22:47:58 +00:00
andrewlewis
664c80da15 Set a max input size for VP8 and VP9.
Issue: #1090
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111607802
2016-01-07 22:47:58 +00:00
olly
cc1f3e5cac Clean up parser exception a little + add descriptions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111515406
2016-01-06 17:43:02 +00:00
olly
27e11f1f1a Workaround flushing issues on S-3 JB MR2.
Targeting to all API level 19 devices using the OMX.SEC.avc.dec
decoder is probably the right thing to do. It shouldn't have
negative implications if we apply the workaround on devices that
don't really need it, except to slow down seeking slightly due
to decoder re-allocation. Given we're talking about JB, I think
the priority should be to "make sure it works".

Issue: #951
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111514406
2016-01-06 17:43:02 +00:00
olly
9e3e61901e Remove stray line break (ineffectively busy).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111507159
2016-01-06 17:43:02 +00:00
olly
1892779535 Increment frame timestamps (TS/H.262).
We normally expect each frame to come in its own PES packet,
but it seems that this is not always the case. This change
uses the frame rate in the stream to increment the frame
timestamp in the case of multiple frames contained within
a single PES.

Note that since we don't expect 100s of frames in a single
PES, or anything close to that really, the rounding errors
that may accumulate due to use of a frame duration should be
fine.

Issue: #1112
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111499052
2016-01-06 17:43:02 +00:00
andrewlewis
d740bf9f23 Handle edit lists with one 0 duration edit.
Issue: #1102
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111497855
2016-01-06 17:43:02 +00:00
eguven
69a42b60f8 Implement ID3 Metadata support for audio only HLS.
Issue: #862
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111403855
2016-01-05 14:52:51 +00:00
aquilescanta
1e4f2f6a1f Refactored WebvttCueParser methods to be static
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111402555
2016-01-05 14:52:44 +00:00
andrewlewis
7c103ca5f8 Using ExtractorInput.peek* instead of BufferingInput.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111394118
2016-01-05 14:52:39 +00:00
aquilescanta
681df4e4aa Refactored the SubtitleParser's parse() signature
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111326567
2016-01-05 14:52:30 +00:00
olly
9bcd1069b1 Blacklist CIPVorbisDecoder.
Issue: #1111
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111326378
2016-01-04 20:59:22 +00:00
olly
18a39f3350 Add ability to not offset in PtsTimestampAdjuster.
Issue: #1078
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111325745
2016-01-04 20:59:15 +00:00
andrewlewis
890dd5afb5 Add a peekFully overload with allowEndOfInput.
This is in preparation for removing BufferingInput,
and using peeking instead.

Also add tests for peeking with allowEndOfInput and
resetPeekPosition.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111318236
2016-01-04 20:59:06 +00:00
olly
030f26fd2d Fix an unsafe check in FragmentedMp4Extractor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111315463
2016-01-04 20:58:58 +00:00
aquilescanta
c31473c596 Work around for the Choreographer's resource leak.
This CL adds a class responsible for managing the lifecycle
of a single Choreographer to be shared among all
VideoFrameReleaseTimeHelper instances.

Issue: #1066
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110839824
2016-01-04 20:58:39 +00:00
aquilescanta
33a2b2d0c5 Added test cases to the MP4Webvtt parser
This CL is prepares the ground for refactoring the Webvtt parser,
so as to use the common parsing algorithms in both parsers. In order
to do this, the Webvtt Parser will be refactored. As a side note, many
more test cases will be added once the new subtitle features are
implemented. Some useful test cases have also been left for a following
CL, to allow an easy code review.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110466914
2016-01-04 20:58:04 +00:00
olly
dd497b1259 Don't check a framerate if we don't have one.
Seems (marginally) nicer than making one up :). I didn't
realize there was a method that didn't require a framerate
to be passed!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110456874
2016-01-04 20:57:58 +00:00
Ian Bird
2b1816c1f2 Skip substream id field when parsing EAC3 sync frame format 2016-01-04 08:59:36 +00:00
Ian Bird
e33345e5b8 Add support to identify (E)AC3 streams via TS descriptor tag 2016-01-04 08:58:57 +00:00
Oliver Woodman
b9607321fe Simplify DefaultExtractorInput 2015-12-17 12:15:09 +00:00
Oliver Woodman
cf13280590 Allow onOutputFormatChanged to throw ExoPlaybackException 2015-12-17 12:14:26 +00:00
olly
7fbffc873c Expose control over decoder selection.
This allows implementation and injection of custom MediaCodecSelector
instances. By injecting a custom selector, it's possible for applications
to exert more control over which decoder(s) they instantiate. For example,
applications can force use of a software decoder.

GitHub Issue #938
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110369810
2015-12-16 20:41:51 +00:00
eguven
f16b8baf75 ExtractorInput new skip methods to make skip methods analogous to the three read methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110155932
2015-12-16 20:41:51 +00:00
Oliver Woodman
009b454b69 Add InputStream to byte[] method to Util. 2015-12-16 20:33:50 +00:00
Oliver Woodman
7f8ddeac39 Added little endian methods to ParsableByteArray. 2015-12-16 20:33:04 +00:00
Oliver Woodman
50d5cbea70 Don't treat network_PID as program_map_PID.
Issue: #1068
Issue: #1001
2015-12-16 19:57:14 +00:00
yauhen
7fce590db2 blacklisted broken mp3 decoder on api lower than 20 2015-12-14 17:50:54 +03:00
eguven
a1d5626fe7 Fixed DefaultExtractorInput.read(...) to allow to read bytes in the peek buffer
when the dataSource reaches to the end.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110131793
2015-12-14 10:39:55 +00:00
aquilescanta
80bd91e636 Add "Webvtt embedded in MP4" support
Issue: #689
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110003312
2015-12-14 10:39:45 +00:00
andrewlewis
63dc769bff Improve seeking in MP3 files with XING headers.
Fix behavior of getTimeUs when seeking after the last entry in the table of
contents. Round correctly in getPosition, clipping to the stream duration based
on the input length (if known), falling back to the stream size from the header.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109993852
2015-12-14 10:39:45 +00:00
aptly-io
cd1b991c48 Allow multiple identical but intermittent spans
Multiple identical TTML fontStyles or fontWeights or textDecorations
on the content for a specific moment were rendered as if there's only
one decoration (span).
That's because SpannableStringBuilder.setSpan(span, start, end, flag)
found an earlier set span (the static allocated span's reference
is the same each time) and only refreshed this first span's start and
end values instead of adding a new span at its (new) different range.
This patch removes the static data members;
this makes the newly allocated span objects distinguishable.
A correct implementation is favoured over worries about memory
consumption.
2015-12-14 10:39:45 +00:00
andrewlewis
36ea0f8acd Fix Seeker.getTimeUs for positions before the first frame.
Issue: #1038
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109906628
2015-12-14 10:39:45 +00:00
olly
345e4ec74e Bump version to 1.5.3.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109698010
2015-12-08 18:00:46 +00:00
Oliver Woodman
bdc7633f5a Cleanup in TsExtractor. 2015-12-08 17:17:30 +00:00
olly
84307eff50 Document ChunkSampleSource constructors.
Issue: #1030
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109674800
2015-12-08 16:15:41 +00:00
ojw28
c0b19ed72b Merge pull request #1007 from alex3d/large-pmt
Fixed large PMT packet parsing
2015-12-08 11:39:12 +00:00
olly
fb7ddb722c Minor tweaks to AudioTrack playback params logic.
- Use allowDefaults to fix crash if params are passed without
  the speed being explicitly set.
- Allow null to be passed to clear previously set params.
- Clarify in doc that the passed params shouldn't be modified
  after they're passed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109591580
2015-12-07 19:55:21 +00:00
andrewlewis
20e3ca73ec Don't use CIPMP3Decoder.
Issue: #1000
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109318738
2015-12-07 19:54:56 +00:00
andrewlewis
46481fabcc Mark AudioTrackUtilV23 overriding methods with @Override.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109093558
2015-12-02 17:02:03 +00:00
aquilescanta
6570ef0e48 Add support for AudioTrack pitch/speed alteration on API 23.
Issue #26
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=108958826
2015-12-02 17:00:29 +00:00
alex3d
f752a023c8 Fixed large (>ts packet) PMT parsing 2015-11-30 19:41:14 +03:00
Oliver Woodman
a6bfe02d24 Add additional Widevine samples + improve errors.
* Add additional Widevine samples.
* Improve error messaging in demo app around decoders.
* Display toasts for playback errors related to missing insecure
  decoders, missing secure decoders, decoder instantiation failure
  and decoder query failure.
* Remove checks from SampleChooserActivity, since the above largely
  covers off this problem.
2015-11-27 16:40:31 +00:00
Oliver Woodman
c2df814b58 Add special WebvttExtractor for HLS.
This is the main component required to enable WebVTT subtitles in HLS.
It passes through each WebVTT file as a sample, and derives the correct,
adjusted timestamp for each of them on the way through.

Not yet wired up because we need to properly share the same
PtsTimestampAdjuster everywhere, and also stop instantiating new instances
of the adjuster. The adjuster will also need to correctly handle
discontinuities, since we'll no longer be creating new instances of it.

Issue: #151
2015-11-27 16:03:37 +00:00
Oliver Woodman
1a9b2be551 WebVTT styling.
- parse webvtt cue
- remove all tags from string (supported or not)
- apply spans for b, i and u
- honor class names in tags to properly parse the cue but do not apply styles for them
2015-11-27 16:02:30 +00:00
Oliver Woodman
cdb6ac4073 Added a isLocalFileUrlOrPath(Uri) method to remove manual checks
Also replaced the manual checks with a call to this method
2015-11-27 15:59:25 +00:00
Oliver Woodman
c667feca4b Get the physical display resolution if possible.
Issue: #800
2015-11-27 15:58:11 +00:00
Oliver Woodman
c62e535cf0 Make HLS behind-live-window behavior consistent.
- Propagate BehindLiveWindowException if we fall off the back
  of an HLS live stream.
- Consolidate seekPositionUs and playbackPositionUs into a
  single parameter.

Issue: #765
2015-11-27 15:57:20 +00:00
Oliver Woodman
4bb8bea952 Subtitle renditions can be represented by Variant instances.
This will make it easier to use HlsChunkSource with WebVTT HLS
media playlists.
2015-11-25 17:07:40 +00:00
Oliver Woodman
761b8137eb Use API level 23 constants. 2015-11-25 17:05:59 +00:00
Oliver Woodman
72f093c4f6 WebVTT parser improvements.
* Split findNextCueHeader and validateWebVttHeader into static methods.
  This is a step toward WebVTT in HLS, where we'll need to re-use these
  to peek at the top of the WebVTT file (they'll be moved into a util
  class).
* Made parser robust against bad cue headers + added a test.
* Removed spurious looking assertion in WebvttSubtitle.
2015-11-25 17:05:20 +00:00
Oliver Woodman
963e604ffd Misc cleanup.
- Remove some unnecessary condition checking.
- Rename variable to a better name.
2015-11-25 17:03:57 +00:00
Oliver Woodman
1fc32d56c8 check maximum consecutively dropped frames in video tests 2015-11-25 17:01:21 +00:00
Oliver Woodman
ddaa9092ec Parse the sequence number at discontinuities.
This is required to match up segments in one playlist (e.g. VTT)
to those in another (e.g. Audio/Video).
2015-11-25 17:00:18 +00:00
Oliver Woodman
6f62b499c5 Merge seek/playback positions in ChunkSource interface. 2015-11-25 16:50:30 +00:00
Oliver Woodman
f11a204b4a Remove caption parser strict modes.
They don't seem particularly useful; they don't technically force
strict compliance, but rather just catch a few token things in
each case. Furthermore, for playback, probably the right thing to
do is to always turn strict mode off.
2015-11-25 16:49:25 +00:00
Oliver Woodman
4fbe4fc7d5 Throw correct exception. 2015-11-25 16:48:45 +00:00
Oliver Woodman
042bd2ff82 Clean up WebvttParser somewhat. 2015-11-25 16:47:52 +00:00
Oliver Woodman
7e2fffe74d Make sure we use the correct mimeType with DRM initialization data.
We were previously using the container format of the media being
played as the mimeType generating key requests, but this is not
always correct. As an example, where a manifest contains webm streams
but specifies initialization data using cenc:pssh elements in the
manifest, the media has a webm mimeType, but the DRM initialization
data has an mp4 mimeType.
2015-11-25 16:47:05 +00:00
Oliver Woodman
ad7237b5d0 Handle E-AC-3 audio in HLS. 2015-11-25 16:45:37 +00:00
Oliver Woodman
9fd575e1be Allow Representations to have custom cache keys. 2015-11-25 16:44:43 +00:00
Oliver Woodman
632ccc6c20 Simplify passthrough playback rate calculation.
This change also fixes pre-M DTS HD passthrough playback on NVIDIA Shield.
2015-11-25 16:43:56 +00:00
Oliver Woodman
b8e7e1077e Fix bad pixel w:h ratio calculation in H262 reader.
It appears the spec calculation gives the h:w pixel ratio, where-as
we want w:h. It's pretty easy to convince oneself that this way round
is correct. Consider a video that's 100px by 100px, and setting
aspectRatioCode=3 to achieve this. The pixelWidthHeightRatio needs to
be 16/9 and not 9/16 :).

Issue: #965
2015-11-25 16:42:12 +00:00
Oliver Woodman
57ee90a96c Clean up AudioTrack. 2015-11-17 16:29:42 +00:00
Oliver Woodman
a4f1e3ce53 Don't re-buffer when AudioTrack underruns occur. 2015-11-17 16:27:53 +00:00
Oliver Woodman
e65f726458 Allow video format filtering without viewport constraint. 2015-11-17 16:06:43 +00:00
Oliver Woodman
80e829d7d1 Fix some warnings. 2015-11-17 16:03:10 +00:00
Oliver Woodman
8234a25110 Add H262 support for TS.
Built on top of https://github.com/google/ExoPlayer/pull/915.
2015-11-17 16:01:28 +00:00
Oliver Woodman
b1e4283058 Some cleanup to TS H264/H265 readers. 2015-11-17 15:55:57 +00:00
Oliver Woodman
d96fe37c05 Don't use getClass().getSimpleName() where it's pointless to do so 2015-11-17 15:52:58 +00:00
Oliver Woodman
bcbfe9f708 Add AMR-NB and AMR-WB support to ExoPlayer 2015-11-17 15:52:16 +00:00
Oliver Woodman
b293cf2a76 Parse QuickTime variant audio sample entries.
Issue: #958
2015-11-17 15:50:20 +00:00
Oliver Woodman
f8d2229f52 Fix build break 2015-11-17 15:43:48 +00:00
Oliver Woodman
a3f894b86b Add support for extracting E-AC-3 in Matroska files. 2015-11-17 15:43:24 +00:00
Oliver Woodman
5de7638f74 Handle laggy manifest servers. Don't reprocess discarded manifests twice. 2015-11-17 15:42:40 +00:00
Oliver Woodman
b27dc9b7dc Clean up E-AC-3 naming. 2015-11-17 15:41:30 +00:00
Oliver Woodman
269757cb3e Clean up MP4/FMP4 shouldParse methods. 2015-11-17 15:38:54 +00:00
Oliver Woodman
3cbb1fa1b9 Tweak error string 2015-11-17 15:32:25 +00:00
ebascel
1f309f7edf Check for valid periods in DASH MPD after parsing. 2015-11-13 14:44:50 +01:00
Miquel Beltran
0089987055 Added missing MimeTypes to Smooth Streaming manifest parser 2015-11-03 16:51:05 +01:00
Oliver Woodman
a679e39ab7 Limit max line length to 100 chars. 2015-10-30 12:02:34 +00:00
Andrew Lewis
c53495e7e2 Check all descriptors for a registration_descriptor.
Issue: #898
2015-10-29 16:37:48 +00:00
Andrew Lewis
b64986ce82 Blacklist bad decoders 2015-10-29 16:28:00 +00:00
ojw28
ffc925f194 Merge pull request #885 from RikHeijdens/parse-hls-name-label
Parse HLS NAME label from the MasterPlaylist
2015-10-28 22:04:32 +00:00
Rik Heijdens
d49d3e2cd3 Changed formatName to something more concise
And fixed the indentation
2015-10-28 16:58:06 -04:00
Rik Heijdens
4a77d1a44e Remove unnecessary getter 2015-10-28 11:14:05 -04:00
Rik Heijdens
022c1ad6dd Store HLS trackname in the Variant class instead of Format class 2015-10-28 11:10:58 -04:00
Rik Heijdens
1c1f5af5d2 Changed the use of the name variable 2015-10-28 11:02:44 -04:00
Oliver Woodman
b9224160a3 Use equals rather than == for string equality 2015-10-28 13:42:40 +00:00
Oliver Woodman
4237e3d391 Cleanup following #884 II 2015-10-27 21:06:38 +00:00
Oliver Woodman
02cc495f1c Cleanup following #884 2015-10-27 21:03:16 +00:00
Oliver Woodman
f4b07ab147 Resolve conflicts 2015-10-27 20:37:54 +00:00
Oliver Woodman
cda5b20353 Bump version to 1.5.2 2015-10-27 20:15:37 +00:00
Oliver Woodman
4422e8a015 Further cleanup to FLV extractor 2015-10-27 18:23:00 +00:00
Oliver Woodman
f91ea9039d Read AC-3 and HEVC signaled by private registration_descriptor.
Issue: #898
2015-10-27 18:20:53 +00:00
Oliver Woodman
195c0c8884 Fix parsing of multi-channel AAC audio specific config in MP4 and ADTS.
Previously, when spectral band replication (SBR) or parametric
stereo (PS) was in use in an MPEG-4 stream, the channel configuration
chosen was likely incorrect. The channel configuration was *always*
incorrect for 7.1 audio (gave 7 channels instead of 8).
2015-10-26 15:34:29 +00:00
Oliver Woodman
9246fbbe7d Add exception type for manifest load errors. 2015-10-26 15:33:53 +00:00
Oliver Woodman
f3113e7055 Use MediaCodecUtil.IsSizeAndRateSupportedV21 where available. 2015-10-26 15:32:49 +00:00
Oliver Woodman
a74fd17e92 Handle curle braces in SystemID UUID.
Issue: #863
2015-10-26 15:31:09 +00:00
Oliver Woodman
21c1b8ca06 Add basic handling for edit lists in MP4 streams.
Issue: #874
2015-10-26 15:29:10 +00:00
Oliver Woodman
b03278f2bf Don't assume representations are video in first two DashChunkSource constructors. 2015-10-26 15:28:10 +00:00
Oliver Woodman
4d9dd3f6e6 Remove spurious blank line 2015-10-26 15:26:05 +00:00
Oliver Woodman
941ca3f304 Add readShort to ParsableByteArray 2015-10-26 15:25:46 +00:00
Oliver Woodman
b766253116 m 2015-10-26 15:23:06 +00:00
Oliver Woodman
14c190310c Fix broken Javadoc 2015-10-26 15:19:10 +00:00
Oliver Woodman
c59fc47565 Throw ParserException from parsers when a parse exception occurs. 2015-10-26 15:18:53 +00:00
Oliver Woodman
13aaa5a5db Use C.MICROS_PER_SECOND more consistently. 2015-10-26 15:16:56 +00:00
Oliver Woodman
daa5835915 Timestamp HEVC samples based on the first NALU's timestamp.
Issue: #893
2015-10-26 15:15:42 +00:00
Rik Heijdens
ec65fe952c Fixed code indentation 2015-10-26 09:59:19 -04:00
Oliver Woodman
02d42753ec A couple of final tweaks 2015-10-26 11:56:25 +00:00
Oliver Woodman
cdad156bae Further tweaks to ScriptTagPayloadReader 2015-10-26 11:52:23 +00:00
Oliver Woodman
dff17f244c Some probably correct tweaks to ScriptTagPayloadReader 2015-10-26 11:14:34 +00:00
Oliver Woodman
950cc70003 Purely stylistic changes to FLV extractor 2015-10-26 10:44:19 +00:00
Oliver Woodman
fb75b65a70 Fix compile error. 2015-10-26 10:24:30 +00:00
ojw28
f133524c2f Merge pull request #828 from jeoliva/flv-experiment
FLV (H.264 + AAC) support
2015-10-26 10:17:53 +00:00
Rik Heijdens
282a3fe818 Converted trackId into String 2015-10-23 09:56:00 -04:00
joli
3e36f529f8 FLV Support - Added Video Reader and parsing improvements 2015-10-22 23:50:46 +02:00
Rik Heijdens
1b469f422f Synced with upstream 2015-10-20 15:52:35 -04:00
Rik Heijdens
1d31521710 Merge branch 'dev' of github.com:/google/ExoPlayer into mediaformat-id-dash
Syncing my fork
2015-10-20 15:49:45 -04:00
Rik Heijdens
10f3be6d50 Hls NAME parsing changes
-   NAME is optionial now in the Hls Manifest
-   Use the id field in Format to store the NAME instead of
    a field in Variant to mimic DASH's behaviour
    (see the DASH Id PR, which is not merged yet at this time).
2015-10-20 15:01:44 -04:00
Rik Heijdens
eb282639c5 Parse NAME label from HLS Master Playlist
The HlsPlaylistParser now parses the "NAME" property
from the MasterHlsPlaylist and saves it in the Variant
2015-10-20 14:51:31 -04:00
Rik Heijdens
42351d3127 Added id property to MediaFormat
Added the property 'id' to the MediaFormat class
 which serves as an identifier for the track.

DASH Representations will have the "id's" from their
Media Presentation Description mapped to the id property
 in the MediaFormat class that will represent the track.

We needed this for an use case where we wanted to read the 'id'
value from the DASH representation and present it to the user
in order for the user to select the right track.
2015-10-20 14:21:41 -04:00
Oliver Woodman
0545c58dee Bump version to 1.5.1 2015-10-14 12:12:03 +01:00
Oliver Woodman
6d44ec560e Skip to the sample/auxiliary data offset in fragmented MP4 streams.
The sample data position is the sum of the data offset and the base data offset.
The base data offset is either specified in the stream, or defaults to the first
byte position in the moof box. (We only support one traf per moof currently, so
the offset does not need to be assigned for later track fragments.) The data
position can optionally be offset by a data position read from the trun.

The auxiliary information offset is calculated in the same way, but using an
offset read from the saio box.

Issue: #837
Issue: #861
2015-10-14 11:51:16 +01:00
Oliver Woodman
aa647745a2 No-op re-orderings. 2015-10-12 17:59:14 +01:00
Oliver Woodman
20e05a31b2 Do TTML color parsing directly in Exoplayer.
- Added TtmlColorParser to workaround JellyBean issues with named colors.
- Support rgb and rgba expressions as well.
2015-10-12 17:57:10 +01:00
Oliver Woodman
bcb9f8282d Enable SmoothFrameTimeHelper by default.
Context:
- Currently, playback is significantly more juddery with it disabled,
  particularly on AndroidTV.
- We should be able to do the "best" job of this internally, so injection
  doesn't buy anything useful. If someone has a better implementation for
  adjusting the frame release, they should improve the core library.
2015-10-12 12:32:10 +01:00
Oliver Woodman
9b4e9723e5 Don't use SEC VP8 decoder on Galaxy S3s.
The only Samsung devices with names starting "d2" that we're aware of
are Galaxy S3 variants, and also one Samsung Galaxy Pocket Neo d2aio
SAMSUNG-SGH-I747Z. This change speculatively includes that device too because
its name is very similar to SAMSUNG-SGH-I747 which is known to be affected.

Issue: #548
2015-10-12 12:28:14 +01:00
Oliver Woodman
c4235d0e8d Ignore tfdt boxes for SmoothStreaming playbacks.
Issue #838
2015-10-12 12:26:58 +01:00
Oliver Woodman
7905506681 On Sony Bravia devices check for 4k panel.
Documentation: https://developer.sony.com/develop/tvs/android-tv/design-guide/

On API 23 we should also check Display.Mode (where supported).

Issue: #800
2015-10-12 12:25:58 +01:00
Oliver Woodman
952bd4e73c Don't calculate a maximum input size for H.264 on Sony 4k TV.
Issue: #800
2015-10-12 12:24:48 +01:00
Oliver Woodman
a764b359e8 Add support for DTS passthrough on supporting devices before API 23.
NVIDIA Shield before API 23 supports DTS passthrough, so this change inlines the
constant value.
2015-10-12 12:21:16 +01:00
Oliver Woodman
a5ebb49a1a Set the maximum input size based on the sample table for MP4s. 2015-10-12 12:20:15 +01:00
Oliver Woodman
3682141ee1 webm_extractor: Re-sync to next level 1 element on invalid data
Try re-sync'ing to the next level 1 element when invalid data is found. This
corrects the behavior for test case 4 in the mkv test suite.

Partially Fixes Issue #631
2015-10-12 12:18:12 +01:00
Oliver Woodman
6bf817f107 Workaround EOS propagation for all devices with RK decoder.
As per the end of the related issue, it's likely that all devices
running the affected API levels + decoder are affected by the same
issue.

Issue #464
2015-10-12 12:12:43 +01:00
ojw28
98426a782f Merge pull request #857 from IanDBird/dev-truehd
Add support for TrueHD audio codec in WebMExtractor
2015-10-12 12:03:31 +01:00
Ian Bird
e933e2d49f Add support for MPEG2 video codec in WebMExtractor 2015-10-09 14:38:39 +01:00
Ian Bird
ee8a00b68a Add support for TrueHD audio codec in WebMExtractor 2015-10-09 14:12:48 +01:00
Ian Bird
6a5cd68892 Make MediaCodecUtil.getMediaCodecInfo public 2015-10-09 12:33:01 +01:00
joli
8ddc73511e FLV Support - Added Audio and Script Data readers 2015-09-29 17:20:38 +02:00
Oliver Woodman
62ce0ff009 Fix indentation. 2015-09-29 11:40:59 +01:00
Oliver Woodman
d8934e2751 Make mapping from position to time more accurate in XING MP3 streams.
This change keeps the proportion offset * 256 as a floating point value rather
than rounding it before linear interpolation, which will increase precision
slightly when seeking in streams with XING headers.

In practice, this won't make much of a difference because precise seeking in VBR
MP3s with XING headers seems not to be possible without reading the entire file,
due to the fact that the (uneven) distribution of bits is represented by a fixed
number of table of contents entries.
2015-09-29 11:37:40 +01:00
Oliver Woodman
15da18d900 Fix format selection bug.
Issue: #825
2015-09-29 11:36:26 +01:00
Oliver Woodman
427cb34aca Bump version to 1.5.0 2015-09-28 20:56:28 +01:00
Oliver Woodman
dce74f4209 Add onDrmKeysLoaded back again (oops) 2015-09-28 20:24:46 +01:00
Oliver Woodman
e96e618046 Clean up expansion of sample buffers.
- The old approach was technically incorrect, because the checks
were "capacity < sampleSize" and hence neglected the fact that
the buffer position may be greater than 0 (e.g. if the caller
wants to prefix the sample with some additional data).

- Also proactively throw an exception if the buffer is too small,
rather than wait for the failure when we actually do the write.
2015-09-28 20:23:45 +01:00
Oliver Woodman
15c2f9c328 Explicitly set max input size for H264 decoders.
This works around an issue where some devices, such as the Acer Iconia,
don't allocate large enough input buffers for H264.

Issue: #616
Issue: #714
2015-09-28 12:38:35 +01:00
Oliver Woodman
decb7f58c7 Expose container track identifier via MediaFormat.
Issue: #770
2015-09-28 12:36:28 +01:00
Oliver Woodman
979fd083b4 Don't invoke adaptiveTrack with 0 or 1 representations.
0 will crash. 1 is pointless.
2015-09-28 12:34:19 +01:00
Oliver Woodman
e8895c8746 Fix AudioTrack EOS handling in ExoPlayer. 2015-09-28 12:25:30 +01:00
Oliver Woodman
15052052ee Clean up TrackRenderer TODOs 2015-09-28 12:24:35 +01:00
Oliver Woodman
b81ac8cdc2 Added robustness for chunk removal.
Issue #812
2015-09-28 12:24:13 +01:00
Oliver Woodman
42416b82db Fixed issue in which DashChunkSource didn't make use of the most recent
manifest.
2015-09-28 12:22:54 +01:00
Oliver Woodman
c3e0d34aa1 Fixed int overflow issue with callbacks on very long-running streams. 2015-09-28 12:22:12 +01:00
Oliver Woodman
e4e02f9189 Further improve WebVTT parser according to WebVTT spec 2015-09-28 12:20:27 +01:00
Oliver Woodman
71f542f7c2 If a parser really wants to throw a runtime exception, don't crash. 2015-09-28 12:16:26 +01:00
Oliver Woodman
e652019bb3 Tweak new drm listener method. Fix demo app 2015-09-28 11:59:10 +01:00
Patrik Åkerfeldt
95db1eacd1 Add onKeysLoaded callback
This adds a callback for when DRM keys have been loaded.
2015-09-25 10:03:00 +02:00
Oliver Woodman
765d1659be Return "seeked to" position immediately after seek. 2015-09-18 18:25:25 +01:00
Oliver Woodman
c1b8352e33 Stylistic tweaks. 2015-09-18 18:25:07 +01:00
Oliver Woodman
da97e30e33 Support mp3 media segments in HLS.
Issue #804
2015-09-18 18:23:50 +01:00
Oliver Woodman
c960636d28 Stylistic cleanup. 2015-09-18 18:23:28 +01:00
Oliver Woodman
cf27b83e8a Implement handlesTrack using MediaCodecUtil. 2015-09-18 18:22:40 +01:00
Oliver Woodman
3538e57797 Work around incorrect timestamp handling on Sony Xperia E.
Also include more Sony Xperia Z devices in the MP3 workaround.
2015-09-18 18:20:47 +01:00
Oliver Woodman
6ef8c3a61b Avoid loading the first HLS segment twice.
Issue: #788
2015-09-18 18:20:12 +01:00
Oliver Woodman
8a723706d6 Provide more flexibility for setting caption font size.
- Respect any padding set on SubtitleLayout.
- Allow specification of absolute, fractional and fractional-ignoring-padding
  text sizes.
2015-09-18 18:19:28 +01:00
ojw28
d6801389de Merge pull request #807 from castlabs/feature/parse_audio_channels_only_for_mpeg_dash
Parse audioChannels only when on mpeg-dash
2015-09-18 11:58:28 +01:00
Miquel Beltran
ff6455aadb Parse audioChannels only when on mpeg-dash
Only parse the @value as Int when the schemeIdUri is urn:mpeg:dash:23003:3:audio_channel_configuration:2011
2015-09-18 11:48:34 +02:00
ojw28
de68c982ab Merge pull request #795 from jeoliva/webvtt-parser-improvements
Improve WebVTT parser according to WebVTT spec
2015-09-17 16:34:33 +01:00
ojw28
1be3f9dcbc Merge pull request #796 from souji1103/dev
Prevent ArrayIndexOutOfBoundsException when proguard is enabled
2015-09-17 15:15:59 +01:00
joli
925795cb4f Improve WebVTT parser according to WebVTT spec
- Line parameter
  - Added support for value and line alignment attributes.
  - Support negative numbers when line is an absolute number (not a
percentage).
- Position parameter
  - Added support for value and position alignment attributes
- Added support for WebVTT comment blocks
- Percentage values now accept decimal numbers (as webvtt spec states)
- Added new WebVTT tests for testing all new implemented features
2015-09-16 21:09:44 +02:00
souji
e2ed741ddd prevented excess loop, reading pes header 2015-09-16 09:04:04 +09:00
Oliver Woodman
d7697176ed Include language in audio formats.
Issue: #437
2015-09-15 13:45:54 +01:00
Oliver Woodman
b6f15a17e0 TTML improvements.
- do not denormalize styles at parsing time but only put normalized style info
into TtmlNode tree. Resolve styles on demand when Cues are requested for a
given timeUs.
- create TtmlRenderUtil to have static render functions separate
- added unit test for TtmlRenderUtil
- adjusted testing strategy for unit test to check resolved style on Spannables after rendering
2015-09-15 13:44:52 +01:00
Oliver Woodman
908e4dfd5d Search for synch' when sniffing ADTS and check four frames.
Issue: #791
2015-09-15 13:43:42 +01:00
Oliver Woodman
721956710f Remove MediaFormat.create methods that don't take a duration. 2015-09-15 13:43:12 +01:00
Oliver Woodman
e7926145c6 Fix overflow for DASH live streams using large timescales.
Issue: #789
2015-09-15 13:42:16 +01:00
Oliver Woodman
ab46d263ad Use decoders with names that don't start "OMX.".
There is no guarantee codec names start with this prefix in >= L.

Issue: #782
2015-09-15 13:41:42 +01:00
Oliver Woodman
e6e1e2c1d1 Tweaking TTML parsing logic. 2015-09-10 19:03:40 +01:00
Oliver Woodman
04342f2b76 Don't use toLowerCase :).
It can do weird things if the device has an unusual default Locale.
Util.toLowerInvariant uses the US Locale, which does the right thing
in this case.
2015-09-10 18:31:08 +01:00
Oliver Woodman
eeb73a86ea Improve sniffer behavior for fragmented MP4.
- Allow a moof box to exceed the search size.
- Return immediately after reading an ftyp box with no compatible types.

Issue: #784
2015-09-10 18:30:47 +01:00
Oliver Woodman
6f9019a4e3 Use DTS to set timestamp adjustment where available.
Partial fix for #778
2015-09-10 18:30:13 +01:00
Oliver Woodman
1f3bd97a2d Add non-strict SubRip parsing (enabled by default). 2015-09-10 18:29:36 +01:00
Oliver Woodman
ede7a69d95 Change DTS MIME type to vnd.dts. 2015-09-10 18:28:50 +01:00
Oliver Woodman
ab66dfa7c2 Parsing embedded TTML styling. 2015-09-10 18:27:03 +01:00
Oliver Woodman
e48851d8cc Share PTS timestamp adjustment across format changes.
When switching format in HLS, we instantiate a new extractor, which
adjusts TS presentation timestamps so that they align properly with
the start of the first segment in the new format. Some HLS streams
appear to have slightly misalignment that causes a glitch when using
this approach.

It's better to re-use the same timestamp adjustment across formats,
and only reset it when seeking or when there's an actual discontinuity.
This is because the HLS spec guarantees PTS timestamp alignment across
different formats.

We'll also need something like PtsTimestampAdjuster to share between
separated audio and WebVTT tracks, which also contain PTS timestamps
that are aligned, and will need to share a common adjustment.

Issue: #692
2015-09-10 18:23:57 +01:00
Oliver Woodman
7d38d2ef3c CuePainter fixes for caption styling.
- Don't allow "nothing has changed" optimization in the case
  that only styling has changed (TextUtils.equals will return
  true in this case, but we shouldn't optimize).
- Add functionality to suppress embedded styling; seems useful
  to have.
- Added "this." for clarity.
2015-09-10 18:22:44 +01:00
Oliver Woodman
68f2dc5998 Remove MultiTrackChunkSource (multi track now supported directly). 2015-09-10 18:22:07 +01:00
Oliver Woodman
e6ca2df514 Fix end-of-stream for live streams.
Issue: #764
2015-09-10 18:21:21 +01:00
Oliver Woodman
89fcafec5b Correctly set a format duration. 2015-09-10 18:20:07 +01:00
Oliver Woodman
820433de06 Call stop() to fully play out remaining audio!
Issue: #707
2015-09-10 18:19:09 +01:00
Oliver Woodman
9bcc00f369 Fix reported buffered position for HLS across format switches. 2015-09-10 18:16:42 +01:00
Oliver Woodman
a7ba393d54 When multiple BaseURL elements are present, prefer the first one.
Issue: #771
2015-09-10 18:16:23 +01:00
Oliver Woodman
4a29be498b Correctly use "current-manifest-live" v.s. "stream-is-live"
When a live stream ends, what typically happens is that the manifest
is refreshed and the refreshed version is not marked as live/dynamic.
When this happens we:

1. Don't want the duration of the track to change.
2. Still want to consider the possibility that we may have fallen behind
   the live window.
3. Don't want to allow futher manifest refreshes.

This change uses the right thing in the right place.
2015-09-10 18:15:15 +01:00
Oliver Woodman
143a4deee8 If no buffers were queued, handle EoS directly.
Issue: #707
2015-09-10 18:12:32 +01:00
Oliver Woodman
59a789b340 Include missing durations in AC3/DTS formats. 2015-09-10 18:11:18 +01:00
Ian Bird
4b69fad6b7 Ignore extra returns in Subrip parsing 2015-09-09 11:56:10 +01:00
Oliver Woodman
5c0745cedf Add some generally useful error propagation logic for HLS.
Issue #765
2015-09-07 13:59:55 +01:00
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
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
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
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
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
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
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
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
Oliver Woodman
ea7caf4f91 Bit of a hack to pass through original MediaFormat from FrameworkSampleSource. 2015-08-19 16:32:33 +01:00
Oliver Woodman
c9d9808013 Make getRendererEnabled behavior the same as it used to be, until it's removed. 2015-08-19 16:32:01 +01:00
Oliver Woodman
679fa8de03 Only use passthrough for passthrough MIME types. 2015-08-19 16:31:28 +01:00
Oliver Woodman
e770e5c24b Multi-track - The (nearly) final step.
- Migrate demo app to use new APIs.
- Add multi-track support for ExtractorSampleSource case.
- Add multi-track support for SmoothStreaming use case.

The final step is to add support back for the DASH use case and
delete MultiTrackChunkSource. This is blocked on multi-period support
landing, in order to prevent a horrendous merge conflict. We also
need to update HLS to expose sensible track information.

Issue: #514
2015-08-19 16:29:30 +01:00
hori-ryota
3714751b95 Fixed bug of AES URI Pattern for hls 2015-08-19 18:22:33 +09:00
Oliver Woodman
3b9ca40b05 Add ISO 14496-30 embedded TTML (stpp) subtitle support.
Issue: #689
2015-08-17 17:15:53 +01:00
Oliver Woodman
38f2413290 Allow ChunkSource an opportunity to fail preparation.
When ChunkSource implementations implement multi-track for DASH and SS,
format selection will move inside of ChunkSource. If we, for example, fail
to query the decoder to determine which tracks are playable, we need an
opportunity to fail (i.e. say we're not prepared, so that maybeThrowError
is called, from which we can throw).

This may go away in the future if we remove the distinct preparation step
and treat tracks/formats as things that can change dynamically, but for now
this is what we have.

Issue #514.
2015-08-17 17:14:21 +01:00
Oliver Woodman
d49d5a1765 Fix reading HEVC in MPEG TS.
Fix reading the first slice flag, which before could cause a read out of bounds
if the NAL unit started at the end of the buffer.

Handle non-VCL NAL units by flushing a pending sample when starting to read one.
2015-08-17 17:13:23 +01:00
Oliver Woodman
37ebec6e82 Skip more than one ID3 header.
Issue: 713
2015-08-17 17:12:33 +01:00
Oliver Woodman
90f9f7314d Allow MediaFormat to express that it's adaptive (not yet used).
Also:
- Better document MediaFormat.
- Document getFormat to indicate what it's good (and not good) for.
2015-08-17 17:11:37 +01:00
Oliver Woodman
6e527c550f Expose new multi-track APIs in the ExoPlayer interface + plumb
multi-track support upstream to the ChunkSource interface.

This change does not yet make use of the newly exposed APIs. This
will come in a subsequent CL.

Issue #514.
2015-08-17 17:09:55 +01:00
Oliver Woodman
bf77f3b289 Simplify subtitle parsing.
- Currently all subtitles we parse contain timestamps relative to the sample
  timestamp, however we add the sample timestamp in inconsistent ways (sometimes
  in the Subtitle, sometimes in the SubtitleParser). This change converges on
  a single approach. It also paves the way for passing absolute offsets to use
  instead, and being able to apply them in a consistent way in a single place
  (PlayableSubtitle). This functionality will be required for ISO 14496-30 TTML
  embedded subtitles.

Issue: #689
2015-08-13 20:36:50 +01:00
Oliver Woodman
fbf590fdf6 Fix reading PCM configuration in HEVC SPS. 2015-08-13 20:35:52 +01:00
Oliver Woodman
6b44c6e6b1 Fix single sample loading + seeking in HLS.
Issue #587
2015-08-13 20:32:09 +01:00
Oliver Woodman
d3995eaa7a Fix rotation handling as far as is possible.
Issue: #91
2015-08-13 11:18:15 +01:00
Oliver Woodman
8db1331021 Propagate MediaFormat instead of TrackInfo.
Issue #514.
2015-08-11 18:23:22 +01:00
Oliver Woodman
f7ffeb75cf Parse pixel aspect ratio from SPS for use when there's no pasp atom.
Issue: #697
2015-08-11 18:18:19 +01:00