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-04-26 14:47:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a2f317a113a89b94d5b0a32a6263f78a531b2047
a2f317a1
1 parent
a63a3812
add chad.wang to authors for srs-librtmp on windows build project
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
55 行增加
和
2 行删除
AUTHORS.txt
trunk/src/app/srs_app_edge.cpp
trunk/src/app/srs_app_edge.hpp
trunk/src/app/srs_app_source.cpp
trunk/src/app/srs_app_source.hpp
AUTHORS.txt
查看文件 @
a2f317a
...
...
@@ -6,3 +6,4 @@ Authors ordered by first contribution.
* naijia.liu<youngcow@youngcow.net>
* alcoholyi<alcoholyi@qq.com>
* byteman<wangchen2011@gmail.com>
* chad.wang<chad.wang.cn@gmail.com>
...
...
trunk/src/app/srs_app_edge.cpp
查看文件 @
a2f317a
...
...
@@ -23,3 +23,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_app_edge.hpp>
#include <srs_kernel_error.hpp>
SrsEdge
::
SrsEdge
()
{
state
=
SrsEdgeStateInit
;
}
SrsEdge
::~
SrsEdge
()
{
}
int
SrsEdge
::
on_client_play
()
{
int
ret
=
ERROR_SUCCESS
;
return
ret
;
}
...
...
trunk/src/app/srs_app_edge.hpp
查看文件 @
a2f317a
...
...
@@ -30,4 +30,34 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp>
/**
* the state of edge
*/
enum
SrsEdgeState
{
SrsEdgeStateInit
=
0
,
SrsEdgeStatePlay
=
100
,
SrsEdgeStatePublish
,
SrsEdgeStateConnected
,
SrsEdgeStateAborting
,
SrsEdgeStateReloading
,
};
/**
* edge control service.
*/
class
SrsEdge
{
private
:
SrsEdgeState
state
;
public
:
SrsEdge
();
virtual
~
SrsEdge
();
public
:
/**
* when client play stream on edge.
*/
virtual
int
on_client_play
();
};
#endif
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
a2f317a
...
...
@@ -38,6 +38,7 @@ using namespace std;
#include <srs_protocol_rtmp.hpp>
#include <srs_app_dvr.hpp>
#include <srs_kernel_stream.hpp>
#include <srs_app_edge.hpp>
#define CONST_MAX_JITTER_MS 500
#define DEFAULT_FRAME_TIME_MS 40
...
...
@@ -455,6 +456,7 @@ SrsSource::SrsSource(SrsRequest* _req)
frame_rate
=
sample_rate
=
0
;
_can_publish
=
true
;
edge
=
new
SrsEdge
();
gop_cache
=
new
SrsGopCache
();
_srs_config
->
subscribe
(
this
);
...
...
@@ -487,6 +489,7 @@ SrsSource::~SrsSource()
srs_freep
(
cache_sh_video
);
srs_freep
(
cache_sh_audio
);
srs_freep
(
edge
);
srs_freep
(
gop_cache
);
#ifdef SRS_AUTO_HLS
...
...
@@ -1177,8 +1180,7 @@ bool SrsSource::is_atc()
int
SrsSource
::
on_edge_play_stream
()
{
int
ret
=
ERROR_SUCCESS
;
return
ret
;
return
edge
->
on_client_play
();
}
int
SrsSource
::
create_forwarders
()
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
a2f317a
...
...
@@ -37,6 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_app_st.hpp>
#include <srs_app_reload.hpp>
class
SrsEdge
;
class
SrsSource
;
class
SrsCommonMessage
;
class
SrsOnMetaDataPacket
;
...
...
@@ -234,6 +235,8 @@ private:
#ifdef SRS_AUTO_TRANSCODE
SrsEncoder
*
encoder
;
#endif
// edge control service
SrsEdge
*
edge
;
// gop cache for client fast startup.
SrsGopCache
*
gop_cache
;
// to forward stream to other servers
...
...
请
注册
或
登录
后发表评论