summaryrefslogtreecommitdiff
path: root/test/FakeDecoderAPI.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/FakeDecoderAPI.cxx')
-rw-r--r--test/FakeDecoderAPI.cxx40
1 files changed, 2 insertions, 38 deletions
diff --git a/test/FakeDecoderAPI.cxx b/test/FakeDecoderAPI.cxx
index cd8d52cf2..9204835fe 100644
--- a/test/FakeDecoderAPI.cxx
+++ b/test/FakeDecoderAPI.cxx
@@ -80,51 +80,15 @@ FakeDecoder::OpenUri(const char *uri)
}
size_t
-decoder_read(gcc_unused DecoderClient *client,
- InputStream &is,
- void *buffer, size_t length)
+FakeDecoder::Read(InputStream &is, void *buffer, size_t length)
{
try {
return is.LockRead(buffer, length);
- } catch (const std::runtime_error &) {
+ } catch (const std::runtime_error &e) {
return 0;
}
}
-bool
-decoder_read_full(DecoderClient *client, InputStream &is,
- void *_buffer, size_t size)
-{
- uint8_t *buffer = (uint8_t *)_buffer;
-
- while (size > 0) {
- size_t nbytes = decoder_read(client, is, buffer, size);
- if (nbytes == 0)
- return false;
-
- buffer += nbytes;
- size -= nbytes;
- }
-
- return true;
-}
-
-bool
-decoder_skip(DecoderClient *client, InputStream &is, size_t size)
-{
- while (size > 0) {
- char buffer[1024];
- size_t nbytes = decoder_read(client, is, buffer,
- std::min(sizeof(buffer), size));
- if (nbytes == 0)
- return false;
-
- size -= nbytes;
- }
-
- return true;
-}
-
void
FakeDecoder::SubmitTimestamp(gcc_unused double t)
{