2514 Commits

Author SHA1 Message Date
Oliver Woodman
f1e3d3f244 Enable tunneling end-to-end
- Tunneling can be enabled by calling:
  trackSelector.setTunnelingAudioSessionId(
      C.generateAudioSessionIdV21(this));

- If enabled, tunneling is automatically used when the renderers
  and track selection combination support it. Tunneling is
  automatically turned on and off through playlists if the support
  changes.

Issue: #1688
2017-01-17 17:21:10 +00:00
Oliver Woodman
c828d9b0bf Some ID3 bug fixes 2017-01-17 15:49:51 +00:00
Oliver Woodman
48099ee52e Fix comments 2017-01-17 15:33:35 +00:00
Oliver Woodman
27b8c31b85 Merge branch 'geekygecko-dev-v2' into dev-v2 2017-01-17 15:29:30 +00:00
Oliver Woodman
5aff31c061 Further improve ID3 parsing 2017-01-17 15:29:07 +00:00
Oliver Woodman
31602af3e6 Merge branch 'dev-v2' of git://github.com/geekygecko/ExoPlayer into geekygecko-dev-v2 2017-01-17 13:53:50 +00:00
olly
7f967f3057 DASH: Parse Role elements to select default audio/text tracks
Issue: #2058

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144693705
2017-01-17 13:44:14 +00:00
aquilescanta
6e481178ea Track HLS discontinuities when playlist does not declare sequence
This is an initial version that does not handle cross-playlists
adjustment in an ideal way.

Issue:#1789

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144692969
2017-01-17 13:43:18 +00:00
aquilescanta
7d7a159195 Provide sample timestamps and subsample offset for Splice info
This will allow recreating timestamp adjustment on the decoding side.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144692956
2017-01-17 13:42:13 +00:00
olly
0e0b23f11e Update getTrackType for completeness
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144690284
2017-01-17 13:41:10 +00:00
olly
79a0899124 Always re-send format if sample buffer is null
Also clear the playingPeriodHolder in the case the renderers
are being disabled. This is required to ensure that
setPlayingPeriodHolder isn't turned into a no-op, which will
break the seek.

Issue: #2330

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144635220
2017-01-17 13:40:05 +00:00
Philip Simpson
f6ecaddc88 Improved ID3 chapter parsing code from feedback given. 2017-01-17 12:03:18 +10:30
Philip Simpson
5153e9e977 Improved ID3 chapter parsing code from feedback given. 2017-01-17 12:00:48 +10:30
olly
60a3eda1e0 Support tunneling in video renderer
At this point the renderers all have TODOs in enable(),
and turning on tunneling is reduced to the problem of
propagating a tunneling ID to these points.

Issue: #1688

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144619393
2017-01-16 11:43:07 +00:00
ojw28
5742c87755 Merge pull request #2327 from pipelka/audio-seek-fix
reconfigure audiotrack on format change
2017-01-16 09:44:59 +00:00
Philip Simpson
f2f1058066 Added ID3 chapter support. 2017-01-16 17:40:02 +10:30
Oliver Woodman
41c4295aee Fix build break + cleanup 2017-01-16 00:20:51 +00:00
ojw28
a418b132d9 Merge pull request #2318 from WeiChungChang/far_seek_improvement
Improve far seek performance of chunkSampleStream
2017-01-16 00:02:44 +00:00
ojw28
bd744fc508 Merge pull request #2314 from meteoorkip/vector-drawables
Fix vector drawable usage on API level 21 or above
2017-01-16 00:01:13 +00:00
eguven
418cd9e7e3 Make DefaultLoadControl use PriorityTaskManager if one is given
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144448491
2017-01-15 23:54:20 +00:00
Alexander Pipelka
24a0061caa reconfigure audiotrack on format change
under certain circumstances (e.g. seek to a position where the input format
changed) the audio track needs a reconfigure even if there aren't any
pending buffers
2017-01-14 12:14:37 +01:00
WeiChungChang
2214a4c152 'refine_to_make_flow_simpler' 2017-01-14 10:22:27 +08:00
Devin Tuchsen
30c59c7a3f
Apple Lossless (ALAC) support 2017-01-13 20:16:49 -06:00
andrewlewis
5a16aee2c9 Use stereo for mono audio passthrough on fugu.
Also backport the Shield workaround to v1.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144446498
2017-01-13 17:27:26 +00:00
olly
270f68a95e Add convenience methods to query current window
- Support querying whether the current window is dynamic
  and seekable. The new methods are similar to getDuration,
  which is also a convenience method for the current window.
- Improve demo app to restore positions in VOD items within
  playlists where the last item is live. Also restore the
  position within the window for live items unless the player
  failed with BehindLiveWindowException.

Issue: #2320

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144443898
2017-01-13 17:27:26 +00:00
andrewlewis
ca7febe442 Remove unused local variable in AudioTrack.java.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144443010
2017-01-13 17:27:26 +00:00
aquilescanta
28e117d25f Add support for #EXT-X-START tag
This overrides the start position relative to the window.

