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
4b299126
authored
Sep 01, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Some renaming to make format use slightly clearer.
parent
fae6c653
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
library/src/main/java/com/google/android/exoplayer/dash/DashChunkSource.java
library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingChunkSource.java
library/src/main/java/com/google/android/exoplayer/dash/DashChunkSource.java
View file @
4b299126
...
@@ -108,7 +108,7 @@ public class DashChunkSource implements ChunkSource {
...
@@ -108,7 +108,7 @@ public class DashChunkSource implements ChunkSource {
private
final
Handler
eventHandler
;
private
final
Handler
eventHandler
;
private
final
EventListener
eventListener
;
private
final
EventListener
eventListener
;
private
final
MediaFormat
media
Format
;
private
final
MediaFormat
track
Format
;
private
final
DataSource
dataSource
;
private
final
DataSource
dataSource
;
private
final
FormatEvaluator
formatEvaluator
;
private
final
FormatEvaluator
formatEvaluator
;
private
final
Evaluation
evaluation
;
private
final
Evaluation
evaluation
;
...
@@ -294,7 +294,7 @@ public class DashChunkSource implements ChunkSource {
...
@@ -294,7 +294,7 @@ public class DashChunkSource implements ChunkSource {
this
.
maxWidth
=
maxWidth
==
0
?
MediaFormat
.
NO_VALUE
:
maxWidth
;
this
.
maxWidth
=
maxWidth
==
0
?
MediaFormat
.
NO_VALUE
:
maxWidth
;
this
.
maxHeight
=
maxHeight
==
0
?
MediaFormat
.
NO_VALUE
:
maxHeight
;
this
.
maxHeight
=
maxHeight
==
0
?
MediaFormat
.
NO_VALUE
:
maxHeight
;
// TODO: Remove this and pass proper formats instead (b/22996976).
// TODO: Remove this and pass proper formats instead (b/22996976).
this
.
media
Format
=
MediaFormat
.
createFormatForMimeType
(
mimeType
,
MediaFormat
.
NO_VALUE
,
this
.
track
Format
=
MediaFormat
.
createFormatForMimeType
(
mimeType
,
MediaFormat
.
NO_VALUE
,
totalDurationUs
);
totalDurationUs
);
}
}
...
@@ -310,7 +310,7 @@ public class DashChunkSource implements ChunkSource {
...
@@ -310,7 +310,7 @@ public class DashChunkSource implements ChunkSource {
@Override
@Override
public
final
MediaFormat
getFormat
(
int
track
)
{
public
final
MediaFormat
getFormat
(
int
track
)
{
return
media
Format
;
return
track
Format
;
}
}
// VisibleForTesting
// VisibleForTesting
...
...
library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java
View file @
4b299126
...
@@ -71,7 +71,7 @@ public final class HlsSampleSource implements SampleSource, SampleSourceReader,
...
@@ -71,7 +71,7 @@ public final class HlsSampleSource implements SampleSource, SampleSourceReader,
private
int
enabledTrackCount
;
private
int
enabledTrackCount
;
private
boolean
[]
trackEnabledStates
;
private
boolean
[]
trackEnabledStates
;
private
boolean
[]
pendingDiscontinuities
;
private
boolean
[]
pendingDiscontinuities
;
private
MediaFormat
[]
mediaFormats
;
private
MediaFormat
[]
trackFormat
;
private
MediaFormat
[]
downstreamMediaFormats
;
private
MediaFormat
[]
downstreamMediaFormats
;
private
Format
downstreamFormat
;
private
Format
downstreamFormat
;
...
@@ -135,14 +135,14 @@ public final class HlsSampleSource implements SampleSource, SampleSourceReader,
...
@@ -135,14 +135,14 @@ public final class HlsSampleSource implements SampleSource, SampleSourceReader,
trackEnabledStates
=
new
boolean
[
trackCount
];
trackEnabledStates
=
new
boolean
[
trackCount
];
pendingDiscontinuities
=
new
boolean
[
trackCount
];
pendingDiscontinuities
=
new
boolean
[
trackCount
];
downstreamMediaFormats
=
new
MediaFormat
[
trackCount
];
downstreamMediaFormats
=
new
MediaFormat
[
trackCount
];
mediaFormats
=
new
MediaFormat
[
trackCount
];
trackFormat
=
new
MediaFormat
[
trackCount
];
long
durationUs
=
chunkSource
.
getDurationUs
();
long
durationUs
=
chunkSource
.
getDurationUs
();
for
(
int
i
=
0
;
i
<
trackCount
;
i
++)
{
for
(
int
i
=
0
;
i
<
trackCount
;
i
++)
{
MediaFormat
format
=
extractor
.
getMediaFormat
(
i
).
copyWithDurationUs
(
durationUs
);
MediaFormat
format
=
extractor
.
getMediaFormat
(
i
).
copyWithDurationUs
(
durationUs
);
if
(
MimeTypes
.
isVideo
(
format
.
mimeType
))
{
if
(
MimeTypes
.
isVideo
(
format
.
mimeType
))
{
format
=
format
.
copyAsAdaptive
();
format
=
format
.
copyAsAdaptive
();
}
}
mediaFormats
[
i
]
=
format
;
trackFormat
[
i
]
=
format
;
}
}
prepared
=
true
;
prepared
=
true
;
return
true
;
return
true
;
...
@@ -176,7 +176,7 @@ public final class HlsSampleSource implements SampleSource, SampleSourceReader,
...
@@ -176,7 +176,7 @@ public final class HlsSampleSource implements SampleSource, SampleSourceReader,
@Override
@Override
public
MediaFormat
getFormat
(
int
track
)
{
public
MediaFormat
getFormat
(
int
track
)
{
Assertions
.
checkState
(
prepared
);
Assertions
.
checkState
(
prepared
);
return
mediaFormats
[
track
];
return
trackFormat
[
track
];
}
}
@Override
@Override
...
...
library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingChunkSource.java
View file @
4b299126
...
@@ -180,7 +180,7 @@ public class SmoothStreamingChunkSource implements ChunkSource,
...
@@ -180,7 +180,7 @@ public class SmoothStreamingChunkSource implements ChunkSource,
@Override
@Override
public
final
MediaFormat
getFormat
(
int
track
)
{
public
final
MediaFormat
getFormat
(
int
track
)
{
return
tracks
.
get
(
track
).
f
ormat
;
return
tracks
.
get
(
track
).
trackF
ormat
;
}
}
@Override
@Override
...
@@ -512,7 +512,7 @@ public class SmoothStreamingChunkSource implements ChunkSource,
...
@@ -512,7 +512,7 @@ public class SmoothStreamingChunkSource implements ChunkSource,
private
static
final
class
ExposedTrack
{
private
static
final
class
ExposedTrack
{
public
final
MediaFormat
f
ormat
;
public
final
MediaFormat
trackF
ormat
;
private
final
int
elementIndex
;
private
final
int
elementIndex
;
...
@@ -524,8 +524,8 @@ public class SmoothStreamingChunkSource implements ChunkSource,
...
@@ -524,8 +524,8 @@ public class SmoothStreamingChunkSource implements ChunkSource,
private
final
int
adaptiveMaxWidth
;
private
final
int
adaptiveMaxWidth
;
private
final
int
adaptiveMaxHeight
;
private
final
int
adaptiveMaxHeight
;
public
ExposedTrack
(
MediaFormat
f
ormat
,
int
elementIndex
,
Format
fixedFormat
)
{
public
ExposedTrack
(
MediaFormat
trackF
ormat
,
int
elementIndex
,
Format
fixedFormat
)
{
this
.
format
=
f
ormat
;
this
.
trackFormat
=
trackF
ormat
;
this
.
elementIndex
=
elementIndex
;
this
.
elementIndex
=
elementIndex
;
this
.
fixedFormat
=
fixedFormat
;
this
.
fixedFormat
=
fixedFormat
;
this
.
adaptiveFormats
=
null
;
this
.
adaptiveFormats
=
null
;
...
@@ -533,9 +533,9 @@ public class SmoothStreamingChunkSource implements ChunkSource,
...
@@ -533,9 +533,9 @@ public class SmoothStreamingChunkSource implements ChunkSource,
this
.
adaptiveMaxHeight
=
MediaFormat
.
NO_VALUE
;
this
.
adaptiveMaxHeight
=
MediaFormat
.
NO_VALUE
;
}
}
public
ExposedTrack
(
MediaFormat
f
ormat
,
int
elementIndex
,
Format
[]
adaptiveFormats
,
public
ExposedTrack
(
MediaFormat
trackF
ormat
,
int
elementIndex
,
Format
[]
adaptiveFormats
,
int
adaptiveMaxWidth
,
int
adaptiveMaxHeight
)
{
int
adaptiveMaxWidth
,
int
adaptiveMaxHeight
)
{
this
.
format
=
f
ormat
;
this
.
trackFormat
=
trackF
ormat
;
this
.
elementIndex
=
elementIndex
;
this
.
elementIndex
=
elementIndex
;
this
.
adaptiveFormats
=
adaptiveFormats
;
this
.
adaptiveFormats
=
adaptiveFormats
;
this
.
adaptiveMaxWidth
=
adaptiveMaxWidth
;
this
.
adaptiveMaxWidth
=
adaptiveMaxWidth
;
...
...
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