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
ea7caf4f
authored
Aug 19, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Bit of a hack to pass through original MediaFormat from FrameworkSampleSource.
parent
c9d98080
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
library/src/main/java/com/google/android/exoplayer/FrameworkSampleSource.java
library/src/main/java/com/google/android/exoplayer/MediaFormat.java
library/src/main/java/com/google/android/exoplayer/FrameworkSampleSource.java
View file @
ea7caf4f
...
@@ -315,10 +315,12 @@ public final class FrameworkSampleSource implements SampleSource, SampleSourceRe
...
@@ -315,10 +315,12 @@ public final class FrameworkSampleSource implements SampleSource, SampleSourceRe
}
}
long
durationUs
=
format
.
containsKey
(
android
.
media
.
MediaFormat
.
KEY_DURATION
)
long
durationUs
=
format
.
containsKey
(
android
.
media
.
MediaFormat
.
KEY_DURATION
)
?
format
.
getLong
(
android
.
media
.
MediaFormat
.
KEY_DURATION
)
:
C
.
UNKNOWN_TIME_US
;
?
format
.
getLong
(
android
.
media
.
MediaFormat
.
KEY_DURATION
)
:
C
.
UNKNOWN_TIME_US
;
return
new
MediaFormat
(
mimeType
,
maxInputSize
,
durationUs
,
width
,
height
,
rotationDegrees
,
MediaFormat
mediaFormat
=
new
MediaFormat
(
mimeType
,
maxInputSize
,
durationUs
,
width
,
height
,
MediaFormat
.
NO_VALUE
,
channelCount
,
sampleRate
,
language
,
rotationDegrees
,
MediaFormat
.
NO_VALUE
,
channelCount
,
sampleRate
,
language
,
MediaFormat
.
OFFSET_SAMPLE_RELATIVE
,
initializationData
,
false
,
MediaFormat
.
NO_VALUE
,
MediaFormat
.
OFFSET_SAMPLE_RELATIVE
,
initializationData
,
false
,
MediaFormat
.
NO_VALUE
,
MediaFormat
.
NO_VALUE
);
MediaFormat
.
NO_VALUE
);
mediaFormat
.
setFrameworkFormatV16
(
format
);
return
mediaFormat
;
}
}
@TargetApi
(
16
)
@TargetApi
(
16
)
...
...
library/src/main/java/com/google/android/exoplayer/MediaFormat.java
View file @
ea7caf4f
...
@@ -262,6 +262,18 @@ public final class MediaFormat {
...
@@ -262,6 +262,18 @@ public final class MediaFormat {
return
frameworkMediaFormat
;
return
frameworkMediaFormat
;
}
}
/**
* Sets the framework format returned by {@link #getFrameworkMediaFormatV16()}.
*
* @deprecated This method only exists for FrameworkSampleSource, which is itself deprecated.
* @param format The framework format.
*/
@Deprecated
@TargetApi
(
16
)
/* package */
final
void
setFrameworkFormatV16
(
android
.
media
.
MediaFormat
format
)
{
frameworkMediaFormat
=
format
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"MediaFormat("
+
mimeType
+
", "
+
maxInputSize
+
", "
+
width
+
", "
+
height
+
", "
return
"MediaFormat("
+
mimeType
+
", "
+
maxInputSize
+
", "
+
width
+
", "
+
height
+
", "
...
...
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