[Bug 768110] new plugin: ahssrc (Android hardware sensor source)

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 12 21:59:40 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=768110

--- Comment #12 from Martin Kelly <martin at surround.io> ---
Alright, attached is a new version of the plugin addressing all the feedback so
far. There's only one outstanding issue that I know, which is that I'm not sure
where to install the file listing caps and and data structs, as well as how to
write the correct Makefile rules to make that happen.

I have removed the emit-events property and removed system time entirely, so
now the plugin is passing only buffers, using pipeline time.

I experimented with using the timestamp in the actual Android SensorEvent.
However, it appears that those timestamps are not reliable, so I'm just using
pipeline time when we receive the callback. If you're curious, see here for
more details on Android timestamps:

https://code.google.com/p/android/issues/detail?id=7981

In addition, I added a UNION_CAST macro to avoid a type-punning issue. This
macro is from the following website:

http://www.cocoawithlove.com/2008/04/using-pointers-to-recast-in-c-is-bad.html

The website allows use, as long as you provide attribution
(http://www.cocoawithlove.com/about/), so I added attribution at the top of the
file. However, someone may want to check that I did this correctly before the
patch is accepted.

(In reply to Sebastian Dröge (slomo) from comment #11)
> (In reply to Martin Kelly from comment #10)
> > Although platform specific integration libraries seem like a good idea, I
> > actually hope for the sensor caps that I created to be usable by non-Android
> > platforms (for example, a more standard embedded Linux device). In addition,
> > the caps header needs to be accessible by apps that use ahssrc.
> > 
> > What is the best location to install such a header? Should it go in gst-libs
> > inside gst-plugins-bad? For example, I could put it in
> > gst-libs/gst/sensor/gstsensorcaps.h, or similar.
> 
> That would also work, but it's not only caps, right? It should probably come
> with something that parses the data into proper C structs

Yes, agreed. Right now, I have just merged the struct and caps definitions into
one file, gstsensors.h. I'm not sure where this file should be installed and
how to setup the Makefile rules to install it. I welcome advice on how best to
do this.

Thanks again!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list