2534 Commits

Author SHA1 Message Date
olly
1055c520cc Remove side effects from SeekMap.getPosition implementations
Issue: #2167

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141451444
2016-12-12 16:15:38 +00:00
andrewlewis
f45751872d Move track sample index updates out of getPosition(long).
This requires knowing the seek time in Extractor.seek, so that it's possible to
pick the latest synchronization sample at/before the seek time for each track
(rather than the earliest synchronization sample after the seek position).

Also remove the STATE_AFTER_SEEK state which should no longer be needed.

Issue: #2167

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141432598
2016-12-12 16:15:38 +00:00
aquilescanta
2fce364936 Ignore Splice Info in HLS TS media chunks
Issue:#2070

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141335458
2016-12-12 16:15:38 +00:00
olly
1518927e12 Fix seeking backward from end of last period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141299172
2016-12-12 16:15:38 +00:00
aquilescanta
1cbc0fc678 Allow HlsPlaylistTracker to change the primaryHlsUrl
When the primary url is blacklisted (due to a 404, for example) or
the selected variant is different from primary url, allow the tracker
to change the url.

Issue:#87

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141291435
2016-12-12 16:15:38 +00:00
WeiChungChang
63966a3736 Fix the issue when the sequence of PTS is out of order by bidirectional prediction for skipToKeyframeBefore() 2016-12-12 20:34:09 +08:00
Oliver Woodman
8765b1981c Revert: Rm newline 2016-12-06 21:09:44 +00:00
Oliver Woodman
847e371ae7 Rm newline 2016-12-06 21:08:14 +00:00
aquilescanta
a66b4a9bad Parse ID3 sample timestamp for HLS audio chunks
Pending improvement:

* Peek just the required priv frame. Avoid decoding all id3 information.
* Sniff the used container format instead of using the extension.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141181781
2016-12-06 20:06:37 +00:00
olly
e5bc00ea94 Fix DataSourceInputStream + add unit test
Issue: #2162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141177715
2016-12-06 20:06:04 +00:00
olly
2db7c50d7c Fix test.
The definition of negative line indices was intentionally shifted
by one because the way VTT defines them doesn't appear to allow for
cues to be positioned at the very bottom of the screen in the case
that ANCHOR_TYPE_END is used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141168028
2016-12-06 20:05:23 +00:00
olly
4db6f1e495 Expose whether decoders support tunneling
This is a first step toward supporting tunneled playback

Issue: #1688

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167501
2016-12-06 20:04:44 +00:00
olly
99957bbae7 Correctly handle dynamic playlist modifications
- Fix bug where we'd try and call replaceStream having already
  notified the renderer that the current stream is final. This
  could occur if a period was added to the end of the playlist.
- If the current period being played is removed and a new period
  to play cannot be resolved, assume we've gone off the end of
  the playlist and transition to the ended state. This allows
  the current source to be re-used (unlike the previous behavior
  of considering it an error). Treat valid seeks that cannot be
  resolved due to concurrent timeline update similarly.
- Add seek sanity check back to ExoPlayerImpl. Meh. It's probably
  best to keep this, since it stops the exposed window index
  being invalid w.r.t the exposed timeline.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167151
2016-12-06 20:04:01 +00:00
olly
9ea8b02083 Correctly handle reading of an empty string without a terminating NUL byte
Issue: #2152

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141159330
2016-12-06 20:03:21 +00:00
olly
e86bfd6dbe Improvements for 608 positioning
- Infer likely left/center/right alignment for pop-on captions.
  This makes the rendering much better in practice, particularly
  when the captions were intended to be center aligned.
- Fix line anchoring.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141156222
2016-12-06 20:02:42 +00:00
cdrolle
88c0695bd0 Added safe-area adjustment (i.e. padding) to CEA-608 captions and fixed minor issue with rollup.
CEA-608 specifies a "safe-area" in which the captions should be rendered. This change adjusts all of the cue positions so they are within that safe area. It also fixes a minor issue in which roll up captions would drift towards the last row if a preamble address code had the "next row toggle" bit set.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141077433
2016-12-06 20:01:57 +00:00
aquilescanta
931670957f Add support for multiple table sections in PSI section
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141073182
2016-12-06 20:01:13 +00:00
olly
db215ff156 Make invalid seek positions fail on playback thread only
Seeks are permitted when there's no timeline, and in this
case playback necessarily fails on the playback thread when
the timeline becomes known. Pushing failure to the same
place when the timeline is known means there's only one
failure path for this case. A later CL will likely introduce
an InvalidSeekPositionException for this case.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141037708
2016-12-06 20:00:24 +00:00
olly
88fc682dde Expose manual playback control hiding from SimpleExoPlayerView
Issue #2146

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141036866
2016-12-06 19:59:41 +00:00
andrewlewis
01acc0e201 Remove unnecessary final.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141031900
2016-12-06 19:58:56 +00:00
drhill
cc24c4e38b change to switch to avoid changing 4.0 tracks 2016-12-06 08:08:58 -05:00
Oliver Woodman
fda2d143e4 CEA 608 bugfix 2016-12-02 19:48:59 +00:00
Oliver Woodman
421dab433a Restore accidentally clobbered SimpleExoPlayerView change 2016-12-02 19:47:50 +00:00
Oliver Woodman
d6d59ef07e Restore accidentally clobbered MKV change 2016-12-02 19:42:54 +00:00
olly
bbbd61e319 Skip negative SubRip timecodes
Issue: #2145

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140868079
2016-12-02 19:37:14 +00:00
andrewlewis
e0649db513 Handle input format changes in SimpleDecoderAudioRenderer.
This is implemented in the same way as in MediaCodecRenderer.

