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
78e72abb
authored
Dec 02, 2019
by
andrewlewis
Committed by
Oliver Woodman
Dec 06, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove row VP9 multi-threading option
PiperOrigin-RevId: 283319944
parent
8e44e3b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
21 deletions
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java
View file @
78e72abb
...
@@ -68,7 +68,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -68,7 +68,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
*/
*/
private
static
final
int
DEFAULT_INPUT_BUFFER_SIZE
=
768
*
1024
;
private
static
final
int
DEFAULT_INPUT_BUFFER_SIZE
=
768
*
1024
;
private
final
boolean
enableRowMultiThreadMode
;
private
final
int
threads
;
private
final
int
threads
;
@Nullable
private
VpxDecoder
decoder
;
@Nullable
private
VpxDecoder
decoder
;
...
@@ -121,8 +120,8 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -121,8 +120,8 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
* permitted to play clear regions of encrypted media files before {@code drmSessionManager}
* permitted to play clear regions of encrypted media files before {@code drmSessionManager}
* has obtained the keys necessary to decrypt encrypted regions of the media.
* has obtained the keys necessary to decrypt encrypted regions of the media.
* @deprecated Use {@link #LibvpxVideoRenderer(long, Handler, VideoRendererEventListener, int,
* @deprecated Use {@link #LibvpxVideoRenderer(long, Handler, VideoRendererEventListener, int,
*
boolean, int, int, int)}} instead, and pass DRM-related parameters to the {@link
*
int, int, int)}} instead, and pass DRM-related parameters to the {@link MediaSource}
*
MediaSource}
factories.
* factories.
*/
*/
@Deprecated
@Deprecated
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
...
@@ -140,7 +139,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -140,7 +139,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
maxDroppedFramesToNotify
,
maxDroppedFramesToNotify
,
drmSessionManager
,
drmSessionManager
,
playClearSamplesWithoutKeys
,
playClearSamplesWithoutKeys
,
/* enableRowMultiThreadMode= */
false
,
getRuntime
().
availableProcessors
(),
getRuntime
().
availableProcessors
(),
/* numInputBuffers= */
4
,
/* numInputBuffers= */
4
,
/* numOutputBuffers= */
4
);
/* numOutputBuffers= */
4
);
...
@@ -154,7 +152,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -154,7 +152,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
* @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
* invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
* invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @param threads Number of threads libvpx will use to decode.
* @param numInputBuffers Number of input buffers.
* @param numInputBuffers Number of input buffers.
* @param numOutputBuffers Number of output buffers.
* @param numOutputBuffers Number of output buffers.
...
@@ -165,7 +162,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -165,7 +162,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
@Nullable
Handler
eventHandler
,
@Nullable
Handler
eventHandler
,
@Nullable
VideoRendererEventListener
eventListener
,
@Nullable
VideoRendererEventListener
eventListener
,
int
maxDroppedFramesToNotify
,
int
maxDroppedFramesToNotify
,
boolean
enableRowMultiThreadMode
,
int
threads
,
int
threads
,
int
numInputBuffers
,
int
numInputBuffers
,
int
numOutputBuffers
)
{
int
numOutputBuffers
)
{
...
@@ -176,7 +172,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -176,7 +172,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
maxDroppedFramesToNotify
,
maxDroppedFramesToNotify
,
/* drmSessionManager= */
null
,
/* drmSessionManager= */
null
,
/* playClearSamplesWithoutKeys= */
false
,
/* playClearSamplesWithoutKeys= */
false
,
enableRowMultiThreadMode
,
threads
,
threads
,
numInputBuffers
,
numInputBuffers
,
numOutputBuffers
);
numOutputBuffers
);
...
@@ -197,13 +192,12 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -197,13 +192,12 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
* begin in parallel with key acquisition. This parameter specifies whether the renderer is
* begin in parallel with key acquisition. This parameter specifies whether the renderer is
* permitted to play clear regions of encrypted media files before {@code drmSessionManager}
* permitted to play clear regions of encrypted media files before {@code drmSessionManager}
* has obtained the keys necessary to decrypt encrypted regions of the media.
* has obtained the keys necessary to decrypt encrypted regions of the media.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @param threads Number of threads libvpx will use to decode.
* @param numInputBuffers Number of input buffers.
* @param numInputBuffers Number of input buffers.
* @param numOutputBuffers Number of output buffers.
* @param numOutputBuffers Number of output buffers.
* @deprecated Use {@link #LibvpxVideoRenderer(long, Handler, VideoRendererEventListener, int,
* @deprecated Use {@link #LibvpxVideoRenderer(long, Handler, VideoRendererEventListener, int,
*
boolean, int, int, int)}} instead, and pass DRM-related parameters to the {@link
*
int, int, int)}} instead, and pass DRM-related parameters to the {@link MediaSource}
*
MediaSource}
factories.
* factories.
*/
*/
@Deprecated
@Deprecated
public
LibvpxVideoRenderer
(
public
LibvpxVideoRenderer
(
...
@@ -213,7 +207,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -213,7 +207,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
int
maxDroppedFramesToNotify
,
int
maxDroppedFramesToNotify
,
@Nullable
DrmSessionManager
<
ExoMediaCrypto
>
drmSessionManager
,
@Nullable
DrmSessionManager
<
ExoMediaCrypto
>
drmSessionManager
,
boolean
playClearSamplesWithoutKeys
,
boolean
playClearSamplesWithoutKeys
,
boolean
enableRowMultiThreadMode
,
int
threads
,
int
threads
,
int
numInputBuffers
,
int
numInputBuffers
,
int
numOutputBuffers
)
{
int
numOutputBuffers
)
{
...
@@ -224,7 +217,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -224,7 +217,6 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
maxDroppedFramesToNotify
,
maxDroppedFramesToNotify
,
drmSessionManager
,
drmSessionManager
,
playClearSamplesWithoutKeys
);
playClearSamplesWithoutKeys
);
this
.
enableRowMultiThreadMode
=
enableRowMultiThreadMode
;
this
.
threads
=
threads
;
this
.
threads
=
threads
;
this
.
numInputBuffers
=
numInputBuffers
;
this
.
numInputBuffers
=
numInputBuffers
;
this
.
numOutputBuffers
=
numOutputBuffers
;
this
.
numOutputBuffers
=
numOutputBuffers
;
...
@@ -259,12 +251,7 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
...
@@ -259,12 +251,7 @@ public class LibvpxVideoRenderer extends SimpleDecoderVideoRenderer {
format
.
maxInputSize
!=
Format
.
NO_VALUE
?
format
.
maxInputSize
:
DEFAULT_INPUT_BUFFER_SIZE
;
format
.
maxInputSize
!=
Format
.
NO_VALUE
?
format
.
maxInputSize
:
DEFAULT_INPUT_BUFFER_SIZE
;
VpxDecoder
decoder
=
VpxDecoder
decoder
=
new
VpxDecoder
(
new
VpxDecoder
(
numInputBuffers
,
numInputBuffers
,
numOutputBuffers
,
initialInputBufferSize
,
mediaCrypto
,
threads
);
numOutputBuffers
,
initialInputBufferSize
,
mediaCrypto
,
enableRowMultiThreadMode
,
threads
);
this
.
decoder
=
decoder
;
this
.
decoder
=
decoder
;
TraceUtil
.
endSection
();
TraceUtil
.
endSection
();
return
decoder
;
return
decoder
;
...
...
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java
View file @
78e72abb
...
@@ -53,7 +53,6 @@ import java.nio.ByteBuffer;
...
@@ -53,7 +53,6 @@ import java.nio.ByteBuffer;
* @param initialInputBufferSize The initial size of each input buffer.
* @param initialInputBufferSize The initial size of each input buffer.
* @param exoMediaCrypto The {@link ExoMediaCrypto} object required for decoding encrypted
* @param exoMediaCrypto The {@link ExoMediaCrypto} object required for decoding encrypted
* content. Maybe null and can be ignored if decoder does not handle encrypted content.
* content. Maybe null and can be ignored if decoder does not handle encrypted content.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @param threads Number of threads libvpx will use to decode.
* @throws VpxDecoderException Thrown if an exception occurs when initializing the decoder.
* @throws VpxDecoderException Thrown if an exception occurs when initializing the decoder.
*/
*/
...
@@ -62,7 +61,6 @@ import java.nio.ByteBuffer;
...
@@ -62,7 +61,6 @@ import java.nio.ByteBuffer;
int
numOutputBuffers
,
int
numOutputBuffers
,
int
initialInputBufferSize
,
int
initialInputBufferSize
,
@Nullable
ExoMediaCrypto
exoMediaCrypto
,
@Nullable
ExoMediaCrypto
exoMediaCrypto
,
boolean
enableRowMultiThreadMode
,
int
threads
)
int
threads
)
throws
VpxDecoderException
{
throws
VpxDecoderException
{
super
(
super
(
...
@@ -75,7 +73,8 @@ import java.nio.ByteBuffer;
...
@@ -75,7 +73,8 @@ import java.nio.ByteBuffer;
if
(
exoMediaCrypto
!=
null
&&
!
VpxLibrary
.
vpxIsSecureDecodeSupported
())
{
if
(
exoMediaCrypto
!=
null
&&
!
VpxLibrary
.
vpxIsSecureDecodeSupported
())
{
throw
new
VpxDecoderException
(
"Vpx decoder does not support secure decode."
);
throw
new
VpxDecoderException
(
"Vpx decoder does not support secure decode."
);
}
}
vpxDecContext
=
vpxInit
(
/* disableLoopFilter= */
false
,
enableRowMultiThreadMode
,
threads
);
vpxDecContext
=
vpxInit
(
/* disableLoopFilter= */
false
,
/* enableRowMultiThreadMode= */
false
,
threads
);
if
(
vpxDecContext
==
0
)
{
if
(
vpxDecContext
==
0
)
{
throw
new
VpxDecoderException
(
"Failed to initialize decoder"
);
throw
new
VpxDecoderException
(
"Failed to initialize decoder"
);
}
}
...
...
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