5
* Copyright (C) 1998 Rasca, Berlin
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
fprintf (stderr, "Usage: %s <file>\n", pname);
34
main (int argc, char *argv[])
45
fp = fopen (file, "rb");
52
if (gt_read4byte (&size, fp) < 4)
54
if (gt_read4byte (&type, fp) < 4)
56
printf ("position: %08d, atom type: %c%c%c%c, size: %d bytes\n",
57
ftell(fp)-8, *(p+3), *(p+2), *(p+1), *(p), size);
58
if (type == ATOM_movie) {
59
fseek (fp, -8, SEEK_CUR);
60
moov = gt_get_movie (fp);
62
for (i = 0; i < moov->memb; i++) {
63
if (moov->suba[i]->type == ATOM_track) {
64
printf (" -> track\n");
66
for (j = 0; j < gt->memb; j++) {
67
if (gt->suba[j]->type == ATOM_media) {
68
printf (" -> media\n");
75
fseek (fp, size-8, SEEK_CUR);