foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
mp3header

#include <mp3_utils.h>

Public Member Functions

 mp3header (const mp3header &src)
 
 mp3header ()
 
void copy (const mp3header &src)
 
void copy_raw (const void *src)
 
bool decode (mp3_utils::TMPEGFrameInfo &p_out)
 
void get_bytes (void *out)
 
unsigned get_frame_size () const
 
unsigned get_samples_per_frame ()
 
const mp3headeroperator= (const mp3header &src)
 

Private Attributes

t_uint8 bytes [4]
 

Detailed Description

Definition at line 43 of file mp3_utils.h.

Constructor & Destructor Documentation

mp3header::mp3header ( const mp3header src)
inline

Definition at line 51 of file mp3_utils.h.

51 {copy(src);}
void copy(const mp3header &src)
Definition: mp3_utils.h:48
mp3header::mp3header ( )
inline

Definition at line 52 of file mp3_utils.h.

52 {}

Member Function Documentation

void mp3header::copy ( const mp3header src)
inline

Definition at line 48 of file mp3_utils.h.

48 {memcpy(bytes,src.bytes,4);}
t_uint8 bytes[4]
Definition: mp3_utils.h:45
void mp3header::copy_raw ( const void *  src)
inline

Definition at line 49 of file mp3_utils.h.

49 {memcpy(bytes,src,4);}
t_uint8 bytes[4]
Definition: mp3_utils.h:45
bool mp3header::decode ( mp3_utils::TMPEGFrameInfo p_out)
inline

Definition at line 58 of file mp3_utils.h.

bool ParseMPEGFrameHeader(TMPEGFrameInfo &p_info, const t_uint8 p_header[4])
Definition: mp3_utils.cpp:48
t_uint8 bytes[4]
Definition: mp3_utils.h:45
void mp3header::get_bytes ( void *  out)
inline

Definition at line 56 of file mp3_utils.h.

56 {memcpy(out,bytes,4);}
t_uint8 bytes[4]
Definition: mp3_utils.h:45
unsigned mp3header::get_frame_size ( ) const
inline

Definition at line 57 of file mp3_utils.h.

unsigned QueryMPEGFrameSize(const t_uint8 p_header[4])
Definition: mp3_utils.cpp:41
t_uint8 bytes[4]
Definition: mp3_utils.h:45
unsigned mp3header::get_samples_per_frame ( )

Definition at line 176 of file mp3_utils.cpp.

177 {
179  if (!decode(fr)) return 0;
180  return fr.m_duration;
181 }
bool decode(mp3_utils::TMPEGFrameInfo &p_out)
Definition: mp3_utils.h:58
const mp3header& mp3header::operator= ( const mp3header src)
inline

Definition at line 54 of file mp3_utils.h.

54 {copy(src); return *this;}
void copy(const mp3header &src)
Definition: mp3_utils.h:48

Field Documentation

t_uint8 mp3header::bytes[4]
private

Definition at line 45 of file mp3_utils.h.


The documentation for this class was generated from the following files: