1
0
Fork 0
forked from len0rd/rockbox

Housekeeping. Comment musepack code seqments unused in rockbox.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27111 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2010-06-24 18:48:04 +00:00
parent 9079cddd83
commit d7ee0fe076
4 changed files with 23 additions and 2 deletions

View file

@ -78,10 +78,11 @@ struct mpc_demux_t {
mpc_uint32_t seek_table_size; /// used size in seek_table mpc_uint32_t seek_table_size; /// used size in seek_table
// chapters // chapters
/* rockbox: not used
mpc_seek_t chap_pos; /// supposed position of the first chapter block mpc_seek_t chap_pos; /// supposed position of the first chapter block
mpc_int_t chap_nb; /// number of chapters (-1 if unknown, 0 if no chapter) mpc_int_t chap_nb; /// number of chapters (-1 if unknown, 0 if no chapter)
mpc_chap_info * chap; /// chapters position and tag mpc_chap_info * chap; /// chapters position and tag
*/
}; };
/** /**

View file

@ -272,10 +272,12 @@ mpc_decoder * mpc_decoder_init(mpc_streaminfo *si)
return p_tmp; return p_tmp;
} }
/* rockbox: not used
void mpc_decoder_exit(mpc_decoder *d) void mpc_decoder_exit(mpc_decoder *d)
{ {
(void)d; (void)d;
} }
*/
void mpc_decoder_decode_frame(mpc_decoder * d, void mpc_decoder_decode_frame(mpc_decoder * d,
mpc_bits_reader * r, mpc_bits_reader * r,

View file

@ -155,7 +155,7 @@ mpc_demux_seek(mpc_demux * d, mpc_seek_t fpos, mpc_uint32_t min_bytes) {
* @param d demuxer context * @param d demuxer context
* @return current stream position in bits * @return current stream position in bits
*/ */
mpc_seek_t mpc_demux_pos(mpc_demux * d) static mpc_seek_t mpc_demux_pos(mpc_demux * d)
{ {
return (((mpc_seek_t)(d->r->tell(d->r)) - d->bytes_total + return (((mpc_seek_t)(d->r->tell(d->r)) - d->bytes_total +
d->bits_reader.buff - d->buffer) << 3) + 8 - d->bits_reader.count; d->bits_reader.buff - d->buffer) << 3) + 8 - d->bits_reader.count;
@ -300,8 +300,10 @@ static void mpc_demux_SP(mpc_demux * d, int size, int block_size)
mpc_demux_seek(d, (ptr - size) * 8 + cur, 11); mpc_demux_seek(d, (ptr - size) * 8 + cur, 11);
st_head_size = mpc_bits_get_block(&d->bits_reader, &b); st_head_size = mpc_bits_get_block(&d->bits_reader, &b);
if (memcmp(b.key, "ST", 2) == 0) { if (memcmp(b.key, "ST", 2) == 0) {
/* rockbox: not used
d->chap_pos = (ptr - size + b.size + st_head_size) * 8 + cur; d->chap_pos = (ptr - size + b.size + st_head_size) * 8 + cur;
d->chap_nb = -1; d->chap_nb = -1;
*/
mpc_demux_fill(d, (mpc_uint32_t) b.size, 0); mpc_demux_fill(d, (mpc_uint32_t) b.size, 0);
mpc_demux_ST(d); mpc_demux_ST(d);
} }
@ -480,7 +482,9 @@ mpc_demux * mpc_demux_init(mpc_reader * p_reader)
memset(p_tmp, 0, sizeof(mpc_demux)); memset(p_tmp, 0, sizeof(mpc_demux));
p_tmp->buffer = g_buffer; p_tmp->buffer = g_buffer;
p_tmp->r = p_reader; p_tmp->r = p_reader;
/* rockbox: not used
p_tmp->chap_nb = -1; p_tmp->chap_nb = -1;
*/
mpc_demux_clear_buff(p_tmp); mpc_demux_clear_buff(p_tmp);
if (mpc_demux_header(p_tmp) == MPC_STATUS_OK && if (mpc_demux_header(p_tmp) == MPC_STATUS_OK &&
mpc_demux_seek_init(p_tmp) == MPC_STATUS_OK) { mpc_demux_seek_init(p_tmp) == MPC_STATUS_OK) {
@ -495,11 +499,13 @@ mpc_demux * mpc_demux_init(mpc_reader * p_reader)
return p_tmp; return p_tmp;
} }
/* rockbox: not used
void mpc_demux_exit(mpc_demux * d) void mpc_demux_exit(mpc_demux * d)
{ {
mpc_decoder_exit(d->d); mpc_decoder_exit(d->d);
memset(d->seek_table, 0, sizeof(g_seek_table)); memset(d->seek_table, 0, sizeof(g_seek_table));
} }
*/
void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i) void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i)
{ {
@ -567,10 +573,12 @@ error:
return MPC_STATUS_INVALIDSV; return MPC_STATUS_INVALIDSV;
} }
/* rockbox: not used
mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds) mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds)
{ {
return mpc_demux_seek_sample(d, (mpc_int64_t)(seconds * (double)d->si.sample_freq + 0.5)); return mpc_demux_seek_sample(d, (mpc_int64_t)(seconds * (double)d->si.sample_freq + 0.5));
} }
*/
mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample) mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample)
{ {

View file

@ -95,6 +95,7 @@ typedef struct mpc_frame_info_t {
mpc_bool_t is_key_frame; /// 1 if this frame is a key frame (first in block) 0 else. Set by the demuxer. mpc_bool_t is_key_frame; /// 1 if this frame is a key frame (first in block) 0 else. Set by the demuxer.
} mpc_frame_info; } mpc_frame_info;
/* rockbox: not used
typedef struct mpc_chap_info_t { typedef struct mpc_chap_info_t {
mpc_uint64_t sample; /// sample where the chapter starts mpc_uint64_t sample; /// sample where the chapter starts
mpc_uint16_t gain; /// replaygain chapter value mpc_uint16_t gain; /// replaygain chapter value
@ -102,14 +103,17 @@ typedef struct mpc_chap_info_t {
mpc_uint_t tag_size; /// size of the tag element (0 if no tag is present for this chapter) mpc_uint_t tag_size; /// size of the tag element (0 if no tag is present for this chapter)
char * tag; /// pointer to an APEv2 tag without the preamble char * tag; /// pointer to an APEv2 tag without the preamble
} mpc_chap_info; } mpc_chap_info;
*/
/// Initializes mpc decoder with the supplied stream info parameters. /// Initializes mpc decoder with the supplied stream info parameters.
/// \param si streaminfo structure indicating format of source stream /// \param si streaminfo structure indicating format of source stream
/// \return pointer on the initialized decoder structure if successful, 0 if not /// \return pointer on the initialized decoder structure if successful, 0 if not
MPC_API mpc_decoder * mpc_decoder_init(mpc_streaminfo *si); MPC_API mpc_decoder * mpc_decoder_init(mpc_streaminfo *si);
/* rockbox: not used
/// Releases input mpc decoder /// Releases input mpc decoder
MPC_API void mpc_decoder_exit(mpc_decoder *p_dec); MPC_API void mpc_decoder_exit(mpc_decoder *p_dec);
*/
/** /**
* Sets decoder sample scaling factor. All decoded samples will be multiplied * Sets decoder sample scaling factor. All decoded samples will be multiplied
@ -129,8 +133,10 @@ MPC_API void mpc_decoder_decode_frame(mpc_decoder * d, mpc_bits_reader * r, mpc_
* @return an initialized mpc_demux pointer * @return an initialized mpc_demux pointer
*/ */
MPC_API mpc_demux * mpc_demux_init(mpc_reader * p_reader); MPC_API mpc_demux * mpc_demux_init(mpc_reader * p_reader);
/* rockbox: not used
/// free demuxer /// free demuxer
MPC_API void mpc_demux_exit(mpc_demux * d); MPC_API void mpc_demux_exit(mpc_demux * d);
*/
/** /**
* Calls mpc_decoder_scale_output to set the scaling factor according to the * Calls mpc_decoder_scale_output to set the scaling factor according to the
* replay gain stream information and the supplied ouput level * replay gain stream information and the supplied ouput level
@ -150,11 +156,15 @@ MPC_API mpc_status mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i); MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
/// seeks to a given sample /// seeks to a given sample
MPC_API mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample); MPC_API mpc_status mpc_demux_seek_sample(mpc_demux * d, mpc_uint64_t destsample);
/* rockbox: not used
/// seeks to a given second /// seeks to a given second
MPC_API mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds); MPC_API mpc_status mpc_demux_seek_second(mpc_demux * d, double seconds);
*/
/* rockbox: keep static
/// \return the current position in the stream (in bits) from the beginning of the file /// \return the current position in the stream (in bits) from the beginning of the file
MPC_API mpc_seek_t mpc_demux_pos(mpc_demux * d); MPC_API mpc_seek_t mpc_demux_pos(mpc_demux * d);
*/
/// chapters : only for sv8 streams /// chapters : only for sv8 streams
/** /**