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
62618f24
authored
Oct 10, 2019
by
sofijajvc
Committed by
Ian Baker
Oct 10, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove copybara exclusions and add extension to the demo app
Issue: #3353 PiperOrigin-RevId: 273949689
parent
60566721
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
4 deletions
RELEASENOTES.md
core_settings.gradle
demos/main/build.gradle
extensions/av1/proguard-rules.txt
library/core/src/main/java/com/google/android/exoplayer2/C.java
library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java
RELEASENOTES.md
View file @
62618f24
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
### dev-v2 (not yet released) ###
### dev-v2 (not yet released) ###
*
AV1 extension: Uses libgav1 to decode AV1 videos. Android 10 includes an AV1
decoder, but the older versions of Android require this extension for playback
of AV1 streams (
[
#3353
](
https://github.com/google/ExoPlayer/issues/3353
)
).
*
UI
*
UI
*
Setting
`app:played_color`
on
`PlayerView`
and
`PlayerControlView`
no longer
*
Setting
`app:played_color`
on
`PlayerView`
and
`PlayerControlView`
no longer
adjusts the colors of the scrubber handle , buffered and unplayed parts of
adjusts the colors of the scrubber handle , buffered and unplayed parts of
...
...
core_settings.gradle
View file @
62618f24
...
@@ -24,6 +24,7 @@ include modulePrefix + 'library-hls'
...
@@ -24,6 +24,7 @@ include modulePrefix + 'library-hls'
include
modulePrefix
+
'library-smoothstreaming'
include
modulePrefix
+
'library-smoothstreaming'
include
modulePrefix
+
'library-ui'
include
modulePrefix
+
'library-ui'
include
modulePrefix
+
'testutils'
include
modulePrefix
+
'testutils'
include
modulePrefix
+
'extension-av1'
include
modulePrefix
+
'extension-ffmpeg'
include
modulePrefix
+
'extension-ffmpeg'
include
modulePrefix
+
'extension-flac'
include
modulePrefix
+
'extension-flac'
include
modulePrefix
+
'extension-gvr'
include
modulePrefix
+
'extension-gvr'
...
@@ -46,6 +47,7 @@ project(modulePrefix + 'library-hls').projectDir = new File(rootDir, 'library/hl
...
@@ -46,6 +47,7 @@ project(modulePrefix + 'library-hls').projectDir = new File(rootDir, 'library/hl
project
(
modulePrefix
+
'library-smoothstreaming'
).
projectDir
=
new
File
(
rootDir
,
'library/smoothstreaming'
)
project
(
modulePrefix
+
'library-smoothstreaming'
).
projectDir
=
new
File
(
rootDir
,
'library/smoothstreaming'
)
project
(
modulePrefix
+
'library-ui'
).
projectDir
=
new
File
(
rootDir
,
'library/ui'
)
project
(
modulePrefix
+
'library-ui'
).
projectDir
=
new
File
(
rootDir
,
'library/ui'
)
project
(
modulePrefix
+
'testutils'
).
projectDir
=
new
File
(
rootDir
,
'testutils'
)
project
(
modulePrefix
+
'testutils'
).
projectDir
=
new
File
(
rootDir
,
'testutils'
)
project
(
modulePrefix
+
'extension-av1'
).
projectDir
=
new
File
(
rootDir
,
'extensions/av1'
)
project
(
modulePrefix
+
'extension-ffmpeg'
).
projectDir
=
new
File
(
rootDir
,
'extensions/ffmpeg'
)
project
(
modulePrefix
+
'extension-ffmpeg'
).
projectDir
=
new
File
(
rootDir
,
'extensions/ffmpeg'
)
project
(
modulePrefix
+
'extension-flac'
).
projectDir
=
new
File
(
rootDir
,
'extensions/flac'
)
project
(
modulePrefix
+
'extension-flac'
).
projectDir
=
new
File
(
rootDir
,
'extensions/flac'
)
project
(
modulePrefix
+
'extension-gvr'
).
projectDir
=
new
File
(
rootDir
,
'extensions/gvr'
)
project
(
modulePrefix
+
'extension-gvr'
).
projectDir
=
new
File
(
rootDir
,
'extensions/gvr'
)
...
...
demos/main/build.gradle
View file @
62618f24
...
@@ -69,6 +69,7 @@ dependencies {
...
@@ -69,6 +69,7 @@ dependencies {
implementation
project
(
modulePrefix
+
'library-hls'
)
implementation
project
(
modulePrefix
+
'library-hls'
)
implementation
project
(
modulePrefix
+
'library-smoothstreaming'
)
implementation
project
(
modulePrefix
+
'library-smoothstreaming'
)
implementation
project
(
modulePrefix
+
'library-ui'
)
implementation
project
(
modulePrefix
+
'library-ui'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-av1'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-ffmpeg'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-ffmpeg'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-flac'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-flac'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-ima'
)
withExtensionsImplementation
project
(
path:
modulePrefix
+
'extension-ima'
)
...
...
extensions/av1/proguard-rules.txt
View file @
62618f24
...
@@ -5,7 +5,3 @@
...
@@ -5,7 +5,3 @@
native <methods>;
native <methods>;
}
}
# Some members of this class are being accessed from native methods. Keep them unobfuscated.
-keep class com.google.android.exoplayer2.ext.av1.Gav1OutputBuffer {
*;
}
library/core/src/main/java/com/google/android/exoplayer2/C.java
View file @
62618f24
...
@@ -521,6 +521,7 @@ public final class C {
...
@@ -521,6 +521,7 @@ public final class C {
/** Indicates that a buffer should be decoded but not rendered. */
/** Indicates that a buffer should be decoded but not rendered. */
public
static
final
int
BUFFER_FLAG_DECODE_ONLY
=
1
<<
31
;
// 0x80000000
public
static
final
int
BUFFER_FLAG_DECODE_ONLY
=
1
<<
31
;
// 0x80000000
// LINT.IfChange
/**
/**
* Video decoder output modes. Possible modes are {@link #VIDEO_OUTPUT_MODE_NONE}, {@link
* Video decoder output modes. Possible modes are {@link #VIDEO_OUTPUT_MODE_NONE}, {@link
* #VIDEO_OUTPUT_MODE_YUV} and {@link #VIDEO_OUTPUT_MODE_SURFACE_YUV}.
* #VIDEO_OUTPUT_MODE_YUV} and {@link #VIDEO_OUTPUT_MODE_SURFACE_YUV}.
...
@@ -535,6 +536,10 @@ public final class C {
...
@@ -535,6 +536,10 @@ public final class C {
public
static
final
int
VIDEO_OUTPUT_MODE_YUV
=
0
;
public
static
final
int
VIDEO_OUTPUT_MODE_YUV
=
0
;
/** Video decoder output mode that renders 4:2:0 YUV planes directly to a surface. */
/** Video decoder output mode that renders 4:2:0 YUV planes directly to a surface. */
public
static
final
int
VIDEO_OUTPUT_MODE_SURFACE_YUV
=
1
;
public
static
final
int
VIDEO_OUTPUT_MODE_SURFACE_YUV
=
1
;
// LINT.ThenChange(
// ../../../../../../../../../extensions/av1/src/main/jni/gav1_jni.cc,
// ../../../../../../../../../extensions/vp9/src/main/jni/vpx_jni.cc
// )
/**
/**
* Video scaling modes for {@link MediaCodec}-based {@link Renderer}s. One of {@link
* Video scaling modes for {@link MediaCodec}-based {@link Renderer}s. One of {@link
...
...
library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java
View file @
62618f24
...
@@ -365,6 +365,33 @@ public class DefaultRenderersFactory implements RenderersFactory {
...
@@ -365,6 +365,33 @@ public class DefaultRenderersFactory implements RenderersFactory {
// The extension is present, but instantiation failed.
// The extension is present, but instantiation failed.
throw
new
RuntimeException
(
"Error instantiating VP9 extension"
,
e
);
throw
new
RuntimeException
(
"Error instantiating VP9 extension"
,
e
);
}
}
try
{
// Full class names used for constructor args so the LINT rule triggers if any of them move.
// LINT.IfChange
Class
<?>
clazz
=
Class
.
forName
(
"com.google.android.exoplayer2.ext.av1.Libgav1VideoRenderer"
);
Constructor
<?>
constructor
=
clazz
.
getConstructor
(
long
.
class
,
android
.
os
.
Handler
.
class
,
com
.
google
.
android
.
exoplayer2
.
video
.
VideoRendererEventListener
.
class
,
int
.
class
);
// LINT.ThenChange(../../../../../../../proguard-rules.txt)
Renderer
renderer
=
(
Renderer
)
constructor
.
newInstance
(
allowedVideoJoiningTimeMs
,
eventHandler
,
eventListener
,
MAX_DROPPED_VIDEO_FRAME_COUNT_TO_NOTIFY
);
out
.
add
(
extensionRendererIndex
++,
renderer
);
Log
.
i
(
TAG
,
"Loaded Libgav1VideoRenderer."
);
}
catch
(
ClassNotFoundException
e
)
{
// Expected if the app was built without the extension.
}
catch
(
Exception
e
)
{
// The extension is present, but instantiation failed.
throw
new
RuntimeException
(
"Error instantiating AV1 extension"
,
e
);
}
}
}
/**
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java
View file @
62618f24
...
@@ -34,10 +34,15 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
...
@@ -34,10 +34,15 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
void
releaseOutputBuffer
(
VideoDecoderOutputBuffer
outputBuffer
);
void
releaseOutputBuffer
(
VideoDecoderOutputBuffer
outputBuffer
);
}
}
// LINT.IfChange
public
static
final
int
COLORSPACE_UNKNOWN
=
0
;
public
static
final
int
COLORSPACE_UNKNOWN
=
0
;
public
static
final
int
COLORSPACE_BT601
=
1
;
public
static
final
int
COLORSPACE_BT601
=
1
;
public
static
final
int
COLORSPACE_BT709
=
2
;
public
static
final
int
COLORSPACE_BT709
=
2
;
public
static
final
int
COLORSPACE_BT2020
=
3
;
public
static
final
int
COLORSPACE_BT2020
=
3
;
// LINT.ThenChange(
// ../../../../../../../../../../extensions/av1/src/main/jni/gav1_jni.cc,
// ../../../../../../../../../../extensions/vp9/src/main/jni/vpx_jni.cc
// )
/** Decoder private data. */
/** Decoder private data. */
public
int
decoderPrivate
;
public
int
decoderPrivate
;
...
...
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