Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-10-19 08:42:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a323483bea377ac233774ac25d9ad48b29bd9bf6
a323483b
1 parent
fbe6e061
add protocol stack
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
117 行增加
和
2 行删除
trunk/configure
trunk/src/core/srs_core_client.cpp
trunk/src/core/srs_core_protocol.cpp
trunk/src/core/srs_core_protocol.hpp
trunk/src/core/srs_core_rtmp.cpp
trunk/src/core/srs_core_rtmp.hpp
trunk/src/srs/srs.upp
trunk/configure
查看文件 @
a323483
...
...
@@ -85,7 +85,7 @@ ModuleLibIncs=(${LibSTRoot})
MODULE_FILES
=(
"srs_core"
"srs_core_log"
"srs_core_server"
"srs_core_error"
"srs_core_conn"
"srs_core_client"
"srs_core_rtmp"
"srs_core_socket"
"srs_core_buffer"
"srs_core_auto_free"
)
"srs_core_auto_free"
"srs_core_protocol"
)
MODULE_DIR
=
"src/core"
. auto/modules.sh
CORE_OBJS
=
"
${
MODULE_OBJS
[@]
}
"
...
...
trunk/src/core/srs_core_client.cpp
查看文件 @
a323483
...
...
@@ -65,6 +65,13 @@ int SrsClient::do_cycle()
}
srs_verbose
(
"rtmp handshake success"
);
SrsApp
*
app
=
NULL
;
if
((
ret
=
rtmp
->
connect_app
(
&
app
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"rtmp connect vhost/app failed. ret=%d"
,
ret
);
return
ret
;
}
srs_verbose
(
"rtmp connect vhost/app success"
);
return
ret
;
}
...
...
trunk/src/core/srs_core_protocol.cpp
0 → 100755
查看文件 @
a323483
/*
The MIT License (MIT)
Copyright (c) 2013 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_core_protocol.hpp>
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_core_socket.hpp>
#include <srs_core_buffer.hpp>
SrsProtocol
::
SrsProtocol
(
st_netfd_t
client_stfd
)
{
stfd
=
client_stfd
;
}
SrsProtocol
::~
SrsProtocol
()
{
}
...
...
trunk/src/core/srs_core_protocol.hpp
0 → 100755
查看文件 @
a323483
/*
The MIT License (MIT)
Copyright (c) 2013 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SRS_CORE_PROTOCOL_HPP
#define SRS_CORE_PROTOCOL_HPP
/*
#include <srs_core_protocol.hpp>
*/
#include <srs_core.hpp>
#include <st.h>
class
SrsProtocol
{
private
:
st_netfd_t
stfd
;
public
:
SrsProtocol
(
st_netfd_t
client_stfd
);
virtual
~
SrsProtocol
();
public
:
};
#endif
\ No newline at end of file
...
...
trunk/src/core/srs_core_rtmp.cpp
查看文件 @
a323483
...
...
@@ -25,17 +25,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_log.hpp>
#include <srs_core_error.hpp>
#include <srs_core_buffer.hpp>
#include <srs_core_socket.hpp>
#include <srs_core_protocol.hpp>
#include <srs_core_auto_free.hpp>
SrsRtmp
::
SrsRtmp
(
st_netfd_t
client_stfd
)
{
protocol
=
new
SrsProtocol
(
client_stfd
);
stfd
=
client_stfd
;
}
SrsRtmp
::~
SrsRtmp
()
{
if
(
protocol
)
{
delete
protocol
;
protocol
=
NULL
;
}
}
int
SrsRtmp
::
handshake
()
...
...
@@ -83,3 +88,9 @@ int SrsRtmp::handshake()
return
ret
;
}
int
SrsRtmp
::
connect_app
(
SrsApp
**
papp
)
{
int
ret
=
ERROR_SUCCESS
;
return
ret
;
}
...
...
trunk/src/core/srs_core_rtmp.hpp
查看文件 @
a323483
...
...
@@ -30,17 +30,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp>
#include <string>
#include <st.h>
struct
SrsApp
{
std
::
string
vhost
;
std
::
string
app
;
};
class
SrsProtocol
;
class
SrsRtmp
{
private
:
SrsProtocol
*
protocol
;
st_netfd_t
stfd
;
public
:
SrsRtmp
(
st_netfd_t
client_stfd
);
virtual
~
SrsRtmp
();
public
:
virtual
int
handshake
();
virtual
int
connect_app
(
SrsApp
**
papp
);
};
#endif
\ No newline at end of file
...
...
trunk/src/srs/srs.upp
查看文件 @
a323483
...
...
@@ -16,6 +16,8 @@ file
..\core\srs_core_client.cpp,
..\core\srs_core_rtmp.hpp,
..\core\srs_core_rtmp.cpp,
..\core\srs_core_protocol.hpp,
..\core\srs_core_protocol.cpp,
..\core\srs_core_socket.hpp,
..\core\srs_core_socket.cpp,
..\core\srs_core_buffer.hpp,
...
...
请
注册
或
登录
后发表评论