Table of Contents
|
Introduction
Here are notes related to project for Programming Computer Networks subject.
What for ?
Main aim of project is to show main ideas related to how transmit video data through RTP [1].
What does it do ?
This project consist two packages:
- server
- client
Server reads animation and sends to client over RTP protocol - to be more specific TCP/UDP/RTP.
Animation is a sequence of images.
Image is a pixmap file of DIB format (also known as BMP OS/2 , Windows bitmap format).
Client receives raw interlaced data.
On beginning accumulates data into buffer.
No feedback information is being send to server - no Qos, no RTSP.
Sources and sources' documentation
Download
http://grzegorz.wierzowiecki.pl/projects/sko/anirtp/
Sources' Documentation
http://grzegorz.wierzowiecki.pl/projects/sko/anirtp/docs/
Compilation and usage
Compilation
make - to make all
make clean -to clean
make <TARGET> -to make taget
Targets are described in "Usage" section (soory for little mess).
If it complains about lack of libglut (-lglut) do folllowing:
Find where you have glut libs :
/sbin/ldconfig -p | grep libglut
On my system it gave me
libglut.so.3 (libc6,x86-64) => /usr/lib64/libglut.so.3
libglut.so.3 (libc6) => /usr/lib/libglut.so.3
libglut.so (libc6,x86-64) => /usr/lib64/libglut.so
libglut.so (libc6) => /usr/lib/libglut.so
but on other it gave me /usr/X11R6/lib path.
Let's assume that on your's it's /usr/X11R6/lib , cause it's usual path.
Now edit Makefile file and change lopt line to
lopt=-L/usr/X11R6/lib -lGL -lglut
Now it should compile fine… if not, try to install glut on your system (i.e. freeglut).
Preparing series of images
Usage
sendrtp_example.bin
An example application that sends rtp packets. You can specify parameters in main loop, and check with sniffer (i.e. Wireshark) and "Decode AS RTP" , how does it look like.
Testing sending RTP packets with code template.
./sendrtp_example.bin -h 127.0.0.1:56777
udpproxy.bin
Udp proxy application. Good for simulating network problems.
Just proxing
./udpproxy.bin -me 127.0.0.1:56777 -d 127.0.0.1:56779
Proxing with "quality" 50% (I mean with 50% packets forwared) and statistics
./udpproxy.bin -me 127.0.0.1:56777 -d 127.0.0.1:56779 -stat on -q 50
sendrtp_images.bin
This sends images over RTP.
With standart speed, etc.
ls -1 *.bmp | sort | ./sendrtp_images.bin -me 127.0.0.1:35007 -d 127.0.0.1:56777
And with addtionall info
ls -1 *.bmp | sort | ./sendrtp_images.bin -me 127.0.0.1:35007 -d 127.0.0.1:56777 -stat on
Or from another directory
find /long/direcotry/path -name '*.bmp' | sort | ./sendrtp_images.bin -me 127.0.0.1:35007 -d 127.0.0.1:5677
Design notes.
This program uses interlacing technique to reduce negative impact of package loss.
Information sources
- RTP: Real-Time Transport Protocol - Good explanations about RTP packet structure
- wikipedia: Real-time Transport Protocol
- GNU: ccRTP
- "OpenGL - Księga eksperta" / "Opengl Superbible: The Complete Guide to Opengl Programming for Windows Nt and Windows 95" - Michael Sweet,Richard S. Wright jr
- wikipedia:Windows and OS/2 bitmap
- BMP image format and other data formats
- An introduction to DIBs (Device Independent Bitmaps)