1
0
Fork 0

Add org.blurayx.uhd interfaces

This commit is contained in:
hpi1 2017-08-25 09:38:10 +03:00
parent 7354991d58
commit 0f19e7b872
8 changed files with 346 additions and 0 deletions

View File

@ -0,0 +1,27 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.system;
public abstract interface UHDRegisters {
public static final int PSR_UHD_CAPABILITY = 25;
public static final int PSR_UHD_DISPLAY_CAPABILITY = 26;
public static final int PSR_UHD_HDR_PREFERENCE = 27;
public static final int PSR_UHD_SDR_CONVERSION_PREFERENCE = 28;
}

View File

@ -0,0 +1,47 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ti;
import java.lang.reflect.Constructor;
import java.security.AccessController;
import java.security.PrivilegedAction;
import org.bluray.ti.CodingType;
public class UHDCodingType {
public static final CodingType HEVC_VIDEO =
(CodingType)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
CodingType type = null;
try {
Class classCodingType = Class.forName("org.bluray.ti.CodingType");
Constructor constructor = classCodingType.getDeclaredConstructor(new Class[] { String.class });
constructor.setAccessible(true);
type = (CodingType)constructor.newInstance(new String[] { "HEVC_VIDEO" });
}
catch (Exception e) {
System.err.println("UHDCodingType.HEVC_VIDEO initialization failed");
e.printStackTrace();
}
return type;
}
});
}

View File

@ -0,0 +1,39 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ui;
public class ColorSpaceProperty {
private String name = null;
public static final ColorSpaceProperty BT709 = new ColorSpaceProperty("BT.709");
public static final ColorSpaceProperty BT2020 = new ColorSpaceProperty("BT.2020");
protected ColorSpaceProperty(String name) {
this.name = name;
if (name == null) {
throw new NullPointerException("name is null");
}
}
public String toString() {
return getClass().getName() + "[" + name + "]";
}
}

View File

@ -0,0 +1,25 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ui;
public abstract class DeviceConfigurationsUHD {
public static final int HD_1920_1080 = 1;
public static final int UHD_1920_1080 = 7;
}

View File

@ -0,0 +1,65 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ui;
public class DynamicRangeProperty {
private String name = null;
public static final DynamicRangeProperty SDR = new DynamicRangeProperty("SDR");
public static final DynamicRangeProperty BDMV_HDR = new DynamicRangeProperty("BDMV_HDR");
public static final DynamicRangeProperty OPTION_A = new DynamicRangeProperty("OPTION_A");
public static final DynamicRangeProperty OPTION_B = new DynamicRangeProperty("OPTION_B");
public static final DynamicRangeProperty OPTION_C = new DynamicRangeProperty("OPTION_C");
public static final DynamicRangeProperty OPTION_D = new DynamicRangeProperty("OPTION_D");
public static final DynamicRangeProperty OPTION_E = new DynamicRangeProperty("OPTION_E");
public static final DynamicRangeProperty OPTION_F = new DynamicRangeProperty("OPTION_F");
public static final DynamicRangeProperty OPTION_G = new DynamicRangeProperty("OPTION_G");
public static final DynamicRangeProperty OPTION_H = new DynamicRangeProperty("OPTION_H");
public static final DynamicRangeProperty OPTION_I = new DynamicRangeProperty("OPTION_I");
public static final DynamicRangeProperty OPTION_J = new DynamicRangeProperty("OPTION_J");
public static final DynamicRangeProperty OPTION_K = new DynamicRangeProperty("OPTION_K");
public static final DynamicRangeProperty OPTION_L = new DynamicRangeProperty("OPTION_L");
public static final DynamicRangeProperty OPTION_M = new DynamicRangeProperty("OPTION_M");
public static final DynamicRangeProperty OPTION_N = new DynamicRangeProperty("OPTION_N");
public static final DynamicRangeProperty OPTION_O = new DynamicRangeProperty("OPTION_O");
public static final DynamicRangeProperty OPTION_P = new DynamicRangeProperty("OPTION_P");
public static final DynamicRangeProperty OPTION_Q = new DynamicRangeProperty("OPTION_Q");
public static final DynamicRangeProperty OPTION_R = new DynamicRangeProperty("OPTION_R");
public static final DynamicRangeProperty OPTION_S = new DynamicRangeProperty("OPTION_S");
public static final DynamicRangeProperty OPTION_T = new DynamicRangeProperty("OPTION_T");
public static final DynamicRangeProperty OPTION_U = new DynamicRangeProperty("OPTION_U");
public static final DynamicRangeProperty OPTION_V = new DynamicRangeProperty("OPTION_V");
public static final DynamicRangeProperty OPTION_W = new DynamicRangeProperty("OPTION_W");
public static final DynamicRangeProperty OPTION_X = new DynamicRangeProperty("OPTION_X");
public static final DynamicRangeProperty OPTION_Y = new DynamicRangeProperty("OPTION_Y");
public static final DynamicRangeProperty OPTION_Z = new DynamicRangeProperty("OPTION_Z");
protected DynamicRangeProperty(String name) {
this.name = name;
if (name == null) {
throw new NullPointerException("name is null");
}
}
public String toString() {
return getClass().getName() + "[" + name + "]";
}
}

View File

@ -0,0 +1,46 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ui;
import org.havi.ui.HBackgroundConfigTemplate;
public class HBackgroundConfigurationTemplateUHD extends HBackgroundConfigTemplate {
public static final int DYNAMIC_RANGE = 18;
protected int getPreferenceCount() {
return super.getPreferenceCount() + 1;
}
protected int getPreferenceObjectCount() {
return super.getPreferenceObjectCount() + 1;
}
protected int getPreferenceIndex(int preference) {
if (preference == DYNAMIC_RANGE)
return super.getPreferenceCount();
return super.getPreferenceIndex(preference);
}
protected int getPreferenceObjectIndex(int preference) {
if (preference == DYNAMIC_RANGE)
return super.getPreferenceObjectCount();
return super.getPreferenceObjectIndex(preference);
}
}

View File

@ -0,0 +1,46 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ui;
import org.havi.ui.HGraphicsConfigTemplate;
public class HGraphicsConfigurationTemplateUHD extends HGraphicsConfigTemplate {
public static final int DYNAMIC_RANGE = 18;
protected int getPreferenceCount() {
return super.getPreferenceCount() + 1;
}
protected int getPreferenceObjectCount() {
return super.getPreferenceObjectCount() + 1;
}
protected int getPreferenceIndex(int preference) {
if (preference == DYNAMIC_RANGE)
return super.getPreferenceCount();
return super.getPreferenceIndex(preference);
}
protected int getPreferenceObjectIndex(int preference) {
if (preference == DYNAMIC_RANGE)
return super.getPreferenceObjectCount();
return super.getPreferenceObjectIndex(preference);
}
}

View File

@ -0,0 +1,51 @@
/*
* This file is part of libbluray
* Copyright (C) 2017 VideoLAN
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.blurayx.uhd.ui;
import org.bluray.ui.BDVideoConfigTemplate;
public class HVideoConfigurationTemplateUHD extends BDVideoConfigTemplate {
public static final int DYNAMIC_RANGE = 18;
public static final int COLOR_SPACE = 19;
protected int getPreferenceCount() {
return super.getPreferenceCount() + 2;
}
protected int getPreferenceObjectCount() {
return super.getPreferenceObjectCount() + 2;
}
protected int getPreferenceIndex(int preference) {
if (preference == DYNAMIC_RANGE)
return super.getPreferenceCount();
else if (preference == COLOR_SPACE)
return super.getPreferenceCount() + 1;
return super.getPreferenceIndex(preference);
}
protected int getPreferenceObjectIndex(int preference) {
if (preference == DYNAMIC_RANGE)
return super.getPreferenceObjectCount();
else if (preference == COLOR_SPACE)
return super.getPreferenceObjectCount() + 1;
return super.getPreferenceObjectIndex(preference);
}
}