1625 Commits

Author SHA1 Message Date
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
eb3829c7c8 Always show track language if we have it.
May as well. Also specifically fixes showing the language
for subtitle tracks that have application/* mime types.
2015-09-01 13:56:40 +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
ojw28
01a037f496 Merge pull request #741 from pakerfeldt/unfinal-streamingdrmsessionmanager
Enable override of open/close in StreamingDrmSessionManager
2015-08-27 10:58:46 +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
Yu-Hsuan Lin
0df29a6497 Add an extension that provide DataSource using OkHttp 2015-08-24 00:49:41 +08: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
ojw28
57250036bf Merge pull request #724 from hori-ryota/feature/bugfix-of-parse-aes-url-for-hls
Fixed bug of AES URI Pattern for hls
2015-08-19 12:04:13 +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
87457d5042 Add CodecCounters to LibvpxVideoTrackRenderer. 2015-08-13 11:19:34 +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
Oliver Woodman
69466adbe3 Remove unused exception class. 2015-08-11 18:17:33 +01:00
Oliver Woodman
02c7525ff7 Remove custom VTT logic. 2015-08-11 18:16:56 +01:00
Oliver Woodman
dbaeecc4da Improve DASH manifest parsing.
- Parse all attributes that may exist in either the AdaptationSet or
  in the child Representation elements at both levels.
- Correctly infer TYPE_TEXT for Representation elements whose mimeType
  is application/mp4 and whose codecs attribute indicates a known text
  codec type.

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

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

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

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

Issue: #654
2015-08-11 17:55:19 +01:00
Oliver Woodman
6ee6bc5c59 webm demo app: Fix crash on screen touch
Fix crash on screen touch before starting playback. mediaController cannot be
used until after setMediaPlayer has been called on it.
2015-08-11 17:48:45 +01:00
Oliver Woodman
ce26e601ed Fix typo in H265Reader.
See H.265/HEVC specification subsection 7.3.4.
2015-08-11 17:47:02 +01:00
Oliver Woodman
ab3f623767 Workaround broken devices.
Issue #464
Issue #665
2015-08-07 17:28:03 +01:00
Oliver Woodman
a7d843f90d Increment version to 1.4.2 2015-08-04 16:07:54 +01:00
Oliver Woodman
3bd52c74bb Update release notes 2015-08-04 13:53:57 +01:00