[libbluray-devel] Make events serializable

hpi1 git at videolan.org
Thu Sep 11 11:05:20 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Sep 11 11:40:24 2014 +0300| [7b6f87da96033934bab2d85eaf9a17fbb1ccc85e] | committer: hpi1

Make events serializable

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=7b6f87da96033934bab2d85eaf9a17fbb1ccc85e
---

 src/libbluray/bdj/java/javax/media/MediaLocator.java          |    5 ++++-
 src/libbluray/bdj/java/javax/media/Time.java                  |    6 +++++-
 src/libbluray/bdj/java/javax/tv/service/SIChangeType.java     |    6 +++++-
 src/libbluray/bdj/java/org/dvb/application/AppID.java         |    6 +++++-
 src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStream.java         |    5 ++++-
 src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStreamEvent.java    |    1 +
 src/libbluray/bdj/java/org/dvb/dsmcc/NPTRate.java             |    6 +++++-
 src/libbluray/bdj/java/org/dvb/dsmcc/ServiceXFRReference.java |    6 +++++-
 8 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/src/libbluray/bdj/java/javax/media/MediaLocator.java b/src/libbluray/bdj/java/javax/media/MediaLocator.java
index 91a713f..a182e8d 100644
--- a/src/libbluray/bdj/java/javax/media/MediaLocator.java
+++ b/src/libbluray/bdj/java/javax/media/MediaLocator.java
@@ -19,10 +19,11 @@
 
 package javax.media;
 
+import java.io.Serializable;
 import java.net.MalformedURLException;
 import java.net.URL;
 
-public class MediaLocator
+public class MediaLocator implements Serializable
 {
     public MediaLocator(URL url) { 
         this(url.toExternalForm());
@@ -58,4 +59,6 @@ public class MediaLocator
     
     private String protocol = "";
     private String remainder = "";
+
+    private static final long serialVersionUID = 1L;
 }
diff --git a/src/libbluray/bdj/java/javax/media/Time.java b/src/libbluray/bdj/java/javax/media/Time.java
index ddf63b3..dcadb06 100644
--- a/src/libbluray/bdj/java/javax/media/Time.java
+++ b/src/libbluray/bdj/java/javax/media/Time.java
@@ -19,7 +19,9 @@
 
 package javax.media;
 
-public class Time {
+import java.io.Serializable;
+
+public class Time implements Serializable {
     public static final long ONE_SECOND = 1000000000L;
     protected long nanoseconds;
 
@@ -47,4 +49,6 @@ public class Time {
     {
         return nanoseconds / (double) ONE_SECOND;
     }
+
+    private static final long serialVersionUID = 1L;
 }
diff --git a/src/libbluray/bdj/java/javax/tv/service/SIChangeType.java b/src/libbluray/bdj/java/javax/tv/service/SIChangeType.java
index 47e28ec..70764ec 100644
--- a/src/libbluray/bdj/java/javax/tv/service/SIChangeType.java
+++ b/src/libbluray/bdj/java/javax/tv/service/SIChangeType.java
@@ -19,7 +19,9 @@
 
 package javax.tv.service;
 
-public class SIChangeType
+import java.io.Serializable;
+
+public class SIChangeType implements Serializable
 {
     public static final SIChangeType ADD = new SIChangeType("ADD");
     public static final SIChangeType REMOVE = new SIChangeType("REMOVE");
@@ -34,4 +36,6 @@ public class SIChangeType
     }
     
     protected String name;
+
+    private static final long serialVersionUID = 1L;
 }
diff --git a/src/libbluray/bdj/java/org/dvb/application/AppID.java b/src/libbluray/bdj/java/org/dvb/application/AppID.java
index 270f43f..366f95e 100644
--- a/src/libbluray/bdj/java/org/dvb/application/AppID.java
+++ b/src/libbluray/bdj/java/org/dvb/application/AppID.java
@@ -19,7 +19,9 @@
 
 package org.dvb.application;
 
-public class AppID {
+import java.io.Serializable;
+
+public class AppID implements Serializable {
     public AppID(int oid, int aid)
     {
         this.oid = oid;
@@ -68,4 +70,6 @@ public class AppID {
 
     int oid;
     int aid;
+
+    private static final long serialVersionUID = 1;
 }
diff --git a/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStream.java b/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStream.java
index 9792564..65af513 100644
--- a/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStream.java
+++ b/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStream.java
@@ -19,9 +19,10 @@
 package org.dvb.dsmcc;
 
 import java.io.IOException;
+import java.io.Serializable;
 import org.davic.net.Locator;
 
-public class DSMCCStream {
+public class DSMCCStream implements Serializable {
     public DSMCCStream(DSMCCObject aDSMCCObject) throws NotLoadedException,
             IllegalObjectTypeException
     {
@@ -89,4 +90,6 @@ public class DSMCCStream {
     {
         throw new Error("Not implemented");
     }
+
+    private static final long serialVersionUID = 1L;
 }
diff --git a/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStreamEvent.java b/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStreamEvent.java
index fb8c738..e205270 100644
--- a/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStreamEvent.java
+++ b/src/libbluray/bdj/java/org/dvb/dsmcc/DSMCCStreamEvent.java
@@ -66,4 +66,5 @@ public class DSMCCStreamEvent extends DSMCCStream {
         throw new Error("Not implemented");
     }
 
+    private static final long serialVersionUID = 1L;
 }
diff --git a/src/libbluray/bdj/java/org/dvb/dsmcc/NPTRate.java b/src/libbluray/bdj/java/org/dvb/dsmcc/NPTRate.java
index 24882d9..7e8c8f5 100644
--- a/src/libbluray/bdj/java/org/dvb/dsmcc/NPTRate.java
+++ b/src/libbluray/bdj/java/org/dvb/dsmcc/NPTRate.java
@@ -19,7 +19,9 @@
 
 package org.dvb.dsmcc;
 
-public class NPTRate {
+import java.io.Serializable;
+
+public class NPTRate implements Serializable {
 
     // should only be called internally
     public NPTRate(int numerator, int denominator)
@@ -40,4 +42,6 @@ public class NPTRate {
 
     private int numerator;
     private int denominator;
+
+    private static final long serialVersionUID = 1L;
 }
diff --git a/src/libbluray/bdj/java/org/dvb/dsmcc/ServiceXFRReference.java b/src/libbluray/bdj/java/org/dvb/dsmcc/ServiceXFRReference.java
index 062957e..969a218 100644
--- a/src/libbluray/bdj/java/org/dvb/dsmcc/ServiceXFRReference.java
+++ b/src/libbluray/bdj/java/org/dvb/dsmcc/ServiceXFRReference.java
@@ -19,9 +19,11 @@
 
 package org.dvb.dsmcc;
 
+import java.io.Serializable;
+
 import org.davic.net.Locator;
 
-public class ServiceXFRReference {
+public class ServiceXFRReference implements Serializable {
     public ServiceXFRReference(Locator serviceLocator, int carouselId,
             String pathName)
     {
@@ -52,4 +54,6 @@ public class ServiceXFRReference {
     {
         throw new Error("Not implemented");
     }
+
+    private static final long serialVersionUID = 1L;
 }



More information about the libbluray-devel mailing list