Well you have asked 3 questions. I'll try to answer them one by one.
Quote:
1. During server mode, how does the server packetize its audio and video data into RTP packets?
|
This question needs a little explanation. What you want to know?? the algo used by server or what?
If you are confused that how the server packetize the different types of data like ASF,MPEG,XVID into RTP packets. The answer is that RTP is just the carrier, it doesn't need to know what is inside the packet. It just carry the data to the destination. No matter its MPEG or ASF etc...
Quote:
2. how do I find its codec type and any other useful information from its file data
|
You will find it from the header. Like if you see that its a AVI container then there could be MPEG4 data or H264 data or something. So all you need to do is that read the first 2K of the AVI file and parse it, it contains all the information about the CODEC, Video Stream, Audio Stream, Index location etc... You need to read some more information about the "Audio Video Containers" like AVI and header information about these containers. But its not a very tuff job to determine.
Quote:
3. Now my question is when packets lost, how do we deal with it?
|
You don't need to worry about that. When you use RTP, it ensures that you will find each and every packet. In case some packet is corrupted or lost, the RTP control channel that is running over TCP/IP requests for the retransmission of that packet. So all this process will be at lower layer and will be transparent to you. So when ever you will read the data from RTP client. you will get the complete data.
Hope i answered your questions.