00001
00002 #ifndef MP3_MP3_H
00003 #define MP3_MP3_H 1
00004
00005 #include "config.h"
00006
00007 #ifdef HAVE_ID3LIB
00008 #include <id3.h>
00009 #endif
00010
00011 #include <stdio.h>
00012
00013 #include <xpsh/xpsh_def.h>
00014
00015 #ifdef HAVE_ID3LIB
00016
00020 struct tag_array {
00022 ID3_FrameID frameid;
00024 char *description;
00025 };
00026
00029 struct tag_array used_tags[] = {
00030 { ID3FID_TITLE, "Title" },
00031 { ID3FID_LEADARTIST, "Artist" },
00032 { ID3FID_ALBUM, "Album" },
00033 { ID3FID_TRACKNUM, "Track" },
00034 { ID3FID_YEAR, "Year" },
00035 { ID3FID_SONGLEN, "Length" }
00036 };
00037 #endif
00038
00041 struct mp3header {
00043 char version[9];
00045 char layer[10];
00047 char mode[13];
00049 char bitrate[4];
00051 char freq[6];
00052 };
00053
00054 char **implemented_mime_types();
00055 int n_implemented_mime_types();
00056
00057 char *get_ns_prefix();
00058 char *get_ns_uri();
00059
00060 void expand_metadata( node_xpsh *root_metadata_node,
00061 const char *filename,
00062 const char *mime_type );
00063
00064 void expand_content( node_xpsh *root_content_node,
00065 const char *filename,
00066 const char *mime_type );
00067
00068 node_xpsh *newNode( node_xpsh *parent, node_type t, char *name,
00069 const char *value, node_xpsh *prev );
00070
00071 struct mp3header getHeaderInfo( const char *filename );
00072
00073 #endif