summaryrefslogtreecommitdiffstats
path: root/test-server.c
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2014-05-09 20:28:25 +0200
committerTimo Dritschler <timo.dritschler@kit.edu>2014-05-09 20:28:25 +0200
commit86c5a2afb4cbebbc7b41b9815c993c4fcc099b64 (patch)
tree2b5e166a7f73c6f3fd8d47fc6737d201a9fd06db /test-server.c
parentb39079922bb4288dee30dfcb89a0fa0d20e81632 (diff)
downloadkiro-86c5a2afb4cbebbc7b41b9815c993c4fcc099b64.tar.gz
kiro-86c5a2afb4cbebbc7b41b9815c993c4fcc099b64.tar.bz2
kiro-86c5a2afb4cbebbc7b41b9815c993c4fcc099b64.tar.xz
kiro-86c5a2afb4cbebbc7b41b9815c993c4fcc099b64.zip
Added SDL (Simple Direct media Layer) image output to testing framework
Test communicaation between server and client now passes images via KIRO-TRB Updated Makefile Removed Super-Verbose output from kiro_client_sync
Diffstat (limited to 'test-server.c')
-rw-r--r--test-server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test-server.c b/test-server.c
index 1becb31..63fefaa 100644
--- a/test-server.c
+++ b/test-server.c
@@ -118,7 +118,7 @@ print_current_frame (gchar *buffer, guint number, guint width, guint height, GRa
//pattern
for (guint y = 16; y < height; y++) {
guint index = y * width;
- memcpy(&buffer[index], &default_line[0], width);
+ memcpy(buffer+index, &default_line[0], width);
}
//This block will fill a square at the center of the image with normal
@@ -143,7 +143,7 @@ int main(void)
{
KiroServer *server = g_object_new(KIRO_TYPE_SERVER, NULL);
KiroTrb *rb = g_object_new(KIRO_TYPE_TRB, NULL);
- kiro_trb_reshape(rb, 512*512, 1000);
+ kiro_trb_reshape(rb, 512*512, 15);
GRand *rand = g_rand_new();
if(0 > kiro_server_start(server, NULL, "60010", kiro_trb_get_raw_buffer(rb), kiro_trb_get_raw_size(rb)))
{
@@ -152,9 +152,11 @@ int main(void)
}
guint frame = 0;
+ gchar *buffer = NULL;
while(1)
{
- print_current_frame(kiro_trb_dma_push(rb), frame, 512, 512, rand);
+ buffer = kiro_trb_dma_push(rb);
+ print_current_frame(buffer, frame, 512, 512, rand);
frame++;
}