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
037aeaf7
authored
Jan 05, 2017
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Some minor cleanup
parent
1d9d68dd
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
143 additions
and
39 deletions
library/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java
library/src/main/java/com/google/android/exoplayer2/upstream/DataSource.java
library/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
library/src/main/res/drawable-v21/exo_controls_fastforward.xml
library/src/main/res/drawable-v21/exo_controls_next.xml
library/src/main/res/drawable-v21/exo_controls_pause.xml
library/src/main/res/drawable-v21/exo_controls_play.xml
library/src/main/res/drawable-v21/exo_controls_previous.xml
library/src/main/res/drawable-v21/exo_controls_rewind.xml
library/src/main/res/drawable-xxxhdpi/exo_controls_fastforward.png
library/src/main/res/drawable-xxxhdpi/exo_controls_next.png
library/src/main/res/drawable-xxxhdpi/exo_controls_pause.png
library/src/main/res/drawable-xxxhdpi/exo_controls_play.png
library/src/main/res/drawable-xxxhdpi/exo_controls_previous.png
library/src/main/res/drawable-xxxhdpi/exo_controls_rewind.png
library/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java
View file @
037aeaf7
...
@@ -202,7 +202,7 @@ public final class SimpleExoPlayerView extends FrameLayout {
...
@@ -202,7 +202,7 @@ public final class SimpleExoPlayerView extends FrameLayout {
int
playerLayoutId
=
R
.
layout
.
exo_simple_player_view
;
int
playerLayoutId
=
R
.
layout
.
exo_simple_player_view
;
boolean
useArtwork
=
true
;
boolean
useArtwork
=
true
;
int
defaultArtwork
=
0
;
int
defaultArtwork
Id
=
0
;
boolean
useController
=
true
;
boolean
useController
=
true
;
int
surfaceType
=
SURFACE_TYPE_SURFACE_VIEW
;
int
surfaceType
=
SURFACE_TYPE_SURFACE_VIEW
;
int
resizeMode
=
AspectRatioFrameLayout
.
RESIZE_MODE_FIT
;
int
resizeMode
=
AspectRatioFrameLayout
.
RESIZE_MODE_FIT
;
...
@@ -214,8 +214,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
...
@@ -214,8 +214,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
playerLayoutId
=
a
.
getResourceId
(
R
.
styleable
.
SimpleExoPlayerView_player_layout_id
,
playerLayoutId
=
a
.
getResourceId
(
R
.
styleable
.
SimpleExoPlayerView_player_layout_id
,
playerLayoutId
);
playerLayoutId
);
useArtwork
=
a
.
getBoolean
(
R
.
styleable
.
SimpleExoPlayerView_use_artwork
,
useArtwork
);
useArtwork
=
a
.
getBoolean
(
R
.
styleable
.
SimpleExoPlayerView_use_artwork
,
useArtwork
);
defaultArtwork
=
a
.
getResourceId
(
R
.
styleable
.
SimpleExoPlayerView_default_artwork
,
defaultArtwork
Id
=
a
.
getResourceId
(
R
.
styleable
.
SimpleExoPlayerView_default_artwork
,
defaultArtwork
);
defaultArtworkId
);
useController
=
a
.
getBoolean
(
R
.
styleable
.
SimpleExoPlayerView_use_controller
,
useController
);
useController
=
a
.
getBoolean
(
R
.
styleable
.
SimpleExoPlayerView_use_controller
,
useController
);
surfaceType
=
a
.
getInt
(
R
.
styleable
.
SimpleExoPlayerView_surface_type
,
surfaceType
);
surfaceType
=
a
.
getInt
(
R
.
styleable
.
SimpleExoPlayerView_surface_type
,
surfaceType
);
resizeMode
=
a
.
getInt
(
R
.
styleable
.
SimpleExoPlayerView_resize_mode
,
resizeMode
);
resizeMode
=
a
.
getInt
(
R
.
styleable
.
SimpleExoPlayerView_resize_mode
,
resizeMode
);
...
@@ -257,8 +257,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
...
@@ -257,8 +257,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
// Artwork view.
// Artwork view.
artworkView
=
(
ImageView
)
findViewById
(
R
.
id
.
exo_artwork
);
artworkView
=
(
ImageView
)
findViewById
(
R
.
id
.
exo_artwork
);
this
.
useArtwork
=
useArtwork
&&
artworkView
!=
null
;
this
.
useArtwork
=
useArtwork
&&
artworkView
!=
null
;
if
(
defaultArtwork
!=
0
)
{
if
(
defaultArtwork
Id
!=
0
)
{
this
.
defaultArtwork
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
defaultArtwork
);
defaultArtwork
=
BitmapFactory
.
decodeResource
(
context
.
getResources
(),
defaultArtworkId
);
}
}
// Subtitle view.
// Subtitle view.
...
...
library/src/main/java/com/google/android/exoplayer2/upstream/DataSource.java
View file @
037aeaf7
...
@@ -65,7 +65,7 @@ public interface DataSource {
...
@@ -65,7 +65,7 @@ public interface DataSource {
* @param buffer The buffer into which the read data should be stored.
* @param buffer The buffer into which the read data should be stored.
* @param offset The start offset into {@code buffer} at which data should be written.
* @param offset The start offset into {@code buffer} at which data should be written.
* @param readLength The maximum number of bytes to read.
* @param readLength The maximum number of bytes to read.
* @return The number of bytes read, or {@link C#RESULT_END_OF_INPUT} if no data is ava
li
able
* @return The number of bytes read, or {@link C#RESULT_END_OF_INPUT} if no data is ava
il
able
* because the end of the opened range has been reached.
* because the end of the opened range has been reached.
* @throws IOException If an error occurs reading from the source.
* @throws IOException If an error occurs reading from the source.
*/
*/
...
...
library/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java
View file @
037aeaf7
...
@@ -438,10 +438,12 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
...
@@ -438,10 +438,12 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
}
}
/**
/**
* Returns
true if the current frame
should be dropped.
* Returns
whether the buffer being processed
should be dropped.
*
*
* @param earlyUs Time indicating how early the frame is. Negative values indicate late frame.
* @param earlyUs The time until the buffer should be presented in microseconds. A negative value
* @param elapsedRealtimeUs Wall clock time.
* indicates that the buffer is late.
* @param elapsedRealtimeUs {@link android.os.SystemClock#elapsedRealtime()} in microseconds,
* measured at the start of the current iteration of the rendering loop.
*/
*/
protected
boolean
shouldDropOutputBuffer
(
long
earlyUs
,
long
elapsedRealtimeUs
)
{
protected
boolean
shouldDropOutputBuffer
(
long
earlyUs
,
long
elapsedRealtimeUs
)
{
// Drop the frame if we're more than 30ms late rendering the frame.
// Drop the frame if we're more than 30ms late rendering the frame.
...
...
library/src/main/res/drawable-v21/exo_controls_fastforward.xml
View file @
037aeaf7
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"32dp"
android:width=
"32dp"
android:height=
"32dp"
android:height=
"32dp"
android:viewportHeight=
"24.0"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"
/>
<path
android:fillColor=
"#FFF"
android:pathData=
"M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"
/>
</vector>
</vector>
library/src/main/res/drawable-v21/exo_controls_next.xml
View file @
037aeaf7
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"32dp"
android:width=
"32dp"
android:height=
"32dp"
android:height=
"32dp"
android:viewportHeight=
"24.0"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"
/>
<path
android:fillColor=
"#FFF"
android:pathData=
"M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"
/>
</vector>
</vector>
library/src/main/res/drawable-v21/exo_controls_pause.xml
View file @
037aeaf7
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"32dp"
android:width=
"32dp"
android:height=
"32dp"
android:height=
"32dp"
android:viewportHeight=
"24.0"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"
/>
<path
android:fillColor=
"#FFF"
android:pathData=
"M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"
/>
</vector>
</vector>
library/src/main/res/drawable-v21/exo_controls_play.xml
View file @
037aeaf7
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"32dp"
android:width=
"32dp"
android:height=
"32dp"
android:height=
"32dp"
android:viewportHeight=
"24.0"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M8,5v14l11,-7z"
/>
<path
android:fillColor=
"#FFF"
android:pathData=
"M8,5v14l11,-7z"
/>
</vector>
</vector>
library/src/main/res/drawable-v21/exo_controls_previous.xml
View file @
037aeaf7
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"32dp"
android:width=
"32dp"
android:height=
"32dp"
android:height=
"32dp"
android:viewportHeight=
"24.0"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"
/>
<path
android:fillColor=
"#FFF"
android:pathData=
"M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"
/>
</vector>
</vector>
library/src/main/res/drawable-v21/exo_controls_rewind.xml
View file @
037aeaf7
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"32dp"
android:width=
"32dp"
android:height=
"32dp"
android:height=
"32dp"
android:viewportHeight=
"24.0"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FFFFFFFF"
android:pathData=
"M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"
/>
<path
android:fillColor=
"#FFF"
android:pathData=
"M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"
/>
</vector>
</vector>
library/src/main/res/drawable-xxxhdpi/exo_controls_fastforward.png
deleted
100644 → 0
View file @
1d9d68dd
712 Bytes
library/src/main/res/drawable-xxxhdpi/exo_controls_next.png
deleted
100644 → 0
View file @
1d9d68dd
532 Bytes
library/src/main/res/drawable-xxxhdpi/exo_controls_pause.png
deleted
100644 → 0
View file @
1d9d68dd
188 Bytes
library/src/main/res/drawable-xxxhdpi/exo_controls_play.png
deleted
100644 → 0
View file @
1d9d68dd
484 Bytes
library/src/main/res/drawable-xxxhdpi/exo_controls_previous.png
deleted
100644 → 0
View file @
1d9d68dd
522 Bytes
library/src/main/res/drawable-xxxhdpi/exo_controls_rewind.png
deleted
100644 → 0
View file @
1d9d68dd
690 Bytes
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