ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

EXPORT int mpg123_info ( mpg123_handle *  mh,
struct mpg123_frameinfo mi 
)

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;
}

Generated on Sat May 26 2012 06:11:37 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.