Move codec != null guard into feedInputBuffer to handle the case of an input
format change with no dequeued buffers where the codec can't be reinitialized
immediately.

Issue: #2111

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140864942
2016-12-02 19:35:09 +00:00
eguven
7ea16a6ae2 Remove unused parameter
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140847027
2016-12-02 19:29:36 +00:00
andrewlewis
164b406e23 Clean up loading period update.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140843106
2016-12-02 19:26:30 +00:00
andrewlewis
45bc4a0374 Pass player and isTopLevelSource to MediaSource.prepareSource.
These additions are useful for sources that need to track the playback position
and control playback.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140828310
2016-12-02 19:23:35 +00:00
Oliver Woodman
0a52e823de Use constant for MPEG max frame size 2016-12-02 16:29:11 +00:00
ojw28
b5437907cf Merge pull request #2135 from drhill/dev-v2_mp2
add mp2 audio
2016-12-02 16:28:35 +00:00
Oliver Woodman
4c427f5b13 Merge branch 'drhill-dev-v2_subtitles_view' into dev-v2 2016-12-02 16:27:36 +00:00
Oliver Woodman
a7736e101f Merge branch 'dev-v2_subtitles_view' of git://github.com/drhill/ExoPlayer into drhill-dev-v2_subtitles_view 2016-12-02 16:27:29 +00:00
Drew Hill
e22c42c7c2 requested changes for simplicity 2016-12-01 19:30:27 -05:00
Drew Hill
3884641464 switch to proper mimetype 2016-12-01 16:41:23 -05:00
Drew Hill
8fcc8c63ef change to getview call instead of set property 2016-12-01 16:25:49 -05:00
Oliver Woodman
e803bff2b1 Don't log FileNotFoundException while reading cache index file 2016-12-01 19:29:07 +00:00
Oliver Woodman
0cc874dd01 Fix indentation 2016-12-01 18:35:14 +00:00
Oliver Woodman
54b4df703a Merge branch 'RikHeijdens-eia-608-improvements' into dev-v2 2016-12-01 18:31:49 +00:00
Oliver Woodman
a6ccedf741 Merge branch 'eia-608-improvements' of git://github.com/RikHeijdens/ExoPlayer into RikHeijdens-eia-608-improvements 2016-12-01 18:31:39 +00:00
Oliver Woodman
7a18738dfa Clean up AudioTagPayloadReader 2016-12-01 17:25:08 +00:00
ojw28
6e6f912ed1 Merge pull request #2140 from EENCloud/FLV_PCM_LAW_Support
Added FLV PCM law support
2016-12-01 16:38:17 +00:00
Greg Slomin
2d1f151cb9 Added support for PCM u/a-law audio in FLV containers 2016-12-01 10:32:55 -06:00
ojw28
867bc7cb05 Merge pull request #2138 from google/revert-2127-FLV_PCM_LAW_Support
Revert "Added support for PCM u/a-law audio in FLV containers"
2016-12-01 14:54:36 +00:00
ojw28
17cd73d8ed Revert "Added support for PCM u/a-law audio in FLV containers" 2016-12-01 14:54:27 +00:00
ojw28
8601cd8766 Merge pull request #2127 from EENCloud/FLV_PCM_LAW_Support
Added support for PCM u/a-law audio in FLV containers
2016-12-01 14:54:20 +00:00
olly
53dcb82862 Merge pull request #2131
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140720011
2016-12-01 13:47:32 +00:00
eguven
f3dbb74613 Fix unnecessary rewrite of cache index file after CachedContentIndex.readFile()
Prevented readFile() setting "changed" boolean to true every time. It's set only if encryption key is set but the index file isn't encrypted.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140714173
2016-12-01 13:46:52 +00:00
Drew Hill
214c55b665 add function to change subtitles style 2016-11-30 19:44:47 -05:00
Drew Hill
db4b478cc0 fix 6.1 channel passthrough failing 2016-11-30 18:47:36 -05:00