Skip to content

Commit

Permalink
stream TCP receive to use processinfo output post.
Browse files Browse the repository at this point in the history
  • Loading branch information
DasVinch authored and scexao6 committed Nov 13, 2023
1 parent d042356 commit d157a88
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/COREMOD_memory/stream_TCP.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ imageID COREMOD_MEMORY_image_NETWORKreceive(int port,
{
frame_md = (TCP_BUFFER_METADATA *)(buff + framesize);

img_p->md->write = 1;
img_p->md->cnt1 = frame_md->cnt1;

// copy pixel data
Expand Down Expand Up @@ -1089,21 +1090,7 @@ imageID COREMOD_MEMORY_image_NETWORKreceive(int port,

monitorindex++;

img_p->md->cnt0++;
for(semnb = 0; semnb < img_p->md->sem; semnb++)
{
semval = ImageStreamIO_semvalue(img_p, semnb);
if(semval < SEMAPHORE_MAXVAL)
{
ImageStreamIO_sempost(img_p, semnb);
}
}

sem_getvalue(img_p->semlog, &semval);
if(semval < 2)
{
sem_post(img_p->semlog);
}
processinfo_update_output_stream(processinfo, ID);
}

if(socketOpen == 0)
Expand Down

0 comments on commit d157a88

Please sign in to comment.