2052 Commits

Author SHA1 Message Date
andrewlewis
fd6012a727 Remove outputBuffer assertion in ResamplingBufferProcessor.
The outputBuffer is not necessarily empty after a flush, so the assertion could
fail in normal usage. The assertion can just be removed as the output buffer is
rewritten in full on every call to handleBuffer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147541016
2017-02-15 17:05:53 +00:00
andrewlewis
3691454b82 Fix resuming after error for CEA-608 SEI in fMP4.
Also test SEI parsing in FragmentedMp4ExtractorTest.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147460699
2017-02-15 17:04:50 +00:00
olly
7625c1b862 Remove unnecessary configuration parameter.
- It's always fine to prefer the manifest drm init data. In
  DASH we always do this anyway. In SS the manifest and sample
  formats are identical.
- Optimized the case where the manifest and sample formats are
  identical by avoiding the format copy.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147385282
2017-02-15 17:03:47 +00:00
olly
8cb3b6ed07 SmoothStreaming: Replace variant bitrate/start_time placeholders
Issue: #2447

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147358615
2017-02-15 17:02:47 +00:00
olly
0316ab80df Fix broken Javadoc
Issue: #2433

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147355544
2017-02-15 17:01:41 +00:00
eguven
f7fbbe993e Fix ArrayIndexOutOfBoundsException while reading SEI NAL unit
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147165453
2017-02-15 16:57:33 +00:00
cdrolle
ef475eb9c9 Fixed potential bug in which old paint-on captions could be drawn overtop by pop-on captions as they weren't being cleared properly.
This fix was taken from YouTube's Cea608Decoder ([]

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147066662
2017-02-15 16:56:29 +00:00
maxjulian
9e07cf7c73 Update exoplayer 1 and 2 to support stereo mesh layout.
Reference spec:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md#semantics

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147060701
2017-02-15 16:55:24 +00:00
cdrolle
de46ed7fb9 Fixed an issue with Cea608Decoder in which tab commands were not being used correctly.
Tab commands were being used cumulatively (i.e. moving the cursor farther and farther over) resulting in the text eventually trying to write beyond the bounds of the screen and throwing an exception.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146783284
2017-02-15 16:53:04 +00:00
aquilescanta
7c8a3d006d Flexibilize mp4 extensions detection for HLS chunks
This CL adds support  mp4 extensions of the form .m4_.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146479870
2017-02-15 16:50:52 +00:00
olly
d3f4da749c Propagate track type through ExtractorOutput.track
This allows binding by track type in ChunkExtractorWrapper, which
allows the EMSG and 608 tracks to be enabled on FragmentedMp4Extractor
in DefaultDashChunkSource. ChunkExtractorWrapper currently binds these
to DummyTrackOutputs.

Note: I wanted to pass the mimeType instead, since it's a more specific,
but unfortunately there's at least one place where it's not known at the
point of invoking track() (FlvExtractor).

Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146471082
2017-02-15 16:49:47 +00:00
aquilescanta
f2d3af7dea Delete dead code and fix javadocs from hls
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146466389
2017-02-15 16:47:43 +00:00
andrewlewis
c82319332f Omit clipped samples when applying edits for audio tracks.
Issue: #2408

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146389955
2017-02-15 16:46:39 +00:00
cdrolle
537a3ab5be Fixed 2 issues with Cea708Decoder.
The first issue occurs when we attempt to process a DtvCcPacket that hasn't been completely filled. In this case we attempted to extract data beyond the length of the packet, instead of dropping the packet as we should have. The other issue occurs when we encountered an invalid cc_data_pkt. In that case we were finalizing the entire DtvCcPacket, instead of just ignoring that particular cc_data_pkt as we should have.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146373074
2017-02-15 16:45:39 +00:00
aquilescanta
0402191ace Make SeiReader injectable to H26xReaders
This CL is a no-op refactor but allows defining the outputted
channels through the TsPayloadReaderFactory.

Issue:#2161

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146243736
2017-02-15 16:44:38 +00:00
olly
ee3c5f875f Simplify chunk package ahead of EMSG/608 piping
Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146243681
2017-02-15 16:43:36 +00:00
eguven
025a67cae9 Enable buffering for CacheDataSink by default
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146221487
2017-02-15 16:42:34 +00:00
andrewlewis
74acbe04e3 Pass an array of BufferProcessors to the AudioTrack.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146215966
2017-02-15 16:41:32 +00:00
aquilescanta
feeec77407 Add support for multiple programs in a single TS
* Prevents calling endTracks() before all PMTs have been
  processed.
* Adds a unique ID to the format of each track. This allows
  the track selector to identify which track belongs to
  each program. The format of each id is
  "<program number>/<track output id>".

Note: This CL will break malformed TS files whose PAT
declares more PMTs than it actually contains, which
previously were supported. This does not apply for HLS
mode.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146151642
2017-02-15 16:40:28 +00:00
andrewlewis
4301606200 Add a BufferProcessor for resampling.
This initial version of the BufferProcessor interface assumes that buffers are
handled in their entirety on each invocation.

Move PCM resampling out of AudioTrack into a BufferProcessor.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146128411
2017-02-15 16:39:28 +00:00
eguven
3edeec2495 Document passing null cacheWriteDataSink to CacheDataSource constructor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146128328
2017-02-15 16:38:28 +00:00
olly
7c1b2beb84 Support dyanmically setting key request headers
Issue: #1924

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146120465
2017-02-15 16:37:27 +00:00
olly
8f482cb2ed Fixing some Javadoc errors
- Cea708 Javadoc references private internals with @link. Doc
  about device accessibility settings doesn't relate to the
  decoder, either.
- Creator Javadoc unnecessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146118092
2017-02-15 16:35:17 +00:00
cdrolle
87e790f44d Fixed issue with TextRenderer and RawCC 608/708 captions in which all the captions prior to the playback position would be rendered in [] succession when a VOD stream starts.
Instead of clearing the DECODE_ONLY flag for all input buffers in TextRenderer (i.e. for all caption types), we now only clear it on the output buffer in SimpleSubtitleDecoder. The number if input buffers in CeaDecoder has also been increased to reduce the delay before captions appear for playback sessions that start far ahead into the content.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146028680
2017-02-15 16:34:15 +00:00
cblay
2e7f9fb6cb Don't setContentLength() in CacheDataSource if the current request ignores cache.
Otherwise an empty cache span is created.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146014081
2017-01-30 19:19:43 +00:00
ojw28
a7dd0f7609 Merge pull request #2326 from devint1/alac-dev
Apple Lossless (ALAC) support
2017-01-30 18:44:47 +00:00
olly
615b707b16 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145994313
2017-01-30 16:31:30 +00:00
aquilescanta
e6bbd397d5 Add support for HLS's #EXT-X-PLAYLIST-TYPE
Issue:#805

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145991145
2017-01-30 16:30:34 +00:00
aquilescanta
7ee8567f4a Fix demo app to avoid seeking if resume position is clear
This fixed the resume live window issue by modifying the demo app.

Issue:#2344

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145987470
2017-01-30 16:29:23 +00:00
aquilescanta
9a90795041 Resume from playback position by default when media source changes
Issue:#2369

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145982198
2017-01-30 16:27:53 +00:00
aquilescanta
c49d142981 Prevent old playlist snapshots from being used on live HLS streams
This aims to replace InvalidCodeResponse's with BLWE's caused by trying to
load chunks that have been removed from the server.

Issue:#2344

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145679171
2017-01-30 16:26:49 +00:00
olly
63e6bf5cf2 Consolidate UnrecognizedInputFormatException
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145570097
2017-01-25 19:29:10 +00:00
olly
6f5c7b38a7 Wait for first sync frame in MediaCodecRenderer
For the video renderer, it's not true that the source always
provides from a sync frame specifically in the case where
the surface has been replaced on the renderer. In this case
the source doesn't know that it should be providing from a
sync frame.

Issue: #2093

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145562222
2017-01-25 19:28:08 +00:00
andrewlewis
98db14e7e5 Fix some documentation nits in AudioTrack.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145554504
2017-01-25 19:27:05 +00:00
cdrolle
e9ab71a280 Modified CeaDecoder and CeaSubtitle so that it's correctly setting the subsampleOffset and making proper use of it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145552166
2017-01-25 19:26:03 +00:00
olly
0a8dc41632 Set max resolution from codec capabilities for ABR where resolutions are unknown
Issue: #2096

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145542983
2017-01-25 19:25:02 +00:00
olly
953c6855ec FMP4 EMSG/CEA608 output bug fix + tweaks
- Fix to use different track ids for EMSG + CEA608, so they can
  both be enabled at once.
- Tweaked extractor to output formats prior to endTracks() when
  parsing the initial moov box. This makes it easier to handle
  multiple tracks through the chunk package. It may or may not
  be made a requirement (it's already true for the MKV extractor).

Issue: #2362
Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145538757
2017-01-25 19:23:58 +00:00
eguven
8970e80b25 Don't use the returned key set id if the request wasn't for an offline license key
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145533961
2017-01-25 19:22:56 +00:00
zhihuichen
0e99237075 Allow duplicate tracks in WebM/MKV extractor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145457836
2017-01-25 19:21:55 +00:00
olly
c01c2c34f7 Store full accessibility descriptors in parsed DASH manifest
Issue: #2362

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145402640
2017-01-24 14:25:47 +00:00
olly
4efdd14c65 Allow FMP4 extractor to output CEA-608
Issue: #2362

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145401668
2017-01-24 14:25:47 +00:00
aquilescanta
b1ec5e3a25 Move TimestampAdjuster from extractor to util
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145295850
2017-01-24 14:25:47 +00:00
aquilescanta
497651c7b9 Ignore file extension for HLS Subtitle Renditions
According to the spec, subtitle renditions must be Webvtt media
segments.

Issue:#2025
Issue:#2355

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145289266
2017-01-24 14:25:47 +00:00
aquilescanta
18d7cdf39f Add pts adjustment in SpliceInfoDecoder
This allows the user to interpret PTSs in the playback timebase.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145280921
2017-01-24 14:25:47 +00:00
olly
5debf5a14a Use bitrate as fixed track selection tie breaker
If we don't have resolutions (and therefore cannot determine
pixel counts) then use bitrate as a tie breaker instead. Also
use pixel count as a tie breaker if pixel counts are known
but equal. Streams with known pixel counts will always be
preferred over streams without.

Issue: #2343

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145269968
2017-01-24 14:25:47 +00:00
Oliver Woodman
55ca323cee Add upstream.crypto package (and friends). 2017-01-20 20:50:02 +00:00
olly
52d47aa244 Fix possible track selection NPE
If no tracks are selected at the start of playback, TrackSelectorResult
isEquivalent(null) returned true, meaning we were keeping the old result
(i.e. null), which we then tried to de-reference.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145105702
2017-01-20 19:27:30 +00:00
aquilescanta
63604493b4 Fix memory leak in HlsMediaChunk's
Issue:#2319

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145089668
2017-01-20 19:26:34 +00:00
olly
26b303a449 Pull assertion and layer of indirection out from ChunkExtractorWrapper
It should be possible to remove ChunkExtractorWrapper from the track
output side as well (currently all extractor output is funneled via
ChunkExtractorWrapper just so it can adjust the format, which is kind
of unnecessary).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145083620
2017-01-20 16:12:03 +00:00
tap-prod
5407c98526 Automated rollback
*** Original change description ***

Pull assertion and layer of indirection out from ChunkExtractorWrapper

It should be possible to remove ChunkExtractorWrapper from the track
output side as well (currently all extractor output is funneled via
ChunkExtractorWrapper just so it can adjust the format, which is kind
of unnecessary).

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145078094
2017-01-20 16:11:16 +00:00