Commit 8082f750 authored by Thomas Guillem's avatar Thomas Guillem

LibVLC: allow to force hw accel on unknow devices

Mainly for 4.2.x devices when the user asked for it.
parent 08c2b0fa
......@@ -735,12 +735,15 @@ public class Media extends VLCObject<Media.Event> {
* @param force force hw acceleration even for unknown devices
*/
public void setHWDecoderEnabled(boolean enabled, boolean force) {
final HWDecoderUtil.Decoder decoder = enabled ?
HWDecoderUtil.Decoder decoder = enabled ?
HWDecoderUtil.getDecoderFromDevice() :
HWDecoderUtil.Decoder.NONE;
if (decoder == HWDecoderUtil.Decoder.NONE ||
(decoder == HWDecoderUtil.Decoder.UNKNOWN && !force)) {
/* Unknown device but the user asked for hardware acceleration */
if (decoder == HWDecoderUtil.Decoder.UNKNOWN && force)
decoder = HWDecoderUtil.Decoder.ALL;
if (decoder == HWDecoderUtil.Decoder.NONE || decoder == HWDecoderUtil.Decoder.UNKNOWN) {
addOption(":codec=all");
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment