Commit 41642e77 authored by Petri Hintukainen's avatar Petri Hintukainen

havi: use S3D/UHD configuration templates when running as profile 5 or 6 player

parent c9da2197
/*
* This file is part of libbluray
* Copyright (C) 2010 William Hahne
* Copyright (C) 2019 Petri Hintukainen <phintuka@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -19,14 +20,26 @@
package org.havi.ui;
import org.blurayx.s3d.ui.HBackgroundConfigTemplateS3D;
import org.blurayx.uhd.ui.HBackgroundConfigurationTemplateUHD;
import java.awt.Color;
public class HBackgroundDevice extends HScreenDevice {
protected HBackgroundDevice() {
boolean is_p6 = isProfile6();
boolean is_p5 = isProfile5();
int length = HScreenConfigTemplate.defaultConfig.length;
hbcArray = new HBackgroundConfiguration[length];
for (int i = 0; i < length; i++) {
HBackgroundConfigTemplate hbct = new HBackgroundConfigTemplate();
HBackgroundConfigTemplate hbct;
if (is_p6) {
hbct = new HBackgroundConfigurationTemplateUHD();
} else if (is_p5) {
hbct = new HBackgroundConfigTemplateS3D();
} else {
hbct = new HBackgroundConfigTemplate();
}
HScreenConfigTemplate.initDefaultConfigTemplate(hbct, i);
hbcArray[i] = new HStillImageBackgroundConfiguration(hbct, new Color(0, 0, 0, 0));
}
......
/*
* This file is part of libbluray
* Copyright (C) 2010 William Hahne
* Copyright (C) 2019 Petri Hintukainen <phintuka@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -19,6 +20,9 @@
package org.havi.ui;
import org.blurayx.s3d.ui.HGraphicsConfigTemplateS3D;
import org.blurayx.uhd.ui.HGraphicsConfigurationTemplateUHD;
import java.awt.Dimension;
import org.videolan.GUIManager;
......@@ -26,10 +30,19 @@ import org.videolan.Logger;
public class HGraphicsDevice extends HScreenDevice {
protected HGraphicsDevice() {
boolean is_p6 = isProfile6();
boolean is_p5 = isProfile5();
int length = HScreenConfigTemplate.defaultConfig.length;
hgcArray = new HGraphicsConfiguration[length];
for (int i = 0; i < length; i++) {
HGraphicsConfigTemplate hgct = new HGraphicsConfigTemplate();
HGraphicsConfigTemplate hgct;
if (is_p6) {
hgct = new HGraphicsConfigurationTemplateUHD();
} else if (is_p5) {
hgct = new HGraphicsConfigTemplateS3D();
} else {
hgct = new HGraphicsConfigTemplate();
}
HScreenConfigTemplate.initDefaultConfigTemplate(hgct, i);
hgcArray[i] = new HGraphicsConfiguration(hgct);
}
......
/*
* This file is part of libbluray
* Copyright (C) 2010 William Hahne
* Copyright (C) 2019 Petri Hintukainen <phintuka@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -38,6 +39,15 @@ public class HScreenDevice implements ResourceProxy, ResourceServer {
HScreenDevice() {
}
protected boolean isProfile5() {
String p = System.getProperty("bluray.profile.5");
return (p != null && p.equals("YES"));
}
protected boolean isProfile6() {
String p = System.getProperty("bluray.profile.6");
return (p != null && p.equals("YES"));
}
public String getIDstring() {
return "HAVi Screen Device";
}
......
/*
* This file is part of libbluray
* Copyright (C) 2010 William Hahne
* Copyright (C) 2019 Petri Hintukainen <phintuka@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -19,12 +20,24 @@
package org.havi.ui;
import org.blurayx.s3d.ui.HVideoConfigTemplateS3D;
import org.blurayx.uhd.ui.HVideoConfigurationTemplateUHD;
public class HVideoDevice extends HScreenDevice {
protected HVideoDevice() {
boolean is_p6 = isProfile6();
boolean is_p5 = isProfile5();
int length = HScreenConfigTemplate.defaultConfig.length;
hvcArray = new HVideoConfiguration[length];
for (int i = 0; i < length; i++) {
HVideoConfigTemplate hvct = new HVideoConfigTemplate();
HVideoConfigTemplate hvct;
if (is_p6) {
hvct = new HVideoConfigurationTemplateUHD();
} else if (is_p5) {
hvct = new HVideoConfigTemplateS3D();
} else {
hvct = new HVideoConfigTemplate();
}
HScreenConfigTemplate.initDefaultConfigTemplate(hvct, i);
hvcArray[i] = new HVideoConfiguration(hvct);
}
......
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