GStreamermm: Unable to insert "const char*" of Gst::TAG_TITLE & Gst::TAG_GENRE into SQLite3 database



Hello everybody,

I am trying to develop a small music manager using Gtkmm, GStreamermm & SQLite3. It reads metadata (track, title, artist, album, etc...) of all the files using GStreamermm & inserts these metadata into the underlying SQLite database. Then it will load these metadata into the Gtk::TreeView next time it starts.

The program is able to read Gst::TAG_TITLE & Gst::TAG_GENRE and output these tags into <iostream>. It can insert the "const char*" of these tags (I used Glib::ustring::c_str() to get the "const char*" from the Glib::ustring returned by Gst::TAG_TITLE & Gst::TAG_GENRE) into the underlying SQLite3 database. However, the title & genre of the song do not appear when I do a query of the SQLite3 database. It seems that Glib::ustring::c_str() returns an * empty const char* * and SQLite3 just inserts that empty const char* into the database. I have been scratching over my head for several days because of this. I wonder if this is my fault or is there any problem with GStreamermm or SQLite3.

I am currently using Fedora 16 with all the latest updates. My GStreamermm version is 0.10.10.

Here is the link to download the program. If you can please download it & type "make" to compile it in your machine & see if there is any problem with my code, or the libraries.

http://www.mediafire.com/?tazj62a2rcdl3a5

Thank you for reading my message! Happy New Year everybody!


Best regards,

--
Phong V. Cao
phngcv gmail com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]