Tree [521bb4] 0.7.92 /

File Date Author Commit
 bindings 2009-10-19 Todd Zullinger Todd Zullinger [051892] Migrate from Subversion to Git
 docs 2010-02-28 Christophe Fergeau Christophe Fergeau [1e7149] add new smart playlist fields
 m4 2009-08-19 Christophe Fergeau Christophe Fergeau [344217] use autotools 1.11 AM_SILENT_RULES instead of s...
 po 2010-01-22 Alain Portal Alain Portal [7b8720] Update translation to current revision.
 src 2010-03-12 Christophe Fergeau Christophe Fergeau [58a541] rename (private) itdb_sync to itdb_fsync
 tests 2009-11-01 Christophe Fergeau Christophe Fergeau [61c32c] get rid of test-checksum
 tools 2010-03-19 Christophe Fergeau Christophe Fergeau [ec49b5] Revert "fix ipod icon name"
 .gitignore 2009-10-19 Todd Zullinger Todd Zullinger [051892] Migrate from Subversion to Git
 AUTHORS 2005-09-10 Christophe Fergeau Christophe Fergeau [c76e33] Initial import
 COPYING 2005-11-21 Christophe Fergeau Christophe Fergeau [07d714] 2005-11-21 Christophe Fergeau <>
 ChangeLog 2009-08-19 Todd Zullinger Todd Zullinger [1d4741] Sync for automake-1.11 support
 INSTALL 2005-09-22 Jorg Schuler Jorg Schuler [3a9ca9] * applied Christophe Fergeau's patch which add...
 INSTALL_GIT 2009-10-19 Todd Zullinger Todd Zullinger [051892] Migrate from Subversion to Git 2010-02-21 Christophe Fergeau Christophe Fergeau [d6c88b] ship new README files in tarballs
 NEWS 2010-03-19 Christophe Fergeau Christophe Fergeau [521bb4] 0.7.92
 README 2008-07-17 Todd Zullinger Todd Zullinger [08e998] Remove references to itdb_thumb_get_gdk_pixbuf()
 README.SysInfo 2009-01-31 Todd Zullinger Todd Zullinger [acfcda] Add info on determining FirewireGUID on FreeBSD
 README.overview 2010-02-04 Christophe Fergeau Christophe Fergeau [2a1b47] doc trying to give an overview of how it all works
 README.sqlite 2009-12-29 Christophe Fergeau Christophe Fergeau [62fdf0] add documentation about what does what
 TROUBLESHOOTING 2009-01-31 Todd Zullinger Todd Zullinger [8e3e94] Improve the default hal callout and fdi paths 2007-11-25 Todd Zullinger Todd Zullinger [afc8a4] pass any user-specified options to configure 2010-03-19 Christophe Fergeau Christophe Fergeau [521bb4] 0.7.92 2009-08-19 Todd Zullinger Todd Zullinger [1d4741] Sync for automake-1.11 support 2007-11-26 Todd Zullinger Todd Zullinger [e1c06b] conditionally add gdk-pixbuf to pkg-config Requ...

Read Me

libgpod is a library meant to abstract access to an iPod content. It
provides an easy to use API to retrieve the list of files and playlist
stored on an iPod, to modify them and to save them back to the iPod.

This code was originally part of gtkpod ( When the iPod
content parsing code was made to be self-contained with gtkpod 0.93,
we chose to put this code in a separate library so that other project
can benefit from it without duplicating code.

If you decide to make improvements, like support for cover art or
photos please contact us so we can work together. Just drop a mail to (you may ask to be CC in the


Quick HOWTO use libgpod for audio

itdb_parse(): read the iTunesDB and ArtworkDB
itdb_write(): write the iTunesDB and ArtworkDB

itdb_parse() will return a Itdb_iTunesDB structure with GLists
containing all tracks (each track is represented by a Itdb_Track
structure) and the playlists (each playlist is represented by a
Itdb_Playlist structure).

A number of functions for adding, removing, duplicating tracks are
available. Please see itdb.h for details (itdb_track_*()).

In each Itdb_Playlist structure you can find a GList called 'members'
with listing all member tracks. Each track referenced in a playlist
must also be present in the tracks GList of the iTunesDB.

The iPod must contain one master playlist (MPL) containing all tracks
accessible on the iPod through the
Music->Tracks/Albums/Artists... menu. Besides the MPL there can be a
number of normal playlists accessible through the Music->Playlists
menu on the iPod. Tracks that are a member of one of these normal
playlists must also be a member of the MPL.

The Podcasts playlist is just another playlist with some internal
flags set differently. Also, member tracks in the Podcasts playlist
are not normally members of the MPL (so on the iPod they will only
show up under the Podcasts menu). All tracks referenced must be in the
tracklist of the Itdb_iTunesDB, however.

A number of functions to add/remove playlists, or add/remove tracks
are available. Please see itdb.h for details (itdb_playlist_*()).

Each track can have a thumbnail associated with it. You can retrieve a
GdkPixmap of the thumbnail using itdb_artwork_get_pixbuf().  You can
remove a thumbnail with itdb_track_remove_thumbnails(). And finally,
you can set a new thumbnail using itdb_track_set_thumbnails().

Please note that iTunes additionally stores the artwork as tags in the
original music file. That's also from where the data is read when
artwork is displayed in iTunes, and there can be more than one piece
of artwork. libgpod does not store the artwork as tags in the original
music file. As a consequence, if iTunes attempts to access the
artwork, it will find none, and remove libgpod's artwork. Luckily,
iTunes will only attempt to access the artwork if you select a track
in iTunes. (To work around this, gtkpod keeps a list of the original
filename of all artwork and silently adds the thumbnails if they were
'lost'. Your application might want to do something similar, or you
can supply patches for (optionally!) adding tags to the original music

The Itdb_iTunesDB, Itdb_Playlist and Itdb_Track structures each have a
userdata and a usertype field that can be used by the application to
store application-specific additional data. If userdata is a pointer
to an external structure, you can supply a ItdbUserDataDuplicateFunc
and a ItdbUserDataDestroyFunc so that this data can be duplicated
or freed automatically with a call to the library _duplicate()/_free()

For more information I would advice to have a look at gtkpod's source
code. You can also ask questions on the developer's mailing list:
gtkpod-devel at lists dot sourceforge dot net

Jörg Schuler (jcsjcs at users dot sourceforge dot net)


Quick HOWTO use libgpod for photos

       Read an existing PhotoDB.

       Create a new Itdb_PhotoDB structure. The Photo Library Album is
       (first album) is created automatically.

   itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
       Add a photo to the PhotoDB (from file or from a chunk of
       memory). It is automatically added to the Photo Library Album
       (first album), which is created if it does not exist already.

       Create and add a new photoalbum.

       Add a photo (Itdb_Artwork) to an existing photoalbum.

       Remove an existing photoalbum. Pictures can be kept in the
       Photo Library or automatically removed as well.

       Remove a photo either from a photoalbum or completely from the database.

       Write out your PhotoDB.

       Free all memory taken by the PhotoDB.

       Find the first photoalbum with a given name or the Photo
       Library Album if called with no name.

If you cannot add photos because your iPod is not recognized, you may
have to set the iPod model by calling

itdb_device_set_sysinfo (db->device, "ModelNumStr", model);

For example, "MA450" would stand for an 80 GB 6th generation iPod
Video. See itdb_device.c for a list of supported models.

This information will be written to the iPod when the PhotoDB is saved
(itdb_device_write_sysinfo() is called).

Have a look at the following test-photos test program in the tests/
subdirectory for an example of how to use the interface.

Jörg Schuler (jcsjcs at users dot sourceforge dot net)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks