diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-11-07 12:08:19 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2006-11-07 12:08:19 +0000 |
commit | b261eb62e01147c3e4fb8dd8154bff007d6e15cc (patch) | |
tree | fc2f382ee048104fd6e9190e2ce682e075a1fee8 /src | |
parent | 080e5bc2fdae7c9278b028b6b2b5ff40e083d04f (diff) | |
download | libgpod-tmz-b261eb62e01147c3e4fb8dd8154bff007d6e15cc.tar.gz libgpod-tmz-b261eb62e01147c3e4fb8dd8154bff007d6e15cc.tar.xz libgpod-tmz-b261eb62e01147c3e4fb8dd8154bff007d6e15cc.zip |
* itdb.h:
itdb_itunesdb.c:
itdb_track.c:
renamed some formerly unknown Itdb_Track entries and added
comments:
- unk184->pregap
- samplecount: guint32 -> guint64.
- unk192->(removed)
- unk200->postgap
- unk208->mediatype
- unk212->season_nr
- unk216->episode_nr
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1334 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src')
-rw-r--r-- | src/itdb.h | 55 | ||||
-rw-r--r-- | src/itdb_itunesdb.c | 28 | ||||
-rw-r--r-- | src/itdb_track.c | 8 |
3 files changed, 62 insertions, 29 deletions
@@ -1,4 +1,4 @@ -/* Time-stamp: <2006-10-29 19:18:27 jcs> +/* Time-stamp: <2006-11-07 20:51:08 jcs> | | Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -766,7 +766,9 @@ struct _Itdb_Track (middle button) with further information about the track will be shown. */ guint64 dbid2; /* not clear. if not set, itdb will set this to - the same value as dbid when adding a track */ + the same value as dbid when adding a + track. (With iTunes, since V0x12, this field + value differs from the dbid one.) */ guint8 lyrics_flag; /* set to 0x01 if lyrics are present in MP3 tag ("ULST"), 0x00 otherwise */ guint8 movie_flag; /* set to 0x01 if it's a movie file, 0x00 @@ -775,15 +777,48 @@ struct _Itdb_Track on the iPod (bullet) once played it is set to 0x01. Non-podcasts have this set to 0x01. */ guint8 unk179; /* unknown (always 0x00 so far) */ - guint32 unk180, unk184; - guint32 samplecount;/* Number of samples in the song. First observed + guint32 unk180; + guint32 pregap; /* Number of samples of silence before the songs + starts (for gapless playback). */ + guint64 samplecount;/* Number of samples in the song. First observed in dbversion 0x0d, and only for AAC and WAV - files (not MP3?!?). */ - guint32 unk192, unk196, unk200; - guint32 unk204; /* unknown - added in dbversion 0x0c, first - values observed in 0x0d. Observed to be 0x0 - or 0x1. */ - guint32 unk208, unk212, unk216, unk220, unk224; + files (for gapless playback). */ + guint32 unk196; + guint32 postgap; /* Number of samples of silence at the end of + the song (for gapless playback). */ + guint32 unk204; /* unknown - added in dbversion 0x0c, first + values observed in 0x0d. Observed to be 0x0 + or 0x1. */ + guint32 mediatype; /* It seems that this field denotes the type of + the file on (e.g.) the 5g video iPod. It must + be set to 0x00000001 for audio files, and set + to 0x00000002 for video files. If set to + 0x00, the files show up in both, the audio + menus ("Songs", "Artists", etc.) and the + video menus ("Movies", "Music Videos", + etc.). It appears to be set to 0x20 for music + videos, and if set to 0x60 the file shows up + in "TV Shows" rather than "Movies". + + The following list summarizes all observed types: + + * 0x00 00 00 00 - Audio/Video + * 0x00 00 00 01 - Audio + * 0x00 00 00 02 - Video + * 0x00 00 00 04 - Podcast + * 0x00 00 00 06 - Video Podcast + * 0x00 00 00 08 - Audiobook + * 0x00 00 00 20 - Music Video + * 0x00 00 00 40 - TV Show (shows up ONLY in TV Shows + * 0x00 00 00 60 - TV Show (shows up in the + Music lists as well) */ + guint32 season_nr; /* the season number of the track, for TV shows only. */ + guint32 episode_nr; /* the episode number of the track, for TV shows + only - although not displayed on the iPod, + the episodes are sorted by episode number. */ + guint32 unk220; /* Has something to do with protected files - + set to 0x0 for non-protected files. */ + guint32 unk224; guint32 unk228, unk232, unk236, unk240; /* Chapter data: defines where the chapter stops are in the track, diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 67b259c..f9284bc 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2006-09-21 20:12:24 jcs> +/* Time-stamp: <2006-11-07 20:53:26 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -2126,15 +2126,14 @@ static glong get_mhit (FImport *fimp, glong mhit_seek) track->mark_unplayed = get8int (cts, seek+178); track->unk179 = get8int (cts, seek+179); track->unk180 = get32lint (cts, seek+180); - track->unk184 = get32lint (cts, seek+184); - track->samplecount = get32lint (cts, seek+188); - track->unk192 = get32lint (cts, seek+192); + track->pregap = get32lint (cts, seek+184); + track->samplecount = get64lint (cts, seek+188); track->unk196 = get32lint (cts, seek+196); - track->unk200 = get32lint (cts, seek+200); + track->postgap = get32lint (cts, seek+200); track->unk204 = get32lint (cts, seek+204); - track->unk208 = get32lint (cts, seek+208); - track->unk212 = get32lint (cts, seek+212); - track->unk216 = get32lint (cts, seek+216); + track->mediatype = get32lint (cts, seek+208); + track->season_nr = get32lint (cts, seek+212); + track->episode_nr = get32lint (cts, seek+216); track->unk220 = get32lint (cts, seek+220); track->unk224 = get32lint (cts, seek+224); track->unk228 = get32lint (cts, seek+228); @@ -3313,15 +3312,14 @@ static void mk_mhit (WContents *cts, Itdb_Track *track) put8int (cts, track->mark_unplayed); put8int (cts, track->unk179); put32lint (cts, track->unk180); - put32lint (cts, track->unk184); - put32lint (cts, track->samplecount); - put32lint (cts, track->unk192); + put32lint (cts, track->pregap); + put64lint (cts, track->samplecount); put32lint (cts, track->unk196); - put32lint (cts, track->unk200); + put32lint (cts, track->postgap); put32lint (cts, track->unk204); - put32lint (cts, track->unk208); - put32lint (cts, track->unk212); - put32lint (cts, track->unk216); + put32lint (cts, track->mediatype); + put32lint (cts, track->season_nr); + put32lint (cts, track->episode_nr); put32lint (cts, track->unk220); put32lint (cts, track->unk224); put32lint (cts, track->unk228); diff --git a/src/itdb_track.c b/src/itdb_track.c index 1d3d2e0..fc66f75 100644 --- a/src/itdb_track.c +++ b/src/itdb_track.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2006-10-22 17:42:23 jcs> +/* Time-stamp: <2006-11-07 20:54:45 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -169,17 +169,17 @@ static void itdb_track_set_defaults (Itdb_Track *tr) * proven that setting unk208 to non-0 doesn't upset older * ipod models */ - if (tr->unk208 == 0) + if (tr->mediatype == 0) { if (haystack (tr->filetype, m4v_desc)) { /* set type to video (0x00000002) */ - tr->unk208 = 0x00000002; + tr->mediatype = 0x00000002; } else { /* set type to audio */ - tr->unk208 = 0x00000001; + tr->mediatype = 0x00000001; } } } |