| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef STREAM_CHANNEL_H_ |
| #define STREAM_CHANNEL_H_ |
| |
| #include <spice/stream-device.h> |
| |
| #include "red-channel.h" |
| |
| G_BEGIN_DECLS |
| |
| |
| |
| |
| |
| |
| typedef struct StreamChannel StreamChannel; |
| typedef struct StreamChannelClass StreamChannelClass; |
| |
| #define TYPE_STREAM_CHANNEL stream_channel_get_type() |
| |
| #define STREAM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_STREAM_CHANNEL, StreamChannel)) |
| #define STREAM_CHANNEL_CLASS(klass) \ |
| (G_TYPE_CHECK_CLASS_CAST((klass), TYPE_STREAM_CHANNEL, StreamChannelClass)) |
| #define IS_STREAM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_STREAM_CHANNEL)) |
| #define IS_STREAM_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_STREAM_CHANNEL)) |
| #define STREAM_CHANNEL_GET_CLASS(obj) \ |
| (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_STREAM_CHANNEL, StreamChannelClass)) |
| |
| GType stream_channel_get_type(void) G_GNUC_CONST; |
| |
| |
| |
| |
| StreamChannel* stream_channel_new(RedsState *server, uint32_t id); |
| |
| |
| |
| |
| void stream_channel_reset(StreamChannel *channel); |
| |
| struct StreamMsgStreamFormat; |
| struct StreamMsgStartStop; |
| |
| void stream_channel_change_format(StreamChannel *channel, |
| const struct StreamMsgFormat *fmt); |
| void stream_channel_send_data(StreamChannel *channel, |
| const void *data, size_t size, |
| uint32_t mm_time); |
| |
| typedef void (*stream_channel_start_proc)(void *opaque, struct StreamMsgStartStop *start, |
| StreamChannel *channel); |
| void stream_channel_register_start_cb(StreamChannel *channel, |
| stream_channel_start_proc cb, void *opaque); |
| |
| typedef struct StreamQueueStat { |
| uint32_t num_items; |
| uint32_t size; |
| } StreamQueueStat; |
| |
| typedef void (*stream_channel_queue_stat_proc)(void *opaque, const StreamQueueStat *stats, |
| StreamChannel *channel); |
| void stream_channel_register_queue_stat_cb(StreamChannel *channel, |
| stream_channel_queue_stat_proc cb, void *opaque); |
| |
| G_END_DECLS |
| |
| #endif |