summary refs log blame commit diff stats
path: root/plugins/mpcinfo/oggInfo.c
blob: e1191649a1c9f3bfec31c21c1ff0ffd59d914276 (plain) (tree)
generated by cgit-pink 1.4.1 (git 2.36.1) at 2025-01-16 08:00:58 +0000
"n">getOggInt(header,h1pos+7+5,4); info.mode=header[h1pos+7+4]; info.bitrate=nomBr; if (((maxBr==nomBr)&&(nomBr=minBr))||((minBr==0)&&(maxBr==0))||((minBr=-1)&&(maxBr=-1)) )info.cbr=1;else info.cbr=0; printf("bitrates: %i|%i|%i\n",maxBr,nomBr,minBr); printf("freq: %u\n",info.freq); pos=h3pos+7; pos+=getOggInt(header,pos,4)+4; count=getOggInt(header,pos,4); //printf("tags: %i\n",count); pos+=4; info.artist=NULL;info.title=NULL;info.album=NULL;info.comment=NULL;info.genre=NULL; for (i=0;i<count;i++){ tagLen=getOggInt(header,pos,4); //printf("taglength: %i\n",tagLen); sub=substring(header,pos+4,tagLen); name=upperStr(substring(sub,0,inStr(sub,tagLen,"="))); val=substring(sub,inStr(sub,tagLen,"=")+1,tagLen-inStr(sub,tagLen,"=")-1); //printf("Tag: %s\n",sub); //printf("Name: %s\n",name); //printf("value: %s\n",val); if (strcmp(name,"ARTIST")==0) info.artist=val; if (strcmp(name,"TITLE")==0) info.title=val; if (strcmp(name,"ALBUM")==0) info.album=val; if (strcmp(name,"GENRE")==0) info.genre=val; if (strcmp(name,"COMMENT")==0) info.comment=val; pos+=4+tagLen; } if (info.artist==NULL) info.artist=""; if (info.album==NULL) info.album =""; if (info.title==NULL) info.title=""; if (info.genre==NULL) info.genre=""; if (info.comment==NULL) info.comment=""; printf("Artist: %s\nTitle: %s\nAlbum: %s\n",info.artist,info.title, info.album); printf("Genre: %s\nComment: %s\nMode: %i\nCBR: %i\n",info.genre,info.comment,info.mode,info.cbr); //if (DEBUG==1) putlog("ogg header readed"); return info; } /* void printOggInfo(char *file){ printf("Scanning Ogg-File for Informations: %s\n",file); printf("size:\t%10d byte\n",getSize(file)); struct tagInfo info = getOggHeader(file); } */