Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
ExoPlayer
提交
2f8c31d1
E
ExoPlayer
项目概览
NotesChapter
/
ExoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
ExoPlayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2f8c31d1
编写于
8月 08, 2017
作者:
O
ojw28
提交者:
GitHub
8月 08, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3151 from google/dev-v2-r2.5.1
r2.5.1
上级
deb9b301
a6fd4bda
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
44 addition
and
22 deletion
+44
-22
RELEASENOTES.md
RELEASENOTES.md
+7
-0
constants.gradle
constants.gradle
+1
-1
demo/src/main/AndroidManifest.xml
demo/src/main/AndroidManifest.xml
+2
-2
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
.../com/google/android/exoplayer2/ExoPlayerImplInternal.java
+19
-10
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerLibraryInfo.java
...a/com/google/android/exoplayer2/ExoPlayerLibraryInfo.java
+3
-3
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
...n/java/com/google/android/exoplayer2/SimpleExoPlayer.java
+3
-3
library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaSource.java
...google/android/exoplayer2/source/ClippingMediaSource.java
+9
-3
未找到文件。
RELEASENOTES.md
浏览文件 @
2f8c31d1
# Release notes #
### r2.5.1 ###
*
Fix an issue that could cause the reported playback position to stop advancing
in some cases.
*
Fix an issue where a Surface could be released whilst still in use by the
player.
### r2.5.0 ###
*
IMA extension: Wraps the Google Interactive Media Ads (IMA) SDK to provide an
...
...
constants.gradle
浏览文件 @
2f8c31d1
...
...
@@ -24,7 +24,7 @@ project.ext {
supportLibraryVersion
=
'25.4.0'
dexmakerVersion
=
'1.2'
mockitoVersion
=
'1.9.5'
releaseVersion
=
'r2.5.
0
'
releaseVersion
=
'r2.5.
1
'
modulePrefix
=
':'
if
(
gradle
.
ext
.
has
(
'exoplayerModulePrefix'
))
{
modulePrefix
+=
gradle
.
ext
.
exoplayerModulePrefix
...
...
demo/src/main/AndroidManifest.xml
浏览文件 @
2f8c31d1
...
...
@@ -16,8 +16,8 @@
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.google.android.exoplayer2.demo"
android:versionCode=
"250
0
"
android:versionName=
"2.5.
0
"
>
android:versionCode=
"250
1
"
android:versionName=
"2.5.
1
"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
浏览文件 @
2f8c31d1
...
...
@@ -975,11 +975,10 @@ import java.io.IOException;
mediaPeriodInfoSequence
.
setTimeline
(
timeline
);
Object
manifest
=
timelineAndManifest
.
second
;
int
processedInitialSeekCount
=
0
;
if
(
oldTimeline
==
null
)
{
if
(
pendingInitialSeekCount
>
0
)
{
Pair
<
Integer
,
Long
>
periodPosition
=
resolveSeekPosition
(
pendingSeekPosition
);
processedInitialSeekCount
=
pendingInitialSeekCount
;
int
processedInitialSeekCount
=
pendingInitialSeekCount
;
pendingInitialSeekCount
=
0
;
pendingSeekPosition
=
null
;
if
(
periodPosition
==
null
)
{
...
...
@@ -996,7 +995,7 @@ import java.io.IOException;
}
}
else
if
(
playbackInfo
.
startPositionUs
==
C
.
TIME_UNSET
)
{
if
(
timeline
.
isEmpty
())
{
handleSourceInfoRefreshEndedPlayback
(
manifest
,
processedInitialSeekCount
);
handleSourceInfoRefreshEndedPlayback
(
manifest
);
}
else
{
Pair
<
Integer
,
Long
>
defaultPosition
=
getPeriodPosition
(
0
,
C
.
TIME_UNSET
);
int
periodIndex
=
defaultPosition
.
first
;
...
...
@@ -1005,8 +1004,10 @@ import java.io.IOException;
startPositionUs
);
playbackInfo
=
new
PlaybackInfo
(
periodId
,
periodId
.
isAd
()
?
0
:
startPositionUs
,
startPositionUs
);
notifySourceInfoRefresh
(
manifest
,
processedInitialSeekCount
);
notifySourceInfoRefresh
(
manifest
);
}
}
else
{
notifySourceInfoRefresh
(
manifest
);
}
return
;
}
...
...
@@ -1015,7 +1016,7 @@ import java.io.IOException;
MediaPeriodHolder
periodHolder
=
playingPeriodHolder
!=
null
?
playingPeriodHolder
:
loadingPeriodHolder
;
if
(
periodHolder
==
null
&&
playingPeriodIndex
>=
oldTimeline
.
getPeriodCount
())
{
notifySourceInfoRefresh
(
manifest
,
processedInitialSeekCount
);
notifySourceInfoRefresh
(
manifest
);
return
;
}
Object
playingPeriodUid
=
periodHolder
==
null
...
...
@@ -1027,7 +1028,7 @@ import java.io.IOException;
int
newPeriodIndex
=
resolveSubsequentPeriod
(
playingPeriodIndex
,
oldTimeline
,
timeline
);
if
(
newPeriodIndex
==
C
.
INDEX_UNSET
)
{
// We failed to resolve a suitable restart position.
handleSourceInfoRefreshEndedPlayback
(
manifest
,
processedInitialSeekCount
);
handleSourceInfoRefreshEndedPlayback
(
manifest
);
return
;
}
// We resolved a subsequent period. Seek to the default position in the corresponding window.
...
...
@@ -1055,7 +1056,7 @@ import java.io.IOException;
MediaPeriodId
periodId
=
new
MediaPeriodId
(
newPeriodIndex
);
newPositionUs
=
seekToPeriodPosition
(
periodId
,
newPositionUs
);
playbackInfo
=
new
PlaybackInfo
(
periodId
,
newPositionUs
);
notifySourceInfoRefresh
(
manifest
,
processedInitialSeekCount
);
notifySourceInfoRefresh
(
manifest
);
return
;
}
...
...
@@ -1072,14 +1073,14 @@ import java.io.IOException;
long
newPositionUs
=
seekToPeriodPosition
(
periodId
,
playbackInfo
.
contentPositionUs
);
long
contentPositionUs
=
periodId
.
isAd
()
?
playbackInfo
.
contentPositionUs
:
C
.
TIME_UNSET
;
playbackInfo
=
new
PlaybackInfo
(
periodId
,
newPositionUs
,
contentPositionUs
);
notifySourceInfoRefresh
(
manifest
,
processedInitialSeekCount
);
notifySourceInfoRefresh
(
manifest
);
return
;
}
}
if
(
periodHolder
==
null
)
{
// We don't have any period holders, so we're done.
notifySourceInfoRefresh
(
manifest
,
processedInitialSeekCount
);
notifySourceInfoRefresh
(
manifest
);
return
;
}
...
...
@@ -1117,7 +1118,7 @@ import java.io.IOException;
}
}
notifySourceInfoRefresh
(
manifest
,
processedInitialSeekCount
);
notifySourceInfoRefresh
(
manifest
);
}
private
MediaPeriodHolder
updatePeriodInfo
(
MediaPeriodHolder
periodHolder
,
int
periodIndex
)
{
...
...
@@ -1131,6 +1132,10 @@ import java.io.IOException;
}
}
private
void
handleSourceInfoRefreshEndedPlayback
(
Object
manifest
)
{
handleSourceInfoRefreshEndedPlayback
(
manifest
,
0
);
}
private
void
handleSourceInfoRefreshEndedPlayback
(
Object
manifest
,
int
processedInitialSeekCount
)
{
// Set the playback position to (0,0) for notifying the eventHandler.
...
...
@@ -1143,6 +1148,10 @@ import java.io.IOException;
resetInternal
(
false
);
}
private
void
notifySourceInfoRefresh
(
Object
manifest
)
{
notifySourceInfoRefresh
(
manifest
,
0
);
}
private
void
notifySourceInfoRefresh
(
Object
manifest
,
int
processedInitialSeekCount
)
{
eventHandler
.
obtainMessage
(
MSG_SOURCE_INFO_REFRESHED
,
new
SourceInfo
(
timeline
,
manifest
,
playbackInfo
,
processedInitialSeekCount
)).
sendToTarget
();
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerLibraryInfo.java
浏览文件 @
2f8c31d1
...
...
@@ -31,13 +31,13 @@ public final class ExoPlayerLibraryInfo {
* The version of the library expressed as a string, for example "1.2.3".
*/
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION_INT) or vice versa.
public
static
final
String
VERSION
=
"2.5.
0
"
;
public
static
final
String
VERSION
=
"2.5.
1
"
;
/**
* The version of the library expressed as {@code "ExoPlayerLib/" + VERSION}.
*/
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
public
static
final
String
VERSION_SLASHY
=
"ExoPlayerLib/2.5.
0
"
;
public
static
final
String
VERSION_SLASHY
=
"ExoPlayerLib/2.5.
1
"
;
/**
* The version of the library expressed as an integer, for example 1002003.
...
...
@@ -47,7 +47,7 @@ public final class ExoPlayerLibraryInfo {
* integer version 123045006 (123-045-006).
*/
// Intentionally hardcoded. Do not derive from other constants (e.g. VERSION) or vice versa.
public
static
final
int
VERSION_INT
=
200500
0
;
public
static
final
int
VERSION_INT
=
200500
1
;
/**
* Whether the library was compiled with {@link com.google.android.exoplayer2.util.Assertions}
...
...
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
浏览文件 @
2f8c31d1
...
...
@@ -749,12 +749,12 @@ public class SimpleExoPlayer implements ExoPlayer {
}
}
if
(
this
.
surface
!=
null
&&
this
.
surface
!=
surface
)
{
// If we created this surface, we are responsible for releasing it.
// We're replacing a surface. Block to ensure that it's not accessed after the method returns.
player
.
blockingSendMessages
(
messages
);
// If we created the previous surface, we are responsible for releasing it.
if
(
this
.
ownsSurface
)
{
this
.
surface
.
release
();
}
// We're replacing a surface. Block to ensure that it's not accessed after the method returns.
player
.
blockingSendMessages
(
messages
);
}
else
{
player
.
sendMessages
(
messages
);
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaSource.java
浏览文件 @
2f8c31d1
...
...
@@ -48,7 +48,9 @@ public final class ClippingMediaSource implements MediaSource, MediaSource.Liste
* start providing samples, in microseconds.
* @param endPositionUs The end position within {@code mediaSource}'s timeline at which to stop
* providing samples, in microseconds. Specify {@link C#TIME_END_OF_SOURCE} to provide samples
* from the specified start point up to the end of the source.
* from the specified start point up to the end of the source. Specifying a position that
* exceeds the {@code mediaSource}'s duration will also result in the end of the source not
* being clipped.
*/
public
ClippingMediaSource
(
MediaSource
mediaSource
,
long
startPositionUs
,
long
endPositionUs
)
{
this
(
mediaSource
,
startPositionUs
,
endPositionUs
,
true
);
...
...
@@ -66,7 +68,9 @@ public final class ClippingMediaSource implements MediaSource, MediaSource.Liste
* start providing samples, in microseconds.
* @param endPositionUs The end position within {@code mediaSource}'s timeline at which to stop
* providing samples, in microseconds. Specify {@link C#TIME_END_OF_SOURCE} to provide samples
* from the specified start point up to the end of the source.
* from the specified start point up to the end of the source. Specifying a position that
* exceeds the {@code mediaSource}'s duration will also result in the end of the source not
* being clipped.
* @param enableInitialDiscontinuity Whether the initial discontinuity should be enabled.
*/
public
ClippingMediaSource
(
MediaSource
mediaSource
,
long
startPositionUs
,
long
endPositionUs
,
...
...
@@ -149,8 +153,10 @@ public final class ClippingMediaSource implements MediaSource, MediaSource.Liste
Assertions
.
checkArgument
(!
window
.
isDynamic
);
long
resolvedEndUs
=
endUs
==
C
.
TIME_END_OF_SOURCE
?
window
.
durationUs
:
endUs
;
if
(
window
.
durationUs
!=
C
.
TIME_UNSET
)
{
if
(
resolvedEndUs
>
window
.
durationUs
)
{
resolvedEndUs
=
window
.
durationUs
;
}
Assertions
.
checkArgument
(
startUs
==
0
||
window
.
isSeekable
);
Assertions
.
checkArgument
(
resolvedEndUs
<=
window
.
durationUs
);
Assertions
.
checkArgument
(
startUs
<=
resolvedEndUs
);
}
Period
period
=
timeline
.
getPeriod
(
0
,
new
Period
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录