Rework the wire protocol

Send a command stream over the socket.
Implement a new buffer object that holds the data and commands.
Make iterator and builders to parse and construct buffers.
Rework gstreamer elements to use new API for creating and parsing
buffers.
Add _release_buffer to notify a stream when we are done processing the
buffer. This will eventually go all the way to the server and will allow
us to do more complicated buffer management.
This commit is contained in:
Wim Taymans 2015-08-24 16:41:04 +02:00
parent d0f3f3125b
commit c47fcd8105
14 changed files with 937 additions and 229 deletions

View file

@ -22,6 +22,7 @@
#include <glib-object.h>
#include <client/buffer.h>
#include <client/context.h>
G_BEGIN_DECLS
@ -53,16 +54,6 @@ typedef enum {
PINOS_STREAM_FLAGS_NONE = 0,
} PinosStreamFlags;
typedef struct {
guint32 flags;
guint32 seq;
gint64 pts;
gint64 dts_offset;
guint64 offset;
guint64 size;
GSocketControlMessage *message;
} PinosBufferInfo;
typedef enum {
PINOS_STREAM_MODE_SOCKET = 0,
PINOS_STREAM_MODE_BUFFER = 1,
@ -114,9 +105,12 @@ gboolean pinos_stream_start (PinosStream *stream,
gboolean pinos_stream_stop (PinosStream *stream);
gboolean pinos_stream_capture_buffer (PinosStream *stream,
PinosBufferInfo *info);
PinosBuffer *buffer);
void pinos_stream_release_buffer (PinosStream *stream,
PinosBuffer *buffer);
gboolean pinos_stream_provide_buffer (PinosStream *stream,
PinosBufferInfo *info);
PinosBuffer *buffer);
G_END_DECLS