]> Git Repo - qemu.git/blame - hw/core/stream.c
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
[qemu.git] / hw / core / stream.c
CommitLineData
18c86e2b 1#include "qemu/osdep.h"
83c9f4ca 2#include "hw/stream.h"
0b8fa32f 3#include "qemu/module.h"
669b4983 4
35e60bfd 5size_t
42bb9c91 6stream_push(StreamSlave *sink, uint8_t *buf, size_t len)
669b4983
PC
7{
8 StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink);
9
42bb9c91 10 return k->push(sink, buf, len);
35e60bfd
PC
11}
12
13bool
14stream_can_push(StreamSlave *sink, StreamCanPushNotifyFn notify,
15 void *notify_opaque)
16{
17 StreamSlaveClass *k = STREAM_SLAVE_GET_CLASS(sink);
18
19 return k->can_push ? k->can_push(sink, notify, notify_opaque) : true;
669b4983
PC
20}
21
8c43a6f0 22static const TypeInfo stream_slave_info = {
669b4983
PC
23 .name = TYPE_STREAM_SLAVE,
24 .parent = TYPE_INTERFACE,
25 .class_size = sizeof(StreamSlaveClass),
26};
27
28
29static void stream_slave_register_types(void)
30{
31 type_register_static(&stream_slave_info);
32}
33
34type_init(stream_slave_register_types)
This page took 0.362675 seconds and 4 git commands to generate.