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
09e97cf2
authored
Jul 10, 2020
by
olly
Committed by
kim-vde
Jul 13, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix some Javadoc issues
PiperOrigin-RevId: 320581002
parent
efce10c8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
29 deletions
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecAdapter.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecAsyncCallback.java
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java
library/core/src/main/java/com/google/android/exoplayer2/offline/Downloader.java
library/core/src/test/java/com/google/android/exoplayer2/mediacodec/BatchBufferTest.java
library/hls/src/test/java/com/google/android/exoplayer2/source/hls/HlsMediaSourceTest.java
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecAdapter.java
View file @
09e97cf2
...
@@ -22,16 +22,13 @@ import android.media.MediaFormat;
...
@@ -22,16 +22,13 @@ import android.media.MediaFormat;
import
android.view.Surface
;
import
android.view.Surface
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.decoder.CryptoInfo
;
import
com.google.android.exoplayer2.decoder.CryptoInfo
;
import
com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.MediaCodecOperationMode
;
/**
/**
* Abstracts {@link MediaCodec} operations.
* Abstracts {@link MediaCodec} operations.
*
*
* <p>{@code MediaCodecAdapter} offers a common interface to interact with a {@link MediaCodec}
* <p>{@code MediaCodecAdapter} offers a common interface to interact with a {@link MediaCodec}
* regardless of the {@link
* regardless of the {@link MediaCodecOperationMode} the {@link MediaCodec} is operating in.
* com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.MediaCodecOperationMode} the {@link
* MediaCodec} is operating in.
*
* @see com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.MediaCodecOperationMode
*/
*/
public
interface
MediaCodecAdapter
{
public
interface
MediaCodecAdapter
{
...
@@ -97,31 +94,23 @@ public interface MediaCodecAdapter {
...
@@ -97,31 +94,23 @@ public interface MediaCodecAdapter {
* <p>The {@code index} must be an input buffer index that has been obtained from a previous call
* <p>The {@code index} must be an input buffer index that has been obtained from a previous call
* to {@link #dequeueInputBufferIndex()}.
* to {@link #dequeueInputBufferIndex()}.
*
*
* <p>Note: This method behaves as {@link MediaCodec#queueSecureInputBuffer} with the difference
* <p>This method behaves like {@link MediaCodec#queueSecureInputBuffer}, with the difference that
* that {@code info} is of type {@link CryptoInfo} and not {@link
* {@code info} is of type {@link CryptoInfo} and not {@link android.media.MediaCodec.CryptoInfo}.
* android.media.MediaCodec.CryptoInfo}.
*
*
* @see MediaCodec#queueSecureInputBuffer
* @see MediaCodec#queueSecureInputBuffer
*/
*/
void
queueSecureInputBuffer
(
void
queueSecureInputBuffer
(
int
index
,
int
offset
,
CryptoInfo
info
,
long
presentationTimeUs
,
int
flags
);
int
index
,
int
offset
,
CryptoInfo
info
,
long
presentationTimeUs
,
int
flags
);
/**
/** Flushes both the adapter and the underlying {@link MediaCodec}. */
* Flushes the {@code MediaCodecAdapter}.
*
* <p>Note: {@link #flush()} should also call any {@link MediaCodec} methods needed to flush the
* {@link MediaCodec}, i.e., {@link MediaCodec#flush()} and <em>optionally</em> {@link
* MediaCodec#start()}, if the {@link MediaCodec} operates in asynchronous mode.
*/
void
flush
();
void
flush
();
/**
/**
* Shut
down the {@code MediaCodecAdapter}
.
* Shut
s down the adapter
.
*
*
* <p>Note: This method does not release the underlying {@link MediaCodec}. Make sure to call
* <p>This method does not stop or release the underlying {@link MediaCodec}. It should be called
* {@link #shutdown()} before stopping or releasing the underlying {@link MediaCodec} to ensure
* before stopping or releasing the {@link MediaCodec} to avoid the possibility of the adapter
* the adapter is fully shutdown before the {@link MediaCodec} stops executing. Otherwise, there
* interacting with a stopped or released {@link MediaCodec}.
* is a risk the adapter might interact with a stopped or released {@link MediaCodec}.
*/
*/
void
shutdown
();
void
shutdown
();
...
...
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecAsyncCallback.java
View file @
09e97cf2
...
@@ -83,14 +83,13 @@ import java.util.ArrayDeque;
...
@@ -83,14 +83,13 @@ import java.util.ArrayDeque;
* <p>Call this <b>after</b> {@link #dequeueOutputBufferIndex} returned {@link
* <p>Call this <b>after</b> {@link #dequeueOutputBufferIndex} returned {@link
* MediaCodec#INFO_OUTPUT_FORMAT_CHANGED}.
* MediaCodec#INFO_OUTPUT_FORMAT_CHANGED}.
*
*
* @throws
{@link IllegalStateException} if you call this method before before {
* @throws
IllegalStateException If called before {@link #dequeueOutputBufferIndex} has returned
*
@link #dequeueOutputBufferIndex} returned
{@link MediaCodec#INFO_OUTPUT_FORMAT_CHANGED}.
*
{@link MediaCodec#INFO_OUTPUT_FORMAT_CHANGED}.
*/
*/
public
MediaFormat
getOutputFormat
()
throws
IllegalStateException
{
public
MediaFormat
getOutputFormat
()
throws
IllegalStateException
{
if
(
currentFormat
==
null
)
{
if
(
currentFormat
==
null
)
{
throw
new
IllegalStateException
();
throw
new
IllegalStateException
();
}
}
return
currentFormat
;
return
currentFormat
;
}
}
...
@@ -101,7 +100,6 @@ import java.util.ArrayDeque;
...
@@ -101,7 +100,6 @@ import java.util.ArrayDeque;
public
void
maybeThrowMediaCodecException
()
throws
IllegalStateException
{
public
void
maybeThrowMediaCodecException
()
throws
IllegalStateException
{
IllegalStateException
exception
=
mediaCodecException
;
IllegalStateException
exception
=
mediaCodecException
;
mediaCodecException
=
null
;
mediaCodecException
=
null
;
if
(
exception
!=
null
)
{
if
(
exception
!=
null
)
{
throw
exception
;
throw
exception
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java
View file @
09e97cf2
...
@@ -429,7 +429,7 @@ public final class DownloadHelper {
...
@@ -429,7 +429,7 @@ public final class DownloadHelper {
}
}
/**
/**
* Equivalent to {@link #createMediaSource(DownloadRequest, Factory, DrmSessionManager)
* Equivalent to {@link #createMediaSource(DownloadRequest,
DataSource.
Factory, DrmSessionManager)
* createMediaSource(downloadRequest, dataSourceFactory, null)}.
* createMediaSource(downloadRequest, dataSourceFactory, null)}.
*/
*/
public
static
MediaSource
createMediaSource
(
public
static
MediaSource
createMediaSource
(
...
...
library/core/src/main/java/com/google/android/exoplayer2/offline/Downloader.java
View file @
09e97cf2
...
@@ -31,7 +31,7 @@ public interface Downloader {
...
@@ -31,7 +31,7 @@ public interface Downloader {
*
*
* <p>May be called directly from {@link #download}, or from any other thread used by the
* <p>May be called directly from {@link #download}, or from any other thread used by the
* downloader. In all cases, {@link #download} is guaranteed not to return until after the last
* downloader. In all cases, {@link #download} is guaranteed not to return until after the last
* call to
{@link #onProgress}
has finished executing.
* call to
this method
has finished executing.
*
*
* @param contentLength The length of the content in bytes, or {@link C#LENGTH_UNSET} if
* @param contentLength The length of the content in bytes, or {@link C#LENGTH_UNSET} if
* unknown.
* unknown.
...
...
library/core/src/test/java/com/google/android/exoplayer2/mediacodec/BatchBufferTest.java
View file @
09e97cf2
...
@@ -32,9 +32,9 @@ import org.junit.runner.RunWith;
...
@@ -32,9 +32,9 @@ import org.junit.runner.RunWith;
@RunWith
(
AndroidJUnit4
.
class
)
@RunWith
(
AndroidJUnit4
.
class
)
public
final
class
BatchBufferTest
{
public
final
class
BatchBufferTest
{
/** Bigger than {@
link BatchBuffer#
BATCH_SIZE_BYTES} */
/** Bigger than {@
code BatchBuffer.
BATCH_SIZE_BYTES} */
private
static
final
int
BUFFER_SIZE_LARGER_THAN_BATCH_SIZE_BYTES
=
100
*
1000
*
1000
;
private
static
final
int
BUFFER_SIZE_LARGER_THAN_BATCH_SIZE_BYTES
=
100
*
1000
*
1000
;
/** Smaller than {@
link BatchBuffer#
BATCH_SIZE_BYTES} */
/** Smaller than {@
code BatchBuffer.
BATCH_SIZE_BYTES} */
private
static
final
int
BUFFER_SIZE_MUCH_SMALLER_THAN_BATCH_SIZE_BYTES
=
100
;
private
static
final
int
BUFFER_SIZE_MUCH_SMALLER_THAN_BATCH_SIZE_BYTES
=
100
;
private
static
final
byte
[]
TEST_ACCESS_UNIT
=
private
static
final
byte
[]
TEST_ACCESS_UNIT
=
...
...
library/hls/src/test/java/com/google/android/exoplayer2/source/hls/HlsMediaSourceTest.java
View file @
09e97cf2
...
@@ -27,7 +27,7 @@ import java.util.Collections;
...
@@ -27,7 +27,7 @@ import java.util.Collections;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
/** Unit test for {@link
Dash
MediaSource}. */
/** Unit test for {@link
Hls
MediaSource}. */
@RunWith
(
AndroidJUnit4
.
class
)
@RunWith
(
AndroidJUnit4
.
class
)
public
class
HlsMediaSourceTest
{
public
class
HlsMediaSourceTest
{
...
...
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