I have two streams of data, one with audio data,the other with video data.
The sound i record with DirectSound is put in a buffer of 100ms length and a DirectShow ISampleGrabbe witch grabs frame for me at 30 frames per second(one frame at each 33,33 ms).
What TimeStamping means? Should I attach to the video/audio a DateTime field and verify at receiving which audio packet have the same TimeStamp with the video frame?
I know this is a really hard subject, but can you please give me an idea?
It means each video/audio element has a time offset that says when it must be played in relation to when the video/audio was started. So the receiving end will order received elements by their timestamp and play them in order, also it will wait when video or audio elements are missing.
You should not add a DateTime attribute to every element. Instead the video/audio header should indicate at what framerate or frequency the media must be played and therefore how much elements it will receive every second. So a simple autonumber would do. It’s the players responsibility to order the received elements and check if the point to where it has received all elements is far enough in the future that it can keep playing.