summaryrefslogtreecommitdiff
path: root/lib/network.h
diff options
context:
space:
mode:
authordeva <deva>2006-08-12 15:00:40 +0000
committerdeva <deva>2006-08-12 15:00:40 +0000
commit49265541974282f3346c9dc7de2365858f9fcb4d (patch)
tree0861c3b9bdb9d64a7c68674c4f864171a26eed18 /lib/network.h
parenta145483e4f59ae76b28657cefd1b1e72fe5e4e2c (diff)
Added timecode and fixed the sending and receiving of frames through the network.
Diffstat (limited to 'lib/network.h')
-rw-r--r--lib/network.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/network.h b/lib/network.h
index e00dac7..dc7d614 100644
--- a/lib/network.h
+++ b/lib/network.h
@@ -3,7 +3,7 @@
* network.h
*
* Wed Nov 3 21:23:14 CET 2004
- * Copyright 2004 Bent Bisballe
+ * Copyright 2004 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
@@ -30,6 +30,13 @@
#include "socket.h"
#include "package.h"
+#include "frame.h"
+#include "status.h"
+
+// Frame recv buffer sizes.
+// These should be big enough for every type of frame.
+#define VFRAMESZ 720*576*4
+#define AFRAMESZ 48000*2
class Network {
public:
@@ -43,9 +50,21 @@ public:
// Package communication
int sendPackage(n_header *h, void* buf, int bufsz);
int recvPackage(n_header *h, void* buf, int bufsz);
+
+ // Frame communication
+ int sendFrame(Frame *frame);
+ Frame *recvFrame();
+
+ // Status message communication
+ int sendStatus(Status *status);
+ int recvStatus(Status *status);
private:
Socket *s;
+
+ // Frame recv buffer
+ char vframe_buf[VFRAMESZ];
+ char aframe_buf[AFRAMESZ];
};
#endif/*__NETWORK_H__*/