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
9e1c6321
authored
Oct 13, 2020
by
samrobinson
Committed by
kim-vde
Oct 13, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Adjust static metadata logging to only list non-empty Metadata.
PiperOrigin-RevId: 336864814
parent
8fdadade
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
View file @
9e1c6321
...
...
@@ -2121,15 +2121,15 @@ import java.util.concurrent.atomic.AtomicBoolean;
private
ImmutableList
<
Metadata
>
extractMetadataFromTrackSelectionArray
(
TrackSelectionArray
trackSelectionArray
)
{
ImmutableList
.
Builder
<
Metadata
>
builder
=
new
ImmutableList
.
Builder
<>();
ImmutableList
.
Builder
<
Metadata
>
result
=
new
ImmutableList
.
Builder
<>();
for
(
int
i
=
0
;
i
<
trackSelectionArray
.
length
;
i
++)
{
@Nullable
TrackSelection
trackSelection
=
trackSelectionArray
.
get
(
i
);
if
(
trackSelection
!=
null
)
{
Format
format
=
trackSelection
.
getFormat
(
0
);
builder
.
add
(
format
.
metadata
==
null
?
new
Metadata
()
:
format
.
metadata
);
Format
format
=
trackSelection
.
getFormat
(
/* index= */
0
);
result
.
add
(
format
.
metadata
==
null
?
new
Metadata
()
:
format
.
metadata
);
}
}
return
builder
.
build
();
return
result
.
build
();
}
private
void
enableRenderers
()
throws
ExoPlaybackException
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java
View file @
9e1c6321
...
...
@@ -300,8 +300,11 @@ public class EventLogger implements AnalyticsListener {
public
void
onStaticMetadataChanged
(
EventTime
eventTime
,
List
<
Metadata
>
metadataList
)
{
logd
(
"staticMetadata ["
+
getEventTimeString
(
eventTime
));
for
(
int
i
=
0
;
i
<
metadataList
.
size
();
i
++)
{
logd
(
" "
+
i
);
printMetadata
(
metadataList
.
get
(
i
),
" "
);
@Nullable
Metadata
currentMetadata
=
metadataList
.
get
(
i
);
if
(
currentMetadata
!=
null
&&
currentMetadata
.
length
()
!=
0
)
{
logd
(
" "
+
i
);
printMetadata
(
currentMetadata
,
" "
);
}
}
logd
(
"]"
);
}
...
...
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