List Info

Thread: gpsd and gstreamer?




gpsd and gstreamer?
user name
2007-01-06 15:09:19
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, "rwn");

  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/

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
gpsd and gstreamer?
user name
2007-01-06 16:15:17
Am Sat, 6 Jan 2007 16:09:19 +0100 schrieb Andreas Volz:

> 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:
> ...

Forget my question. I found the solution. I forgot that glib
or gtk
init functions set locale. Because of this functions like
sscanf don't
work as expected. A setlocale(LC_NUMERIC, "C") did
it.

regards
Andreas

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )