首先,很抱歉我的语法,我不是本地人!
我正在尝试在Sink设备上开发Miracast应用程序。它是在一些Android手机上完成的(LG G,华硕...)它不像Nexus 10那样基于stagefright (也有Nexus 4,HTC One...)。
当我尝试建立WFD会话时,在我回复消息M3之后,Nexus10说:“RTSP /1.0505rtsp版本不受支持”。我用谷歌搜索了一下,知道问题可能是源设备在消息响应中找不到"RTSP/1.0“。我定义了RTSP_VERSION,并将其用于所有消息(包括M1和M2,仍然是OK)。
#define RTSP_VERSION "RTSP/1.0"问题是:为什么手机会这样回复我(错误505)?对我解决这个问题有什么建议吗?
RTSP消息日志如下所示:
!!!
OPTIONS * RTSP/1.0
Date: Wed, 02 Jul 2014 08:21:50 +0000
Server: stagefright/1.2 (Linux;Android 4.4.4)
CSeq: 1
Require: org.wfa.wfd1.0
!!!
***
RTSP/1.0 200 OK
CSeq: 1
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER
***
***
OPTIONS * RTSP/1.0
CSeq: 0
Require: org.wfa.wfd1.0
***
!!!
RTSP/1.0 200 OK
Date: Wed, 02 Jul 2014 08:21:50 +0000
Server: stagefright/1.2 (Linux;Android 4.4.4)
CSeq: 0
Public: org.wfa.wfd1.0, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER
!!!
!!!
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 02 Jul 2014 08:21:50 +0000
Server: stagefright/1.2 (Linux;Android 4.4.4)
CSeq: 2
Content-Type: text/parameters
Content-Length: 83
wfd_audio_codecs:
wfd_video_formats:
wfd_content_protection:
wfd_client_rtp_ports
***
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 210
wfd_audio_codecs: AAC 00000001 00
wfd_video_formats: 28 00 02 02 00000020 00000000 00000000 00 0000 0000 00 none none
wfd_content_protection: none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 6500 0 mode=play
!!!
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 02 Jul 2014 08:21:50 +0000
Server: stagefright/1.2 (Linux;Android 4.4.4)
CSeq: 3
Content-Type: text/parameters
Content-Length: 246
wfd_video_formats: 00 00 02 02 00000020 00000000 0000
<missing log but don't care about that, it's fine>
***
RTSP/1.0 200 OK
CSeq: 3
***
!!!
RTSP/1.0 505 RTSP Version not supported
Date: Wed, 02 Jul 2014 08:21:50 +0000
Server: stagefright/1.2 (Linux;Android 4.4.4)
CSeq: 3
!!!
##MIRA Break!!!!
##MIRA EndClient!!!发布于 2014-07-19 22:22:22
您报告的错误来自作为here的onReceiveClientData。由于控件在这里,很明显响应不是从RTSP开始的。请检查响应字符串中是否有任何拼写错误或空格。
发布于 2017-11-29 17:44:56
甚至我也面临着同样的问题。这是因为content-length值错误。在回复GET_PARAMETER请求时尝试使用211而不是210
https://stackoverflow.com/questions/24634480
复制相似问题