add a "tell" callback to the seekable stream encoder to make the metadata writeback more robust

This commit is contained in:
Josh Coalson
2003-09-25 04:01:49 +00:00
parent 792ddbf4c5
commit 6e2c6d9958
8 changed files with 237 additions and 54 deletions

View File

@@ -375,6 +375,7 @@ public:
// from FLAC::Encoder::SeekableStream
::FLAC__SeekableStreamEncoderSeekStatus seek_callback(FLAC__uint64 absolute_byte_offset);
::FLAC__SeekableStreamEncoderTellStatus tell_callback(FLAC__uint64 *absolute_byte_offset);
::FLAC__StreamEncoderWriteStatus write_callback(const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame);
bool die(const char *msg = 0) const;
@@ -387,6 +388,13 @@ public:
return ::FLAC__SEEKABLE_STREAM_ENCODER_SEEK_STATUS_OK;
}
::FLAC__SeekableStreamEncoderTellStatus SeekableStreamEncoder::tell_callback(FLAC__uint64 *absolute_byte_offset)
{
(void)absolute_byte_offset;
return ::FLAC__SEEKABLE_STREAM_ENCODER_TELL_STATUS_OK;
}
::FLAC__StreamEncoderWriteStatus SeekableStreamEncoder::write_callback(const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame)
{
(void)buffer, (void)bytes, (void)samples, (void)current_frame;