2013-01-13 154 views
1

我试图打包并解析不同的rtsp请求和响应。现在我正在尝试使用rtsp SET_PARAMETER请求。我想知道rtsp set_parameter (success)响应的样子。在rtsp规范中给出的例子是示例RTSP SET_PARAMETER响应

C->S: SET_PARAMETER rtsp://example.com/media.mp4 RTSP/1.0 
     CSeq: 10 
     Content-length: 20 
     Content-type: text/parameters 

     barparam: barstuff 

    S->C: RTSP/1.0 451 Invalid Parameter 
     CSeq: 10 
     Content-length: 10 
     Content-type: text/parameters 

     barparam 

这就是所请求的参数是无效的情况。我正在寻找成功的rtsp 200 ok响应。如果有人知道它的外观,请帮助我。我尝试了谷歌搜索,但没有得到任何有用的结果。

回答

1

例如从机场快线到SET_PARAMETER(体积比)的有效RTSP响应如下所示:

RTSP/1.0 200 OK 
Server: AirTunes/105.1 
CSeq: 5 
(empty line) 

注意(empty line)只是一个空行,而不是文字字符串。该stackoverflow格式只是删除一个尾随的空行。在响应中有没有身体。

0

下面是从here

有效的请求采取的示例:

SET_PARAMETER rtsp://myserver/axis-media/media.amp RTSP/1.0 
CSeq: 7 
Session: 12345678 
Content-Type: text/parameters 
Content-Length: 19 

响应:

RTSP/1.0 200 OK 
CSeq: 7 
Session: 12345678 
Date: Wed, 16 Jul 2008 13:01:25 GMT 

而且

无效请求:

SET_PARAMETER rtsp://myserver/axis-media/media.amp RTSP/1.0 
CSeq: 7 
Session: 12345678 
Require: com.axis.parameters-in-header 

响应:

RTSP/1.0 551 Option not supported 
CSeq: 7 
Session: 12345678 
Unsupported: com.axis.parameters-in-header 
Date: Wed, 16 Jul 2008 13:01:24 GMT