2013-01-13 152 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