From 86c5a2afb4cbebbc7b41b9815c993c4fcc099b64 Mon Sep 17 00:00:00 2001 From: Timo Dritschler Date: Fri, 9 May 2014 20:28:25 +0200 Subject: 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 --- test-server.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test-server.c') 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++; } -- cgit v1.2.3