15163 Commits

Author SHA1 Message Date
Oliver Woodman
a879819dd3 Force callers into MediaCodecUtil to catch any exceptions that occur.
Issue: #217
Issue: #228
2015-01-12 17:40:55 +00:00
Oliver Woodman
286365ada8 Use Long.SIZE. 2015-01-12 17:38:21 +00:00
Oliver Woodman
3ca12d0c39 Update min retry count to 3.
Empirical testing in shows increased robustness.
2015-01-12 17:37:25 +00:00
Oliver Woodman
e8d2c00cf7 Add trace to chunk fetches. 2015-01-12 17:37:07 +00:00
Oliver Woodman
f65a093596 AudioTrack enhancements.
- Workaround issue where video may freeze whilst audio continues
  on some devices that have entered bad states.
- Fix wrap-around for playbacks lasting more than 27 hours.
2015-01-12 17:35:43 +00:00
Oliver Woodman
224fc2eef8 Omit range header if the range is 0-.
Apparently some servers don't like it, and in general it's
unnecessary to set the header for this case.
2015-01-12 17:34:00 +00:00
ojw28
a6e94af267 Merge pull request #226 from google/dev
Refine logic for determining AudioTrack size.
2015-01-06 20:15:42 +00:00
Oliver Woodman
1613c9c7a8 Refine logic for determining AudioTrack size.
- Target 4x the minimum specified by the framework.
- Impose a minimum duration (250ms).
- Impose a maximum duration (750ms, or the minimum
  specified by the framework if that's larger).

I've removed the ability to specify the multiplication
factor, since the underlying implementation is getting more
complicated, and we should really be able to figure this out
internally.
2015-01-06 20:13:50 +00:00
ojw28
869ecbfcf3 Merge pull request #225 from google/dev
dev -> dev-hls
2015-01-02 17:38:59 +00:00
Oliver Woodman
8cb37d7935 Merge branch 'dev' of persistent-https://github.com/google/ExoPlayer into dev 2015-01-02 17:36:36 +00:00
Oliver Woodman
d906e405a1 Propagate AudioTrack errors. 2015-01-02 17:35:57 +00:00
ojw28
2128ceb777 Merge pull request #220 from martinbonnin/log_all_audiotrack_write_errors
log all AudioTrack errors
2015-01-02 17:31:33 +00:00
Martin Bonnin
75b5a59f59 Oooops... bad comparison 2015-01-02 18:10:14 +01:00
Martin Bonnin
e8a8c49a97 better handling of input format change for non-adaptive codecs
* this fixes a bug when switching from HE-AAC 22050Hz to AAC 44100Hz (the AudioTrack was not reset and we were trying to send a bad number of bytes, triggering a "AudioTrack.write() called with invalid size" error)
* this also improves quality switches, making it almost seamless
2014-12-23 13:47:50 +01:00
Martin Bonnin
eec4e24ef0 log all audio errors 2014-12-23 13:02:29 +01:00
ojw28
f745be8978 Merge pull request #219 from google/dev
Include gradle plugin 1.0.0
2014-12-23 10:53:58 +00:00
ojw28
a96a7fe782 Merge pull request #218 from google/master
Include gradle plugin 1.0.0
2014-12-23 10:53:29 +00:00
ojw28
e3eeddab21 Merge pull request #216 from ened/gradle-plugin-100
Include gradle plugin 1.0.0
2014-12-23 10:50:07 +00:00
Sebastian Roth
e4ea9c1056 Include gradle plugin 1.0.0 2014-12-22 10:34:46 +08:00
ojw28
f39d83cf75 Merge pull request #215 from google/dev
dev -> dev-hls
2014-12-20 12:00:41 +00:00
Oliver Woodman
4c0554d0d7 Start adding support for more formats in WebM container. 2014-12-20 11:59:19 +00:00
Oliver Woodman
ed6fcb638e Fix reading single byte from DataSourceInputStream. 2014-12-20 11:57:49 +00:00
Oliver Woodman
0414b0d2f6 Fix assertion fail on seek.
Issue: #214
2014-12-20 11:57:05 +00:00
Oliver Woodman
c497b78ffe Fix memory leak in TsExtractor when not all tracks are enabled.
Previously samples belonging to disabled tracks would just
accumulate in an arbitrarily long queue in TsExtractor. We
need to actively throw samples away from disabled tracks up
to the current playback position, so as to prevent this.

Issue: #174
2014-12-19 12:14:06 +00:00
Oliver Woodman
1fce55f6fe HLS: Consider all programs.
I'm not sure exactly what the implications of this change are,
but I'd really hope that only one program in each stream is carrying
audio/video. For GoPro cameras, they expose the video stream in
the second program, for some reason.

Issue: #116
2014-12-19 12:12:04 +00:00
Oliver Woodman
0756c3d28c Relax assertion.
We've seen a few streams where this assertion fails. If you
just skip the packet, things appear to recover correctly in
all cases I've seen, so replacing failure with a warning.
2014-12-19 12:11:17 +00:00
Oliver Woodman
ea21eba87e Allow re-enabling video track without transition through buffering state. 2014-12-19 12:10:16 +00:00
ojw28
5cf781ab9f Merge pull request #211 from google/dev
dev -> dev-hls
2014-12-19 12:09:06 +00:00
Oliver Woodman
7f91a6d4d8 Merge branch 'dev' of https://github.com/google/ExoPlayer into dev 2014-12-19 12:07:39 +00:00
Oliver Woodman
99b438e4c4 Don't request that the server use DEFLATE compression.
If the server actually gives us a DEFLATE response, we
fail to handle it properly!
2014-12-19 12:06:00 +00:00
Oliver Woodman
4d6c9f27c2 Minor cleanup of AudioTrack. 2014-12-19 12:05:03 +00:00
ojw28
cc830d6fdb Merge pull request #208 from alexandrite/fix-mp3-buffer
AudioTrack will mark 0-size buffers as consumed
2014-12-18 10:29:06 +00:00
Alex Puterbaugh
52e5b8e848 AudioTrack will mark 0-size buffers as consumed
This can happen in the first, non-codec-config output buffer
from MediaCodec, while decoding MP3 data.

This issue was discovered on Nexus 5's running both KitKat
Lollippop.
2014-12-17 12:03:50 -08:00
ojw28
83e80f98fb Merge pull request #207 from google/dev
dev -> dev-hls
2014-12-17 19:25:12 +00:00
Oliver Woodman
ee823a95fc Add launcher icon source. 2014-12-17 19:22:52 +00:00
Oliver Woodman
48540c2ba0 Add icon for demo app. 2014-12-17 19:19:39 +00:00
Oliver Woodman
3a9d08edb5 Misc performance/correctness tweaks. 2014-12-17 19:18:33 +00:00
Oliver Woodman
f1fe109bfa Fix AC3Passthrough
- Handle read returning NOTHING_READ for AC-3 streams.
- Remove extra checks for the audio track being initialized.
- Call isInitialized() instead of checking audioTrack != null.
2014-12-17 19:16:02 +00:00
Oliver Woodman
39c07d570c Adapt HLS on non-adaptive devices.
This just brings HLS treatment in the demo app in line with
DASH and SmoothStreaming.
2014-12-15 15:30:21 +00:00
ojw28
1face38709 Merge pull request #204 from google/dev
dev -> dev-hls
2014-12-15 15:12:21 +00:00
Oliver Woodman
57068a6406 Clear subtitle when text disabled. 2014-12-15 15:06:05 +00:00
Oliver Woodman
57faa49756 Fix crash running ExoPlayer demo on JB. My bad!
- We can't refer to UnsupportedSchemeException outside of the
V18 compat inner classes.
- There were also a few missing return; calls.
2014-12-15 15:05:06 +00:00
Oliver Woodman
11eb1c222b Identify AC-3 tracks by codecs="ac-3", not the MIME type. 2014-12-15 15:04:38 +00:00
Oliver Woodman
595147de9b Enforce sliding window of available segments for DASH DVB. 2014-12-15 15:03:10 +00:00
Oliver Woodman
978a4d857a Handle getting the audio track's position before the first AC-3 buffer.
ac3Bitrate is set only after the first buffer is handled, which meant that
getting the playback position would cause a divide by zero before then.

When playing back AC-3 content, the ac3Bitrate will always be set after the
first buffer is handled, so return a 0 position if it is not set.
2014-12-15 15:02:29 +00:00
Oliver Woodman
b80569237b Correctly propagate fatal load error. 2014-12-12 14:25:48 +00:00
Oliver Woodman
4c29eb58f1 Merge branch 'dev' into dev-hls 2014-12-12 14:24:05 +00:00
Oliver Woodman
0cb8169323 Merge branch 'dev-hls' into dev 2014-12-12 14:23:43 +00:00
Oliver Woodman
5a3340d638 Add initial AC3 passthrough support. 2014-12-12 14:18:54 +00:00
Oliver Woodman
81bf68b1cb Minor doc fixes. 2014-12-12 14:13:58 +00:00