Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
530
Issue boards
Milestones
Wiki
Code
Merge requests
15
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
40362990
Commit
40362990
authored
5 years ago
by
Thomas Guillem
Browse files
Options
Downloads
Patches
Plain Diff
LibVLC: handle hw decoding option for LibVLC 4.0
parent
dbf1e339
No related branches found
No related tags found
1 merge request
!395
Libvlc4 fixes
Pipeline
#12924
passed with stage
in 23 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libvlc/src/org/videolan/libvlc/Media.java
+7
-0
7 additions, 0 deletions
libvlc/src/org/videolan/libvlc/Media.java
with
7 additions
and
0 deletions
libvlc/src/org/videolan/libvlc/Media.java
+
7
−
0
View file @
40362990
...
...
@@ -449,6 +449,8 @@ public class Media extends VLCObject<IMedia.Event> implements IMedia {
* @param force force hw acceleration even for unknown devices
*/
public
void
setHWDecoderEnabled
(
boolean
enabled
,
boolean
force
)
{
if
(
LibVLC
.
majorVersion
()
==
3
)
{
HWDecoderUtil
.
Decoder
decoder
=
enabled
?
HWDecoderUtil
.
getDecoderFromDevice
()
:
HWDecoderUtil
.
Decoder
.
NONE
;
...
...
@@ -484,12 +486,16 @@ public class Media extends VLCObject<IMedia.Event> implements IMedia {
sb
.
append
(
"all"
);
addOption
(
sb
.
toString
());
}
else
if
(!
enabled
)
/* LibVLC >= 4.0 */
addOption
(
":no-decoder-hw"
);
}
/**
* Enable HWDecoder options if not already set
*/
public
void
setDefaultMediaPlayerOptions
()
{
if
(
LibVLC
.
majorVersion
()
==
3
)
{
boolean
codecOptionSet
;
synchronized
(
this
)
{
codecOptionSet
=
mCodecOptionSet
;
...
...
@@ -497,6 +503,7 @@ public class Media extends VLCObject<IMedia.Event> implements IMedia {
}
if
(!
codecOptionSet
)
setHWDecoderEnabled
(
true
,
false
);
}
/* dvdnav need to be explicitly forced for network playbacks */
if
(
mUri
!=
null
&&
mUri
.
getScheme
()
!=
null
&&
!
mUri
.
getScheme
().
equalsIgnoreCase
(
"file"
)
&&
...
...
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