annotate Plugins/Input/aac/src/tagging_mp4.c @ 341:46271e2c9622 trunk

[svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
author nenolod
date Mon, 26 Dec 2005 00:38:59 -0800
parents
children 54dd4df67688
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
341
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
1 /*
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
2 * Audacious -- Cross-platform Multimedia Player
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
3 * Copyright (c) 2005 William Pitcock <nenolod@nenolod.net>
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
4 *
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
8 * (at your option) any later version.
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
9 *
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
13 * GNU General Public License for more details.
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
14 *
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
16 * along with this program; if not, write to the Free Software
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
18 */
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
19
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
20 #include <glib.h>
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
21 #include <string.h>
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
22 #include <unistd.h>
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
23
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
24 #include <mp4.h>
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
25
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
26 #include "tagging.h"
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
27
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
28 gchar *audmp4_get_artist(MP4FileHandle file)
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
29 {
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
30 gchar *value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
31
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
32 MP4GetMetadataArtist(file, &value);
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
33
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
34 return value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
35 }
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
36
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
37 gchar *audmp4_get_title(MP4FileHandle file)
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
38 {
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
39 gchar *value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
40
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
41 MP4GetMetadataName(file, &value);
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
42
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
43 return value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
44 }
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
45
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
46 gchar *audmp4_get_album(MP4FileHandle file)
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
47 {
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
48 gchar *value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
49
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
50 MP4GetMetadataAlbum(file, &value);
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
51
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
52 return value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
53 }
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
54
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
55 gchar *audmp4_get_genre(MP4FileHandle file)
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
56 {
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
57 gchar *value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
58
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
59 MP4GetMetadataGenre(file, &value);
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
60
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
61 return value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
62 }
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
63
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
64 gint audmp4_get_year(MP4FileHandle file)
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
65 {
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
66 gchar *value;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
67
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
68 MP4GetMetadataYear(file, &value);
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
69
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
70 if (!value)
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
71 return 0;
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
72
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
73 return atoi(value);
46271e2c9622 [svn] Initial tagging_mp4.c code. Still need to add a class for aac tagging information (ID3)
nenolod
parents:
diff changeset
74 }