Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
532
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
108d27ba
Commit
108d27ba
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Code factorization
parent
7c47d44d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libvlc/src/org/videolan/libvlc/util/VLCUtil.java
+13
-24
13 additions, 24 deletions
libvlc/src/org/videolan/libvlc/util/VLCUtil.java
with
13 additions
and
24 deletions
libvlc/src/org/videolan/libvlc/util/VLCUtil.java
+
13
−
24
View file @
108d27ba
...
...
@@ -32,6 +32,7 @@ import org.videolan.libvlc.LibVLC;
import
org.videolan.libvlc.Media
;
import
java.io.BufferedReader
;
import
java.io.Closeable
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.FileReader
;
...
...
@@ -170,14 +171,8 @@ public class VLCUtil {
}
}
catch
(
IOException
ignored
)
{
}
finally
{
if
(
br
!=
null
)
try
{
br
.
close
();
}
catch
(
IOException
e
)
{}
if
(
fileReader
!=
null
)
try
{
fileReader
.
close
();
}
catch
(
IOException
e
)
{}
close
(
br
);
close
(
fileReader
);
}
if
(
processors
==
0
)
processors
=
1
;
// possibly borked cpuinfo?
...
...
@@ -243,14 +238,8 @@ public class VLCUtil {
Log
.
w
(
TAG
,
"Could not parse maximum CPU frequency!"
);
Log
.
w
(
TAG
,
"Failed to parse: "
+
line
);
}
finally
{
if
(
br
!=
null
)
try
{
br
.
close
();
}
catch
(
IOException
ignored
)
{}
if
(
fileReader
!=
null
)
try
{
fileReader
.
close
();
}
catch
(
IOException
ignored
)
{}
close
(
br
);
close
(
fileReader
);
}
// Store into MachineSpecs
...
...
@@ -372,16 +361,10 @@ public class VLCUtil {
return
null
;
}
return
elf
;
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
if
(
in
!=
null
)
in
.
close
();
}
catch
(
IOException
e
)
{
}
close
(
in
);
}
return
null
;
}
...
...
@@ -566,7 +549,6 @@ public class VLCUtil {
else
sb
.
append
(
c
);
}
return
sb
.
toString
();
}
...
...
@@ -592,5 +574,12 @@ public class VLCUtil {
return
nativeGetThumbnail
(
media
,
i_width
,
i_height
);
}
private
static
void
close
(
Closeable
closeable
)
{
if
(
closeable
!=
null
)
try
{
closeable
.
close
();
}
catch
(
IOException
ignored
)
{}
}
private
static
native
byte
[]
nativeGetThumbnail
(
Media
media
,
int
i_width
,
int
i_height
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment