林老师最后一次大作业:Project 10 – RTSP Windows Client: RFC 2326

本文档详细介绍了基于RTSP的Windows客户端项目,涵盖RTSP协议、LIVE555库的介绍,以及基本和高级功能的实现。通过类图和时序图展示解决方案设计,并提供了测试用例及结果分析,涉及到VLC等媒体播放器的RTSP支持。
摘要由CSDN通过智能技术生成

Section I Problem Specification

翻译老师要求:

也可以直接看我另一篇 博客
题目:Project 10 – RTSP Windows Client: RFC 2326
RSTP的windows客户端:RFC 2326

A. Overview

Introduction of RTSP
The Real Time Streaming Protocol (RTSP, RFC 2326, http://www.cs.columbia.edu/~hgs/rtsp/) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between end points. Clients of media servers issue VCR-like commands, such as play and pause, to facilitate real-time control of playback of media files from the server.


译:A.总览
1.介绍RTSP
实时流传输协议(RTSP,RFC 2326)是一种在娱乐和交流系统中被用于控制流媒体服务器的网络控制协议。该协议被用于在两个端点(译者:最好简单理解为一个播放MP3的播放器的客户端,和一个服务端)之间建立和控制媒体的交流。媒体的客户端能够发出类似于VCR的命令行,例如播放、暂停,因此有利于实时控制来自服务器的媒体文件的播放。



The transmission of streaming data itself is not a task of the RTSP protocol. Most RTSP servers use the Real-time Transport Protocol (RTP, RFC 3550, 3551, http://www.cs.columbia.edu/~hgs/rtp/) for media stream delivery; however some vendors implement proprietary transport protocols.
While similar in some ways to HTTP, RTSP defines control sequences useful in controlling multimedia playback. While HTTP is stateless, 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, while most RTSP control messages are sent by the client to the server, some commands travel in the other direction (i.e. from server to client).

译:RTSP并不负责流数据的传输。大多数RTSP服务器使用实时传输协议(RTP, RFC 3550, 3551)传输流数据。然而大多数供应商也会考虑使用自己发明的协议。
某种意义上讲与HTTP协议相似,RTSP定义了有利于控制多媒体播放的控制序列。然后HTTP没有状态,而RTSP是有状态的(译者:RTSP协议在播放音乐时有播放、暂停的状态)。如果需要,会有一个标示符用于跟踪并发的会话。类似于HTTP,RTSP使用TCP维持端到端的联接,并且,当大多数RTSP控制消息被客户端发送至服务端的同时,也有一些命令从服务端发送到客户端。


Presented here are the basic RTSP requests. Some typical HTTP requests, like the OPTIONS request, are also available. The default transport layer port number is 554.
OPTIONS
An OPTIONS request returns the request types the server will accept.
DESCRIBE
A DESCRIBE request includes an RTSP URL (rtsp://...), and the type of reply data that can be handled. The default port for the RTSP protocol is 554 for both UDP and TCP transports. This reply includes the presentation description, typically in Session Description Protocol (SDP, RFC 4566) format. Among other things, the presentation description lists the media streams controlled with the aggregate URL. In the typical case, there is one media stream each for audio and video.
SETUP
A SETUP request specifies how a single 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 typically includes a local port for receiving RTP data (audio or video), and another for RTCP data (meta information). The server reply usually confirms the chosen parameters, and fills in the missing parts, such as the server's chosen ports. Each media stream must be configured using SETUP before an aggregate play request may be sent.
PLAY
A PLAY request will cause one or all media streams to be played. Play requests can be stacked by sending multiple PLAY requests. The URL may be the aggregate URL (to play all media streams), or a single media stream URL (to play only that stream). A range can be specified. If no range is specified, the stream is played from the beginning and plays to the end, or, if the stream is paused, it is resumed at the point it was paused.
PAUSE
A PAUSE request temporarily halts one or all media streams, so it can later 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 immediately and indefinitely.
TEARDOWN
A TEARDOWN request is used to terminate the session. It stops all media streams and frees all session related data on the server.
GET_PARAMETER
The GET_PARAMETER request retrieves the value of a parameter of a presentation or stream specified in the URI. The content of the reply and response is left to the implementation. GET_PARAMETER with no entity body may be used to test client or server liveness ("ping").

译:下面列出来的都是基本的RTSP请求消息,另外一些典型的HTTP的请求消息,比如OPTIONS,也是可以使用的。默认的传输层的端口号是554.
OPTIONS:使用该请求消息,将会返回服务器将要接受的请求类型。

DESCRIBE:该请求消息包括一个RTSP的URL(rtsp://...),并且能够被处理的回应数据的类型。对于UDP和TCP的传输,RTSP默认的端口号是554。回应包括了会话描述协议格式(SDP, RFC 4566)的表示描述,此外,表示描述还列出了被聚合URL控制的媒体流。在典型的情况下,这里各有一个媒体流负责音频和视频。

SETUP:该请求消息详细说明了一个单独的媒体流将如何被传输。该消息必须先于PLAY消息发送。该消息应该包含媒体流的URL和一个传输的标示符。这个标示符应该包含一个本地的端口用于接收RTP的数据(包括音频或者视频),和另一个端口用于接收RTCP数据(元信息)。服务端作出回应时,通常会确认一些参数,并且填满遗失的部分,包括服务端的端口。每一个媒体流都必须确认已经在一个聚合的PLAY请求消息发送之前已经使用了SETUP请求消息

PLAY:该请求消息将使得一个或者多个媒体流被播放了。如果多个PLAY消息被发送了,将会使用栈的结构来处理它。URL也可以是一个聚合的URL(即是:播放所有的媒体流),或者一个单独的媒体流URL(只播放一个流)。播放范围也是可以指定的,如果没有指定范围,那么这个流将会被从头播放结尾,或者如果流被暂停了,将会在它暂停的地方开始播放。

PAUSE:该请求消息能够暂时暂停一个或者多个媒体流,所以这个暂停可以被之后的PLAY消息回复。这个请求包含一个聚合或者单独的媒体流URL。存在于PAUSE里面的参数可以指定何时暂停。如果不指定何时暂停,那么这个暂停将会立刻发生。

TEARDOWN:该请求消息将用于暂停这个会话,它将会暂停所有的媒体流,并且释放所有存在于服务器与会话相关的数据。

GET_PARAMETER:该请求消息可以得到一个表示描述或者以URL指定的流的所有参数的值。我们还可以指定回应的内容和反应。一个没有实体内容的GET_PARAMETER将会用于测试客户端或者服务器的是否活着(类似于ping)。
Introduction of LIVE555
We will use LIVE555 as the streaming server for testing your RTSP Windows client player.LIVE555 is an open source (LGPL) C++ library for multimedia streaming. This code forms a set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries are already being used to implement applications such as: 
  • "the LIVE555 Media Server" (a RTSP server application, http://www.live555.com/mediaServer/);
  • "liveCaster"(http://www.live555.com/liveCaster/) and "playRTPMPEG" (http://www.live555.com/multikit/playRTPMPEG.html)(for streaming MP3 audio using RTP/RTCP); and "vobStreamer"(http://www.live555.com/vobStreamer/) (for streaming DVD content using RTP/RTCP/RTSP). 
  • The libraries can also be used to stream, receive, and process MPEG, H.264, H.263+, DV or JPEG video, and several audio codecs. They can easily be extended to support additional (audio and/or video) codecs, and can also be used to build basic RTSP or SIP clients and servers, and have been used to add streaming support to existing media player applications, such as "VLC"(http://www.videolan.org/vlc/) and "MPlayer"(http://www.live555.com/mplayer/).

译:我们将会使用LIVE5555作为流提供服务器用于测试你的基于RTSP协议的客户端播放器。LIVE5555一个开源(LGPL) 的C++库,主要用于多媒体流。代码都是一个C++库的集合,使用了开放的标准协议(RTP/RTCP, RTSP, SIP)服务多媒体流。使用该库实现的应用程序有如下:


  • "the LIVE555 Media Server" (一个基于RTSP的服务端应用程序);
  • "liveCaster"and "playRTPMPEG" (使用 RTP/RTCP协议播放MP3的音频);
  • "vobStreamer"(使用RTP/RTCP/RTSP播放DVD流的内容). 

这个库也可以用于处理流的接收,还有处理如下格式:MPEG, H.264, H.263+, DV, JPEG video以及其它的几种多媒体编码格式。该库可轻易的扩展,支持其他的音频或者视频的格式,当然也可以用于建立基本的RTSP或SIP的客户端或者服务端,并且还能被用于改善已存的媒体播放器,使其可以播放流,比如:VLC,MPlayer。

Specification

Your assignment is to write a RTSP client that should work with LIVE555 Media Server.
1.  Your implementation should follow the specification in the Real Time Streaming Protocol (RTSP, RFC 2326, http://tools.ietf.org/html/rfc2326), so that your version of RTSP Client is able to work together with the LIVE555 MediaServer.
2.  Your implementation should follow the specification in the Real-time Transport Protocol  (RTP, RFC 3550, 3551)  and RTP Payload Format for MPEG1/MPEG2 Video (RFC 2250), so that your version of RTSP Client is able to handle RTP packets correctly. You may achieve this by writing your own code or just using a third party library, such as:
The JRDPLIB is an open-source project  for  packetizing/de-packetizing video/audio data over RTP (http://research.edm.uhasselt.be/~jori/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值