diff options
author | Josh Coalson <jcoalson@users.sourceforce.net> | 2003-09-24 22:08:00 +0000 |
---|---|---|
committer | Josh Coalson <jcoalson@users.sourceforce.net> | 2003-09-24 22:08:00 +0000 |
commit | d36b346dbbb55c274e0074bdbbc41c1f3ae4bc71 (patch) | |
tree | fb6da61f9e7e7a114c0efbfe66af7b0256f36245 /include | |
parent | c6d1fc8a230a3dbd7bffe1dd2f48bcca7a982b5c (diff) | |
download | flac-d36b346dbbb55c274e0074bdbbc41c1f3ae4bc71.tar.gz |
add resolved_as_cstring()
Diffstat (limited to 'include')
-rw-r--r-- | include/FLAC++/decoder.h | 1 | ||||
-rw-r--r-- | include/FLAC/stream_decoder.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/FLAC++/decoder.h b/include/FLAC++/decoder.h index d0bbfe99..c98b6a69 100644 --- a/include/FLAC++/decoder.h +++ b/include/FLAC++/decoder.h @@ -95,6 +95,7 @@ namespace FLAC { inline State(::FLAC__StreamDecoderState state): state_(state) { } inline operator ::FLAC__StreamDecoderState() const { return state_; } inline const char *as_cstring() const { return ::FLAC__StreamDecoderStateString[state_]; } + inline const char *resolved_as_cstring(const Stream &decoder) const { return ::FLAC__stream_decoder_get_resolved_state_string(decoder.decoder_); } protected: ::FLAC__StreamDecoderState state_; }; diff --git a/include/FLAC/stream_decoder.h b/include/FLAC/stream_decoder.h index d2fb6bb7..0075cabe 100644 --- a/include/FLAC/stream_decoder.h +++ b/include/FLAC/stream_decoder.h @@ -606,6 +606,16 @@ FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDec */ FLAC_API FLAC__StreamDecoderState FLAC__stream_decoder_get_state(const FLAC__StreamDecoder *decoder); +/** Get the current decoder state as a C string. + * + * \param decoder A decoder instance to query. + * \assert + * \code decoder != NULL \endcode + * \retval const char * + * The decoder state as a C string. Do not modify the contents. + */ +FLAC_API const char *FLAC__stream_decoder_get_resolved_state_string(const FLAC__StreamDecoder *decoder); + /** Get the current number of channels in the stream being decoded. * Will only be valid after decoding has started and will contain the * value from the most recently decoded frame header. |