00001 #ifndef metaioMP4_H_ 00002 #define metaioMP4_H_ 00003 00004 #include "metaio.h" 00005 00006 extern "C" { 00007 #include <mp4ff.h> 00008 } 00009 00010 // Similar to the ones define in id3tag.h 00011 //#define MYTH_ID3_FRAME_ALBUMARTIST "TPE4" 00012 00013 00014 class MetaIOMP4 : public MetaIO 00015 { 00016 public: 00017 MetaIOMP4(void); 00018 virtual ~MetaIOMP4(void); 00019 00020 bool write(Metadata* mdata, bool exclusive = false); 00021 Metadata* read(QString filename); 00022 00023 private: 00024 00025 mp4ff_callback_t *mp4_cb; 00026 int getTrackLength(QString filename); 00027 int getAACTrack(mp4ff_t *infile); 00028 void metadataSanityCheck(QString *artist, QString *album, QString *title, QString *genre); 00029 }; 00030 00031 typedef struct 00032 { 00033 FILE* file; 00034 int fd; //only used for truncating/writing. 00035 } mp4callback_data_t; 00036 00037 #endif 00038 00039
1.5.5