HP-UX Multimedia Streaming Protocols (MSP) Programmer's Guide

Make File
The make file for RTP is as follows:
all : sender recver
sender: sender.c
cc -O sender.c -o sender -l rtp
recver: recver.c
cc -O recver.c -o recver -l rtp
Compiling the Sample RTP Program
This section describes how to compile the sample RTP program.
Before compiling the program, ensure that the rtp.h header file and the librtp
library that come with HP-UX MSP are available on the machine. The rtp.h header
file is assumed to be in the /usr/include directory and the librtp library in the
/usr/lib directory.To compile, issue the following commands:
$ cc recver.c -o recver -lrtp
$ cc sender.c -o sender -lrtp
Alternatively, you can use the make file to compile the RTP programs as follows:
$ make all
or
$ make sender
$ make recver
RTSP Sample Program
You can use the sampleclient.c program, a minimal RTSP client, to send RTSP
messages to a server.The program is interactive and allows you to choose the type of
RTSP message to be sent to a server. Based on the RTSP message type, you may be
prompted to enter additional information.
The following is a sample program for the RTSP module of the MSP suite of libraries:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rtsp.h>
/*
* connect2server :
* Parse the url string and create a RTSP
* Connection to the server identified by the url.
*/
rtsp_conn_t *
connect2server(char *mediaurl)
{
92 Sample Programs