revamp decoder process calls

This commit is contained in:
Josh Coalson
2002-08-02 06:12:36 +00:00
parent ebece62ea1
commit cfdfc82801
14 changed files with 283 additions and 355 deletions

View File

@@ -94,6 +94,18 @@ namespace FLAC {
return State(::FLAC__file_decoder_get_state(decoder_));
}
SeekableStream::State File::get_seekable_stream_decoder_state() const
{
FLAC__ASSERT(0 != decoder_);
return SeekableStream::State(::FLAC__file_decoder_get_seekable_stream_decoder_state(decoder_));
}
Stream::State File::get_stream_decoder_state() const
{
FLAC__ASSERT(0 != decoder_);
return Stream::State(::FLAC__file_decoder_get_stream_decoder_state(decoder_));
}
bool File::get_md5_checking() const
{
FLAC__ASSERT(0 != decoder_);
@@ -146,28 +158,22 @@ namespace FLAC {
return (bool)::FLAC__file_decoder_finish(decoder_);
}
bool File::process_whole_file()
bool File::process_single()
{
FLAC__ASSERT(0 != decoder_);
return (bool)::FLAC__file_decoder_process_whole_file(decoder_);
return (bool)::FLAC__file_decoder_process_single(decoder_);
}
bool File::process_metadata()
bool File::process_until_end_of_metadata()
{
FLAC__ASSERT(0 != decoder_);
return (bool)::FLAC__file_decoder_process_metadata(decoder_);
return (bool)::FLAC__file_decoder_process_until_end_of_metadata(decoder_);
}
bool File::process_one_frame()
bool File::process_until_end_of_file()
{
FLAC__ASSERT(0 != decoder_);
return (bool)::FLAC__file_decoder_process_one_frame(decoder_);
}
bool File::process_remaining_frames()
{
FLAC__ASSERT(0 != decoder_);
return (bool)::FLAC__file_decoder_process_remaining_frames(decoder_);
return (bool)::FLAC__file_decoder_process_until_end_of_file(decoder_);
}
bool File::seek_absolute(FLAC__uint64 sample)

View File

@@ -88,6 +88,12 @@ namespace FLAC {
return State(::FLAC__seekable_stream_decoder_get_state(decoder_));
}
Stream::State SeekableStream::get_stream_decoder_state() const
{
FLAC__ASSERT(is_valid());
return Stream::State(::FLAC__seekable_stream_decoder_get_stream_decoder_state(decoder_));
}
bool SeekableStream::get_md5_checking() const
{
FLAC__ASSERT(is_valid());
@@ -157,28 +163,22 @@ namespace FLAC {
return (bool)::FLAC__seekable_stream_decoder_reset(decoder_);
}
bool SeekableStream::process_whole_stream()
bool SeekableStream::process_single()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__seekable_stream_decoder_process_whole_stream(decoder_);
return (bool)::FLAC__seekable_stream_decoder_process_single(decoder_);
}
bool SeekableStream::process_metadata()
bool SeekableStream::process_until_end_of_metadata()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__seekable_stream_decoder_process_metadata(decoder_);
return (bool)::FLAC__seekable_stream_decoder_process_until_end_of_metadata(decoder_);
}
bool SeekableStream::process_one_frame()
bool SeekableStream::process_until_end_of_stream()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__seekable_stream_decoder_process_one_frame(decoder_);
}
bool SeekableStream::process_remaining_frames()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__seekable_stream_decoder_process_remaining_frames(decoder_);
return (bool)::FLAC__seekable_stream_decoder_process_until_end_of_stream(decoder_);
}
bool SeekableStream::seek_absolute(FLAC__uint64 sample)

View File

@@ -141,28 +141,22 @@ namespace FLAC {
return (bool)::FLAC__stream_decoder_reset(decoder_);
}
bool Stream::process_whole_stream()
bool Stream::process_single()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_decoder_process_whole_stream(decoder_);
return (bool)::FLAC__stream_decoder_process_single(decoder_);
}
bool Stream::process_metadata()
bool Stream::process_until_end_of_metadata()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_decoder_process_metadata(decoder_);
return (bool)::FLAC__stream_decoder_process_until_end_of_metadata(decoder_);
}
bool Stream::process_one_frame()
bool Stream::process_until_end_of_stream()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_decoder_process_one_frame(decoder_);
}
bool Stream::process_remaining_frames()
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__stream_decoder_process_remaining_frames(decoder_);
return (bool)::FLAC__stream_decoder_process_until_end_of_stream(decoder_);
}
::FLAC__StreamDecoderReadStatus Stream::read_callback_(const ::FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data)