Project Specifications for CS400 Advance Windows Network Programming Schoo of Computing, Communication University of China December 11, 2015. Due December 30, 2015 Toos and Patform The foowing toos and patforms are to be used in the projects: Operating System: Microsoft Windows Language: C++ Deveopment Toos: Microsoft Visua Studio 201x Winsock 2.2 Project 10 RTSP Windows Cient: RFC 2326 A. Overview 1. Introduction of RTSP The Rea Time Streaming Protoco (RTSP, RFC 2326, http://www.cs.coumbia.edu/~hgs/rtsp/) is a network contro protoco designed for use in entertainment and communications systems to contro streaming media servers. The protoco is used for estabishing and controing media sessions between end points. Cients of media servers issue VCR-ike commands, such as pay and pause, to faciitate rea-time contro of payback of media fies from the server. The transmission of streaming data itsef is not a task of the RTSP protoco. Most RTSP servers use the Rea-time Transport Protoco (RTP, RFC 3550, 3551, http://www.cs.coumbia.edu/~hgs/rtp/) for media stream deivery; however some vendors impement proprietary transport protocos. Whie simiar in some ways to HTTP, RTSP defines contro sequences usefu in controing mutimedia payback. Whie HTTP is stateess, RTSP has state; an identifier is used when needed to track concurrent sessions. Like HTTP, RTSP uses TCP to maintain an end-to-end connection and, whie most RTSP contro messages are sent by the cient to the server, some commands trave in the other direction (i.e. from server to cient). Presented here are the basic RTSP requests. Some typica HTTP requests, ike the OPTIONS request, are aso avaiabe. The defaut transport ayer port number is 554. OPTIONS An OPTIONS request returns the request types the server wi accept. DESCRIBE A DESCRIBE request incudes an RTSP URL (rtsp://...), and the type of repy data that can be handed. The defaut port for the RTSP protoco is 554 for both UDP and TCP transports. This repy incudes the presentation description, typicay in Session Description Protoco (SDP, RFC 4566) format. Among other things, the presentation description ists the media streams controed with the aggregate URL. In the typica case, there is one media stream each for audio and video. SETUP A SETUP request specifies how a singe media stream must be transported. This must be done before a PLAY request is sent. The request contains the media stream
URL and a transport specifier. This specifier typicay incudes a oca port for receiving RTP data (audio or video), and another for RTCP data (meta information). The server repy usuay confirms the chosen parameters, and fis in the missing parts, such as the server's chosen ports. Each media stream must be configured using SETUP before an aggregate pay request may be sent. PLAY A PLAY request wi cause one or a media streams to be payed. Pay requests can be stacked by sending mutipe PLAY requests. The URL may be the aggregate URL (to pay a media streams), or a singe media stream URL (to pay ony that stream). A range can be specified. If no range is specified, the stream is payed from the beginning and pays to the end, or, if the stream is paused, it is resumed at the point it was paused. PAUSE A PAUSE request temporariy hats one or a media streams, so it can ater be resumed with a PLAY request. The request contains an aggregate or media stream URL. A range parameter on a PAUSE request specifies when to pause. When the range parameter is omitted, the pause occurs immediatey and indefinitey. TEARDOWN A TEARDOWN request is used to terminate the session. It stops a media streams and frees a session reated data on the server. GET_PARAMETER The GET_PARAMETER request retrieves the vaue of a parameter of a presentation or stream specified in the URI. The content of the repy and response is eft to the impementation. GET_PARAMETER with no entity body may be used to test cient or server iveness ("ping"). 2. Introduction of LIVE555 We wi use LIVE555 as the streaming server for testing your RTSP Windows cient payer. LIVE555 is an open source (LGPL) C++ ibrary for mutimedia streaming. This code forms a set of C++ ibraries for mutimedia streaming, using open standard protocos (RTP/RTCP, RTSP, SIP). The ibraries are aready being used to impement appications such as: "the LIVE555 Media Server" (a RTSP server appication, http://www.ive555.com/mediaserver/); "ivecaster"(http://www.ive555.com/ivecaster/) and "payrtpmpeg" (http://www.ive555.com/mutikit/payrtpmpeg.htm)(for streaming MP3 audio using RTP/RTCP); and "vobstreamer"(http://www.ive555.com/vobstreamer/) (for streaming DVD content using RTP/RTCP/RTSP). The ibraries can aso be used to stream, receive, and process MPEG, H.264, H.263+, DV or JPEG video, and severa audio codecs. They can easiy be extended to support additiona (audio and/or video) codecs, and can aso be used to buid basic RTSP or SIP cients and servers, and have been used to add streaming support to existing media payer appications, such as "VLC"(http://www.videoan.org/vc/) and "MPayer"(http://www.ive555.com/mpayer/).
B. Specification Your assignment is to write a RTSP cient that shoud work with LIVE555 Media Server. 1. Your impementation shoud foow the specification in the Rea Time Streaming Protoco (RTSP, RFC 2326, http://toos.ietf.org/htm/rfc2326), so that your version of RTSP Cient is abe to work together with the LIVE555 MediaServer. 2. Your impementation shoud foow the specification in the Rea-time Transport Protoco (RTP, RFC 3550, 3551) and RTP Payoad Format for MPEG1/MPEG2 Video (RFC 2250), so that your version of RTSP Cient is abe to hande RTP packets correcty. You may achieve this by writing your own code or just using a third party ibrary, such as: The JRDPLIB is an open-source project for packetizing/de-packetizing video/audio data over RTP (http://research.edm.uhasset.be/~jori/page/index.php?n=cs.jrtpib). (The JRTPLIB has routines for RTCP, but RTCP is not needed in your impementation because you are not required to encode/decode the audio/video stream data dynamicay.), you can aso refer to a programming instruction (http://bog.csdn.net/bog51/artice/detais/2408531) in Chinese. A tiny RTP ibrary (http://icourse.cuc.edu.cn/networkprogramming/assignments/ RTSP/70565912.bog.51cto.com/Rtsp.rar) introduced by http://70565912.bog.51cto.com. 3. The exampe version RTSP Cient (openrtsp, http://www.ive555.com/openrtsp/) is a inux command-ine program that can be used to open, stream, receive, and (optionay) record media streams that are specified by a RTSP URL - i.e., an URL that begins with rtsp://. Your newy deveoped appication shoud be a MFC appication on Windows patform, but you are free to choose any mechanisms for socket I/O mutipexing (Bocking with Muti-threading, the seect( ) system ca, asynchronous programming with WSAAsyncSeect or any other modes). It is important that you shoud impement the RTSP cient to be independent of the LIVE555 ibraries (that means using any source codes of LIVE555 in your impementation is not permitted.). 4. Your RTSP Cient Must accompish basic and advanced functions: Basic function: Visit the on-demand fie stream from the Live555MediaServer with URL: rtsp://127.0.0.1:8554/mp3audiotest (Windows version) or rtsp://127.0.0.1:554/test.mp3 (Linux version). The fie test.mp3 wi be ready for your RTSP request. The basic task of your RTSP Cient is that it can record the steam as a oca media fie. Advanced function: The advanced task of your RTSP Cient is that it can pay the media fie (mp3 ony) from the on-demand streaming server. You can do this by taking advantage of the ibvc-ibrary, which is the core component of the VLC media payer. An exampe can be found at http://www.codeproject.com/artices/38952/vlcwrapper-a-litte-c-wrapper-around-ibvc. Pease refer to ibvc (http://www.videoan.org/vc/ibvc.htm) and find the ibs on the VideoLan site (ftp://ftp.videoan.org/pub/videoan/vc/2.1.5/) in specia ZIP fies intended for deveopers. Note: You shoud use VLC to pay mp3 ony, pease write your own code to interpret RTSP/RTP and stream down the mp3 fie.
5. Impementations that do not use Object-Oriented Programming wi not be accepted. That aso means it is not acceptabe to write this project in a singe function (or even just a coupe of functions). Notes: You can downoad the ive555 on the course website. There are two versions (Linux @ http://icourse.cuc.edu.cn/networkprogramming/assignments/rtsp/ive-inux.rar and Windows@ http://icourse.cuc.edu.cn/networkprogramming/assignments/rtsp/ive-wondows.rar ), both incude source and executabe fies. You can use the source code to anayze the RTSP protoco, and run the executabe fie to test your cient. If you choose the Linux version, you can find the server (ive555mediaserver) under ive/mediaserver/, and if you choose the Windows version, you can find the server (server.exe) under ive/bin/. And you can use ive/testprogs/testmp3receiver.cpp as the demo of the cient. But a more sophisticated version of mutimedia payer, "VLC" can be used for a cear demonstration. 1) Downoad atest VLC @ http://www.videoan.org/vc/downoad-windows.htm and setup VLC. 2) Open the Open Media Diaog by cick menu [Media] -> [Open Network Stream] 3) In the bank, type rtsp://computing.cuc.edu.cn/ange.mp3 for a test run.
C. Grading Your project wi be tested to make sure it works propery with the ive555 media server. Here is a rough breakdown of the grading: Basic function goes we 50% Advanced function goes we 20% Deaing with impoite requests, unexpected messages 10% Error handing, Stye/Code structure, etc. 20% Extra credits: Ø We defined project report +5 p Ø Eegant GUI interface +5 p Note: 20% of your project grade depends on the how "we your code is written". These points incude the foowing: Error handing (check every system ca for an error!). Safe code (avoiding buffer overfow, etc). How we we can understand your code. There is no required format for your code; there is no requirement ike "you must have one comment for every 2.35 ines of code". Fee free to provide whatever eve of commenting you beieve is appropriate to make sure that other competent programmers coud easiy understand and make changes to your code. Note: A functions wi be tested on different machines. Submissions that do not use Object Oriented Programming with C++ wi not be accepted. If the submitted source code cannot be compied by Visua Studio 201x, your grade wi be deducted. Late submission wi be punished with grade deductions.