gBroutin / gstreamer-java

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

Missing GstValueList #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There doesn't seem to be any implementation for GstValueList, the attached
patch adds some.

Original issue reported on code.google.com by raimo.ja...@gmail.com on 15 May 2010 at 8:12

Attachments:

GoogleCodeExporter commented 8 years ago
there is a GValueAPI.GValueArray so this patch a bit redundant.. but i added it.
it'd be useful to test wether both Structure's getArray and getValueList are 
working.

Original comment by lfar...@gmail.com on 27 May 2010 at 4:22

GoogleCodeExporter commented 8 years ago
Why is it redundant? If I try to call Structure#getArray instead of
Structure#getValueList, I get a NullPointerException:

java.lang.NullPointerException
    at com.sun.jna.Structure.useMemory(Structure.java:224)
    at com.sun.jna.Structure.useMemory(Structure.java:212)
    at org.gstreamer.lowlevel.GValueAPI$GValue.<init>(GValueAPI.java:65)
    at org.gstreamer.lowlevel.GValueAPI$GValueArray.<init>(GValueAPI.java:98)
    at org.gstreamer.Structure.getArray(Structure.java:135)

Original comment by raimo.ja...@gmail.com on 27 May 2010 at 6:34

GoogleCodeExporter commented 8 years ago

Original comment by lfar...@gmail.com on 28 May 2010 at 9:22

GoogleCodeExporter commented 8 years ago
can you send a small test example?

Original comment by lfar...@gmail.com on 28 May 2010 at 9:23

GoogleCodeExporter commented 8 years ago
Maybe there was a misunderstanding here, I didn't mean that there would be a 
problem
with getArray method. As far as I know, getArray should not work in my case, 
because
the value is a value list and not an array (I'm receiving audio level messages 
from a
level element). My point was just that you can't use getArray instead of 
getValueList
(and I didn't understand why the patch is redundant).

Original comment by raimo.ja...@gmail.com on 28 May 2010 at 9:59

GoogleCodeExporter commented 8 years ago
no you've got right and i revert my previous implementation.
thanks for your patch.

Original comment by lfar...@gmail.com on 28 May 2010 at 7:57