#ifndef __GDAM_MP3_INFO_H_
#define __GDAM_MP3_INFO_H_

#include <glib.h>

#ifndef G_N_ELEMENTS
#define G_N_ELEMENTS(array)   ((int)  (sizeof(array) / sizeof((array)[0])))
#endif  

typedef struct _GdamMp3Info GdamMp3Info;

struct _GdamMp3Info {
	int major_version, minor_version;
	unsigned has_id3_data : 1;
	unsigned unsync : 1, extended_header : 1, experimental : 1;


	unsigned id : 1, layer : 3, protection_bit : 1,
	         padding_bit : 1, private_bit : 1,
		 mode : 3, mode_extension : 3,
		 copyright : 1, original : 1,
		 emphasis : 3, version_index : 3;

	unsigned stereo : 1;

	int frequency;
	int mean_frame_size;
	gdouble length;

	GHashTable* extra_values;

	unsigned bitrate, sampling_frequency;
	int tag_size, ext_header_size;
};

GdamMp3Info*   gdam_mp3_info_new(const char* filename);
void           gdam_mp3_info_destroy(GdamMp3Info*);

#endif
