Commit 468a1c65 authored by Petri Hintukainen's avatar Petri Hintukainen

Cosmetics

parent 3c8026b1
......@@ -30,38 +30,27 @@ public class CodingType {
return name;
}
public static final CodingType DOLBY_AC3_AUDIO = new CodingType(
"DOLBY_AC3_AUDIO");
public static final CodingType DOLBY_DIGITAL_PLUS_AUDIO = new CodingType(
"DOLBY_DIGITAL_PLUS_AUDIO");
public static final CodingType DOLBY_LOSSLESS_AUDIO = new CodingType(
"DOLBY_LOSSLESS_AUDIO");
public static final CodingType DRA_AUDIO = new CodingType("DRA_AUDIO");
public static final CodingType DRA_EXTENSION_AUDIO = new CodingType(
"DRA_EXTENSION_AUDIO");
public static final CodingType DTS_AUDIO = new CodingType("DTS_AUDIO");
public static final CodingType DTS_HD_AUDIO = new CodingType("DTS_HD_AUDIO");
public static final CodingType DTS_HD_AUDIO_EXCEPT_XLL = new CodingType(
"DTS_HD_AUDIO_EXCEPT_XLL");
public static final CodingType DTS_HD_AUDIO_LBR = new CodingType(
"DTS_HD_AUDIO_LBR");
public static final CodingType DTS_HD_AUDIO_XLL = new CodingType(
"DTS_HD_AUDIO_XLL");
public static final CodingType INTERACTIVE_GRAPHICS = new CodingType(
"INTERACTIVE_GRAPHICS");
public static final CodingType LPCM_AUDIO = new CodingType("LPCM_AUDIO");
public static final CodingType MPEG2_VIDEO = new CodingType("MPEG2_VIDEO");
public static final CodingType MPEG4_AVC_VIDEO = new CodingType(
"MPEG4_AVC_VIDEO");
public static final CodingType PRESENTATION_GRAPHICS = new CodingType(
"PRESENTATION_GRAPHICS");
public static final CodingType SMPTE_VC1_VIDEO = new CodingType(
"SMPTE_VC1_VIDEO");
public static final CodingType TEXT_SUBTITLE = new CodingType(
"TEXT_SUBTITLE");
public static final CodingType DOLBY_AC3_AUDIO = new CodingType("DOLBY_AC3_AUDIO");
public static final CodingType DOLBY_DIGITAL_PLUS_AUDIO = new CodingType("DOLBY_DIGITAL_PLUS_AUDIO");
public static final CodingType DOLBY_LOSSLESS_AUDIO = new CodingType("DOLBY_LOSSLESS_AUDIO");
// ???
public static final CodingType DRA_AUDIO = new CodingType("DRA_AUDIO");
public static final CodingType DRA_EXTENSION_AUDIO = new CodingType("DRA_EXTENSION_AUDIO");
public static final CodingType DTS_AUDIO = new CodingType("DTS_AUDIO");
public static final CodingType DTS_HD_AUDIO = new CodingType("DTS_HD_AUDIO");
public static final CodingType DTS_HD_AUDIO_EXCEPT_XLL = new CodingType("DTS_HD_AUDIO_EXCEPT_XLL");
public static final CodingType DTS_HD_AUDIO_LBR = new CodingType("DTS_HD_AUDIO_LBR");
public static final CodingType DTS_HD_AUDIO_XLL = new CodingType("DTS_HD_AUDIO_XLL");
public static final CodingType INTERACTIVE_GRAPHICS = new CodingType("INTERACTIVE_GRAPHICS");
public static final CodingType LPCM_AUDIO = new CodingType("LPCM_AUDIO");
public static final CodingType MPEG2_VIDEO = new CodingType("MPEG2_VIDEO");
public static final CodingType MPEG4_AVC_VIDEO = new CodingType("MPEG4_AVC_VIDEO");
public static final CodingType PRESENTATION_GRAPHICS = new CodingType("PRESENTATION_GRAPHICS");
public static final CodingType SMPTE_VC1_VIDEO = new CodingType("SMPTE_VC1_VIDEO");
public static final CodingType TEXT_SUBTITLE = new CodingType("TEXT_SUBTITLE");
private String name;
}
......@@ -19,12 +19,11 @@
package org.bluray.ti;
public class DeliverySystemType extends
javax.tv.service.navigation.DeliverySystemType {
public class DeliverySystemType extends javax.tv.service.navigation.DeliverySystemType {
protected DeliverySystemType(String name) {
super(name);
}
public static final DeliverySystemType BD_ROM = new DeliverySystemType(
"BD_ROM");
public static final DeliverySystemType BD_ROM = new DeliverySystemType("BD_ROM");
}
/*
* This file is part of libbluray
* Copyright (C) 2010-2015 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.bluray.ti;
import java.util.Date;
......@@ -49,12 +68,12 @@ public class PlayItemImpl implements PlayItem {
StreamInfo[] ig = clip.getVideoStreams();
StreamInfo[] secVideo = clip.getVideoStreams();
StreamInfo[] secAudio = clip.getVideoStreams();
int count = video.length + audio.length + pg.length +
ig.length + secVideo.length + secAudio.length;
ServiceComponent[] components = new ServiceComponent[count];
int i = 0;
for (int j = 0; j < video.length; i++, j++)
components[i] = new TitleComponentImpl(j + 1, video[j], StreamType.VIDEO, true, playlistId, playitemId, service);
......@@ -68,7 +87,7 @@ public class PlayItemImpl implements PlayItem {
components[i] = new TitleComponentImpl(j + 1, secVideo[j], StreamType.VIDEO, false, playlistId, playitemId, service);
for (int j = 0; j < secAudio.length; i++, j++)
components[i] = new TitleComponentImpl(j + 1, secAudio[j], StreamType.AUDIO, false, playlistId, playitemId, service);
return components;
}
......
/*
* This file is part of libbluray
* Copyright (C) 2010-2015 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.bluray.ti;
import java.util.Date;
......@@ -34,18 +53,18 @@ public class PlayListImpl implements PlayList {
{
TIClip[] clips = playlist.getClips();
PlayItem[] items = new PlayItem[clips.length];
for (int i = 0; i < clips.length; i++) {
items[i] = new PlayItemImpl(id, i + 1, clips[i], service);
}
return items;
}
public Locator getLocator()
{
int title = Libbluray.getCurrentTitle();
try {
return new BDLocator(null, title, id);
} catch (InvalidLocatorException e) {
......
/*
* This file is part of libbluray
* Copyright (C) 2010-2015 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.bluray.ti;
import java.util.Date;
......@@ -12,9 +31,10 @@ import org.davic.net.InvalidLocatorException;
import org.videolan.StreamInfo;
public class TitleComponentImpl implements TitleComponent {
protected TitleComponentImpl(int stn, StreamInfo stream, StreamType type, boolean primary, int playlistId, int playitemId, Title service)
protected TitleComponentImpl(int stream_number, StreamInfo stream, StreamType type, boolean primary,
int playlistId, int playitemId, Title service)
{
this.stn = stn;
this.stream_number = stream_number;
this.stream = stream;
this.type = type;
this.primary = primary;
......@@ -46,21 +66,23 @@ public class TitleComponentImpl implements TitleComponent {
String str;
str = "bd://" + ((TitleImpl)service).getTitleNum() +
".PLAYLIST:" + playlistId +
".ITEM:" + playitemId;
".PLAYLIST:" + playlistId +
".ITEM:" + playitemId;
if (type.equals(StreamType.AUDIO) && primary)
str += ".A1:" + stn;
str += ".A1:" + stream_number;
else if (type.equals(StreamType.VIDEO) && primary)
str += ".V1:" + stn;
str += ".V1:" + stream_number;
else if (type.equals(StreamType.AUDIO) && !primary)
str += ".A2:" + stn;
str += ".A2:" + stream_number;
else if (type.equals(StreamType.VIDEO) && !primary)
str += ".V2:" + stn;
str += ".V2:" + stream_number;
else if (type.equals(StreamType.SUBTITLES) && primary)
str += ".P:" + stn;
else
str += ".P:" + stream_number;
else {
System.err.println("Unknown StreamType " + type);
return null;
}
try {
return new BDLocator(str);
......@@ -83,14 +105,14 @@ public class TitleComponentImpl implements TitleComponent {
}
public int getStreamNumber() {
return stn;
return stream_number;
}
public int getSubPathId() {
return stream.getSubPathId();
}
int stn;
int stream_number;
StreamInfo stream;
StreamType type;
boolean primary;
......
......@@ -26,6 +26,5 @@ public class TitleInformationType extends ServiceInformationType {
super(name);
}
public static final TitleInformationType BD_ROM = new TitleInformationType(
"BD_ROM");
public static final TitleInformationType BD_ROM = new TitleInformationType("BD_ROM");
}
......@@ -27,10 +27,8 @@ public class TitleType extends ServiceType {
super(name);
}
public static final TitleType BDJ_INTERACTIVE = new TitleType(
"BDJ_INTERACTIVE");
public static final TitleType BDJ_MOVIE = new TitleType("BDJ_MOVIE");
public static final TitleType HDMV_INTERACTIVE = new TitleType(
"HDMV_INTERACTIVE");
public static final TitleType HDMV_MOVIE = new TitleType("HDMV_MOVIE");
public static final TitleType BDJ_INTERACTIVE = new TitleType("BDJ_INTERACTIVE");
public static final TitleType BDJ_MOVIE = new TitleType("BDJ_MOVIE");
public static final TitleType HDMV_INTERACTIVE = new TitleType("HDMV_INTERACTIVE");
public static final TitleType HDMV_MOVIE = new TitleType("HDMV_MOVIE");
}
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