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
4aee221f
authored
May 19, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix webm demo
parent
e3a7fc4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
demo_misc/webm_sw_decoder/src/main/java/com/google/android/exoplayer/demo/webm/DashRendererBuilder.java
demo_misc/webm_sw_decoder/src/main/java/com/google/android/exoplayer/demo/webm/VideoPlayer.java
demo_misc/webm_sw_decoder/src/main/java/com/google/android/exoplayer/demo/webm/DashRendererBuilder.java
View file @
4aee221f
...
...
@@ -54,9 +54,9 @@ public class DashRendererBuilder implements ManifestCallback<MediaPresentationDe
private
static
final
int
VIDEO_BUFFER_SEGMENTS
=
200
;
private
static
final
int
AUDIO_BUFFER_SEGMENTS
=
60
;
private
String
manifestUrl
;
private
String
userAgent
;
private
VideoPlayer
player
;
private
final
String
manifestUrl
;
private
final
String
userAgent
;
private
final
VideoPlayer
player
;
public
DashRendererBuilder
(
String
manifestUrl
,
String
userAgent
,
VideoPlayer
player
)
{
this
.
manifestUrl
=
manifestUrl
;
...
...
@@ -105,7 +105,7 @@ public class DashRendererBuilder implements ManifestCallback<MediaPresentationDe
// Build the video renderer.
LibvpxVideoTrackRenderer
videoRenderer
=
null
;
if
(!
videoRepresentationsList
.
isEmpty
())
{
DataSource
videoDataSource
=
new
DefaultUriDataSource
(
userAgent
,
bandwidthMeter
);
DataSource
videoDataSource
=
new
DefaultUriDataSource
(
player
,
bandwidthMeter
,
userAgent
);
ChunkSource
videoChunkSource
;
String
mimeType
=
videoRepresentations
[
0
].
format
.
mimeType
;
if
(
mimeType
.
equals
(
MimeTypes
.
VIDEO_WEBM
))
{
...
...
@@ -124,7 +124,7 @@ public class DashRendererBuilder implements ManifestCallback<MediaPresentationDe
MultiTrackChunkSource
audioChunkSource
=
null
;
TrackRenderer
audioRenderer
=
null
;
if
(!
audioRepresentationsList
.
isEmpty
())
{
DataSource
audioDataSource
=
new
DefaultUriDataSource
(
userAgent
,
bandwidthMeter
);
DataSource
audioDataSource
=
new
DefaultUriDataSource
(
player
,
bandwidthMeter
,
userAgent
);
ChunkSource
[]
audioChunkSources
=
new
ChunkSource
[
audioRepresentationsList
.
size
()];
FormatEvaluator
audioEvaluator
=
new
FormatEvaluator
.
FixedEvaluator
();
for
(
int
i
=
0
;
i
<
audioRepresentationsList
.
size
();
i
++)
{
...
...
demo_misc/webm_sw_decoder/src/main/java/com/google/android/exoplayer/demo/webm/VideoPlayer.java
View file @
4aee221f
...
...
@@ -160,7 +160,7 @@ public class VideoPlayer extends Activity implements OnClickListener,
mediaController
.
setEnabled
(
true
);
ExtractorSampleSource
sampleSource
=
new
ExtractorSampleSource
(
Uri
.
fromFile
(
new
File
(
filename
)),
new
DefaultUriDataSource
(
Util
.
getUserAgent
(
this
,
"ExoPlayerExtWebMDemo"
),
null
),
new
DefaultUriDataSource
(
this
,
Util
.
getUserAgent
(
this
,
"ExoPlayerExtWebMDemo"
)
),
new
WebmExtractor
(),
2
,
EXTRACTOR_BUFFER_SIZE
);
TrackRenderer
videoRenderer
=
new
LibvpxVideoTrackRenderer
(
sampleSource
,
true
,
handler
,
this
,
50
);
...
...
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