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
2015-03-10 18:07:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9767c91b5483ddfdcc47b4a234b18ddaa4385e9
f9767c91
1 parent
6c11207e
fix configure bug, refine code for stream caster.
隐藏空白字符变更
内嵌
并排对比
正在显示
9 个修改的文件
包含
32 行增加
和
8 行删除
trunk/configure
trunk/src/app/srs_app_config.hpp
trunk/src/app/srs_app_http.cpp
trunk/src/app/srs_app_mpegts_udp.cpp
trunk/src/app/srs_app_mpegts_udp.hpp
trunk/src/app/srs_app_server.hpp
trunk/src/kernel/srs_kernel_error.hpp
trunk/src/kernel/srs_kernel_file.hpp
trunk/src/main/srs_main_server.cpp
trunk/configure
查看文件 @
f9767c9
...
...
@@ -7,7 +7,7 @@
SRS_WORKDIR
=
"."
SRS_OBJS_DIR
=
"objs"
SRS_OBJS
=
"
${
SRS_WORKDIR
}
/
${
SRS_OBJS_DIR
}
"
mkdir -p
${
SRS_OBJS
}
SRS_MAKEFILE
=
"Makefile"
# linux shell color support.
RED
=
"
\\
033[31m"
...
...
@@ -23,6 +23,9 @@ fi
# remove makefile
rm -f
${
SRS_WORKDIR
}
/
${
SRS_MAKEFILE
}
# create objs
mkdir -p
${
SRS_OBJS
}
#####################################################################################
# parse user options, set the variables like:
# srs features: SRS_SSL/SRS_HLS/SRS_NGINX/SRS_FFMPEG_TOOL/SRS_HTTP_CALLBACK/......
...
...
@@ -43,11 +46,9 @@ rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}
#####################################################################################
# generate Makefile.
#####################################################################################
SRS_MAKEFILE
=
"Makefile"
# ubuntu echo in Makefile cannot display color, use bash instead
SRS_BUILD_SUMMARY
=
"_srs_build_summary.sh"
#####################################################################################
# srs-librtmp sample entry
SrsLibrtmpSampleEntry
=
"nossl"
if
[
$SRS_SSL
=
YES
]
;
then
SrsLibrtmpSampleEntry
=
"ssl"
;
fi
...
...
trunk/src/app/srs_app_config.hpp
查看文件 @
f9767c9
...
...
@@ -1101,3 +1101,4 @@ bool srs_directive_equals(SrsConfDirective* a, SrsConfDirective* b);
extern
SrsConfig
*
_srs_config
;
#endif
...
...
trunk/src/app/srs_app_http.cpp
查看文件 @
f9767c9
...
...
@@ -953,7 +953,7 @@ int SrsHttpResponseReader::read_chunked(std::string& data)
}
return
ret
;
}
srs_
trace
(
"http: read %d chunk"
,
ilength
);
srs_
info
(
"http: read %d chunk"
,
ilength
);
// read payload when length specifies some payload.
if
(
ilength
<=
0
)
{
...
...
trunk/src/app/srs_app_mpegts_udp.cpp
查看文件 @
f9767c9
...
...
@@ -130,11 +130,13 @@ SrsMpegtsOverUdp::SrsMpegtsOverUdp(SrsConfDirective* c)
context
=
new
SrsTsContext
();
buffer
=
new
SrsSimpleBuffer
();
output
=
_srs_config
->
get_stream_caster_output
(
c
);
req
=
NULL
;
io
=
NULL
;
client
=
NULL
;
stfd
=
NULL
;
stream_id
=
0
;
avc
=
new
SrsRawH264Stream
();
aac
=
new
SrsRawAacStream
();
h264_sps_changed
=
false
;
...
...
@@ -159,8 +161,6 @@ SrsMpegtsOverUdp::~SrsMpegtsOverUdp()
int
SrsMpegtsOverUdp
::
on_udp_packet
(
sockaddr_in
*
from
,
char
*
buf
,
int
nb_buf
)
{
int
ret
=
ERROR_SUCCESS
;
std
::
string
peer_ip
=
inet_ntoa
(
from
->
sin_addr
);
int
peer_port
=
ntohs
(
from
->
sin_port
);
...
...
@@ -169,6 +169,13 @@ int SrsMpegtsOverUdp::on_udp_packet(sockaddr_in* from, char* buf, int nb_buf)
srs_info
(
"udp: got %s:%d packet %d/%d bytes"
,
peer_ip
.
c_str
(),
peer_port
,
nb_buf
,
buffer
->
length
());
return
on_udp_bytes
(
peer_ip
,
peer_port
,
buf
,
nb_buf
);
}
int
SrsMpegtsOverUdp
::
on_udp_bytes
(
string
host
,
int
port
,
char
*
buf
,
int
nb_buf
)
{
int
ret
=
ERROR_SUCCESS
;
// collect nMB data to parse in a time.
// TODO: FIXME: comment the following for release.
...
...
@@ -215,8 +222,7 @@ int SrsMpegtsOverUdp::on_udp_packet(sockaddr_in* from, char* buf, int nb_buf)
// drop ts packet when size not modulus by 188
if
(
buffer
->
length
()
<
SRS_TS_PACKET_SIZE
)
{
srs_warn
(
"udp: wait %s:%d packet %d/%d bytes"
,
peer_ip
.
c_str
(),
peer_port
,
nb_buf
,
buffer
->
length
());
srs_warn
(
"udp: wait %s:%d packet %d/%d bytes"
,
host
.
c_str
(),
port
,
nb_buf
,
buffer
->
length
());
return
ret
;
}
...
...
@@ -582,6 +588,7 @@ int SrsMpegtsOverUdp::connect()
int
ret
=
ERROR_SUCCESS
;
// when ok, ignore.
// TODO: FIXME: should reconnect when disconnected.
if
(
io
||
client
)
{
return
ret
;
}
...
...
trunk/src/app/srs_app_mpegts_udp.hpp
查看文件 @
f9767c9
...
...
@@ -109,6 +109,8 @@ public:
// interface ISrsUdpHandler
public:
virtual
int
on_udp_packet
(
sockaddr_in
*
from
,
char
*
buf
,
int
nb_buf
);
private
:
virtual
int
on_udp_bytes
(
std
::
string
host
,
int
port
,
char
*
buf
,
int
nb_buf
);
// interface ISrsTsHandler
public:
virtual
int
on_ts_message
(
SrsTsMessage
*
msg
);
...
...
trunk/src/app/srs_app_server.hpp
查看文件 @
f9767c9
...
...
@@ -310,3 +310,4 @@ public:
};
#endif
...
...
trunk/src/kernel/srs_kernel_error.hpp
查看文件 @
f9767c9
...
...
@@ -247,6 +247,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ERROR_HTTP_RESPONSE_EOF 4025
#define ERROR_HTTP_INVALID_CHUNK_HEADER 4026
///////////////////////////////////////////////////////
// user-define error.
///////////////////////////////////////////////////////
#define ERROR_USER_START 9000
#define ERROR_USER_END 9999
/**
* whether the error code is an system control error.
*/
...
...
trunk/src/kernel/srs_kernel_file.hpp
查看文件 @
f9767c9
...
...
@@ -82,6 +82,7 @@ public:
virtual
int
open
(
std
::
string
file
);
virtual
void
close
();
public
:
// TODO: FIXME: extract interface.
virtual
bool
is_open
();
virtual
int64_t
tellg
();
virtual
void
skip
(
int64_t
size
);
...
...
trunk/src/main/srs_main_server.cpp
查看文件 @
f9767c9
...
...
@@ -206,6 +206,11 @@ void check_macro_features()
srs_warn
(
"SRS %s is develop branch, please use %s instead"
,
RTMP_SIG_SRS_VERSION
,
RTMP_SIG_SRS_RELEASE
);
#endif
#if defined(SRS_AUTO_STREAM_CASTER)
#warning "stream caster is experiment feature."
srs_warn
(
"stream caster is experiment feature."
);
#endif
#if defined(SRS_PERF_SO_SNDBUF_SIZE) && !defined(SRS_PERF_MW_SO_SNDBUF)
#error "SRS_PERF_SO_SNDBUF_SIZE depends on SRS_PERF_MW_SO_SNDBUF"
#endif
...
...
请
注册
或
登录
后发表评论