ReactOS  0.4.14-dev-593-g1793dcc
id3.h File Reference
#include "frame.h"
Include dependency graph for id3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_id3 (mpg123_handle *fr)
 
void exit_id3 (mpg123_handle *fr)
 
void reset_id3 (mpg123_handle *fr)
 
void id3_link (mpg123_handle *fr)
 
int parse_new_id3 (mpg123_handle *fr, unsigned long first4bytes)
 
void id3_to_utf8 (mpg123_string *sb, unsigned char encoding, const unsigned char *source, size_t source_size, int noquiet)
 

Function Documentation

◆ exit_id3()

void exit_id3 ( mpg123_handle fr)

Definition at line 203 of file id3.c.

204 {
205  free_picture(fr);
206  free_comment(fr);
207  free_extra(fr);
208  free_text(fr);
209 }
#define free_picture(mh)
Definition: id3.c:110
#define free_comment(mh)
Definition: id3.c:107
#define free_text(mh)
Definition: id3.c:108
#define free_extra(mh)
Definition: id3.c:109

Referenced by reset_id3().

◆ id3_link()

void id3_link ( mpg123_handle fr)

Definition at line 218 of file id3.c.

219 {
220  size_t i;
221  mpg123_id3v2 *v2 = &fr->id3v2;
222  debug("linking ID3v2");
223  null_id3_links(fr);
224  for(i=0; i<v2->texts; ++i)
225  {
226  mpg123_text *entry = &v2->text[i];
227  if (!strncmp("TIT2", entry->id, 4)) v2->title = &entry->text;
228  else if(!strncmp("TALB", entry->id, 4)) v2->album = &entry->text;
229  else if(!strncmp("TPE1", entry->id, 4)) v2->artist = &entry->text;
230  else if(!strncmp("TYER", entry->id, 4)) v2->year = &entry->text;
231  else if(!strncmp("TCON", entry->id, 4)) v2->genre = &entry->text;
232  }
233  for(i=0; i<v2->comments; ++i)
234  {
235  mpg123_text *entry = &v2->comment_list[i];
236  if(entry->description.fill == 0 || entry->description.p[0] == 0)
237  v2->comment = &entry->text;
238  }
239  /* When no generic comment found, use the last non-generic one. */
240  if(v2->comment == NULL && v2->comments > 0)
241  v2->comment = &v2->comment_list[v2->comments-1].text;
242 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static void null_id3_links(mpg123_handle *fr)
Definition: id3.c:42
smooth NULL
Definition: ftsmooth.c:416
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
uint32_t entry
Definition: isohybrid.c:63
mpg123_id3v2 id3v2
Definition: frame.h:296
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
#define debug(msg)
Definition: key_call.c:71

◆ id3_to_utf8()

void id3_to_utf8 ( mpg123_string sb,
unsigned char  encoding,
const unsigned char source,
size_t  source_size,
int  noquiet 
)

Definition at line 292 of file id3.c.

293 {
294  unsigned int bwidth;
295  debug1("encoding: %u", encoding);
296  /* A note: ID3v2.3 uses UCS-2 non-variable 16bit encoding, v2.4 uses UTF16.
297  UTF-16 uses a reserved/private range in UCS-2 to add the magic, so we just always treat it as UTF. */
298  bwidth = encoding_widths[encoding];
299  /* Hack! I've seen a stray zero byte before BOM. Is that supposed to happen? */
300  if(encoding != mpg123_id3_utf16be) /* UTF16be _can_ beging with a null byte! */
301  while(source_size > bwidth && source[0] == 0)
302  {
303  --source_size;
304  ++source;
305  debug("skipped leading zero");
306  }
307  if(source_size % bwidth)
308  {
309  /* When we need two bytes for a character, it's strange to have an uneven bytestream length. */
310  if(noquiet) warning2("Weird tag size %d for encoding %u - I will probably trim too early or something but I think the MP3 is broken.", (int)source_size, encoding);
311  source_size -= source_size % bwidth;
312  }
313  text_converters[encoding](sb, source, source_size, noquiet);
314 }
superblock * sb
Definition: btrfs.c:4137
static const unsigned int encoding_widths[4]
Definition: id3.c:38
#define warning2(s, a, b)
Definition: debug.h:73
ed encoding
Definition: write.c:2839
static const text_converter text_converters[4]
Definition: id3.c:28
GLsizei GLsizei GLchar * source
Definition: glext.h:6048
#define debug(msg)
Definition: key_call.c:71
#define debug1(s, a)
Definition: debug.h:52

Referenced by process_picture(), and store_id3_text().

◆ init_id3()

void init_id3 ( mpg123_handle fr)

Definition at line 52 of file id3.c.

53 {
54  fr->id3v2.version = 0; /* nothing there */
55  null_id3_links(fr);
56  fr->id3v2.comments = 0;
57  fr->id3v2.comment_list = NULL;
58  fr->id3v2.texts = 0;
59  fr->id3v2.text = NULL;
60  fr->id3v2.extras = 0;
61  fr->id3v2.extra = NULL;
62  fr->id3v2.pictures = 0;
63  fr->id3v2.picture = NULL;
64 }
mpg123_text * extra
Definition: mpg123.h:1219
mpg123_text * text
Definition: mpg123.h:1217
static void null_id3_links(mpg123_handle *fr)
Definition: id3.c:42
smooth NULL
Definition: ftsmooth.c:416
unsigned char version
Definition: mpg123.h:1206
size_t texts
Definition: mpg123.h:1218
mpg123_picture * picture
Definition: mpg123.h:1221
mpg123_id3v2 id3v2
Definition: frame.h:296
size_t extras
Definition: mpg123.h:1220
size_t pictures
Definition: mpg123.h:1222
size_t comments
Definition: mpg123.h:1216
mpg123_text * comment_list
Definition: mpg123.h:1215

Referenced by reset_id3().

◆ parse_new_id3()

int parse_new_id3 ( mpg123_handle fr,
unsigned long  first4bytes 
)

Definition at line 670 of file id3.c.

671 {
672  #define UNSYNC_FLAG 128
673  #define EXTHEAD_FLAG 64
674  #define EXP_FLAG 32
675  #define FOOTER_FLAG 16
676  #define UNKNOWN_FLAGS 15 /* 00001111*/
677  unsigned char buf[6];
678  unsigned long length=0;
679  unsigned char flags = 0;
680  int ret = 1;
681  int ret2;
682 #ifndef NO_ID3V2
683  int skiptag = 0;
684 #endif
685  unsigned char major = first4bytes & 0xff;
686  debug1("ID3v2: major tag version: %i", major);
687  if(major == 0xff) return 0; /* Invalid... */
688  if((ret2 = fr->rd->read_frame_body(fr, buf, 6)) < 0) /* read more header information */
689  return ret2;
690 
691  if(buf[0] == 0xff) return 0; /* Revision, will never be 0xff. */
692 
693  /* second new byte are some nice flags, if these are invalid skip the whole thing */
694  flags = buf[1];
695  debug1("ID3v2: flags 0x%08x", flags);
696  /* use 4 bytes from buf to construct 28bit uint value and return 1; return 0 if bytes are not synchsafe */
697  #define synchsafe_to_long(buf,res) \
698  ( \
699  (((buf)[0]|(buf)[1]|(buf)[2]|(buf)[3]) & 0x80) ? 0 : \
700  (res = (((unsigned long) (buf)[0]) << 21) \
701  | (((unsigned long) (buf)[1]) << 14) \
702  | (((unsigned long) (buf)[2]) << 7) \
703  | ((unsigned long) (buf)[3]) \
704  ,1) \
705  )
706  /* id3v2.3 does not store synchsafe frame sizes, but synchsafe tag size - doh! */
707  /* Remember: bytes_to_long() can yield ULONG_MAX on 32 bit platforms! */
708  #define bytes_to_long(buf,res) \
709  ( \
710  major == 3 ? \
711  (res = (((unsigned long) (buf)[0]) << 24) \
712  | (((unsigned long) (buf)[1]) << 16) \
713  | (((unsigned long) (buf)[2]) << 8) \
714  | ((unsigned long) (buf)[3]) \
715  ,1) : synchsafe_to_long(buf,res) \
716  )
717  /* for id3v2.2 only */
718  #define threebytes_to_long(buf,res) \
719  ( \
720  res = (((unsigned long) (buf)[0]) << 16) \
721  | (((unsigned long) (buf)[1]) << 8) \
722  | ((unsigned long) (buf)[2]) \
723  )
724 
725  /* length-10 or length-20 (footer present); 4 synchsafe integers == 28 bit number */
726  /* we have already read 10 bytes, so left are length or length+10 bytes belonging to tag */
727  /* Note: This is an 28 bit value in 32 bit storage, plenty of space for */
728  /* length+x for reasonable x. */
730  {
731  if(NOQUIET) error4("Bad tag length (not synchsafe): 0x%02x%02x%02x%02x; You got a bad ID3 tag here.", buf[2],buf[3],buf[4],buf[5]);
732  return 0;
733  }
734  debug1("ID3v2: tag data length %lu", length);
735 #ifndef NO_ID3V2
736  if(VERBOSE2) fprintf(stderr,"Note: ID3v2.%i rev %i tag of %lu bytes\n", major, buf[0], length);
737  /* skip if unknown version/scary flags, parse otherwise */
738  if(fr->p.flags & MPG123_SKIP_ID3V2)
739  {
740  if(VERBOSE3)
741  fprintf(stderr, "Note: Skipping ID3v2 tag per user request.\n");
742  skiptag = 1;
743  }
744  if((flags & UNKNOWN_FLAGS) || (major > 4) || (major < 2))
745  {
746  if(NOQUIET)
747  warning2( "ID3v2: Won't parse the ID3v2 tag with major version"
748  " %u and flags 0x%xu - some extra code may be needed"
749  , major, flags );
750  skiptag = 1;
751  }
752  if(length < 10)
753  {
754  if(NOQUIET)
755  warning1("ID3v2: unrealistic small tag lengh %lu, skipping", length);
756  skiptag = 1;
757  }
758  if(skiptag)
759  {
760 #endif
761  if((ret2 = fr->rd->skip_bytes(fr,length)) < 0) /* will not store data in backbuff! */
762  ret = ret2;
763 #ifndef NO_ID3V2
764  }
765  else
766  {
767  unsigned char* tagdata = NULL;
768  fr->id3v2.version = major;
769  /* try to interpret that beast */
770  if((tagdata = (unsigned char*) malloc(length+1)) != NULL)
771  {
772  debug("ID3v2: analysing frames...");
773  if((ret2 = fr->rd->read_frame_body(fr,tagdata,length)) > 0)
774  {
775  unsigned long tagpos = 0;
776  /* bytes of frame title and of framesize value */
777  unsigned int head_part = fr->id3v2.version > 2 ? 4 : 3;
778  unsigned int flag_part = fr->id3v2.version > 2 ? 2 : 0;
779  /* The amount of bytes that are unconditionally read for each frame: */
780  /* ID, size, flags. */
781  unsigned int framebegin = head_part+head_part+flag_part;
782  debug1("ID3v2: have read at all %lu bytes for the tag now", (unsigned long)length+6);
783  /* going to apply strlen for strings inside frames, make sure that it doesn't overflow! */
784  tagdata[length] = 0;
785  if(flags & EXTHEAD_FLAG)
786  {
787  debug("ID3v2: skipping extended header");
788  if(!bytes_to_long(tagdata, tagpos) || tagpos >= length)
789  {
790  ret = 0;
791  if(NOQUIET)
792  error4( "Bad (non-synchsafe/too large) tag offset:"
793  "0x%02x%02x%02x%02x"
794  , tagdata[0], tagdata[1], tagdata[2], tagdata[3] );
795  }
796  }
797  if(ret > 0)
798  {
799  char id[5];
800  unsigned long framesize;
801  unsigned long fflags; /* need 16 bits, actually */
802  id[4] = 0;
803  /* Pos now advanced after ext head, now a frame has to follow. */
804  /* Note: tagpos <= length, which is 28 bit integer, so both */
805  /* far away from overflow for adding known small values. */
806  /* I want to read at least one full header now. */
807  while(length >= tagpos+framebegin)
808  {
809  int i = 0;
810  unsigned long pos = tagpos;
811  /* level 1,2,3 - 0 is info from lame/info tag! */
812  /* rva tags with ascending significance, then general frames */
813  enum frame_types tt = unknown;
814  /* we may have entered the padding zone or any other strangeness: check if we have valid frame id characters */
815  for(i=0; i< head_part; ++i)
816  if( !( ((tagdata[tagpos+i] > 47) && (tagdata[tagpos+i] < 58))
817  || ((tagdata[tagpos+i] > 64) && (tagdata[tagpos+i] < 91)) ) )
818  {
819  debug5("ID3v2: real tag data apparently ended after %lu bytes with 0x%02x%02x%02x%02x", tagpos, tagdata[tagpos], tagdata[tagpos+1], tagdata[tagpos+2], tagdata[tagpos+3]);
820  /* This is no hard error... let's just hope that we got something meaningful already (ret==1 in that case). */
821  goto tagparse_cleanup; /* Need to escape two loops here. */
822  }
823  if(ret > 0)
824  {
825  /* 4 or 3 bytes id */
826  strncpy(id, (char*) tagdata+pos, head_part);
827  id[head_part] = 0; /* terminate for 3 or 4 bytes */
828  pos += head_part;
829  tagpos += head_part;
830  /* size as 32 bits or 28 bits */
831  if(fr->id3v2.version == 2) threebytes_to_long(tagdata+pos, framesize);
832  else
833  if(!bytes_to_long(tagdata+pos, framesize))
834  {
835  /* Just assume that up to now there was some good data. */
836  if(NOQUIET) error1("ID3v2: non-syncsafe size of %s frame, skipping the remainder of tag", id);
837  break;
838  }
839  if(VERBOSE3) fprintf(stderr, "Note: ID3v2 %s frame of size %lu\n", id, framesize);
840  tagpos += head_part;
841  pos += head_part;
842  if(fr->id3v2.version > 2)
843  {
844  fflags = (((unsigned long) tagdata[pos]) << 8) | ((unsigned long) tagdata[pos+1]);
845  pos += 2;
846  tagpos += 2;
847  }
848  else fflags = 0;
849 
850  if(length - tagpos < framesize)
851  {
852  if(NOQUIET) error("Whoa! ID3v2 frame claims to be larger than the whole rest of the tag.");
853  break;
854  }
855  tagpos += framesize; /* the important advancement in whole tag */
856  /* for sanity, after full parsing tagpos should be == pos */
857  /* debug4("ID3v2: found %s frame, size %lu (as bytes: 0x%08lx), flags 0x%016lx", id, framesize, framesize, fflags); */
858  /* %0abc0000 %0h00kmnp */
859  #define BAD_FFLAGS (unsigned long) 36784
860  #define PRES_TAG_FFLAG 16384
861  #define PRES_FILE_FFLAG 8192
862  #define READ_ONLY_FFLAG 4096
863  #define GROUP_FFLAG 64
864  #define COMPR_FFLAG 8
865  #define ENCR_FFLAG 4
866  #define UNSYNC_FFLAG 2
867  #define DATLEN_FFLAG 1
868  if(head_part < 4 && promote_framename(fr, id) != 0) continue;
869 
870  /* shall not or want not handle these */
871  if(fflags & (BAD_FFLAGS | COMPR_FFLAG | ENCR_FFLAG))
872  {
873  if(NOQUIET) warning("ID3v2: skipping invalid/unsupported frame");
874  continue;
875  }
876 
877  for(i = 0; i < KNOWN_FRAMES; ++i)
878  if(!strncmp(frame_type[i], id, 4)){ tt = i; break; }
879 
880  if(id[0] == 'T' && tt != extra) tt = text;
881 
882  if(tt != unknown)
883  {
884  int rva_mode = -1; /* mix / album */
885  unsigned long realsize = framesize;
886  unsigned char* realdata = tagdata+pos;
887  unsigned char* unsyncbuffer = NULL;
888  if(((flags & UNSYNC_FLAG) || (fflags & UNSYNC_FFLAG)) && framesize > 0)
889  {
890  unsigned long ipos = 0;
891  unsigned long opos = 0;
892  debug("Id3v2: going to de-unsync the frame data");
893  /* de-unsync: FF00 -> FF; real FF00 is simply represented as FF0000 ... */
894  /* damn, that means I have to delete bytes from withing the data block... thus need temporal storage */
895  /* standard mandates that de-unsync should always be safe if flag is set */
896  realdata = unsyncbuffer = malloc(framesize+1); /* will need <= bytes, plus a safety zero */
897  if(realdata == NULL)
898  {
899  if(NOQUIET) error("ID3v2: unable to allocate working buffer for de-unsync");
900  continue;
901  }
902  /* now going byte per byte through the data... */
903  realdata[0] = tagdata[pos];
904  opos = 1;
905  for(ipos = pos+1; ipos < pos+framesize; ++ipos)
906  {
907  if(!((tagdata[ipos] == 0) && (tagdata[ipos-1] == 0xff)))
908  {
909  realdata[opos++] = tagdata[ipos];
910  }
911  }
912  realsize = opos;
913  /* Append a zero to keep strlen() safe. */
914  realdata[realsize] = 0;
915  debug2("ID3v2: de-unsync made %lu out of %lu bytes", realsize, framesize);
916  }
917  pos = 0; /* now at the beginning again... */
918  /* Avoid reading over boundary, even if there is a */
919  /* zero byte of padding for safety. */
920  if(realsize) switch(tt)
921  {
922  case comment:
923  case uslt:
924  process_comment(fr, tt, realdata, realsize, comment+1, id);
925  break;
926  case extra: /* perhaps foobar2000's work */
927  process_extra(fr, realdata, realsize, extra+1, id);
928  break;
929  case rva2: /* "the" RVA tag */
930  {
931  /* starts with null-terminated identification */
932  if(VERBOSE3) fprintf(stderr, "Note: RVA2 identification \"%s\"\n", realdata);
933  /* default: some individual value, mix mode */
934  rva_mode = 0;
935  if( !strncasecmp((char*)realdata, "album", 5)
936  || !strncasecmp((char*)realdata, "audiophile", 10)
937  || !strncasecmp((char*)realdata, "user", 4))
938  rva_mode = 1;
939  if(fr->rva.level[rva_mode] <= rva2+1)
940  {
941  pos += strlen((char*) realdata) + 1;
942  // channel and two bytes for RVA value
943  // pos possibly just past the safety zero, so one more than realsize
944  if(pos > realsize || realsize-pos < 3)
945  {
946  if(NOQUIET)
947  error("bad RVA2 tag (truncated?)");
948  }
949  else if(realdata[pos] == 1)
950  {
951  ++pos;
952  /* only handle master channel */
953  debug("ID3v2: it is for the master channel");
954  /* two bytes adjustment, one byte for bits representing peak - n bytes, eh bits, for peak */
955  /* 16 bit signed integer = dB * 512. Do not shift signed integers! Multiply instead.
956  Also no implementation-defined casting. Reinterpret the pointer to signed char, then do
957  proper casting. */
958  fr->rva.gain[rva_mode] = (float) (
959  ((short)((signed char*)realdata)[pos]) * 256 + (short)realdata[pos+1] ) / 512;
960  pos += 2;
961  if(VERBOSE3) fprintf(stderr, "Note: RVA value %fdB\n", fr->rva.gain[rva_mode]);
962  /* heh, the peak value is represented by a number of bits - but in what manner? Skipping that part */
963  fr->rva.peak[rva_mode] = 0;
964  fr->rva.level[rva_mode] = rva2+1;
965  }
966  }
967  }
968  break;
969  /* non-rva metainfo, simply store... */
970  case text:
971  process_text(fr, realdata, realsize, id);
972  break;
973  case picture:
974  if (fr->p.flags & MPG123_PICTURE)
975  process_picture(fr, realdata, realsize);
976 
977  break;
978  default: if(NOQUIET) error1("ID3v2: unknown frame type %i", tt);
979  }
980  if(unsyncbuffer)
981  free(unsyncbuffer);
982  }
983  #undef BAD_FFLAGS
984  #undef PRES_TAG_FFLAG
985  #undef PRES_FILE_FFLAG
986  #undef READ_ONLY_FFLAG
987  #undef GROUP_FFLAG
988  #undef COMPR_FFLAG
989  #undef ENCR_FFLAG
990  #undef UNSYNC_FFLAG
991  #undef DATLEN_FFLAG
992  }
993  else break;
994  #undef KNOWN_FRAMES
995  }
996  }
997  }
998  else
999  {
1000  /* There are tags with zero length. Strictly not an error, then. */
1001  if(length > 0 && NOQUIET && ret2 != MPG123_NEED_MORE) error("ID3v2: Duh, not able to read ID3v2 tag data.");
1002  ret = ret2;
1003  }
1004 tagparse_cleanup:
1005  free(tagdata);
1006  }
1007  else
1008  {
1009  if(NOQUIET) error1("ID3v2: Arrg! Unable to allocate %lu bytes for interpreting ID3v2 data - trying to skip instead.", length);
1010  if((ret2 = fr->rd->skip_bytes(fr,length)) < 0) ret = ret2; /* will not store data in backbuff! */
1011  else ret = 0;
1012  }
1013  }
1014 #endif /* NO_ID3V2 */
1015  /* skip footer if present */
1016  if((ret > 0) && (flags & FOOTER_FLAG) && ((ret2 = fr->rd->skip_bytes(fr,length)) < 0)) ret = ret2;
1017 
1018  return ret;
1019  #undef UNSYNC_FLAG
1020  #undef EXTHEAD_FLAG
1021  #undef EXP_FLAG
1022  #undef FOOTER_FLAG
1023  #undef UNKOWN_FLAGS
1024 }
Definition: id3.c:18
struct mpg123_pars_struct p
Definition: frame.h:287
#define threebytes_to_long(buf, res)
#define error(str)
Definition: mkdosfs.c:1605
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define error1(s, a)
Definition: debug.h:109
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define free
Definition: debug_ros.c:5
#define bytes_to_long(buf, res)
#define debug2(s, a, b)
Definition: debug.h:53
#define FOOTER_FLAG
static void process_extra(mpg123_handle *fr, unsigned char *realdata, size_t realsize, int rva_level, char *id)
Definition: id3.c:533
Definition: id3.c:18
#define COMPR_FFLAG
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: id3.c:18
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define strncasecmp
Definition: fake.h:10
#define ENCR_FFLAG
#define VERBOSE2
smooth NULL
Definition: ftsmooth.c:416
static void process_text(mpg123_handle *fr, unsigned char *realdata, size_t realsize, char *id)
Definition: id3.c:361
static int promote_framename(mpg123_handle *fr, char *id)
Definition: id3.c:631
unsigned char version
Definition: mpg123.h:1206
#define warning2(s, a, b)
Definition: debug.h:73
#define error4(s, a, b, c, d)
Definition: debug.h:112
#define VERBOSE3
static void process_comment(mpg123_handle *fr, enum frame_types tt, unsigned char *realdata, size_t realsize, int rva_level, char *id)
Definition: id3.c:443
#define UNKNOWN_FLAGS
#define UNSYNC_FLAG
Definition: id3.c:18
Definition: id3.c:18
#define KNOWN_FRAMES
Definition: id3.c:16
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define BAD_FFLAGS
#define UNSYNC_FFLAG
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
Definition: id3.c:18
GLbitfield flags
Definition: glext.h:7161
#define NOQUIET
int ret
Definition: id3.c:18
mpg123_id3v2 id3v2
Definition: frame.h:296
static float(__cdecl *square_half_float)(float x
#define EXTHEAD_FLAG
#define major(rdev)
Definition: propsheet.cpp:916
#define long
Definition: qsort.c:33
static void process_picture(mpg123_handle *fr, unsigned char *realdata, size_t realsize)
Definition: id3.c:377
static const char frame_type[KNOWN_FRAMES][5]
Definition: id3.c:17
FILE * stderr
#define debug(msg)
Definition: key_call.c:71
#define malloc
Definition: debug_ros.c:4
struct reader * rd
Definition: frame.h:285
#define debug5(s, a, b, c, d, e)
Definition: debug.h:56
#define debug1(s, a)
Definition: debug.h:52
struct mpg123_handle_struct::@3323 rva
#define synchsafe_to_long(buf, res)
#define warning(s)
Definition: debug.h:71
frame_types
Definition: id3.c:18
#define warning1(s, a)
Definition: debug.h:72

◆ reset_id3()

void reset_id3 ( mpg123_handle fr)

Definition at line 211 of file id3.c.

212 {
213  exit_id3(fr);
214  init_id3(fr);
215 }
void init_id3(mpg123_handle *fr)
Definition: id3.c:52
void exit_id3(mpg123_handle *fr)
Definition: id3.c:203