[libbluray-devel] javax.media: add toString() to events
hpi1
git at videolan.org
Wed Apr 13 10:45:29 CEST 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr 11 15:08:40 2016 +0300| [1c92a479e99b3be2c531703125faaafd91d7ecbc] | committer: hpi1
javax.media: add toString() to events
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=1c92a479e99b3be2c531703125faaafd91d7ecbc
---
.../bdj/java/javax/media/CachingControlEvent.java | 9 +++++++--
.../bdj/java/javax/media/ControllerClosedEvent.java | 4 ++++
src/libbluray/bdj/java/javax/media/ControllerEvent.java | 6 +++++-
.../bdj/java/javax/media/DurationUpdateEvent.java | 6 +++++-
src/libbluray/bdj/java/javax/media/GainChangeEvent.java | 13 +++++++++----
src/libbluray/bdj/java/javax/media/MediaTimeSetEvent.java | 7 ++++++-
src/libbluray/bdj/java/javax/media/RateChangeEvent.java | 7 ++++++-
src/libbluray/bdj/java/javax/media/StartEvent.java | 9 +++++++--
src/libbluray/bdj/java/javax/media/StopEvent.java | 7 ++++++-
.../bdj/java/javax/media/StopTimeChangeEvent.java | 7 ++++++-
src/libbluray/bdj/java/javax/media/TransitionEvent.java | 11 ++++++++---
11 files changed, 69 insertions(+), 17 deletions(-)
diff --git a/src/libbluray/bdj/java/javax/media/CachingControlEvent.java b/src/libbluray/bdj/java/javax/media/CachingControlEvent.java
index 413733a..40fcc6a 100644
--- a/src/libbluray/bdj/java/javax/media/CachingControlEvent.java
+++ b/src/libbluray/bdj/java/javax/media/CachingControlEvent.java
@@ -36,7 +36,12 @@ public class CachingControlEvent extends ControllerEvent {
return progress;
}
- private CachingControl cacheControl;
- private long progress;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",cacheControl=" + cacheControl + ",progress=" + progress + "]";
+ }
+
+ private final CachingControl cacheControl;
+ private final long progress;
+
private static final long serialVersionUID = 8877038236738665179L;
}
diff --git a/src/libbluray/bdj/java/javax/media/ControllerClosedEvent.java b/src/libbluray/bdj/java/javax/media/ControllerClosedEvent.java
index 4e37633..600715d 100644
--- a/src/libbluray/bdj/java/javax/media/ControllerClosedEvent.java
+++ b/src/libbluray/bdj/java/javax/media/ControllerClosedEvent.java
@@ -34,6 +34,10 @@ public class ControllerClosedEvent extends ControllerEvent {
return reason;
}
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",reason=" + reason + "]";
+ }
+
private String reason = "";
private static final long serialVersionUID = 5868546288299613691L;
}
diff --git a/src/libbluray/bdj/java/javax/media/ControllerEvent.java b/src/libbluray/bdj/java/javax/media/ControllerEvent.java
index d3c5836..74cb01e 100644
--- a/src/libbluray/bdj/java/javax/media/ControllerEvent.java
+++ b/src/libbluray/bdj/java/javax/media/ControllerEvent.java
@@ -36,6 +36,10 @@ public class ControllerEvent extends EventObject implements MediaEvent {
return source;
}
- private Controller source;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + "]";
+ }
+
+ protected final Controller source;
private static final long serialVersionUID = 2637536605185993242L;
}
diff --git a/src/libbluray/bdj/java/javax/media/DurationUpdateEvent.java b/src/libbluray/bdj/java/javax/media/DurationUpdateEvent.java
index 30b1d3d..d0d2f01 100644
--- a/src/libbluray/bdj/java/javax/media/DurationUpdateEvent.java
+++ b/src/libbluray/bdj/java/javax/media/DurationUpdateEvent.java
@@ -30,6 +30,10 @@ public class DurationUpdateEvent extends ControllerEvent {
return duration;
}
- private Time duration;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",duration=" + duration + "]";
+ }
+
+ private final Time duration;
private static final long serialVersionUID = 400898256354068250L;
}
diff --git a/src/libbluray/bdj/java/javax/media/GainChangeEvent.java b/src/libbluray/bdj/java/javax/media/GainChangeEvent.java
index adb56ae..5b6a846 100644
--- a/src/libbluray/bdj/java/javax/media/GainChangeEvent.java
+++ b/src/libbluray/bdj/java/javax/media/GainChangeEvent.java
@@ -51,9 +51,14 @@ public class GainChangeEvent extends EventObject implements MediaEvent {
return level;
}
- private GainControl source;
- private boolean mute;
- private float dB;
- private float level;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",mute=" + mute + ",db=" + dB + ",level=" + level + "]";
+ }
+
+ private final GainControl source;
+ private final boolean mute;
+ private final float dB;
+ private final float level;
+
private static final long serialVersionUID = -3685931181525562650L;
}
diff --git a/src/libbluray/bdj/java/javax/media/MediaTimeSetEvent.java b/src/libbluray/bdj/java/javax/media/MediaTimeSetEvent.java
index b284488..3a81560 100644
--- a/src/libbluray/bdj/java/javax/media/MediaTimeSetEvent.java
+++ b/src/libbluray/bdj/java/javax/media/MediaTimeSetEvent.java
@@ -30,6 +30,11 @@ public class MediaTimeSetEvent extends ControllerEvent {
return mediaTime;
}
- private Time mediaTime;
+ public String toString() {
+ return getClass().toString() + "[source=" + source + ",mediaTime=" + mediaTime + "]";
+ }
+
+ private final Time mediaTime;
+
private static final long serialVersionUID = -628446955261317468L;
}
diff --git a/src/libbluray/bdj/java/javax/media/RateChangeEvent.java b/src/libbluray/bdj/java/javax/media/RateChangeEvent.java
index 7a1850d..cfe5bbb 100644
--- a/src/libbluray/bdj/java/javax/media/RateChangeEvent.java
+++ b/src/libbluray/bdj/java/javax/media/RateChangeEvent.java
@@ -30,6 +30,11 @@ public class RateChangeEvent extends ControllerEvent {
return rate;
}
- private float rate;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",rate=" + rate + "]";
+ }
+
+ private final float rate;
+
private static final long serialVersionUID = -4420398478601444547L;
}
diff --git a/src/libbluray/bdj/java/javax/media/StartEvent.java b/src/libbluray/bdj/java/javax/media/StartEvent.java
index 881d631..8300f0a 100644
--- a/src/libbluray/bdj/java/javax/media/StartEvent.java
+++ b/src/libbluray/bdj/java/javax/media/StartEvent.java
@@ -35,7 +35,12 @@ public class StartEvent extends TransitionEvent {
return tbTime;
}
- private Time mediaTime;
- private Time tbTime;
+ public String toString() {
+ return getClass().toString() + "[source=" + source + ",mediaTime=" + mediaTime + ",tbTime=" + tbTime + "]";
+ }
+
+ private final Time mediaTime;
+ private final Time tbTime;
+
private static final long serialVersionUID = -6779753774143606328L;
}
diff --git a/src/libbluray/bdj/java/javax/media/StopEvent.java b/src/libbluray/bdj/java/javax/media/StopEvent.java
index 9ec8992..91da003 100644
--- a/src/libbluray/bdj/java/javax/media/StopEvent.java
+++ b/src/libbluray/bdj/java/javax/media/StopEvent.java
@@ -33,6 +33,11 @@ public class StopEvent extends TransitionEvent {
return mediaTime;
}
- private Time mediaTime;
+ public String toString() {
+ return getClass().toString() + "[source=" + source + ",mediaTime=" + mediaTime + "]";
+ }
+
+ private final Time mediaTime;
+
private static final long serialVersionUID = -4224879148377028872L;
}
diff --git a/src/libbluray/bdj/java/javax/media/StopTimeChangeEvent.java b/src/libbluray/bdj/java/javax/media/StopTimeChangeEvent.java
index 21046fd..488669c 100644
--- a/src/libbluray/bdj/java/javax/media/StopTimeChangeEvent.java
+++ b/src/libbluray/bdj/java/javax/media/StopTimeChangeEvent.java
@@ -30,6 +30,11 @@ public class StopTimeChangeEvent extends ControllerEvent {
return stopTime;
}
- private Time stopTime;
+ public String toString() {
+ return getClass().getName() + "[source=" + source + ",stopTime=" + stopTime + "]";
+ }
+
+ private final Time stopTime;
+
private static final long serialVersionUID = -3236645692389122978L;
}
diff --git a/src/libbluray/bdj/java/javax/media/TransitionEvent.java b/src/libbluray/bdj/java/javax/media/TransitionEvent.java
index 044cd35..de87572 100644
--- a/src/libbluray/bdj/java/javax/media/TransitionEvent.java
+++ b/src/libbluray/bdj/java/javax/media/TransitionEvent.java
@@ -40,8 +40,13 @@ public class TransitionEvent extends ControllerEvent {
return target;
}
- private int previous;
- private int current;
- private int target;
+ public String toString() {
+ return getClass().toString() + "[source=" + source + ",previous=" + previous + ",current=" + current + ",target=" + target + "]";
+ }
+
+ private final int previous;
+ private final int current;
+ private final int target;
+
private static final long serialVersionUID = 6818216020447063912L;
}
More information about the libbluray-devel
mailing list