aboutsummaryrefslogtreecommitdiff
path: root/hw/core/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/stream.c')
-rw-r--r--hw/core/stream.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/hw/core/stream.c b/hw/core/stream.c
index a07d6a56d3..5397a8d74a 100644
--- a/hw/core/stream.c
+++ b/hw/core/stream.c
@@ -1,11 +1,20 @@
#include "hw/stream.h"
-void
+size_t
stream_push(StreamSlave *sink, uint8_t *buf, size_t len, uint32_t *app)
{
StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink);
- k->push(sink, buf, len, app);
+ return k->push(sink, buf, len, app);
+}
+
+bool
+stream_can_push(StreamSlave *sink, StreamCanPushNotifyFn notify,
+ void *notify_opaque)
+{
+ StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink);
+
+ return k->can_push ? k->can_push(sink, notify, notify_opaque) : true;
}
static const TypeInfo stream_slave_info = {