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-05-27 19:18:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
978e985519eff7804c13e5621e0dff9c2d82fdfe
978e9855
1 parent
b2859389
fix #87: add source id for full trackable log. 0.9.120
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
34 行增加
和
6 行删除
README.md
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_server.cpp
trunk/src/app/srs_app_source.cpp
trunk/src/app/srs_app_source.hpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
978e985
...
...
@@ -228,8 +228,9 @@ Supported operating systems and hardware:
*
2013-10-17, Created.
<br/>
## History
*
v1.0, 2014-05-25, fix
[
#84
](
https://github.com/winlinvip/simple-rtmp-server/issues/84
)
, unpublish when edge disconnect. 0.9.119
*
v1.0, 2014-05-25, fix
[
#89
](
https://github.com/winlinvip/simple-rtmp-server/issues/89
)
, config to /dev/null to disable ffmpeg log. 0.9.117
*
v1.0, 2014-05-27, fix
[
#87
](
https://github.com/winlinvip/simple-rtmp-server/issues/87
)
, add source id for full trackable log. 0.9.120
*
v1.0, 2014-05-27, fix
[
#84
](
https://github.com/winlinvip/simple-rtmp-server/issues/84
)
, unpublish when edge disconnect. 0.9.119
*
v1.0, 2014-05-27, fix
[
#89
](
https://github.com/winlinvip/simple-rtmp-server/issues/89
)
, config to /dev/null to disable ffmpeg log. 0.9.117
*
v1.0, 2014-05-25, fix
[
#76
](
https://github.com/winlinvip/simple-rtmp-server/issues/76
)
, allow edge vhost to add or remove. 0.9.114
*
v1.0, 2014-05-24, Johnny contribute
[
ossrs.net
](
http://ossrs.net
)
. karthikeyan start to translate wiki to English.
*
v1.0, 2014-05-22, fix
[
#78
](
https://github.com/winlinvip/simple-rtmp-server/issues/78
)
, st joinable thread must be stop by other threads, 0.9.113
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
978e985
...
...
@@ -571,7 +571,7 @@ int SrsRtmpConn::fmle_publish(SrsSource* source)
bool
vhost_is_edge
=
_srs_config
->
get_vhost_is_edge
(
req
->
vhost
);
// when edge, ignore the publish event, directly proxy it.
if
(
vhost_is_edge
)
{
if
(
!
vhost_is_edge
)
{
// notify the hls to prepare when publish start.
if
((
ret
=
source
->
on_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"fmle hls on_publish failed. ret=%d"
,
ret
);
...
...
@@ -650,7 +650,7 @@ int SrsRtmpConn::flash_publish(SrsSource* source)
bool
vhost_is_edge
=
_srs_config
->
get_vhost_is_edge
(
req
->
vhost
);
// when edge, ignore the publish event, directly proxy it.
if
(
vhost_is_edge
)
{
if
(
!
vhost_is_edge
)
{
// notify the hls to prepare when publish start.
if
((
ret
=
source
->
on_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"flash hls on_publish failed. ret=%d"
,
ret
);
...
...
trunk/src/app/srs_app_server.cpp
查看文件 @
978e985
...
...
@@ -176,7 +176,7 @@ int SrsListener::cycle()
if
(
client_stfd
==
NULL
){
// ignore error.
srs_
warn
(
"ignore accept thread stoppped for accept client error"
);
srs_
error
(
"ignore accept thread stoppped for accept client error"
);
return
ret
;
}
srs_verbose
(
"get a client. fd=%d"
,
st_netfd_fileno
(
client_stfd
));
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
978e985
...
...
@@ -248,6 +248,7 @@ SrsConsumer::SrsConsumer(SrsSource* _source)
paused
=
false
;
jitter
=
new
SrsRtmpJitter
();
queue
=
new
SrsMessageQueue
();
should_update_source_id
=
false
;
}
SrsConsumer
::~
SrsConsumer
()
...
...
@@ -262,6 +263,11 @@ void SrsConsumer::set_queue_size(double queue_size)
queue
->
set_queue_size
(
queue_size
);
}
void
SrsConsumer
::
update_source_id
()
{
should_update_source_id
=
true
;
}
int
SrsConsumer
::
get_time
()
{
return
jitter
->
get_time
();
...
...
@@ -287,6 +293,11 @@ int SrsConsumer::enqueue(SrsSharedPtrMessage* msg, int tba, int tbv)
int
SrsConsumer
::
get_packets
(
int
max_count
,
SrsSharedPtrMessage
**&
pmsgs
,
int
&
count
)
{
if
(
should_update_source_id
)
{
srs_trace
(
"update source_id=%d"
,
source
->
source_id
());
should_update_source_id
=
false
;
}
// paused, return nothing.
if
(
paused
)
{
return
ERROR_SUCCESS
;
...
...
@@ -802,6 +813,13 @@ int SrsSource::on_source_id_changed(int id)
_source_id
=
id
;
// notice all consumer
std
::
vector
<
SrsConsumer
*>::
iterator
it
;
for
(
it
=
consumers
.
begin
();
it
!=
consumers
.
end
();
++
it
)
{
SrsConsumer
*
consumer
=
*
it
;
consumer
->
update_source_id
();
}
return
ret
;
}
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
978e985
...
...
@@ -134,11 +134,20 @@ private:
SrsSource
*
source
;
SrsMessageQueue
*
queue
;
bool
paused
;
// when source id changed, notice all consumers
bool
should_update_source_id
;
public
:
SrsConsumer
(
SrsSource
*
_source
);
virtual
~
SrsConsumer
();
public
:
/**
* set the size of queue.
*/
virtual
void
set_queue_size
(
double
queue_size
);
/**
* when source id changed, notice client to print.
*/
virtual
void
update_source_id
();
public
:
/**
* get current client time, the last packet time.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
978e985
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "1
19
"
#define VERSION_REVISION "1
20
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论