"Fossies" - the Fresh Open Source Software Archive

Member "faac-1_30/common/Cfaac/CTag.h" (16 Oct 2019, 2482 Bytes) of package /linux/misc/faac-1_30.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "CTag.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 CTag - Class to read/write id3v2/mp4 tags
    3 Copyright (C) 2004 Antonio Foranna
    4 
    5 This program is free software; you can redistribute it and/or modify
    6 it under the terms of the GNU General Public License as published by
    7 the Free Software Foundation.
    8     
    9 This program is distributed in the hope that it will be useful,
   10 but WITHOUT ANY WARRANTY; without even the implied warranty of
   11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12 GNU General Public License for more details.
   13         
   14 You should have received a copy of the GNU General Public License
   15 along with this program; if not, write to the Free Software
   16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   17             
   18 The author can be contacted at:
   19 ntnfrn_email-temp@yahoo.it
   20 */
   21 
   22 #ifndef _CTag_H
   23 #define _CTag_H
   24 
   25 // *********************************************************************************************
   26 
   27 #include <mp4.h>
   28 #include <id3/tag.h>    // id3 tag
   29 #include "CRegistry.h"
   30 #include "Defines.h"
   31 
   32 // *********************************************************************************************
   33 
   34 #define REG_TAGON "Tag On"
   35 #define REG_TAGIMPORT "Tag import"
   36 #define REG_ARTIST "Tag Artist"
   37 #define REG_TITLE "Tag Title"
   38 #define REG_ALBUM "Tag Album"
   39 #define REG_YEAR "Tag Year"
   40 #define REG_GENRE "Tag Genre"
   41 #define REG_WRITER "Tag Writer"
   42 #define REG_COMMENT "Tag Comment"
   43 #define REG_TRACK "Tag Track"
   44 #define REG_NTRACKS "Tag Tracks"
   45 #define REG_DISK "Tag Disk"
   46 #define REG_NDISKS "Tag Disks"
   47 #define REG_COMPILATION "Tag Compilation"
   48 #define REG_ARTFILE "Tag Art file"
   49 
   50 // *********************************************************************************************
   51 
   52 typedef struct
   53 {
   54     char    *data;
   55     DWORD   size;
   56     DWORD   pictureType; // front, back, icon, ...
   57     char    *mimeType, // jpg, png, gif
   58             *format, // ???
   59             *description; // text description
   60 } id3Picture;
   61 
   62 class CMP4Tag
   63 {
   64 private:
   65     int check_image_header(const char *buf);
   66     int ReadCoverArtFile(char *pCoverArtFile, char **artBuf);
   67 
   68 public:
   69     CMP4Tag();
   70     virtual ~CMP4Tag() { FreeTag(); }
   71 
   72     virtual void FreeTag();
   73     virtual int WriteMP4Tag(MP4FileHandle MP4File);
   74     virtual int WriteAacTag(char *Filename);
   75     virtual int ReadMp4Tag(char *Filename);
   76     virtual int ReadAacTag(char *Filename);
   77 
   78     char    *copyright; // used in Cfaad
   79     char    *artist, *title, *album, *year, *genre, *writer, *comment;
   80     WORD    trackno,ntracks, discno,ndiscs;
   81     BYTE    compilation;
   82     char    *artFilename;
   83     id3Picture art; // used in ReadAacTag(). Remark: field not stored into registry
   84 };
   85 
   86 #endif