1

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

  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回应。如果有人知道它的外观,请帮助我。我尝试了谷歌搜索,但没有得到任何有用的结果。

4

2 回答 2

1

例如,从 AirPort Express 到 SET_PARAMETER(volume) 的有效 RTSP 响应如下所示:

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

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

于 2013-11-12T17:35:32.150 回答
1

这是取自此处的示例

有效请求:

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
于 2016-10-27T10:56:23.897 回答