Joey

Joey

1个粉丝

15

问答

0

专栏

0

资料

Joey  发布于  2017-06-05 09:07:52
采纳率 0%
15个问答
4943

在论坛上找的一份rtsp server源码,通过vlc可以播放,但是用3536来解码就不行了。

   
本帖最后由 Joey 于 2017-6-5 09:09 编辑

用3536解码时,rtsp会话时,当3536 client发出play之后,server这边开始发送rtp包,但是接着3536 client这边发送“TEARDOWN”的命令请求关掉rtsp会话(这个过程是没人对3536进行操作的,但是不知道为什么3536要发出teardown的命令)
rtsp会话过程具体如下:
[code]/mnt/mpp/test # ./rtsp_rtcp_rtp-v.0
size of 2EnPayLoad=1
RTSP server START

        hostname is: (none)
        rtsp listening port is: 554
        Input rtsp://hostIP:554/test.264 to play this

listen for client connecting...

The pthread schedule_do start

         c) cbr.
please press twice ENTER to exit this sample
AddClient, 128
Incoming RTSP connection accepted on socket: 12
EventLoop Connection reached: 3
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100


rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is  init state
current method code is:  3
OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
(Send to client:)
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER,SET_PARAMETER


leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 108
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER,SET_PARAMETER


leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:DESCRIBE rtsp://192.168.10.210:554/sub RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: Lavf57.25.100


rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is  init state
current method code is:  0
server:192.168.10.210
port:-1093179766


GetSdpDescr,663===>psp.base64profileid=42002A,psp.base64sps=Z0IAKpWoHgCJ+WbgICAgQA==,psp.base64pps=aM48gA==

(Send to client:)
RTSP/1.0 200 OK
CSeq: 2
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Content-Type: application/sdp
Content-Base: rtsp://192.168.10.210/sub/
Content-Length: 464

v=0
o=-2208992768 2208992768 IN IP4 192.168.10.210
s=sub
i=sub
t=0 0
a=tool:Zyqhziee Streaming Media v2015.11.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:H.264 Video, streamed by the Zyqhziee Media Server
a=x-qt-text-inf:test.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpWoHgCJ+WbgICAgQA==,aM48gA==
a=control:track1

leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 646
RTSP/1.0 200 OK
CSeq: 2
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Content-Type: application/sdp
Content-Base: rtsp://192.168.10.210/sub/
Content-Length: 464

v=0
o=-2208992768 2208992768 IN IP4 192.168.10.210
s=sub
i=sub
t=0 0
a=tool:Zyqhziee Streaming Media v2015.11.27
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:H.264 Video, streamed by the Zyqhziee Media Server
a=x-qt-text-inf:test.h264
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42002A;sprop-parameter-sets=Z0IAKpWoHgCJ+WbgICAgQA==,aM48gA==
a=control:track1

leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:SETUP rtsp://192.168.10.210/sub/track1 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=12300-12301
CSeq: 3
User-Agent: Lavf57.25.100


rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is  init state
current method code is:  8
*** transport: RTP/AVP/UDP;unicast;client_port=12300-12301 ***
!!!!!!!!!!!!!!!!!!!!!!rtp create:addr:b10aa8c0,port:12300,localc0a80ad2
<><><><>success creat RTP<><><><>
<><><><>Creat RTP<><><><>
pstr=-12301
**adding a schedule object action ../src/rtsp/rtsputils.c,330**
(Send to client:)
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Transport: RTP/AVP;unicast;client_port=12300-12301;destination=192.168.10.177;source=192.168.10.210;server_port=57111-57112


TRANSFER TO READY STATE!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 229
RTSP/1.0 200 OK
CSeq: 3
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893
Transport: RTP/AVP;unicast;client_port=12300-12301;destination=192.168.10.177;source=192.168.10.210;server_port=57111-57112


leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:PLAY rtsp://192.168.10.210/sub/ RTSP/1.0
Range: npt=0.000-
CSeq: 4
User-Agent: Lavf57.25.100
Session: 99893


rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is  ready state
current method code is:5
        +++++++++++++++++++++
        start to play 0 now!
        +++++++++++++++++++++
(Send to client:)
RTSP/1.0 200 OK
CSeq: 4
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893


        Start Playing!
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 104
RTSP/1.0 200 OK
CSeq: 4
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893


leaving rtsp_server!no error occur!
tcp_read, 1756
192.168.10.177 Port:60632
INPUT_BUFFER was:TEARDOWN rtsp://192.168.10.210/sub/ RTSP/1.0
CSeq: 5
User-Agent: Lavf57.25.100
Session: 99893


rtsp_tracepoint: ../src/rtsp/rtspservice.c,RTSP_state_machine,1388
state_machine:current state is  play state
(Send to client:)
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893


no user online now resetfifo
leaving rtsp_state_machine!
exit Rtsp_state_machine
4
SOUTPUT_BUFFER length 104
RTSP/1.0 200 OK
CSeq: 5
Server: sunshine/1.11
Date: Thu, 01 Jan 1970 01:06:52 GMT
Session: 99893


tcp_read, 1756
fd:12,RTSP connection closed by client.
first error,pRtsp is null
AddClient, 128
Incoming RTSP connection accepted on socket: 12
EventLoop Connection reached: 3
tcp_read, 1756
192.168.10.177 Port:60633
INPUT_BUFFER was:OPTIONS rtsp://192.168.10.210:554/sub RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100
[/code]
我来回答
回答5个
时间排序
认可量排序

qn1551776174

0个粉丝

1

问答

0

专栏

0

资料

qn1551776174 2019-04-18 20:06:28
认可0
求RTSP server实现代码,万分感谢

qn1551776174

0个粉丝

1

问答

0

专栏

0

资料

qn1551776174 2019-07-03 16:52:38
认可0
求RTSP服务器源码,感谢感谢:lol

qn1540561804

0个粉丝

12

问答

0

专栏

1

资料

qn1540561804 2019-07-04 10:26:23
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=144934&ptid=15421]qn1551776174 发表于 2019-7-3 16:52[/url]
求RTSP服务器源码,感谢感谢[/quote]

https://blog.csdn.net/weixin_43549602/article/details/88393025

qn1585280190

0个粉丝

0

问答

0

专栏

0

资料

qn1585280190 2020-04-22 17:17:28
认可0
求RTSP server实现代码,万分感谢

omgzc

0个粉丝

0

问答

0

专栏

0

资料

omgzc 2020-04-30 08:33:49
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=144954&ptid=15421]qn1540561804 发表于 2019-7-4 10:26[/url]
https://blog.csdn.net/weixin_43549602/article/details/88393025[/quote]

你贴的这个只编译成库看不到代码
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区