Index: libmpcdec/branches/zorg/include/mpcdec/mpcdec.h
===================================================================
--- libmpcdec/branches/zorg/include/mpcdec/mpcdec.h	(revision 85)
+++ libmpcdec/branches/zorg/include/mpcdec/mpcdec.h	(revision 104)
@@ -53,12 +53,20 @@
 
 typedef struct mpc_decoder_t mpc_decoder;
+typedef struct mpc_bits_reader_t mpc_bits_reader;
+typedef struct mpc_demux_t mpc_demux;
+
+typedef struct mpc_frame_info_t {
+	mpc_uint32_t samples;	// number of samples in the frame
+	mpc_uint32_t sample_freq;	// frame sample frequency
+	mpc_uint8_t channels;	// number of channels
+	MPC_SAMPLE_FORMAT * buffer;	// frame samples buffer (size = samples * channels * sizeof(MPC_SAMPLE_FORMAT)
+} mpc_frame_info;
 
 /// Initializes mpc decoder with the supplied stream info parameters.
-/// \param p_reader reader that will supply raw data to the decoder
 /// \param si streaminfo structure indicating format of source stream
-/// \return MPC_TRUE if decoder was initalized successfully, FALSE otherwise    
-mpc_status mpc_decoder_init(mpc_decoder **p_dec, mpc_reader *p_reader, mpc_streaminfo *si);
+/// \return pointer on the initialized decoder structure if successful, 0 if not
+mpc_decoder * mpc_decoder_init(mpc_streaminfo *si);
 
-/// Releases input mpc decoder 
+/// Releases input mpc decoder
 void mpc_decoder_exit(mpc_decoder *p_dec);
 
@@ -66,7 +74,7 @@
 /// \param si streaminfo structure indicating format of source stream
 /// \param fast_seeking boolean 0 = use fast seeking if safe, 1 = force fast seeking
-void mpc_decoder_set_seeking(mpc_decoder *p_dec, mpc_streaminfo *si, mpc_bool_t fast_seeking);
+// void mpc_decoder_set_seeking(mpc_decoder *p_dec, mpc_streaminfo *si, mpc_bool_t fast_seeking);
 
-void mpc_decoder_set_streaminfo(mpc_decoder *p_dec, mpc_streaminfo *si);
+// void mpc_decoder_set_streaminfo(mpc_decoder *p_dec, mpc_streaminfo *si);
 
 /// Sets decoder sample scaling factor.  All decoded samples will be multiplied
@@ -83,21 +91,20 @@
 /// \return 0 if the stream has been completely decoded successfully and there are no more samples
 /// \return > 0 to indicate the number of bytes that were actually read from the stream.
-mpc_uint32_t mpc_decoder_decode(
-    mpc_decoder       *p_dec,
-    MPC_SAMPLE_FORMAT *buffer, 
-    mpc_uint32_t      *vbr_update_acc, 
-    mpc_uint32_t      *vbr_update_bits);
-
-mpc_uint32_t mpc_decoder_decode_frame(
-    mpc_decoder       *p_dec,
-    mpc_uint32_t      *in_buffer,
-    mpc_uint32_t      in_len,
-    MPC_SAMPLE_FORMAT *out_buffer);
+void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_frame_info * i);
 
 /// Seeks to the specified sample in the source stream.
-mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *p_dec, mpc_int64_t destsample);
+// mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *p_dec, mpc_int64_t destsample);
 
 /// Seeks to specified position in seconds in the source stream.
-mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *p_dec, double seconds);
+// mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *p_dec, double seconds);
+
+// init demuxer
+mpc_demux * mpc_demux_init(mpc_reader * p_reader);
+// free demuxer
+void mpc_demux_exit(mpc_demux * d);
+// decode frame
+void mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
+// get streaminfo
+void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
 
 #ifdef __cplusplus
Index: libmpcdec/branches/zorg/include/mpcdec/streaminfo.h
===================================================================
--- libmpcdec/branches/zorg/include/mpcdec/streaminfo.h	(revision 85)
+++ libmpcdec/branches/zorg/include/mpcdec/streaminfo.h	(revision 104)
@@ -75,5 +75,5 @@
     /// @name Replaygain properties
     //@{
-    mpc_int16_t          gain_title;         ///< Replaygain title value 
+    mpc_int16_t          gain_title;         ///< Replaygain title value
     mpc_int16_t          gain_album;         ///< Replaygain album value
     mpc_uint16_t         peak_album;         ///< Peak album loudness level
@@ -89,14 +89,8 @@
     char                 encoder[256];       ///< Encoder name
 
-    mpc_streaminfo_off_t tag_offset;         ///< Ofset to file tags
+    mpc_streaminfo_off_t tag_offset;         ///< Offset to file tags
     mpc_streaminfo_off_t total_file_length;  ///< Total length of underlying file
     //@}
 } mpc_streaminfo;
-
-/// Reads streaminfo header from the mpc stream supplied by r.
-/// \param si si pointer to which info will be written
-/// \param p_reader stream reader to supply raw data
-/// \return error code
-mpc_status mpc_streaminfo_init(mpc_streaminfo *si, mpc_reader *p_reader);
 
 /// Gets length of stream si, in seconds.
