Home | Info | Community | Development | myReactOS | Contact Us
Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure.
Definition at line 574 of file frame.c.
{ if(mh == NULL) return MPG123_ERR; if(mi == NULL) { mh->err = MPG123_ERR_NULL; return MPG123_ERR; } mi->version = mh->mpeg25 ? MPG123_2_5 : (mh->lsf ? MPG123_2_0 : MPG123_1_0); mi->layer = mh->lay; mi->rate = frame_freq(mh); switch(mh->mode) { case 0: mi->mode = MPG123_M_STEREO; break; case 1: mi->mode = MPG123_M_JOINT; break; case 2: mi->mode = MPG123_M_DUAL; break; case 3: mi->mode = MPG123_M_MONO; break; default: error("That mode cannot be!"); } mi->mode_ext = mh->mode_ext; mi->framesize = mh->framesize+4; /* Include header. */ mi->flags = 0; if(mh->error_protection) mi->flags |= MPG123_CRC; if(mh->copyright) mi->flags |= MPG123_COPYRIGHT; if(mh->extension) mi->flags |= MPG123_PRIVATE; if(mh->original) mi->flags |= MPG123_ORIGINAL; mi->emphasis = mh->emphasis; mi->bitrate = frame_bitrate(mh); mi->abr_rate = mh->abr_rate; mi->vbr = mh->vbr; return MPG123_OK; }