This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

the operation of NDK and video on evmDM642

Hi,

            Now,I am doing the work about the NDK and the video.  When I processed the video,I want to transfer part of one picture data to PC through the network,So, I used the NDK to carry out this work of network.My question is:

            I combined the NDK UDP appliction with the video applition,and compile passed.Now ,I want to transfer some data of one frame image to PC after process the video.  the network application and video application in a task respectively. and I used a semphone to synchro the two task. the task of the network priority is 5,and the video priority is 2,so the network application is running firstly.the statement is listed below:

           static void NetworkOpen()
           {
                   TSK_sleep(4000);
                   SEM_pend(SEM0,SYS_FOREVER);
                   hUdpSoc   = TaskCreate( SendData, "NetTx",    1, 0x1400, 0, 0, 0 );
           }

and when it was pend,It go to run the video appliction ,

 paint_rectangle(dilate);
 if(flag==1)
 SEM_post(SEM0);

But,I run this appliction on evmDM642,the monitor display nothing and the network was not working ether.

the setting is right? and the logic is right?

When I remove the semphone ,the monitor display the video that i processed,but the network was not work,and serverl seconds later,the appliction can not run again.

  • I am not exactly sure what you are trying to do, but from the code fragments I guess you are trying to start a task when the network is "opened".  I think you should change your logic so the task is created outside of the "open" callback and it blocks on a semaphore that is signaled in NetworkOpen(). So the NetworkOpen would like

    NetworkOpen()

    {

         SEM_post(netTaskSem);

    }

    Sleeping and blocking in the NetworkOpen callback is not a good idea.

    Mark