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

David Chang dchang at fsautomation.com
Thu Sep 7 00:35:32 GMT 2006


Vic,

Is the RTP header fixed length?  Or, can you make it fixed length?

If so, why don't you just write a fixed amount of zeros to the beginning of the file (before capturing the packets), then capture the packets and append to the file.  When the capture is complete, build the header data, rewind the file pointer, and overwrite the fixed amount of zeros.

DC
  ----- Original Message ----- 
  From: Vic 
  To: winpcap-users at winpcap.org 
  Sent: Wednesday, September 06, 2006 4:53 PM
  Subject: [Winpcap-users] how to add wav header to rtp packets I receive?


  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060907/a7cd2322/attachment.htm


More information about the Winpcap-users mailing list