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
6aeacd70
authored
Aug 12, 2020
by
andrewlewis
Committed by
kim-vde
Aug 17, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix miscellaneous nits
PiperOrigin-RevId: 326208366
parent
b02398ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
14 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java
library/core/src/test/java/com/google/android/exoplayer2/audio/DefaultAudioSinkTest.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java
View file @
6aeacd70
...
@@ -379,6 +379,7 @@ public final class DefaultMediaSourceFactory implements MediaSourceFactory {
...
@@ -379,6 +379,7 @@ public final class DefaultMediaSourceFactory implements MediaSourceFactory {
+
" media items with an ad tag uri."
);
+
" media items with an ad tag uri."
);
return
mediaSource
;
return
mediaSource
;
}
}
@Nullable
AdsLoader
adsLoader
=
adSupportProvider
.
getAdsLoader
(
mediaItem
.
playbackProperties
.
adTagUri
);
AdsLoader
adsLoader
=
adSupportProvider
.
getAdsLoader
(
mediaItem
.
playbackProperties
.
adTagUri
);
if
(
adsLoader
==
null
)
{
if
(
adsLoader
==
null
)
{
Log
.
w
(
TAG
,
"Playing media without ads. No AdsLoader for provided adTagUri"
);
Log
.
w
(
TAG
,
"Playing media without ads. No AdsLoader for provided adTagUri"
);
...
...
library/core/src/test/java/com/google/android/exoplayer2/audio/DefaultAudioSinkTest.java
View file @
6aeacd70
...
@@ -33,18 +33,7 @@ import org.junit.Test;
...
@@ -33,18 +33,7 @@ import org.junit.Test;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.robolectric.annotation.Config
;
import
org.robolectric.annotation.Config
;
/**
/** Unit tests for {@link DefaultAudioSink}. */
* Unit tests for {@link DefaultAudioSink}.
*
* <p>Note: the Robolectric-provided AudioTrack instantiated in the audio sink uses only the Java
* part of AudioTrack with a {@code ShadowPlayerBase} underneath. This means it will not consume
* data (i.e., the {@link android.media.AudioTrack#write} methods just return 0), so these tests are
* currently limited to verifying behavior that doesn't rely on consuming data, and the position
* will stay at its initial value. For example, we can't verify {@link
* AudioSink#handleBuffer(ByteBuffer, long, int)} handling a complete buffer, or queueing audio then
* draining to the end of the stream. This could be worked around by having a test-only mode where
* {@link DefaultAudioSink} automatically treats audio as consumed.
*/
@RunWith
(
AndroidJUnit4
.
class
)
@RunWith
(
AndroidJUnit4
.
class
)
public
final
class
DefaultAudioSinkTest
{
public
final
class
DefaultAudioSinkTest
{
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
View file @
6aeacd70
...
@@ -1260,8 +1260,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -1260,8 +1260,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
if
(
initializationDataBytes
!=
null
)
{
if
(
initializationDataBytes
!=
null
)
{
if
(
MimeTypes
.
AUDIO_AAC
.
equals
(
mimeType
))
{
if
(
MimeTypes
.
AUDIO_AAC
.
equals
(
mimeType
))
{
// Update sampleRate and channelCount from the AudioSpecificConfig initialization
// Update sampleRate and channelCount from the AudioSpecificConfig initialization
// data,
// data, which is more reliable. See [Internal: b/10903778].
// which is more reliable. See [Internal: b/10903778].
AacUtil
.
Config
aacConfig
=
AacUtil
.
parseAudioSpecificConfig
(
initializationDataBytes
);
AacUtil
.
Config
aacConfig
=
AacUtil
.
parseAudioSpecificConfig
(
initializationDataBytes
);
sampleRate
=
aacConfig
.
sampleRateHz
;
sampleRate
=
aacConfig
.
sampleRateHz
;
channelCount
=
aacConfig
.
channelCount
;
channelCount
=
aacConfig
.
channelCount
;
...
...
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