[libbluray-devel] org.dvb.media Add toString() to events
hpi1
git at videolan.org
Mon May 2 10:30:00 CEST 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Apr 30 17:13:48 2016 +0300| [169fe1a9219660d3c90ce5199749d79552bc7c0e] | committer: hpi1
org.dvb.media Add toString() to events
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=169fe1a9219660d3c90ce5199749d79552bc7c0e
---
.../org/dvb/media/ActiveFormatDescriptionChangedEvent.java | 6 +++++-
.../bdj/java/org/dvb/media/AspectRatioChangedEvent.java | 6 +++++-
src/libbluray/bdj/java/org/dvb/media/CAStopEvent.java | 7 ++++++-
src/libbluray/bdj/java/org/dvb/media/DFCChangedEvent.java | 6 +++++-
.../bdj/java/org/dvb/media/NoComponentSelectedEvent.java | 6 +++++-
.../bdj/java/org/dvb/media/PresentationChangedEvent.java | 8 ++++++--
src/libbluray/bdj/java/org/dvb/media/ServiceRemovedEvent.java | 6 +++++-
.../bdj/java/org/dvb/media/StopByResourceLossEvent.java | 6 +++++-
.../bdj/java/org/dvb/media/SubtitleAvailableEvent.java | 2 +-
.../bdj/java/org/dvb/media/SubtitleNotAvailableEvent.java | 2 +-
.../bdj/java/org/dvb/media/SubtitleNotSelectedEvent.java | 2 +-
.../bdj/java/org/dvb/media/SubtitleSelectedEvent.java | 2 +-
src/libbluray/bdj/java/org/dvb/media/VideoFormatEvent.java | 7 +++++++
13 files changed, 53 insertions(+), 13 deletions(-)
diff --git a/src/libbluray/bdj/java/org/dvb/media/ActiveFormatDescriptionChangedEvent.java b/src/libbluray/bdj/java/org/dvb/media/ActiveFormatDescriptionChangedEvent.java
index d435d7b..54906e6 100644
--- a/src/libbluray/bdj/java/org/dvb/media/ActiveFormatDescriptionChangedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/ActiveFormatDescriptionChangedEvent.java
@@ -30,6 +30,10 @@ public class ActiveFormatDescriptionChangedEvent extends VideoFormatEvent {
return newFormat;
}
- private int newFormat;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",newFormat=" + newFormat + "]";
+ }
+
+ private final int newFormat;
private static final long serialVersionUID = -1102487117285915146L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/AspectRatioChangedEvent.java b/src/libbluray/bdj/java/org/dvb/media/AspectRatioChangedEvent.java
index e04979e..5503f0b 100644
--- a/src/libbluray/bdj/java/org/dvb/media/AspectRatioChangedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/AspectRatioChangedEvent.java
@@ -30,6 +30,10 @@ public class AspectRatioChangedEvent extends VideoFormatEvent {
return newRatio;
}
- private int newRatio;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",newRatio=" + newRatio + "]";
+ }
+
+ private final int newRatio;
private static final long serialVersionUID = -897298629574550910L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/CAStopEvent.java b/src/libbluray/bdj/java/org/dvb/media/CAStopEvent.java
index 0b5f35e..12f54f9 100644
--- a/src/libbluray/bdj/java/org/dvb/media/CAStopEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/CAStopEvent.java
@@ -26,6 +26,7 @@ import javax.media.MediaLocator;
public class CAStopEvent extends StopEvent {
public CAStopEvent(Controller source) {
super(source, 0, 0, 0, null);
+ this.stream = null;
}
public CAStopEvent(Controller source, int previous, int current,
@@ -38,6 +39,10 @@ public class CAStopEvent extends StopEvent {
return stream;
}
- private MediaLocator stream;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",stream=" + stream + "]";
+ }
+
+ private final MediaLocator stream;
private static final long serialVersionUID = 4964383050657791426L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/DFCChangedEvent.java b/src/libbluray/bdj/java/org/dvb/media/DFCChangedEvent.java
index 15484c5..d28cccf 100644
--- a/src/libbluray/bdj/java/org/dvb/media/DFCChangedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/DFCChangedEvent.java
@@ -30,6 +30,10 @@ public class DFCChangedEvent extends VideoFormatEvent {
return newDFC;
}
- private int newDFC;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",newDFC=" + newDFC + "]";
+ }
+
+ private final int newDFC;
private static final long serialVersionUID = -4351969268893058245L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/NoComponentSelectedEvent.java b/src/libbluray/bdj/java/org/dvb/media/NoComponentSelectedEvent.java
index 9533240..84e61c1 100644
--- a/src/libbluray/bdj/java/org/dvb/media/NoComponentSelectedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/NoComponentSelectedEvent.java
@@ -35,6 +35,10 @@ public class NoComponentSelectedEvent extends StopEvent {
return stream;
}
- private MediaLocator stream;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",stream=" + stream + "]";
+ }
+
+ private final MediaLocator stream;
private static final long serialVersionUID = -5650793101305031432L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/PresentationChangedEvent.java b/src/libbluray/bdj/java/org/dvb/media/PresentationChangedEvent.java
index 3fd7e08..3e15025 100644
--- a/src/libbluray/bdj/java/org/dvb/media/PresentationChangedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/PresentationChangedEvent.java
@@ -40,11 +40,15 @@ public class PresentationChangedEvent extends ControllerEvent {
return reason;
}
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",stream=" + stream + ",reason=" + reason + "]";
+ }
+
public static final int STREAM_UNAVAILABLE = 0x00;
public static final int CA_FAILURE = 0x01;
public static final int CA_RETURNED = 0x02;
- private MediaLocator stream;
- private int reason;
+ private final MediaLocator stream;
+ private final int reason;
private static final long serialVersionUID = 7465215844040053752L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/ServiceRemovedEvent.java b/src/libbluray/bdj/java/org/dvb/media/ServiceRemovedEvent.java
index 7bcb260..7abaae6 100644
--- a/src/libbluray/bdj/java/org/dvb/media/ServiceRemovedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/ServiceRemovedEvent.java
@@ -41,6 +41,10 @@ public class ServiceRemovedEvent extends StopEvent {
return stream;
}
- private MediaLocator stream;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",stream=" + stream + "]";
+ }
+
+ private final MediaLocator stream;
private static final long serialVersionUID = -7235988242857485021L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/StopByResourceLossEvent.java b/src/libbluray/bdj/java/org/dvb/media/StopByResourceLossEvent.java
index 1d22744..5ceeb03 100644
--- a/src/libbluray/bdj/java/org/dvb/media/StopByResourceLossEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/StopByResourceLossEvent.java
@@ -35,6 +35,10 @@ public class StopByResourceLossEvent extends StopEvent {
return stream;
}
- private MediaLocator stream;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",stream=" + stream + "]";
+ }
+
+ private final MediaLocator stream;
private static final long serialVersionUID = -2924890229807383503L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/SubtitleAvailableEvent.java b/src/libbluray/bdj/java/org/dvb/media/SubtitleAvailableEvent.java
index eb27c20..775eadb 100644
--- a/src/libbluray/bdj/java/org/dvb/media/SubtitleAvailableEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/SubtitleAvailableEvent.java
@@ -32,6 +32,6 @@ public class SubtitleAvailableEvent extends EventObject {
return source;
}
- private Object source;
+ protected final Object source;
private static final long serialVersionUID = -7714072037836958718L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/SubtitleNotAvailableEvent.java b/src/libbluray/bdj/java/org/dvb/media/SubtitleNotAvailableEvent.java
index 03a9d43..089f766 100644
--- a/src/libbluray/bdj/java/org/dvb/media/SubtitleNotAvailableEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/SubtitleNotAvailableEvent.java
@@ -31,6 +31,6 @@ public class SubtitleNotAvailableEvent extends EventObject {
return source;
}
- private Object source;
+ protected final Object source;
private static final long serialVersionUID = -5092068346063671440L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/SubtitleNotSelectedEvent.java b/src/libbluray/bdj/java/org/dvb/media/SubtitleNotSelectedEvent.java
index 99324f4..94a9ffe 100644
--- a/src/libbluray/bdj/java/org/dvb/media/SubtitleNotSelectedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/SubtitleNotSelectedEvent.java
@@ -31,6 +31,6 @@ public class SubtitleNotSelectedEvent extends EventObject {
return source;
}
- private Object source;
+ protected final Object source;
private static final long serialVersionUID = 158958833178309906L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/SubtitleSelectedEvent.java b/src/libbluray/bdj/java/org/dvb/media/SubtitleSelectedEvent.java
index 47c6b2b..6899b60 100644
--- a/src/libbluray/bdj/java/org/dvb/media/SubtitleSelectedEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/SubtitleSelectedEvent.java
@@ -31,6 +31,6 @@ public class SubtitleSelectedEvent extends EventObject {
return source;
}
- private Object source;
+ protected final Object source;
private static final long serialVersionUID = -4464632374027942754L;
}
diff --git a/src/libbluray/bdj/java/org/dvb/media/VideoFormatEvent.java b/src/libbluray/bdj/java/org/dvb/media/VideoFormatEvent.java
index f4d7490..e3b7e46 100644
--- a/src/libbluray/bdj/java/org/dvb/media/VideoFormatEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/media/VideoFormatEvent.java
@@ -24,7 +24,14 @@ import java.util.EventObject;
public abstract class VideoFormatEvent extends EventObject {
public VideoFormatEvent(Object source) {
super(source);
+
+ this.source = source;
+ }
+
+ public Object getSource() {
+ return source;
}
+ protected final Object source;
private static final long serialVersionUID = 8432740055225331694L;
}
More information about the libbluray-devel
mailing list