19 Commits

Author SHA1 Message Date
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
820433de06 Call stop() to fully play out remaining audio!
Issue: #707
2015-09-10 18:19:09 +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
4a9ff7b094 Correctly propagate END_OF_STREAM through Opus decoder. 2015-09-01 14:16:36 +01:00
Oliver Woodman
35a744a5d4 Use perl for in-place substitution. 2015-09-01 14:11:01 +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
8db1331021 Propagate MediaFormat instead of TrackInfo.
Issue #514.
2015-08-11 18:23:22 +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
a2f10399e7 Improve error propagation 2015-07-21 10:07:49 +01:00
Oliver Woodman
ebe9ae6b13 In continueBuffering, return whether a particular track has samples.
Issue: #595
2015-07-16 19:30:14 +01:00
Oliver Woodman
8e58a3f5f5 Steps toward full multi-track support.
1. Remove requirement for TrackRenderer implementations to report
   current position, unless they are time sources.
2. Expose whether renderers have media to play. The immediate benefit
   of this is to solve the referenced GitHub issue, and also to only
   display the appropriate Audio/Video/Text buttons in the demo app
   for the media being played. This is also a natural step toward
   multi-track support.

Github issue: #541
2015-06-18 14:27:24 +01:00
Oliver Woodman
a70c1f1a4b Remove requirement to specify downstream renderer count.
This makes it so that it's no longer necessary to specify the number
of downstream renderers to HlsSampleSource, FrameworkSampleSource and
ExtractorSampleSource, by forcing the downstream renderers to register
with the SampleSource instances in their constructors. This eliminates
a common source of subtle client bugs where the passed value is incorrect.
2015-06-12 17:52:56 +01:00
Oliver Woodman
ece3ac63c8 webm branch cleanup 2015-05-22 21:50:29 +01:00
Oliver Woodman
caf41fb1f1 Bring branch up to speed with dev 2015-05-11 21:18:23 +01:00
Oliver Woodman
5d92cc8324 Make changes to Opus/Vp9 projects to build against new dev 2015-05-05 20:41:12 +01:00
Oliver Woodman
d27b6de119 Release AudioTrack when done. 2015-03-25 12:13:53 +00:00
Vignesh Venkatasubramanian
7113d2ab6f Add Opus Native Extension
Add Opus Native Extension that can be used to playback Opus using the native
libopus library.
2015-02-02 14:43:50 -08:00