~ubuntu-branches/ubuntu/lucid/mpg123/lucid

« back to all changes in this revision

Viewing changes to src/libmpg123/mpg123.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-12-21 00:11:29 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20091221001129-gsbnzbenceqv4pjt
Tags: upstream-1.10.0
ImportĀ upstreamĀ versionĀ 1.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
        libmpg123: MPEG Audio Decoder library (version @PACKAGE_VERSION@)
3
3
 
4
 
        copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
 
4
        copyright 1995-2009 by the mpg123 project - free software under the terms of the LGPL 2.1
5
5
        see COPYING and AUTHORS files in distribution or http://mpg123.org
6
6
*/
7
7
 
51
51
#define mpg123_seek_frame     mpg123_seek_frame@LARGEFILE_SUFFIX@
52
52
#define mpg123_timeframe       mpg123_timeframe@LARGEFILE_SUFFIX@
53
53
#define mpg123_index               mpg123_index@LARGEFILE_SUFFIX@
 
54
#define mpg123_set_index       mpg123_set_index@LARGEFILE_SUFFIX@
54
55
#define mpg123_position         mpg123_position@LARGEFILE_SUFFIX@
55
56
#define mpg123_length             mpg123_length@LARGEFILE_SUFFIX@
56
57
#define mpg123_set_filesize mpg123_set_filesize@LARGEFILE_SUFFIX@
161
162
 *  See the mpg123_parms enumeration for a list of available parameters. */
162
163
EXPORT int mpg123_getparam(mpg123_handle *mh, enum mpg123_parms type, long *val, double *fval);
163
164
 
 
165
/** Feature set available for query with mpg123_feature. */
 
166
enum mpg123_feature_set
 
167
{
 
168
         MPG123_FEATURE_ABI_UTF8OPEN = 0     /**< mpg123 expects path names to be given in UTF-8 encoding instead of plain native. */
 
169
        ,MPG123_FEATURE_OUTPUT_8BIT          /**< 8bit output   */
 
170
        ,MPG123_FEATURE_OUTPUT_16BIT         /**< 16bit output  */
 
171
        ,MPG123_FEATURE_OUTPUT_32BIT         /**< 32bit output  */
 
172
        ,MPG123_FEATURE_INDEX                /**< support for building a frame index for accurate seeking */
 
173
        ,MPG123_FEATURE_PARSE_ID3V2          /**< id3v2 parsing */
 
174
        ,MPG123_FEATURE_DECODE_LAYER1        /**< mpeg layer-1 decoder enabled */
 
175
        ,MPG123_FEATURE_DECODE_LAYER2        /**< mpeg layer-2 decoder enabled */
 
176
        ,MPG123_FEATURE_DECODE_LAYER3        /**< mpeg layer-3 decoder enabled */
 
177
        ,MPG123_FEATURE_DECODE_ACCURATE      /**< accurate decoder rounding    */
 
178
        ,MPG123_FEATURE_DECODE_DOWNSAMPLE    /**< downsample (sample omit)     */
 
179
        ,MPG123_FEATURE_DECODE_NTOM          /**< flexible rate decoding       */
 
180
        ,MPG123_FEATURE_PARSE_ICY            /**< ICY support                  */
 
181
};
 
182
 
 
183
/** Query libmpg123 feature, 1 for success, 0 for unimplemented functions. */
 
184
EXPORT int mpg123_feature(const enum mpg123_feature_set key);
 
185
 
164
186
/* @} */
165
187
 
166
188
 
209
231
        MPG123_NO_SEEK,                 /**< Seek not supported by stream. */
210
232
        MPG123_NO_READER,               /**< No stream opened. */
211
233
        MPG123_BAD_PARS,                /**< Bad parameter handle. */
212
 
        MPG123_BAD_INDEX_PAR,   /**< Bad parameters to mpg123_index() */
 
234
        MPG123_BAD_INDEX_PAR,   /**< Bad parameters to mpg123_index() and mpg123_set_index() */
213
235
        MPG123_OUT_OF_SYNC,     /**< Lost track in bytestream and did not try to resync. */
214
236
        MPG123_RESYNC_FAIL,     /**< Resync failed to find valid MPEG data. */
215
237
        MPG123_NO_8BIT, /**< No 8bit encoding possible. */
427
449
 */
428
450
EXPORT int mpg123_decode_frame(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes);
429
451
 
 
452
/** Decode current MPEG frame to internal buffer.
 
453
 * Warning: This is experimental API that might change in future releases!
 
454
 * Please watch mpg123 development closely when using it.
 
455
 *  \param num last frame offset gets stored there
 
456
 *  \param audio this pointer is set to the internal buffer to read the decoded audio from.
 
457
 *  \param bytes number of output bytes ready in the buffer
 
458
 */
 
459
EXPORT int mpg123_framebyframe_decode(mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes);
 
460
 
 
461
/** Find, read and parse the next mp3 frame
 
462
 * Warning: This is experimental API that might change in future releases!
 
463
 * Please watch mpg123 development closely when using it.
 
464
 */
 
465
EXPORT int mpg123_framebyframe_next(mpg123_handle *mh);
 
466
 
430
467
/*@}*/
431
468
 
432
469
 
482
519
EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec);
483
520
 
484
521
/** Give access to the frame index table that is managed for seeking.
485
 
 *  You are asked not to modify the values... unless you are really aware of what you are doing.
 
522
 *  You are asked not to modify the values... Use mpg123_set_index to set the
 
523
 *  seek index
 
524
 *  \param offsets pointer to the index array
 
525
 *  \param step one index byte offset advances this many MPEG frames
 
526
 *  \param fill number of recorded index offsets; size of the array */
 
527
EXPORT int mpg123_index(mpg123_handle *mh, off_t **offsets, off_t *step, size_t *fill);
 
528
 
 
529
/** Set the frame index table
 
530
 *  Setting offsets to NULL and fill > 0 will allocate fill entries. Setting offsets
 
531
 *  to NULL and fill to 0 will clear the index and free the allocated memory used by the index.
486
532
 *  \param offsets pointer to the index array
487
533
 *  \param step    one index byte offset advances this many MPEG frames
488
 
 *  \param fill    number of recorded index offsets; size of the array */
489
 
EXPORT int mpg123_index(mpg123_handle *mh, off_t **offsets, off_t *step, size_t *fill);
 
534
 *  \param fill    number of recorded index offsets; size of the array */ 
 
535
EXPORT int mpg123_set_index(mpg123_handle *mh, off_t *offsets, off_t step, size_t fill);
490
536
 
491
537
/** Get information about current and remaining frames/seconds.
492
538
 *  WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123!