[Winpcap-users] how to add wav header to rtp packets I receive?

Ravi Sankar s_rsy at yahoo.com
Thu Sep 7 04:48:11 GMT 2006


Hi Vic,
   
  The procedure what has to be followed
   
  1. Extract RTP data, from the RTP header find payload type.
  2. Extract RTP data and do codec conversion if required (A law to linear or u law to linear, G.729 decoding) if required.
  3. Store the decoded data into buffer or file.
  4. Once all RTP packets you received, Find the length of RTP data. From that you form WAV header. Refer to http://www.sonicspot.com/guide/wavefiles.html for wav file header details.
   
  Hope this helps.
   
  With this approach my application is working fine with not much memory usage and CPU Time.
   
  If any one has better and efficient method let me know. It will be really helpful.
   
  Regards
  Ravi
   
  
Vic <svictor at yahoo.co.jp> wrote:
  Hi,

I am using Winpcap to capture RTP packets.
I want to add a wav header to it.I cannot really pre-append a header at the very beginning because I do not know the length of the wave file until I I get all RTP packets... 

So, right now, after I dump the whole capture to the file, I write header into a separate file and then copy the dumped RTP into that file as well.

So, it is: WINPCAP->FILE A, HEADER-> FILE B, FILE A->FILE B.

This is really inefficient and eats a lot of memory. How can I pre-append a wav header to the file being dumped by winpcap?

Is there a function in winpcap that will allow me to define this ahead of time and just let winpcap take care of this?

Thanks,
Vic


  
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users


 				
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060907/eb43a529/attachment-0001.htm


More information about the Winpcap-users mailing list