HemaNage / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
1 stars 0 forks source link

Split JavaSE-specific code into separate project #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'd like to contribute a Android port of this library, but in order to do so I 
need you to first separate all JavaSE-specific code (Swing/SWT) into one 
project and the rest into another project. I propose three projects:

core (classes common to all platforms)
javase (swing/swt)
android (android-specific classes)

Original issue reported on code.google.com by cow...@bbs.darktech.org on 27 Jun 2012 at 4:56

GoogleCodeExporter commented 8 years ago
Interesting. What mechanism will be used for accessing the native C Gstreamer 
implementation on Android? 

Original comment by tsha...@gmail.com on 27 Jun 2012 at 6:44

GoogleCodeExporter commented 8 years ago
JNA, I'm going to port that as well.

Original comment by cow...@bbs.darktech.org on 27 Jun 2012 at 6:45

GoogleCodeExporter commented 8 years ago
There is already a JNA Android port. Check in with the JNA mailing list if 
you're not on it.

Original comment by neilcsmi...@googlemail.com on 27 Jun 2012 at 6:49

GoogleCodeExporter commented 8 years ago
Right, I meant I would do the JNA-related porting work. For example, you're 
missing structure.setFieldOrder() in all your classes.

Original comment by cow...@bbs.darktech.org on 27 Jun 2012 at 6:51

GoogleCodeExporter commented 8 years ago
all patches are welcome:-)

Original comment by lfar...@lfarkas.org on 3 Aug 2012 at 8:43

GoogleCodeExporter commented 8 years ago
I'm working on a patch but your use of static methods in Gst is killing me.

I need a different "Gst" implementation for Android and JavaSE because the 
variable "nativeClasses" needs to be different for each platform (e.g. you 
cannot load OSXVideoSink). The first thing I did was split the codebase into:

1. Core
2. JavaSE
3. Android

JavaSE and Android define their own Gst class. The problem is that many classes 
reference Gst directly (due to the use of static methods). So now I am forced 
to duplicate these classes in Android and JavaSE modules even though their 
implementation is identical. I'm trying to introduce some Gst "superclass" but 
it's turning into a total disaster.

I could really use your help here.

Original comment by cow...@bbs.darktech.org on 15 Aug 2012 at 1:27

GoogleCodeExporter commented 8 years ago
we can convert Gst into a singleton and reduce the static function, but i don't 
look into how and where Gst functions are called.

Original comment by lfar...@lfarkas.org on 15 Aug 2012 at 10:14