Photo database
Functions to create, read, write the photo database
These functions are for creating, reading, and writing the photo
database.
Overview of using the Photo database:
itdb_photodb_parse():
Read an existing PhotoDB.
itdb_photodb_create():
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.
itdb_photodb_photoalbum_create():
Create and add a new photoalbum.
itdb_photodb_photoalbum_add_photo():
Add a photo (#Itdb_Artwork) to an existing photoalbum.
itdb_photodb_photoalbum_remove():
Remove an existing photoalbum. Pictures can be kept in the
Photo Library or automatically removed as well.
itdb_photodb_remove_photo():
Remove a photo either from a photoalbum or completely from the database.
itdb_photodb_write():
Write out your PhotoDB.
itdb_photodb_free():
Free all memory taken by the PhotoDB.
itdb_photodb_photoalbum_by_name():
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(), e.g. for an 80 GB 6th generation
iPod Video, you would use:
itdb_device_set_sysinfo (db->device, "ModelNumStr", "MA450");
See itdb_device.c
for a list of supported models.
The model number will be saved on the iPod when the PhotoDB is
written (itdb_photodb_write() calls itdb_device_write_sysinfo()).
Have a look at the test-photos
test program in the tests/
directory of the libgpod source for an example of how to use the interface.
@photos:
@photoalbums:
@device:
@reserved_int1:
@reserved_int2:
@reserved1:
@reserved2:
@usertype:
@userdata:
@userdata_duplicate:
@userdata_destroy:
@mountpoint:
@Returns:
@photodb:
@mp:
@error:
@Returns:
@photodb:
@error:
@Returns:
@db:
@filename:
@position:
@rotation:
@error:
@Returns:
@db:
@image_data:
@image_data_len:
@position:
@rotation:
@error:
@Returns:
@db:
@pixbuf:
@position:
@rotation:
@error:
@Returns:
@db:
@album:
@photo:
@photodb:
@name:
@members:
@album_type:
@playmusic:
@repeat:
@random:
@show_titles:
@transition_direction:
@slide_duration:
@transition_duration:
@song_id:
@unk024:
@unk028:
@unk044:
@unk048:
@album_id:
@prev_album_id:
@reserved_int1:
@reserved_int2:
@reserved1:
@reserved2:
@usertype:
@userdata:
@userdata_duplicate:
@userdata_destroy:
@db:
@albumname:
@pos:
@Returns:
@db:
@album:
@photo:
@position:
@db:
@albumname:
@Returns:
@db:
@album:
@remove_pics: