Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
936f074e
authored
Dec 20, 2016
by
ojw28
Committed by
GitHub
Dec 20, 2016
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #2231 from google/dev-v2-r2.1.1
r2.1.1
parents
47ea5c90
cb3f3499
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
35 deletions
RELEASENOTES.md
build.gradle
demo/src/main/AndroidManifest.xml
library/src/main/java/com/google/android/exoplayer2/BaseRenderer.java
library/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
library/src/main/java/com/google/android/exoplayer2/ExoPlayerLibraryInfo.java
library/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java
library/src/main/java/com/google/android/exoplayer2/source/MediaPeriod.java
library/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaSource.java
RELEASENOTES.md
View file @
936f074e
# Release notes #
# Release notes #
### r2.1.0 ###
### r2.1.1 ###
Bugfix release only. Users of r2.1.0 and r2.0.x should proactively update to
this version.
This release contains important bug fixes. Users of r2.0.x should proactively
*
Fix some subtitle types (e.g. WebVTT) being displayed out of sync
update to this version.
(
[
#2208
](
https://github.com/google/ExoPlayer/issues/2208
)
).
*
Fix incorrect position reporting for on-demand HLS media that includes
EXT-X-PROGRAM-DATE-TIME tags
(
[
#2224
](
https://github.com/google/ExoPlayer/issues/2224
)
).
*
Fix issue where playbacks could get stuck in the initial buffering state if
over 1MB of data needs to be read to initialize the playback.
### r2.1.0 ###
*
HLS: Support for seeking in live streams
*
HLS: Support for seeking in live streams
(
[
87
](
https://github.com/google/ExoPlayer/issues/87
)
).
(
[
#
87
](
https://github.com/google/ExoPlayer/issues/87
)
).
*
HLS: Improved support:
*
HLS: Improved support:
*
Support for EXT-X-PROGRAM-DATE-TIME
*
Support for EXT-X-PROGRAM-DATE-TIME
(
[
747
](
https://github.com/google/ExoPlayer/issues/747
)
).
(
[
#
747
](
https://github.com/google/ExoPlayer/issues/747
)
).
*
Improved handling of sample timestamps and their alignment across variants
*
Improved handling of sample timestamps and their alignment across variants
and renditions.
and renditions.
*
Fix issue that could cause playbacks to get stuck in an endless initial
*
Fix issue that could cause playbacks to get stuck in an endless initial
buffering state.
buffering state.
*
Correctly propagate BehindLiveWindowException instead of
*
Correctly propagate BehindLiveWindowException instead of
IndexOutOfBoundsException exception
IndexOutOfBoundsException exception
(
[
1695
](
https://github.com/google/ExoPlayer/issues/1695
)
).
(
[
#
1695
](
https://github.com/google/ExoPlayer/issues/1695
)
).
*
MP3/MP4: Support for ID3 metadata, including embedded album art
*
MP3/MP4: Support for ID3 metadata, including embedded album art
(
[
979
](
https://github.com/google/ExoPlayer/issues/979
)
).
(
[
#
979
](
https://github.com/google/ExoPlayer/issues/979
)
).
*
Improved customization of UI components. You can read about customization of
*
Improved customization of UI components. You can read about customization of
ExoPlayer's UI components
ExoPlayer's UI components
[
here
](
https://medium.com/google-exoplayer/customizing-exoplayers-ui-components-728cf55ee07a#.9ewjg7avi
)
.
[
here
](
https://medium.com/google-exoplayer/customizing-exoplayers-ui-components-728cf55ee07a#.9ewjg7avi
)
.
...
@@ -31,30 +41,30 @@ update to this version.
...
@@ -31,30 +41,30 @@ update to this version.
*
Support SCTE-35 splice information messages.
*
Support SCTE-35 splice information messages.
*
Support multiple table sections in a single PSI section.
*
Support multiple table sections in a single PSI section.
*
Fix NullPointerException when an unsupported stream type is encountered
*
Fix NullPointerException when an unsupported stream type is encountered
(
[
2149
](
https://github.com/google/ExoPlayer/issues/2149
)
).
(
[
#
2149
](
https://github.com/google/ExoPlayer/issues/2149
)
).
*
Avoid failure when expected ID3 header not found
*
Avoid failure when expected ID3 header not found
(
[
1966
](
https://github.com/google/ExoPlayer/issues/1966
)
).
(
[
#
1966
](
https://github.com/google/ExoPlayer/issues/1966
)
).
*
Improvements to the upstream cache package.
*
Improvements to the upstream cache package.
*
Support caching of media segments for DASH, HLS and SmoothStreaming. Note
*
Support caching of media segments for DASH, HLS and SmoothStreaming. Note
that caching of manifest and playlist files is still not supported in the
that caching of manifest and playlist files is still not supported in the
(normal) case where the corresponding responses are compressed.
(normal) case where the corresponding responses are compressed.
*
Support caching for ExtractorMediaSource based playbacks.
*
Support caching for ExtractorMediaSource based playbacks.
*
Improved flexibility of SimpleExoPlayer
*
Improved flexibility of SimpleExoPlayer
(
[
2102
](
https://github.com/google/ExoPlayer/issues/2102
)
).
(
[
#
2102
](
https://github.com/google/ExoPlayer/issues/2102
)
).
*
Fix issue where only the audio of a video would play due to capability
*
Fix issue where only the audio of a video would play due to capability
detection issues (
[
2007
](
https://github.com/google/ExoPlayer/issues/2007
)
)
detection issues (
[
#
2007
](
https://github.com/google/ExoPlayer/issues/2007
)
)
(
[
2034
](
https://github.com/google/ExoPlayer/issues/2034
)
)
(
[
#
2034
](
https://github.com/google/ExoPlayer/issues/2034
)
)
(
[
2157
](
https://github.com/google/ExoPlayer/issues/2157
)
).
(
[
#
2157
](
https://github.com/google/ExoPlayer/issues/2157
)
).
*
Fix issues that could cause ExtractorMediaSource based playbacks to get stuck
*
Fix issues that could cause ExtractorMediaSource based playbacks to get stuck
buffering (
[
1962
](
https://github.com/google/ExoPlayer/issues/1962
)
).
buffering (
[
#
1962
](
https://github.com/google/ExoPlayer/issues/1962
)
).
*
Correctly set SimpleExoPlayerView surface aspect ratio when an active player
*
Correctly set SimpleExoPlayerView surface aspect ratio when an active player
is attached (
[
2077
](
https://github.com/google/ExoPlayer/issues/1976
)
).
is attached (
[
#
2077
](
https://github.com/google/ExoPlayer/issues/1976
)
).
*
OGG: Fix playback of short OGG files
*
OGG: Fix playback of short OGG files
(
[
1976
](
https://github.com/google/ExoPlayer/issues/1976
)
).
(
[
#
1976
](
https://github.com/google/ExoPlayer/issues/1976
)
).
*
MP4: Support
`.mp3`
tracks
*
MP4: Support
`.mp3`
tracks
(
[
2066
](
https://github.com/google/ExoPlayer/issues/2066
)
).
(
[
#
2066
](
https://github.com/google/ExoPlayer/issues/2066
)
).
*
SubRip: Don't fail playbacks if SubRip file contains negative timestamps
*
SubRip: Don't fail playbacks if SubRip file contains negative timestamps
(
[
2145
](
https://github.com/google/ExoPlayer/issues/2145
)
).
(
[
#
2145
](
https://github.com/google/ExoPlayer/issues/2145
)
).
*
Misc bugfixes.
*
Misc bugfixes.
### r2.0.4 ###
### r2.0.4 ###
...
@@ -185,11 +195,11 @@ V2 release.
...
@@ -185,11 +195,11 @@ V2 release.
*
Improvements to the upstream cache package.
*
Improvements to the upstream cache package.
*
MP4: Support
`.mp3`
tracks
*
MP4: Support
`.mp3`
tracks
(
[
2066
](
https://github.com/google/ExoPlayer/issues/2066
)
).
(
[
#
2066
](
https://github.com/google/ExoPlayer/issues/2066
)
).
*
SubRip: Don't fail playbacks if SubRip file contains negative timestamps
*
SubRip: Don't fail playbacks if SubRip file contains negative timestamps
(
[
2145
](
https://github.com/google/ExoPlayer/issues/2145
)
).
(
[
#
2145
](
https://github.com/google/ExoPlayer/issues/2145
)
).
*
MPEG-TS: Avoid failure when expected ID3 header not found
*
MPEG-TS: Avoid failure when expected ID3 header not found
(
[
1966
](
https://github.com/google/ExoPlayer/issues/1966
)
).
(
[
#
1966
](
https://github.com/google/ExoPlayer/issues/1966
)
).
*
Misc bugfixes.
*
Misc bugfixes.
### r1.5.12 ###
### r1.5.12 ###
...
...
build.gradle
View file @
936f074e
...
@@ -35,7 +35,7 @@ allprojects {
...
@@ -35,7 +35,7 @@ allprojects {
releaseRepoName
=
'exoplayer'
releaseRepoName
=
'exoplayer'
releaseUserOrg
=
'google'
releaseUserOrg
=
'google'
releaseGroupId
=
'com.google.android.exoplayer'
releaseGroupId
=
'com.google.android.exoplayer'
releaseVersion
=
'r2.1.
0
'
releaseVersion
=
'r2.1.
1
'
releaseWebsite
=
'https://github.com/google/ExoPlayer'
releaseWebsite
=
'https://github.com/google/ExoPlayer'
}
}
}
}
demo/src/main/AndroidManifest.xml
View file @
936f074e
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.google.android.exoplayer2.demo"
package=
"com.google.android.exoplayer2.demo"
android:versionCode=
"210
0
"
android:versionCode=
"210
1
"
android:versionName=
"2.1.
0
"
>
android:versionName=
"2.1.
1
"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
...
...
library/src/main/java/com/google/android/exoplayer2/BaseRenderer.java
View file @
936f074e
...
@@ -267,6 +267,12 @@ public abstract class BaseRenderer implements Renderer, RendererCapabilities {
...
@@ -267,6 +267,12 @@ public abstract class BaseRenderer implements Renderer, RendererCapabilities {
return
streamIsFinal
?
C
.
RESULT_BUFFER_READ
:
C
.
RESULT_NOTHING_READ
;
return
streamIsFinal
?
C
.
RESULT_BUFFER_READ
:
C
.
RESULT_NOTHING_READ
;
}
}
buffer
.
timeUs
+=
streamOffsetUs
;
buffer
.
timeUs
+=
streamOffsetUs
;
}
else
if
(
result
==
C
.
RESULT_FORMAT_READ
)
{
Format
format
=
formatHolder
.
format
;
if
(
format
.
subsampleOffsetUs
!=
Format
.
OFFSET_SAMPLE_RELATIVE
)
{
format
=
format
.
copyWithSubsampleOffsetUs
(
format
.
subsampleOffsetUs
+
streamOffsetUs
);
formatHolder
.
format
=
format
;
}
}
}
return
result
;
return
result
;
}
}
...
...
library/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
View file @
936f074e
...
@@ -676,6 +676,7 @@ import java.io.IOException;
...
@@ -676,6 +676,7 @@ import java.io.IOException;
standaloneMediaClock
.
stop
();
standaloneMediaClock
.
stop
();
rendererMediaClock
=
null
;
rendererMediaClock
=
null
;
rendererMediaClockSource
=
null
;
rendererMediaClockSource
=
null
;
rendererPositionUs
=
RENDERER_TIMESTAMP_OFFSET_US
;
for
(
Renderer
renderer
:
enabledRenderers
)
{
for
(
Renderer
renderer
:
enabledRenderers
)
{
try
{
try
{
ensureStopped
(
renderer
);
ensureStopped
(
renderer
);
...
@@ -823,9 +824,6 @@ import java.io.IOException;
...
@@ -823,9 +824,6 @@ import java.io.IOException;
}
}
private
boolean
haveSufficientBuffer
(
boolean
rebuffering
)
{
private
boolean
haveSufficientBuffer
(
boolean
rebuffering
)
{
if
(
loadingPeriodHolder
==
null
)
{
return
false
;
}
long
loadingPeriodBufferedPositionUs
=
!
loadingPeriodHolder
.
prepared
long
loadingPeriodBufferedPositionUs
=
!
loadingPeriodHolder
.
prepared
?
loadingPeriodHolder
.
startPositionUs
?
loadingPeriodHolder
.
startPositionUs
:
loadingPeriodHolder
.
mediaPeriod
.
getBufferedPositionUs
();
:
loadingPeriodHolder
.
mediaPeriod
.
getBufferedPositionUs
();
...
@@ -1287,7 +1285,8 @@ import java.io.IOException;
...
@@ -1287,7 +1285,8 @@ import java.io.IOException;
}
}
private
void
maybeContinueLoading
()
{
private
void
maybeContinueLoading
()
{
long
nextLoadPositionUs
=
loadingPeriodHolder
.
mediaPeriod
.
getNextLoadPositionUs
();
long
nextLoadPositionUs
=
!
loadingPeriodHolder
.
prepared
?
0
:
loadingPeriodHolder
.
mediaPeriod
.
getNextLoadPositionUs
();
if
(
nextLoadPositionUs
==
C
.
TIME_END_OF_SOURCE
)
{
if
(
nextLoadPositionUs
==
C
.
TIME_END_OF_SOURCE
)
{
setIsLoading
(
false
);
setIsLoading
(
false
);
}
else
{
}
else
{
...
...
library/src/main/java/com/google/android/exoplayer2/ExoPlayerLibraryInfo.java
View file @
936f074e
...
@@ -23,7 +23,7 @@ public interface ExoPlayerLibraryInfo {
...
@@ -23,7 +23,7 @@ public interface ExoPlayerLibraryInfo {
/**
/**
* The version of the library, expressed as a string.
* The version of the library, expressed as a string.
*/
*/
String
VERSION
=
"2.1.
0
"
;
String
VERSION
=
"2.1.
1
"
;
/**
/**
* The version of the library, expressed as an integer.
* The version of the library, expressed as an integer.
...
@@ -32,7 +32,7 @@ public interface ExoPlayerLibraryInfo {
...
@@ -32,7 +32,7 @@ public interface ExoPlayerLibraryInfo {
* corresponding integer version 1002003 (001-002-003), and "123.45.6" has the corresponding
* corresponding integer version 1002003 (001-002-003), and "123.45.6" has the corresponding
* integer version 123045006 (123-045-006).
* integer version 123045006 (123-045-006).
*/
*/
int
VERSION_INT
=
200100
0
;
int
VERSION_INT
=
200100
1
;
/**
/**
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
...
...
library/src/main/java/com/google/android/exoplayer2/source/ExtractorMediaPeriod.java
View file @
936f074e
...
@@ -244,7 +244,7 @@ import java.io.IOException;
...
@@ -244,7 +244,7 @@ import java.io.IOException;
@Override
@Override
public
long
getNextLoadPositionUs
()
{
public
long
getNextLoadPositionUs
()
{
return
getBufferedPositionUs
();
return
enabledTrackCount
==
0
?
C
.
TIME_END_OF_SOURCE
:
getBufferedPositionUs
();
}
}
@Override
@Override
...
...
library/src/main/java/com/google/android/exoplayer2/source/MediaPeriod.java
View file @
936f074e
...
@@ -133,4 +133,32 @@ public interface MediaPeriod extends SequenceableLoader {
...
@@ -133,4 +133,32 @@ public interface MediaPeriod extends SequenceableLoader {
*/
*/
long
seekToUs
(
long
positionUs
);
long
seekToUs
(
long
positionUs
);
// SequenceableLoader interface. Overridden to provide more specific documentation.
/**
* Returns the next load time, or {@link C#TIME_END_OF_SOURCE} if loading has finished.
* <p>
* This method should only be called after the period has been prepared. It may be called when no
* tracks are selected.
*/
@Override
long
getNextLoadPositionUs
();
/**
* Attempts to continue loading.
* <p>
* This method may be called both during and after the period has been prepared.
* <p>
* A period may call {@link Callback#onContinueLoadingRequested(SequenceableLoader)} on the
* {@link Callback} passed to {@link #prepare(Callback)} to request that this method be called
* when the period is permitted to continue loading data. A period may do this both during and
* after preparation.
*
* @param positionUs The current playback position.
* @return True if progress was made, meaning that {@link #getNextLoadPositionUs()} will return
* a different value than prior to the call. False otherwise.
*/
@Override
boolean
continueLoading
(
long
positionUs
);
}
}
library/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaSource.java
View file @
936f074e
...
@@ -104,15 +104,14 @@ public final class HlsMediaSource implements MediaSource,
...
@@ -104,15 +104,14 @@ public final class HlsMediaSource implements MediaSource,
SinglePeriodTimeline
timeline
;
SinglePeriodTimeline
timeline
;
if
(
playlistTracker
.
isLive
())
{
if
(
playlistTracker
.
isLive
())
{
// TODO: fix windowPositionInPeriodUs when playlist is empty.
// TODO: fix windowPositionInPeriodUs when playlist is empty.
long
windowPositionInPeriodUs
=
playlist
.
startTimeUs
;
List
<
HlsMediaPlaylist
.
Segment
>
segments
=
playlist
.
segments
;
List
<
HlsMediaPlaylist
.
Segment
>
segments
=
playlist
.
segments
;
long
windowDefaultStartPositionUs
=
segments
.
isEmpty
()
?
0
long
windowDefaultStartPositionUs
=
segments
.
isEmpty
()
?
0
:
segments
.
get
(
Math
.
max
(
0
,
segments
.
size
()
-
3
)).
relativeStartTimeUs
;
:
segments
.
get
(
Math
.
max
(
0
,
segments
.
size
()
-
3
)).
relativeStartTimeUs
;
timeline
=
new
SinglePeriodTimeline
(
C
.
TIME_UNSET
,
playlist
.
durationUs
,
timeline
=
new
SinglePeriodTimeline
(
C
.
TIME_UNSET
,
playlist
.
durationUs
,
windowPositionInPeriod
Us
,
windowDefaultStartPositionUs
,
true
,
!
playlist
.
hasEndTag
);
playlist
.
startTime
Us
,
windowDefaultStartPositionUs
,
true
,
!
playlist
.
hasEndTag
);
}
else
/* not live */
{
}
else
/* not live */
{
timeline
=
new
SinglePeriodTimeline
(
playlist
.
durationUs
,
playlist
.
durationUs
,
0
,
0
,
true
,
timeline
=
new
SinglePeriodTimeline
(
playlist
.
startTimeUs
+
playlist
.
durationUs
,
false
);
playlist
.
durationUs
,
playlist
.
startTimeUs
,
0
,
true
,
false
);
}
}
sourceListener
.
onSourceInfoRefreshed
(
timeline
,
playlist
);
sourceListener
.
onSourceInfoRefreshed
(
timeline
,
playlist
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment