mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
For #1031, SRS edge support douyu.com. 3.0.34
This commit is contained in:
commit
a66d450ec1
4 changed files with 37 additions and 5 deletions
|
@ -184,6 +184,7 @@ Please select according to languages:
|
|||
|
||||
### V3 changes
|
||||
|
||||
* v3.0, 2018-08-02, For [#1031][bug #1031], SRS edge support douyu.com. 3.0.34
|
||||
* v3.0, 2018-07-22, Replace hex to string to match MIT license. 3.0.33
|
||||
* v3.0, 2018-07-22, Replace base64 to match MIT license. 3.0.32
|
||||
* v3.0, 2018-07-22, Replace crc32 IEEE and MPEG by pycrc to match MIT license. 3.0.31
|
||||
|
@ -224,6 +225,7 @@ Please select according to languages:
|
|||
|
||||
### V2 changes
|
||||
|
||||
* v2.0, 2018-08-02, For [#1031][bug #1031], SRS edge support douyu.com. 2.0.250
|
||||
* v2.0, 2018-07-21, Merge [#1119][bug #1119], fix memory leak. 2.0.249
|
||||
* <strong>v2.0, 2018-07-18, [2.0 release3(2.0.248)][r2.0r3] released. 86775 lines.</strong>
|
||||
* v2.0, 2018-07-17, Merge [#1176][bug #1176], fix scaned issues. 2.0.248
|
||||
|
@ -1430,6 +1432,7 @@ Winlin
|
|||
[bug #1077]: https://github.com/ossrs/srs/issues/1077
|
||||
[bug #1176]: https://github.com/ossrs/srs/issues/1176
|
||||
[bug #1119]: https://github.com/ossrs/srs/issues/1119
|
||||
[bug #1031]: https://github.com/ossrs/srs/issues/1031
|
||||
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
|
||||
|
||||
[bug #735]: https://github.com/ossrs/srs/issues/735
|
||||
|
|
|
@ -472,6 +472,14 @@ srs_error_t SrsEdgeForwarder::start()
|
|||
url = srs_generate_rtmp_url(server, port, vhost, req->app, req->stream);
|
||||
}
|
||||
|
||||
// Pass params in stream, @see https://github.com/ossrs/srs/issues/1031#issuecomment-409745733
|
||||
if (!req->param.empty()) {
|
||||
if (req->param.find("?") != 0) {
|
||||
url += "?";
|
||||
}
|
||||
url += req->param;
|
||||
}
|
||||
|
||||
// open socket.
|
||||
srs_freep(sdk);
|
||||
int64_t cto = SRS_EDGE_FORWARDER_TMMS;
|
||||
|
@ -492,6 +500,7 @@ srs_error_t SrsEdgeForwarder::start()
|
|||
if ((err = trd->start()) != srs_success) {
|
||||
return srs_error_wrap(err, "coroutine");
|
||||
}
|
||||
srs_trace("edge-fwr publish url %s", url.c_str());
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// current release version
|
||||
#define VERSION_MAJOR 3
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 33
|
||||
#define VERSION_REVISION 34
|
||||
|
||||
// generated by configure, only macros.
|
||||
#include <srs_auto_headers.hpp>
|
||||
|
|
|
@ -154,9 +154,19 @@ srs_error_t SrsBasicRtmpClient::publish()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
string stream = req->stream;
|
||||
|
||||
// Pass params in stream, @see https://github.com/ossrs/srs/issues/1031#issuecomment-409745733
|
||||
if (!req->param.empty()) {
|
||||
if (req->param.find("?") != 0) {
|
||||
stream += "?";
|
||||
}
|
||||
stream += req->param;
|
||||
}
|
||||
|
||||
// publish.
|
||||
if ((err = client->publish(req->stream, stream_id)) != srs_success) {
|
||||
return srs_error_wrap(err, "publish failed, stream=%s, stream_id=%d", req->stream.c_str(), stream_id);
|
||||
if ((err = client->publish(stream, stream_id)) != srs_success) {
|
||||
return srs_error_wrap(err, "publish failed, stream=%s, stream_id=%d", stream.c_str(), stream_id);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -166,8 +176,18 @@ srs_error_t SrsBasicRtmpClient::play()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if ((err = client->play(req->stream, stream_id)) != srs_success) {
|
||||
return srs_error_wrap(err, "connect with server failed, stream=%s, stream_id=%d", req->stream.c_str(), stream_id);
|
||||
string stream = req->stream;
|
||||
|
||||
// Pass params in stream, @see https://github.com/ossrs/srs/issues/1031#issuecomment-409745733
|
||||
if (!req->param.empty()) {
|
||||
if (req->param.find("?") != 0) {
|
||||
stream += "?";
|
||||
}
|
||||
stream += req->param;
|
||||
}
|
||||
|
||||
if ((err = client->play(stream, stream_id)) != srs_success) {
|
||||
return srs_error_wrap(err, "connect with server failed, stream=%s, stream_id=%d", stream.c_str(), stream_id);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue