dear friends,
         i am trying to receive a data stream over
network socket and play that using sound stream
functions . i have two structure

struct IP
        {
                int tot_length;
                int ipbits;
                int identifier;
                int flags;
                int ttl;
                int checksum;
                long int sourceip;              //has to  be converted 
                long int destip;
                long int opt;
                struct UDP
                {
                        int sourceport;
                        int destport;
                        int length;
                        int checksum;
                        struct RTP
                        {
                                int sequence;
                                int PT;
                                int rtpbits;
                                long int t_stamp;
                                long int ssrc;
                                long int csrc;
                                Int16 dataBuff[1024];
                        }rtp;

                }udp;
        
        }*ipsend,*iprecv;
                

---------------------------------------------------             
typedef struct {
    SndStreamRef soundStream;
    Int16 dataMemP[1024];
} BufPtrs;
static BufPtrs Recbufptrs,Playbufptrs;


                
the first one is for the packet which i am reciveing 
and second for playing it. i am using follwing fun



iprecv = (struct IP *)MemPtrNew(sizeof(struct IP ));
                  
  if((recbytes=recvfrom(sockfd,iprecv,sizeof(struct IP
), 0,(struct sockaddr *)&rec_addr, &addr_len)) != -1)
   {
   
MemMove(&(Playbufptrs.dataMemP),&(iprecv->udp.rtp.dataBuff),BUFSIZE);
 err = SndStreamStart(Playbufptrs.soundStream);
                        
                          }
                          else
                          {
                                FrmAlert(RecAlert);
                           }
                                                                                       
                      
                    free(iprecv);
                 }


But the application is getting hanged while executing
recvfrom function , some problem in receiving.
A similar program for recording and sending data is
working fine.

Any help in this regard will be greatly apprecited.

Regards 
rahul


________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and 
more. 
Go to: http://in.insurance.yahoo.com/licspecial/index.html

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to