正在显示
10 个修改的文件
包含
63 行增加
和
17 行删除
1 | #Simple-RTMP-Server | 1 | #Simple-RTMP-Server |
2 | 2 | ||
3 | +SRS/1.0,开发代号:[HuKaiqun](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Product#release10) | ||
4 | + | ||
3 | SRS定位是运营级的互联网直播服务器集群,追求更好的概念完整性和最简单实现的代码。 | 5 | SRS定位是运营级的互联网直播服务器集群,追求更好的概念完整性和最简单实现的代码。 |
4 | 6 | ||
5 | 下载发布版(github): | 7 | 下载发布版(github): |
6 | -[Centos6-x86_64](http://winlinvip.github.io/srs.release/releases/files/SRS-CentOS6-x86_64-1.0.21.zip) | 8 | +[Centos6-x86_64](http://winlinvip.github.io/srs.release/releases/files/SRS-CentOS6-x86_64-1.0.27.zip) |
7 | 其他[more...](http://winlinvip.github.io/srs.release/releases/) <br/> | 9 | 其他[more...](http://winlinvip.github.io/srs.release/releases/) <br/> |
8 | 下载发布版(国内阿里云镜像): | 10 | 下载发布版(国内阿里云镜像): |
9 | -[Centos6-x86_64](http://www.ossrs.net/srs.release/releases/files/SRS-CentOS6-x86_64-1.0.21.zip) | 11 | +[Centos6-x86_64](http://www.ossrs.net/srs.release/releases/files/SRS-CentOS6-x86_64-1.0.27.zip) |
10 | 其他[more...](http://www.ossrs.net/srs.release/releases/)<br/> | 12 | 其他[more...](http://www.ossrs.net/srs.release/releases/)<br/> |
11 | QQ群: 365936885, by wenjie <br/> | 13 | QQ群: 365936885, by wenjie <br/> |
12 | 同类产品:[BLS](https://github.com/wenjiegit/Bull-Live-Server)/[BLE](https://github.com/wenjiegit/Bull-Live-Encoder), [NGINX-RTMP](https://github.com/arut/nginx-rtmp-module), [CRTMPD](http://www.rtmpd.com/), [RED5](http://www.red5.org/), [WOWZA](http://www.wowza.com/), [FMS/AMS](http://www.adobe.com/products/adobe-media-server-standard.html) | 14 | 同类产品:[BLS](https://github.com/wenjiegit/Bull-Live-Server)/[BLE](https://github.com/wenjiegit/Bull-Live-Encoder), [NGINX-RTMP](https://github.com/arut/nginx-rtmp-module), [CRTMPD](http://www.rtmpd.com/), [RED5](http://www.red5.org/), [WOWZA](http://www.wowza.com/), [FMS/AMS](http://www.adobe.com/products/adobe-media-server-standard.html) |
@@ -362,6 +364,7 @@ Supported operating systems and hardware: | @@ -362,6 +364,7 @@ Supported operating systems and hardware: | ||
362 | [2.0dev branch](https://github.com/winlinvip/simple-rtmp-server/tree/master). | 364 | [2.0dev branch](https://github.com/winlinvip/simple-rtmp-server/tree/master). |
363 | 365 | ||
364 | ## Releases | 366 | ## Releases |
367 | +* 2015-02-12, [Release v1.0r2](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r2), bug fixed, 1.0.27, 59507 lines.<br/> | ||
365 | * 2015-01-15, [Release v1.0r1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1), bug fixed, 1.0.21, 59472 lines.<br/> | 368 | * 2015-01-15, [Release v1.0r1](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1), bug fixed, 1.0.21, 59472 lines.<br/> |
366 | * 2014-12-05, [Release v1.0](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0), all bug fixed, 1.0.10, 59391 lines.<br/> | 369 | * 2014-12-05, [Release v1.0](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0), all bug fixed, 1.0.10, 59391 lines.<br/> |
367 | * 2014-10-09, [Release v1.0-beta](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.beta), all bug fixed, 1.0.0, 59316 lines.<br/> | 370 | * 2014-10-09, [Release v1.0-beta](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0.beta), all bug fixed, 1.0.0, 59316 lines.<br/> |
@@ -384,6 +387,14 @@ Supported operating systems and hardware: | @@ -384,6 +387,14 @@ Supported operating systems and hardware: | ||
384 | * 2013-10-17, Created.<br/> | 387 | * 2013-10-17, Created.<br/> |
385 | 388 | ||
386 | ## History | 389 | ## History |
390 | + | ||
391 | +* <strong>v1.0, 2015-02-12, [1.0r2 release(1.0.27)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r2) released. 59507 lines.</strong> | ||
392 | +* v1.0, 2015-02-11, dev code HuKaiqun for 1.0.27. | ||
393 | +* v1.0, 2015-02-10, for [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), the aac profile must be object plus one. 1.0.26 | ||
394 | +* v1.0, 2015-01-25, hotfix [#268](https://github.com/winlinvip/simple-rtmp-server/issues/268), refine the pcr start at 0, dts/pts plus delay. 1.0.25 | ||
395 | +* v1.0, 2015-01-25, hotfix [#151](https://github.com/winlinvip/simple-rtmp-server/issues/151), refine pcr=dts-800ms and use dts/pts directly. 1.0.24 | ||
396 | +* v1.0, 2015-01-23, hotfix [#151](https://github.com/winlinvip/simple-rtmp-server/issues/151), use absolutely overflow to make jwplayer happy. 1.0.23 | ||
397 | +* v1.0, 2015-01-17, hotfix [#290](https://github.com/winlinvip/simple-rtmp-server/issues/290), use iformat only for rtmp input. 1.0.22 | ||
387 | * <strong>v1.0, 2015-01-15, [1.0r1 release(1.0.21)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1) released. 59472 lines.</strong> | 398 | * <strong>v1.0, 2015-01-15, [1.0r1 release(1.0.21)](https://github.com/winlinvip/simple-rtmp-server/releases/tag/1.0r1) released. 59472 lines.</strong> |
388 | * v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20 | 399 | * v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20 |
389 | * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 | 400 | * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 |
@@ -247,6 +247,13 @@ int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample | @@ -247,6 +247,13 @@ int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample | ||
247 | return ret; | 247 | return ret; |
248 | } | 248 | } |
249 | 249 | ||
250 | + // the profile = object_id + 1 | ||
251 | + // @see aac-mp4a-format-ISO_IEC_14496-3+2001.pdf, page 78, | ||
252 | + // Table 1. A.9 ¨C MPEG-2 Audio profiles and MPEG-4 Audio object types | ||
253 | + // so the aac_profile should plus 1, not minus 1, and nginx-rtmp used it to | ||
254 | + // downcast aac SSR to LC. | ||
255 | + // @see https://github.com/winlinvip/simple-rtmp-server/issues/310 | ||
256 | + // TODO: FIXME: fix the following in future version. | ||
250 | // aac_profile = audioObjectType - 1 | 257 | // aac_profile = audioObjectType - 1 |
251 | aac_profile--; | 258 | aac_profile--; |
252 | 259 |
@@ -222,7 +222,7 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port) | @@ -222,7 +222,7 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port) | ||
222 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/147 | 222 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/147 |
223 | SrsAmf0Object* data = req->args; | 223 | SrsAmf0Object* data = req->args; |
224 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); | 224 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); |
225 | - data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); | 225 | + data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER)); |
226 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); | 226 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); |
227 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); | 227 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); |
228 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); | 228 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); |
@@ -654,7 +654,7 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port) | @@ -654,7 +654,7 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port) | ||
654 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/147 | 654 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/147 |
655 | SrsAmf0Object* data = req->args; | 655 | SrsAmf0Object* data = req->args; |
656 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); | 656 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); |
657 | - data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); | 657 | + data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER)); |
658 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); | 658 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); |
659 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); | 659 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); |
660 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); | 660 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); |
@@ -209,6 +209,13 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine) | @@ -209,6 +209,13 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine) | ||
209 | return ret; | 209 | return ret; |
210 | } | 210 | } |
211 | 211 | ||
212 | + // for not rtmp input, donot append the iformat, | ||
213 | + // for example, "-f flv" before "-i udp://192.168.1.252:2222" | ||
214 | + // @see https://github.com/winlinvip/simple-rtmp-server/issues/290 | ||
215 | + if (input.find("rtmp://") != 0) { | ||
216 | + iformat = ""; | ||
217 | + } | ||
218 | + | ||
212 | return ret; | 219 | return ret; |
213 | } | 220 | } |
214 | 221 |
@@ -336,7 +336,7 @@ int SrsForwarder::connect_app(string ep_server, string ep_port) | @@ -336,7 +336,7 @@ int SrsForwarder::connect_app(string ep_server, string ep_port) | ||
336 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/147 | 336 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/147 |
337 | SrsAmf0Object* data = req->args; | 337 | SrsAmf0Object* data = req->args; |
338 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); | 338 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); |
339 | - data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); | 339 | + data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER)); |
340 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); | 340 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); |
341 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); | 341 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); |
342 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); | 342 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); |
@@ -78,7 +78,9 @@ using namespace std; | @@ -78,7 +78,9 @@ using namespace std; | ||
78 | 78 | ||
79 | // @see: NGX_RTMP_HLS_DELAY, | 79 | // @see: NGX_RTMP_HLS_DELAY, |
80 | // 63000: 700ms, ts_tbn=90000 | 80 | // 63000: 700ms, ts_tbn=90000 |
81 | -#define SRS_AUTO_HLS_DELAY 63000 | 81 | +// 72000: 800ms, ts_tbn=90000 |
82 | +// @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71352511 | ||
83 | +#define SRS_AUTO_HLS_DELAY 72000 | ||
82 | 84 | ||
83 | // the mpegts header specifed the video/audio pid. | 85 | // the mpegts header specifed the video/audio pid. |
84 | #define TS_VIDEO_PID 256 | 86 | #define TS_VIDEO_PID 256 |
@@ -237,7 +239,8 @@ public: | @@ -237,7 +239,8 @@ public: | ||
237 | p[-1] |= 0x20; // Both Adaption and Payload | 239 | p[-1] |= 0x20; // Both Adaption and Payload |
238 | *p++ = 7; // size | 240 | *p++ = 7; // size |
239 | *p++ = 0x50; // random access + PCR | 241 | *p++ = 0x50; // random access + PCR |
240 | - p = write_pcr(p, frame->dts - SRS_AUTO_HLS_DELAY); | 242 | + // about the pcr, read https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71352511 |
243 | + p = write_pcr(p, frame->dts); | ||
241 | } | 244 | } |
242 | 245 | ||
243 | // PES header | 246 | // PES header |
@@ -368,10 +371,12 @@ private: | @@ -368,10 +371,12 @@ private: | ||
368 | } | 371 | } |
369 | static char* write_pcr(char* p, int64_t pcr) | 372 | static char* write_pcr(char* p, int64_t pcr) |
370 | { | 373 | { |
371 | - // the pcr=dts-delay | ||
372 | - // and the pcr maybe negative | 374 | + // the pcr=dts-delay, where dts = frame->dts + delay |
375 | + // and the pcr should never be negative | ||
373 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/268 | 376 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/268 |
374 | - int64_t v = srs_max(0, pcr); | 377 | + srs_assert(pcr >= 0); |
378 | + | ||
379 | + int64_t v = pcr; | ||
375 | 380 | ||
376 | *p++ = (char) (v >> 25); | 381 | *p++ = (char) (v >> 25); |
377 | *p++ = (char) (v >> 17); | 382 | *p++ = (char) (v >> 17); |
@@ -655,10 +660,15 @@ int SrsHlsMuxer::on_sequence_header() | @@ -655,10 +660,15 @@ int SrsHlsMuxer::on_sequence_header() | ||
655 | bool SrsHlsMuxer::is_segment_overflow() | 660 | bool SrsHlsMuxer::is_segment_overflow() |
656 | { | 661 | { |
657 | srs_assert(current); | 662 | srs_assert(current); |
658 | - | ||
659 | return current->duration >= hls_fragment; | 663 | return current->duration >= hls_fragment; |
660 | } | 664 | } |
661 | 665 | ||
666 | +bool SrsHlsMuxer::is_segment_absolutely_overflow() | ||
667 | +{ | ||
668 | + srs_assert(current); | ||
669 | + return current->duration >= 2 * hls_fragment; | ||
670 | +} | ||
671 | + | ||
662 | int SrsHlsMuxer::flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab) | 672 | int SrsHlsMuxer::flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab) |
663 | { | 673 | { |
664 | int ret = ERROR_SUCCESS; | 674 | int ret = ERROR_SUCCESS; |
@@ -1090,7 +1100,9 @@ int SrsHlsCache::write_audio(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t | @@ -1090,7 +1100,9 @@ int SrsHlsCache::write_audio(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t | ||
1090 | // pure audio again for audio disabled. | 1100 | // pure audio again for audio disabled. |
1091 | // so we reap event when the audio incoming when segment overflow. | 1101 | // so we reap event when the audio incoming when segment overflow. |
1092 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/151 | 1102 | // @see https://github.com/winlinvip/simple-rtmp-server/issues/151 |
1093 | - if (muxer->is_segment_overflow()) { | 1103 | + // we use absolutely overflow of segment to make jwplayer/ffplay happy |
1104 | + // @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71155184 | ||
1105 | + if (muxer->is_segment_absolutely_overflow()) { | ||
1094 | if ((ret = reap_segment("audio", muxer, af->pts)) != ERROR_SUCCESS) { | 1106 | if ((ret = reap_segment("audio", muxer, af->pts)) != ERROR_SUCCESS) { |
1095 | return ret; | 1107 | return ret; |
1096 | } | 1108 | } |
@@ -192,10 +192,16 @@ public: | @@ -192,10 +192,16 @@ public: | ||
192 | virtual int segment_open(int64_t segment_start_dts); | 192 | virtual int segment_open(int64_t segment_start_dts); |
193 | virtual int on_sequence_header(); | 193 | virtual int on_sequence_header(); |
194 | /** | 194 | /** |
195 | - * whether video overflow, | ||
196 | - * that is whether the current segment duration >= the segment in config | 195 | + * whether segment overflow, |
196 | + * that is whether the current segment duration>=(the segment in config) | ||
197 | */ | 197 | */ |
198 | virtual bool is_segment_overflow(); | 198 | virtual bool is_segment_overflow(); |
199 | + /** | ||
200 | + * whether segment absolutely overflow, for pure audio to reap segment, | ||
201 | + * that is whether the current segment duration>=2*(the segment in config) | ||
202 | + * @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71155184 | ||
203 | + */ | ||
204 | + virtual bool is_segment_absolutely_overflow(); | ||
199 | virtual int flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab); | 205 | virtual int flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab); |
200 | virtual int flush_video(SrsMpegtsFrame* af, SrsBuffer* ab, SrsMpegtsFrame* vf, SrsBuffer* vb); | 206 | virtual int flush_video(SrsMpegtsFrame* af, SrsBuffer* ab, SrsMpegtsFrame* vf, SrsBuffer* vb); |
201 | /** | 207 | /** |
@@ -956,7 +956,7 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata) | @@ -956,7 +956,7 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata) | ||
956 | } | 956 | } |
957 | 957 | ||
958 | // add server info to metadata | 958 | // add server info to metadata |
959 | - metadata->metadata->set("server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); | 959 | + metadata->metadata->set("server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER)); |
960 | metadata->metadata->set("primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); | 960 | metadata->metadata->set("primary", SrsAmf0Any::str(RTMP_SIG_SRS_PRIMARY)); |
961 | metadata->metadata->set("authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); | 961 | metadata->metadata->set("authors", SrsAmf0Any::str(RTMP_SIG_SRS_AUTHROS)); |
962 | 962 |
@@ -31,9 +31,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,9 +31,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
31 | // current release version | 31 | // current release version |
32 | #define VERSION_MAJOR 1 | 32 | #define VERSION_MAJOR 1 |
33 | #define VERSION_MINOR 0 | 33 | #define VERSION_MINOR 0 |
34 | -#define VERSION_REVISION 21 | 34 | +#define VERSION_REVISION 27 |
35 | + | ||
35 | // server info. | 36 | // server info. |
36 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
38 | +#define RTMP_SIG_SRS_CODE "HuKaiqun" | ||
37 | #define RTMP_SIG_SRS_ROLE "origin/edge server" | 39 | #define RTMP_SIG_SRS_ROLE "origin/edge server" |
38 | #define RTMP_SIG_SRS_NAME RTMP_SIG_SRS_KEY"(Simple RTMP Server)" | 40 | #define RTMP_SIG_SRS_NAME RTMP_SIG_SRS_KEY"(Simple RTMP Server)" |
39 | #define RTMP_SIG_SRS_URL_SHORT "github.com/winlinvip/simple-rtmp-server" | 41 | #define RTMP_SIG_SRS_URL_SHORT "github.com/winlinvip/simple-rtmp-server" |
@@ -49,6 +51,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -49,6 +51,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
49 | #define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release" | 51 | #define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release" |
50 | #define RTMP_SIG_SRS_HTTP_SERVER "https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature" | 52 | #define RTMP_SIG_SRS_HTTP_SERVER "https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature" |
51 | #define RTMP_SIG_SRS_VERSION __SRS_XSTR(VERSION_MAJOR)"."__SRS_XSTR(VERSION_MINOR)"."__SRS_XSTR(VERSION_REVISION) | 53 | #define RTMP_SIG_SRS_VERSION __SRS_XSTR(VERSION_MAJOR)"."__SRS_XSTR(VERSION_MINOR)"."__SRS_XSTR(VERSION_REVISION) |
54 | +#define RTMP_SIG_SRS_SERVER RTMP_SIG_SRS_KEY"/"RTMP_SIG_SRS_VERSION"("RTMP_SIG_SRS_CODE")" | ||
52 | 55 | ||
53 | // internal macros, covert macro values to str, | 56 | // internal macros, covert macro values to str, |
54 | // see: read https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification | 57 | // see: read https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification |
@@ -905,7 +905,7 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip) | @@ -905,7 +905,7 @@ int SrsRtmpServer::response_connect_app(SrsRequest *req, const char* server_ip) | ||
905 | 905 | ||
906 | data->set("version", SrsAmf0Any::str(RTMP_SIG_FMS_VER)); | 906 | data->set("version", SrsAmf0Any::str(RTMP_SIG_FMS_VER)); |
907 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); | 907 | data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY)); |
908 | - data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_KEY" "RTMP_SIG_SRS_VERSION" ("RTMP_SIG_SRS_URL_SHORT")")); | 908 | + data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER)); |
909 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); | 909 | data->set("srs_license", SrsAmf0Any::str(RTMP_SIG_SRS_LICENSE)); |
910 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); | 910 | data->set("srs_role", SrsAmf0Any::str(RTMP_SIG_SRS_ROLE)); |
911 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); | 911 | data->set("srs_url", SrsAmf0Any::str(RTMP_SIG_SRS_URL)); |
-
请 注册 或 登录 后发表评论