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
2014-12-03 19:09:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adf95d239eb8d85d24dfd7e72e0bb1fa327492ac
adf95d23
1 parent
ea0e837c
refine code, move the ISrsBufferReader to srs_protocol_io
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
26 行增加
和
24 行删除
trunk/src/app/srs_app_http.cpp
trunk/src/rtmp/srs_protocol_buffer.cpp
trunk/src/rtmp/srs_protocol_buffer.hpp
trunk/src/rtmp/srs_protocol_io.cpp
trunk/src/rtmp/srs_protocol_io.hpp
trunk/src/rtmp/srs_protocol_stack.cpp
trunk/src/app/srs_app_http.cpp
查看文件 @
adf95d2
...
...
@@ -36,6 +36,7 @@ using namespace std;
#include <srs_app_http_conn.hpp>
#include <srs_app_json.hpp>
#include <srs_kernel_utility.hpp>
#include <srs_protocol_buffer.hpp>
#define SRS_DEFAULT_HTTP_PORT 80
...
...
trunk/src/rtmp/srs_protocol_buffer.cpp
查看文件 @
adf95d2
...
...
@@ -34,14 +34,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/241
#define SOCKET_READ_SIZE 4096
ISrsBufferReader
::
ISrsBufferReader
()
{
}
ISrsBufferReader
::~
ISrsBufferReader
()
{
}
SrsBuffer
::
SrsBuffer
()
{
buffer
=
new
char
[
SOCKET_READ_SIZE
];
...
...
trunk/src/rtmp/srs_protocol_buffer.hpp
查看文件 @
adf95d2
...
...
@@ -21,8 +21,8 @@ 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_KERNEL_BUFFER_HPP
#define SRS_KERNEL_BUFFER_HPP
#ifndef SRS_PROTOCOL_BUFFER_HPP
#define SRS_PROTOCOL_BUFFER_HPP
/*
#include <srs_protocol_buffer.hpp>
...
...
@@ -32,18 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <vector>
/**
* the reader for the buffer to read from whatever channel.
*/
class
ISrsBufferReader
{
public
:
ISrsBufferReader
();
virtual
~
ISrsBufferReader
();
// for protocol/amf0/msg-codec
public:
virtual
int
read
(
void
*
buf
,
size_t
size
,
ssize_t
*
nread
)
=
0
;
};
#include <srs_protocol_io.hpp>
/**
* the buffer provices bytes cache for protocol. generally,
...
...
trunk/src/rtmp/srs_protocol_io.cpp
查看文件 @
adf95d2
...
...
@@ -23,6 +23,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_protocol_io.hpp>
ISrsBufferReader
::
ISrsBufferReader
()
{
}
ISrsBufferReader
::~
ISrsBufferReader
()
{
}
ISrsBufferWriter
::
ISrsBufferWriter
()
{
}
...
...
trunk/src/rtmp/srs_protocol_io.hpp
查看文件 @
adf95d2
...
...
@@ -35,8 +35,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/uio.h>
#endif
#include <srs_protocol_buffer.hpp>
/**
* the system io reader/writer architecture:
+---------------+ +--------------------+ +---------------+
...
...
@@ -63,6 +61,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* the reader for the buffer to read from whatever channel.
*/
class
ISrsBufferReader
{
public
:
ISrsBufferReader
();
virtual
~
ISrsBufferReader
();
// for protocol/amf0/msg-codec
public:
virtual
int
read
(
void
*
buf
,
size_t
size
,
ssize_t
*
nread
)
=
0
;
};
/**
* the writer for the buffer to write to whatever channel.
*/
class
ISrsBufferWriter
...
...
trunk/src/rtmp/srs_protocol_stack.cpp
查看文件 @
adf95d2
...
...
@@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_kernel_stream.hpp>
#include <srs_core_autofree.hpp>
#include <srs_kernel_utility.hpp>
#include <srs_protocol_buffer.hpp>
#include <stdlib.h>
using
namespace
std
;
...
...
请
注册
或
登录
后发表评论