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
11 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4a40075f6837325e5dc0cc35a269a69872b754a6
4a40075f
1 parent
9d5abbd9
add contributors to api/v1/authors
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
66 行增加
和
12 行删除
AUTHORS.txt
README.md
trunk/auto/depends.sh
trunk/src/app/srs_app_http.cpp
trunk/src/app/srs_app_http_api.cpp
trunk/src/app/srs_app_http_api.hpp
trunk/src/core/srs_core.hpp
AUTHORS.txt
查看文件 @
4a40075
Authors ordered by first contribution.
* winlin <winlin@vip.126.com>
* wenjie.zhao <740936897@qq.com>
* xiangcheng.liu <liuxc0116@foxmail.com>
* naijia.liu <youngcow@youngcow.net>
* alcoholyi <alcoholyi@qq.com>
* winlin<winlin@vip.126.com>
* wenjie.zhao<740936897@qq.com>
* xiangcheng.liu<liuxc0116@foxmail.com>
* naijia.liu<youngcow@youngcow.net>
* alcoholyi<alcoholyi@qq.com>
...
...
README.md
查看文件 @
4a40075
...
...
@@ -63,6 +63,7 @@ The PRIMARY AUTHORS are (and/or have been)(Authors ordered by first contribution
About the primary AUTHORS:
*
Contribute important features to SRS.
*
Names of all PRIMARY AUTHORS response in NetConnection.connect and metadata.
*
Names of all CONTRIBUTORS response in api/v1/authors.
And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
people who have submitted patches, reported bugs, added translations, helped
...
...
trunk/auto/depends.sh
查看文件 @
4a40075
...
...
@@ -576,5 +576,17 @@ echo "" >> $SRS_AUTO_HEADERS_H
# prefix
echo
"#define SRS_PREFIX
\"
${
SRS_PREFIX
}
\"
"
>>
$SRS_AUTO_HEADERS_H
echo
""
>>
$SRS_AUTO_HEADERS_H
#####################################################################################
# generated the contributors from AUTHORS.txt
#####################################################################################
SRS_CONSTRIBUTORS
=
`
cat ../AUTHORS.txt|grep
"*"
|awk -F
'* '
'{print $2}'
`
echo
"#define SRS_CONSTRIBUTORS
\"\\
"
>>
$SRS_AUTO_HEADERS_H
for
CONTRIBUTOR
in
$SRS_CONSTRIBUTORS
;
do
echo
"
${
CONTRIBUTOR
}
\\
"
>>
$SRS_AUTO_HEADERS_H
done
echo
"
\"
"
>>
$SRS_AUTO_HEADERS_H
# new empty line to auto headers file.
echo
""
>>
$SRS_AUTO_HEADERS_H
...
...
trunk/src/app/srs_app_http.cpp
查看文件 @
4a40075
...
...
@@ -445,9 +445,6 @@ int SrsHttpParser::parse_message_imp(SrsSocket* skt)
// check header size.
if
(
msg
->
is_complete
())
{
srs_trace
(
"http request parsed, method=%d, url=%s, content-length=%"
PRId64
""
,
msg
->
method
(),
msg
->
url
().
c_str
(),
msg
->
content_length
());
return
ret
;
}
...
...
@@ -579,7 +576,7 @@ int SrsHttpUri::initialize(std::string _url)
srs_info
(
"parse url %s success"
,
purl
);
query
=
get_uri_field
(
url
,
&
hp_u
,
UF_QUERY
);
srs_
trace
(
"parse query %s success"
,
purl
);
srs_
info
(
"parse query %s success"
,
query
);
return
ret
;
}
...
...
trunk/src/app/srs_app_http_api.cpp
查看文件 @
4a40075
...
...
@@ -99,6 +99,7 @@ int SrsApiApi::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
SrsApiV1
::
SrsApiV1
()
{
handlers
.
push_back
(
new
SrsApiVersion
());
handlers
.
push_back
(
new
SrsApiAuthors
());
}
SrsApiV1
::~
SrsApiV1
()
...
...
@@ -117,7 +118,8 @@ int SrsApiV1::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
ss
<<
JOBJECT_START
<<
JFIELD_ERROR
(
ERROR_SUCCESS
)
<<
JFIELD_CONT
<<
JFIELD_ORG
(
"urls"
,
JOBJECT_START
)
<<
JFIELD_STR
(
"version"
,
"the version of SRS"
)
<<
JFIELD_STR
(
"version"
,
"the version of SRS"
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"authors"
,
"the primary authors and contributors"
)
<<
JOBJECT_END
<<
JOBJECT_END
;
...
...
@@ -147,8 +149,36 @@ int SrsApiVersion::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
<<
JFIELD_ORG
(
"major"
,
VERSION_MAJOR
)
<<
JFIELD_CONT
<<
JFIELD_ORG
(
"minor"
,
VERSION_MINOR
)
<<
JFIELD_CONT
<<
JFIELD_ORG
(
"revision"
,
VERSION_REVISION
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"version"
,
RTMP_SIG_SRS_VERSION
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"primary_authors"
,
RTMP_SIG_SRS_PRIMARY_AUTHROS
)
<<
JFIELD_STR
(
"version"
,
RTMP_SIG_SRS_VERSION
)
<<
JOBJECT_END
<<
JOBJECT_END
;
return
res_json
(
skt
,
ss
.
str
());
}
SrsApiAuthors
::
SrsApiAuthors
()
{
}
SrsApiAuthors
::~
SrsApiAuthors
()
{
}
bool
SrsApiAuthors
::
can_handle
(
const
char
*
path
,
int
length
,
const
char
**
/*pchild*/
)
{
return
srs_path_equals
(
"/authors"
,
path
,
length
);
}
int
SrsApiAuthors
::
do_process_request
(
SrsSocket
*
skt
,
SrsHttpMessage
*
req
)
{
std
::
stringstream
ss
;
ss
<<
JOBJECT_START
<<
JFIELD_ERROR
(
ERROR_SUCCESS
)
<<
JFIELD_CONT
<<
JFIELD_ORG
(
"data"
,
JOBJECT_START
)
<<
JFIELD_STR
(
"primary_authors"
,
RTMP_SIG_SRS_PRIMARY_AUTHROS
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"contributors_link"
,
RTMP_SIG_SRS_CONTRIBUTORS_URL
)
<<
JFIELD_CONT
<<
JFIELD_STR
(
"contributors"
,
SRS_CONSTRIBUTORS
)
<<
JOBJECT_END
<<
JOBJECT_END
;
...
...
@@ -220,6 +250,9 @@ int SrsHttpApi::process_request(SrsSocket* skt, SrsHttpMessage* req)
return
ret
;
}
srs_trace
(
"http request parsed, method=%d, url=%s, content-length=%"
PRId64
""
,
req
->
method
(),
req
->
url
().
c_str
(),
req
->
content_length
());
// TODO: maybe need to parse the url.
std
::
string
url
=
req
->
path
();
...
...
trunk/src/app/srs_app_http_api.hpp
查看文件 @
4a40075
...
...
@@ -82,6 +82,16 @@ public:
virtual
int
do_process_request
(
SrsSocket
*
skt
,
SrsHttpMessage
*
req
);
};
class
SrsApiAuthors
:
public
SrsHttpHandler
{
public
:
SrsApiAuthors
();
virtual
~
SrsApiAuthors
();
public
:
virtual
bool
can_handle
(
const
char
*
path
,
int
length
,
const
char
**
pchild
);
virtual
int
do_process_request
(
SrsSocket
*
skt
,
SrsHttpMessage
*
req
);
};
class
SrsHttpApi
:
public
SrsConnection
{
private
:
...
...
trunk/src/core/srs_core.hpp
查看文件 @
4a40075
...
...
@@ -44,6 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)"
#define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2014 winlin"
#define RTMP_SIG_SRS_PRIMARY_AUTHROS "winlin,wenjie.zhao"
#define RTMP_SIG_SRS_CONTRIBUTORS_URL "https://github.com/winlinvip/simple-rtmp-server/blob/master/AUTHORS.txt"
/**
* the core provides the common defined macros, utilities,
...
...
请
注册
或
登录
后发表评论