Issue:#1544

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144434903
2017-01-13 17:27:26 +00:00
eguven
63123f455c Add SimpleCache tests for encrypted index file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144431191
2017-01-13 17:27:26 +00:00
eguven
5f4d6506e0 Add argument checks and some javadoc to CachedContentIndex
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144430372
2017-01-13 17:27:25 +00:00
olly
0c53a4e913 Add TrackSelectorResult
This class can accommodate extra information that may potentially
be specified by TrackSelectors in the future (e.g. configuration
for renderers). Even if we don't do this, it's cleaner to have a
proper class and an info field to refer to, as opposed to using a
Pair.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144428963
2017-01-13 17:27:25 +00:00
eguven
060f2a5d6f Remove unnecessary parameter and local variables
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144427132
2017-01-13 17:27:25 +00:00
eguven
f194df1149 Close InputStream after read
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144424329
2017-01-13 17:27:25 +00:00
olly
1eede5d5bb Fix gradle/proguard setup
- Add proguard rules for libraries/extensions into .aar files
- Add proguard rules to retain CEA608/708 decoder constructors
- Remove lots of default config from gradle files
- Remove disabling of abort on lint error
- Enable optimizations on release builds of demo app

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144350233
2017-01-13 17:27:25 +00:00
aquilescanta
264ba8cfcf Change MetadataDecoder interface to receive a MetadataInputBuffer
This allows passing a subsampleOffsetUs as in Text decoding.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144334172
2017-01-13 17:27:25 +00:00
aquilescanta
4a6a8553e9 Check #EXTM3U header is present in HLS playlists
Issue:#2301

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144334062
2017-01-13 17:27:25 +00:00
cdrolle
706a6b83a9 Removed the direct-referencing of the Cea608Decoder and Cea708Decoder classes from SubtitleDecoderFactory.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144329795
2017-01-13 17:27:25 +00:00
olly
e125ed705e Report tunneling support via RendererCapabilities API
Also revert ability to query for a decoder that explicitly
supports tunneling, since in the new design we'll just be
querying the first decoder provided by the MediaCodecSelector
and then reporting what it supports. This is in line with
what we do when reporting support for adaptive switching.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144315746
2017-01-13 17:27:25 +00:00
mdoucleff
5752524442 Allow extension of SlidingPercentile
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144240101
2017-01-13 17:26:51 +00:00
olly
cd42434719 Plumbing to enable tunneling on AudioTrack from renderers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144223539
2017-01-13 17:06:49 +00:00
olly
3547c9034e Report audio decoder adaptation support correctly
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144219518
2017-01-13 17:05:45 +00:00
andrewlewis
2906a2ea09 Simplify AudioTrack.handleBuffer's return value.
Position discontinuities are notified via AudioTrack.Listener.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144202048
2017-01-13 17:04:43 +00:00
olly
444811c010 Don't overflow when dealing with large segment numbers
Issue: #2311

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144182445
2017-01-13 17:03:41 +00:00
andrewlewis
ce03b8c246 Move AudioTrack initialization into handleBuffer.
Move initialization code from the audio renderers into handleBuffer. The audio
session id and tunneling enabled state can be altered using new setters.

This change is not intended to change the behavior of the audio renderers.
Before this change, the AudioTrack would always be reinitialized by the
renderers before calling handleBuffer.

Add a protected onAudioTrackUnderrun method for custom renderers that want to
implement custom handling of underruns.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144067149
2017-01-13 17:02:39 +00:00
eguven
5c89bbedb7 Fix leftover bytes in cached content index file
Extra calls to CipherOutputStream.close() causes each time extra 16 bytes written to the
underlying OutputStream. Prevented close() is called more than once and also discarded any
data in ReusableBufferedOutputStream buffer on reset().

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144063120
2017-01-13 17:01:37 +00:00
WeiChungChang
cb0394b9cf 'improve_far_seek_of_chunkSampleStream' 2017-01-12 10:49:37 +08:00
meteoorkip
28e221f92e Fix vector drawable usage on API level 21 or above 2017-01-11 20:03:41 +01:00
olly
deefe50abc Handle ID3 frames that end with empty text field
Issue: #2309

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144061654
2017-01-10 10:52:42 +00:00
andrewlewis
bf65df1b35 Allow ClippingMediaPeriod to be used on its own.
ClippingMediaPeriod may be a useful component for other MediaSources too so
remove its dependency on ClippingMediaSource.

Also allow the clipping end point to be TIME_END_OF_SOURCE, in which case
the clipping window extends to the end of the wrapped period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144056285
2017-01-10 10:51:49 +00:00
olly
59ab0fa9f1 Introduce MetadataDecoderFactory
This is analogous to what we do for text/subtitles, and
adds support for playlists where the type of metadata
changes from one playlist item to the next.

Issue: #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143948307
2017-01-10 10:50:52 +00:00
olly
ae2e84df35 Set HLS period duration when live stream ends
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143776633
2017-01-06 16:59:29 +00:00