[gst-devel] gpsd and gstreamer?

Andreas Volz lists at brachttal.net
Sat Jan 6 16:09:19 CET 2007


Hello,

I'm writing an application that uses Gtk+ and gstreamer. Now I like
to add support for gpsd[1] in my application. Some example programms
with gpsd C and C++ API run well, but I've problems to integrate it
into my application. This is what I do currently:

  struct gps_data_t *gpsData;
  struct gps_fix_t *gpsFix;

  gpsData = gps_open ("localhost", "2947");

  gps_query (gpsData, "rw\n");

  gps_poll (gpsData);
  
  gpsFix = &gpsData->fix;

  cout << "Latitude: " << gpsFix->latitude << endl;
  
  gps_close (gpsData);  

It works as long as I call it before gst_init (&argc, &argv). If I put
it somewhere in my application _after_ gst_init, I get everytime 0 for
all gpsd polls (e.g. latitude). I tried also to set a callback
function, but same problem there.

Why does this happen? I know gstreamer uses pthreads too. So maybe
there's a potential conflict with gpsd. There's a call with pthread
handler in the gpsd C API for setting callbacks, but nothing I could set
for poll. Any ideas how to solve this problem?

regards
Andreas

[1] http://gpsd.berlios.de/




More information about the gstreamer-devel mailing list