Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
ed726b62
Commit
ed726b62
authored
Mar 31, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HWDecoderUtil: use a DecoderBySOC per key/value
parent
b8933e19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
36 deletions
+30
-36
libvlc/src/org/videolan/libvlc/HWDecoderUtil.java
libvlc/src/org/videolan/libvlc/HWDecoderUtil.java
+30
-36
No files found.
libvlc/src/org/videolan/libvlc/HWDecoderUtil.java
View file @
ed726b62
...
...
@@ -32,14 +32,15 @@ public class HWDecoderUtil {
UNKNOWN
,
NONE
,
OMX
,
MEDIACODEC
,
ALL
}
private
static
class
DecoderBySOC
{
public
final
String
key
;
public
final
String
value
;
public
final
Decoder
dec
;
public
final
String
[]
list
;
public
DecoderBySOC
(
String
key
,
Decoder
dec
,
String
[]
list
)
{
public
DecoderBySOC
(
String
key
,
String
value
,
Decoder
dec
)
{
this
.
key
=
key
;
this
.
value
=
value
;
this
.
dec
=
dec
;
this
.
list
=
list
;
}
}
...
...
@@ -48,42 +49,36 @@ public class HWDecoderUtil {
* Put first devices you want to blacklist
* because theses devices can match the next rules.
*/
new
DecoderBySOC
(
"ro.product.brand"
,
Decoder
.
NONE
,
new
String
[]
{
"SEMC"
,
// Xperia S
}),
new
DecoderBySOC
(
"ro.board.platform"
,
Decoder
.
NONE
,
new
String
[]
{
"msm7627"
,
// QCOM S1
}),
new
DecoderBySOC
(
"ro.product.brand"
,
"SEMC"
,
Decoder
.
NONE
),
// Xperia S
new
DecoderBySOC
(
"ro.board.platform"
,
"msm7627"
,
Decoder
.
NONE
),
// QCOM S1
/*
* Devices working on OMX
*/
new
DecoderBySOC
(
"ro.board.platform"
,
Decoder
.
OMX
,
new
String
[]
{
"omap3"
,
// Omap 3
"rockchip"
,
"rk29"
,
// Rockchip RK29
"msm7630"
,
// QCOM S2
"s5pc"
,
// Exynos 3
"montblanc"
,
// Montblanc
"exdroid"
,
// Allwinner A31
}),
new
DecoderBySOC
(
"ro.hardware"
,
Decoder
.
OMX
,
new
String
[]
{
"sun6i"
,
// Allwinner A31
}),
new
DecoderBySOC
(
"ro.board.platform"
,
"omap3"
,
Decoder
.
OMX
),
// Omap 3
new
DecoderBySOC
(
"ro.board.platform"
,
"rockchip"
,
Decoder
.
OMX
),
// Rockchip RK29
new
DecoderBySOC
(
"ro.board.platform"
,
"rk29"
,
Decoder
.
OMX
),
// Rockchip RK29
new
DecoderBySOC
(
"ro.board.platform"
,
"msm7630"
,
Decoder
.
OMX
),
// QCOM S2
new
DecoderBySOC
(
"ro.board.platform"
,
"s5pc"
,
Decoder
.
OMX
),
// Exynos 3
new
DecoderBySOC
(
"ro.board.platform"
,
"montblanc"
,
Decoder
.
OMX
),
// Montblanc
new
DecoderBySOC
(
"ro.board.platform"
,
"exdroid"
,
Decoder
.
OMX
),
// Allwinner A31
new
DecoderBySOC
(
"ro.board.platform"
,
"sun6i"
,
Decoder
.
OMX
),
// Allwinner A31
/*
* Devices working on Mediacodec and OMX
*/
new
DecoderBySOC
(
"ro.board.platform"
,
Decoder
.
ALL
,
new
String
[]
{
"omap4"
,
// Omap 4
"tegra"
,
// Tegra 2 & 3
"tegra3"
,
// Tegra 3
"msm8660"
,
// QCOM S3
"exynos4"
,
// Exynos 4 (Samsung Galaxy S2/S3)
"exynos5"
,
// Exynos 5 (Samsung Galaxy S4)
"rk30"
,
"rk31"
,
// Rockchip RK3*
"mv88de3100"
,
// Marvell ARMADA 1500
}),
new
DecoderBySOC
(
"ro.hardware"
,
Decoder
.
ALL
,
new
String
[]
{
"mt65"
,
"mt83"
,
// MTK
}),
new
DecoderBySOC
(
"ro.board.platform"
,
"omap4"
,
Decoder
.
ALL
),
// Omap 4
new
DecoderBySOC
(
"ro.board.platform"
,
"tegra"
,
Decoder
.
ALL
),
// Tegra 2 & 3
new
DecoderBySOC
(
"ro.board.platform"
,
"tegra3"
,
Decoder
.
ALL
),
// Tegra 3
new
DecoderBySOC
(
"ro.board.platform"
,
"msm8660"
,
Decoder
.
ALL
),
// QCOM S3
new
DecoderBySOC
(
"ro.board.platform"
,
"exynos4"
,
Decoder
.
ALL
),
// Exynos 4 (Samsung Galaxy S2/S3)
new
DecoderBySOC
(
"ro.board.platform"
,
"exynos5"
,
Decoder
.
ALL
),
// Exynos 5 (Samsung Galaxy S4)
new
DecoderBySOC
(
"ro.board.platform"
,
"rk30"
,
Decoder
.
ALL
),
// Rockchip RK30
new
DecoderBySOC
(
"ro.board.platform"
,
"rk31"
,
Decoder
.
ALL
),
// Rockchip RK31
new
DecoderBySOC
(
"ro.board.platform"
,
"mv88de3100"
,
Decoder
.
ALL
),
// Marvell ARMADA 1500
new
DecoderBySOC
(
"ro.hardware"
,
"mt65"
,
Decoder
.
ALL
),
//MTK
new
DecoderBySOC
(
"ro.hardware"
,
"mt83"
,
Decoder
.
ALL
),
//MTK
};
private
static
final
HashMap
<
String
,
String
>
sSystemPropertyMap
=
new
HashMap
<
String
,
String
>();
...
...
@@ -108,9 +103,8 @@ public class HWDecoderUtil {
sSystemPropertyMap
.
put
(
decBySOC
.
key
,
prop
);
}
if
(
prop
!=
null
)
{
for
(
String
decProp:
decBySOC
.
list
)
if
(
prop
.
contains
(
decProp
))
return
decBySOC
.
dec
;
if
(
prop
.
contains
(
decBySOC
.
value
))
return
decBySOC
.
dec
;
}
}
}
...
...
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