diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-10-29 08:43:28 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-10-29 08:43:28 +0000 |
commit | cb0393e876d66ae4f16efbd84844246f96f12bd9 (patch) | |
tree | 1a7a2a4aac1a5fd450f57fa3da44d6200bb58594 /src/db-itunes-parser.h | |
parent | c6a0ced66299f158aca59bc33b7966de04ed615b (diff) | |
download | libgpod-cb0393e876d66ae4f16efbd84844246f96f12bd9.tar.gz libgpod-cb0393e876d66ae4f16efbd84844246f96f12bd9.tar.xz libgpod-cb0393e876d66ae4f16efbd84844246f96f12bd9.zip |
Major rework of picture support.
* src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb.h,
src/db-itunes-parser.h: renamed 'master' to 'album_type' in
MhbaHeader and Itdb_PhotoAlbum.
* src/db-artwork-parser.c, src/db-artwork-writer.c,
src/itdb_photoalbum.c: Itdb_Photoalbum->members are now pointers
to the corresponding Itdb_Artwork instead of image_ids.
* src/itdb_photoalbum.c: album_ids and image_ids are set just
before writing the PhotoDB in itdb_photodb_write().
* src/itdb_photoalbum.c: new interface, basically use as follows:
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_craete():
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.
* src/itdb_playlist.c (itdb_playlist_add, itdb_playlist_add_track):
src/itdb_track.c (itdb_track_add): simplify code by using
g_list_insert().
* tests/test-photos.c: change to new interface, add new commands
'list' to list photo IDs in the database, 'remove' to remove IDs
from an album or the iPod, or remove entire photoalbums from the
iPod.
* src/db-itunes-parser.h: added comments to _MhbaHeader definition.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1329 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-itunes-parser.h')
-rw-r--r-- | src/db-itunes-parser.h | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/src/db-itunes-parser.h b/src/db-itunes-parser.h index 344efa4..1b2cfff 100644 --- a/src/db-itunes-parser.h +++ b/src/db-itunes-parser.h @@ -612,22 +612,26 @@ struct _MhbaHeader { unsigned char header_id[4]; gint32 header_len; gint32 total_len; - gint32 num_mhods; /* number of Data Objects in the List, probably always 1 */ - gint32 num_mhias; /* number of pictures in the album */ - gint32 playlist_id; /* starts out at $64 and increments by 1 */ - gint32 unknown2; /* unknown, seems to be always 0 */ - gint16 unknown3; /* unknown, seems to be always 0 */ - gchar master; - /* FIXME: not sure if I have these right; iPod doesn't seem to listen to them */ - guint8 playmusic; - guint8 repeat; - guint8 random; - guint8 show_titles; - guint8 transition_direction; - gint32 slide_duration; - gint32 transition_duration; - gint32 unknown4; - gint32 unknown5; + gint32 num_mhods; /* number of Data Objects in the List, + probably always 1 */ + gint32 num_mhias; /* number of pictures in the album */ + gint32 playlist_id;/* starts out at $64 and increments by 1 */ + gint32 unknown2; /* unknown, seems to be always 0 */ + gint16 unknown3; /* unknown, seems to be always 0 */ + gchar album_type; /* 1 = master photo list ("Photo Library"), + 2 = normal album, sometimes 4 and 5 */ + guint8 playmusic; /* play music during slideshow (from iPhoto setting) */ + guint8 repeat; /* repeat the slideshow (from iPhoto setting) */ + guint8 random; /* show the slides in random order (from iPhoto + setting) */ + guint8 show_titles;/* show slide captions (from iPhoto setting) */ + guint8 transition_direction; /* 0=none, 1=left-to-right, + 2=right-to-left, 3=top-to-bottom, + 4=bottom-to-top (from iPhoto setting) */ + gint32 slide_duration; /* in seconds (from iPhoto setting) */ + gint32 transition_duration; /* in milliseconds (from iPhoto setting) */ + gint32 unk044; + gint32 unk048; gint64 song_id; gint32 prev_playlist_id; /* the id of the previous playlist */ unsigned char padding[]; @@ -656,7 +660,7 @@ struct _MhiaHeader { gint32 total_len; /* probably the size of the header and all child records; * as there aren't any child records this is equal to header length */ gint32 unknown1; /* seems to be zero */ - gint32 image_id; /* the id of the mhii record this mhia refers to */ + guint32 image_id; /* the id of the mhii record this mhia refers to */ unsigned char padding[]; }; |