例子1
Here's a small IPv4 example: it asks for a portbase and a destination and starts sending packets to that destination.
只是简单的参考发送接收,没有实际意义,时间戳1.0/10.0 相当于采样频率是10
而且没有设置时间戳增量
例子2 有很大参考意义
时间戳1.0/8000.0 时间戳增量160 8000除以160等于50
而且等等RTPTime delay(0.020); 每秒发送50次,相当于50帧 太有借鉴意义了
每帧数据大小是160字节,当然也可以改成其它1400字节啥的
例子3 自动记载会话中的ip和端口 自动回复
This IPv4 example listens for incoming packets and automatically adds destinations for new sources.
例子4
This IPv4 example uses the background thread itself to process all packets.You can use example one to send data to the session that's created in this example.
评论