Merge code.
Conflicts: trunk/configure trunk/src/app/srs_app_source.cpp trunk/src/kernel/srs_kernel_error.hpp
正在显示
43 个修改的文件
包含
2009 行增加
和
1365 行删除
| @@ -3,18 +3,22 @@ Donations ordered by first donation. | @@ -3,18 +3,22 @@ Donations ordered by first donation. | ||
| 3 | =========================================================== | 3 | =========================================================== |
| 4 | 2015 | 4 | 2015 |
| 5 | 5 | ||
| 6 | -RMB 1000+ | 6 | +RMB 10000+ |
| 7 | +* [2015-03-03 13:25] 郭强 | ||
| 8 | + | ||
| 9 | +RMB 1000-9999 | ||
| 7 | * [2015-xx-xx xx:xx] xxx | 10 | * [2015-xx-xx xx:xx] xxx |
| 8 | 11 | ||
| 9 | RMB 500-999 | 12 | RMB 500-999 |
| 10 | * [2015-xx-xx xx:xx] xxx | 13 | * [2015-xx-xx xx:xx] xxx |
| 11 | 14 | ||
| 12 | RMB 100-499 | 15 | RMB 100-499 |
| 16 | +* [2015-03-11 09:44] 叶发养 | ||
| 13 | * [2015-02-08 21:10] 韩友洪 | 17 | * [2015-02-08 21:10] 韩友洪 |
| 14 | * [2015-01-09 16:08] 李理 | 18 | * [2015-01-09 16:08] 李理 |
| 15 | 19 | ||
| 16 | RMB 50-99 | 20 | RMB 50-99 |
| 17 | -* [2015-xx-xx xx:xx] xxx | 21 | +* [2015-03-03 17:30] flybird |
| 18 | 22 | ||
| 19 | RMB 0.01-49 | 23 | RMB 0.01-49 |
| 20 | * [2015-xx-xx xx:xx] xxx | 24 | * [2015-xx-xx xx:xx] xxx |
| @@ -12,11 +12,32 @@ Download from ossrs.net: | @@ -12,11 +12,32 @@ Download from ossrs.net: | ||
| 12 | [Centos6-x86_64](http://www.ossrs.net/srs.release/releases/files/SRS-CentOS6-x86_64-1.0.27.zip) | 12 | [Centos6-x86_64](http://www.ossrs.net/srs.release/releases/files/SRS-CentOS6-x86_64-1.0.27.zip) |
| 13 | [more...](http://www.ossrs.net/srs.release/releases/) | 13 | [more...](http://www.ossrs.net/srs.release/releases/) |
| 14 | 14 | ||
| 15 | +## Why SRS? | ||
| 16 | + | ||
| 17 | +1. Completely rewrite HLS following m3u8/ts spec, and HLS support h.264+aac/mp3. | ||
| 18 | +1. High efficient RTMP deliverying support 7k+ concurrency, vhost based, both origin and edge. | ||
| 19 | +1. Embeded simplified media HTTP server for HLS, api and HTTP flv/ts/mp3/aac streaming. | ||
| 20 | +1. Variety input: RTMP, pull by ingest file or stream(HTTP/RTMP/RTSP), push by stream caster | ||
| 21 | +RTSP/MPEGTS-over-UDP. | ||
| 22 | +1. Popular internet delivery: RTMP for flash, HLS for mobile(IOS/IPad/MAC/Android), HTTP | ||
| 23 | +flv/ts/mp3/aac streaming for user prefered. | ||
| 24 | +1. Enhanced DVR: segment/session/append plan, customer path and HTTP callback. | ||
| 25 | +1. Multiple feature: transcode, forward, ingest, http hooks, dvr, hls, rtsp, http streaming, | ||
| 26 | +http api, refer, log, bandwith test and srs-librtmp. | ||
| 27 | +1. Best maintainess: simple arch over state-threads(coroutine), single thread, single process | ||
| 28 | +and for linux/osx platform, common server x86-64/i386/arm/mips cpus, rich comments, strictly | ||
| 29 | +follows RTMP/HLS/RTSP spec. | ||
| 30 | +1. Easy to use: both English and Chinese wiki, typically config files in trunk/conf, traceable | ||
| 31 | +and session based log, linux service script and install script. | ||
| 32 | +1. MIT license, open source with product management and evolution. | ||
| 33 | + | ||
| 34 | +Enjoy it! | ||
| 35 | + | ||
| 15 | ## About | 36 | ## About |
| 16 | 37 | ||
| 17 | SRS(SIMPLE RTMP Server) over state-threads created in 2013.10. | 38 | SRS(SIMPLE RTMP Server) over state-threads created in 2013.10. |
| 18 | 39 | ||
| 19 | -SRS delivers rtmp/hls/http live on x86/x64/arm/mips linux, | 40 | +SRS delivers rtmp/hls/http live on x86/x64/arm/mips linux/osx, |
| 20 | supports origin/edge/vhost and transcode/ingest and dvr/forward | 41 | supports origin/edge/vhost and transcode/ingest and dvr/forward |
| 21 | and http-api/http-callback/reload, introduces tracable | 42 | and http-api/http-callback/reload, introduces tracable |
| 22 | session-oriented log, exports client srs-librtmp, | 43 | session-oriented log, exports client srs-librtmp, |
| @@ -486,14 +507,12 @@ Supported operating systems and hardware: | @@ -486,14 +507,12 @@ Supported operating systems and hardware: | ||
| 486 | ). | 507 | ). |
| 487 | 1. Support HLS(h.264+mp3) streaming, read | 508 | 1. Support HLS(h.264+mp3) streaming, read |
| 488 | [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301). | 509 | [#301](https://github.com/winlinvip/simple-rtmp-server/issues/301). |
| 489 | -1. Support push MPEG-TS over UDP to SRS, read | ||
| 490 | -[#250](https://github.com/winlinvip/simple-rtmp-server/issues/250). | ||
| 491 | 1. Rewrite HLS(h.264+aac/mp3) streaming, read | 510 | 1. Rewrite HLS(h.264+aac/mp3) streaming, read |
| 492 | [#304](https://github.com/winlinvip/simple-rtmp-server/issues/304). | 511 | [#304](https://github.com/winlinvip/simple-rtmp-server/issues/304). |
| 493 | -1. Support push RTSP to SRS, read | 512 | +1. [experiment] Support push MPEG-TS over UDP to SRS, read |
| 513 | +[#250](https://github.com/winlinvip/simple-rtmp-server/issues/250). | ||
| 514 | +1. [experiment] Support push RTSP to SRS, read | ||
| 494 | [#133](https://github.com/winlinvip/simple-rtmp-server/issues/133). | 515 | [#133](https://github.com/winlinvip/simple-rtmp-server/issues/133). |
| 495 | -1. Support DVR http api, read | ||
| 496 | -[#179](https://github.com/winlinvip/simple-rtmp-server/issues/179). | ||
| 497 | 1. [no-plan] Support <500ms latency, FRSC(Fast RTMP-compatible Stream Channel tech). | 516 | 1. [no-plan] Support <500ms latency, FRSC(Fast RTMP-compatible Stream Channel tech). |
| 498 | 1. [no-plan] Support RTMP 302 redirect [#92](https://github.com/winlinvip/simple-rtmp-server/issues/92). | 517 | 1. [no-plan] Support RTMP 302 redirect [#92](https://github.com/winlinvip/simple-rtmp-server/issues/92). |
| 499 | 1. [no-plan] Support multiple processes, for both origin and edge | 518 | 1. [no-plan] Support multiple processes, for both origin and edge |
| @@ -503,7 +522,6 @@ Supported operating systems and hardware: | @@ -503,7 +522,6 @@ Supported operating systems and hardware: | ||
| 503 | 1. [no-plan] Support encryption: RTMPE/RTMPS, HLS DRM | 522 | 1. [no-plan] Support encryption: RTMPE/RTMPS, HLS DRM |
| 504 | 1. [no-plan] Support RTMPT, http to tranverse firewalls | 523 | 1. [no-plan] Support RTMPT, http to tranverse firewalls |
| 505 | 1. [no-plan] Support file source, transcoding file to live stream | 524 | 1. [no-plan] Support file source, transcoding file to live stream |
| 506 | -1. [no-plan] Support RTP/RTSP server. | ||
| 507 | 525 | ||
| 508 | ## Releases | 526 | ## Releases |
| 509 | * 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/> | 527 | * 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/> |
| @@ -532,8 +550,13 @@ Supported operating systems and hardware: | @@ -532,8 +550,13 @@ Supported operating systems and hardware: | ||
| 532 | 550 | ||
| 533 | ### SRS 2.0 history | 551 | ### SRS 2.0 history |
| 534 | 552 | ||
| 535 | -* v2.0, 2015-02-24, for [#304](https://github.com/winlinvip/simple-rtmp-server/issues/304), fix hls bug, write pts/dts error. 2.0.124. | ||
| 536 | -* v2.0, 2015-02-24, fix [#179](https://github.com/winlinvip/simple-rtmp-server/issues/179), support dvr http api. 2.0.123. | 553 | +* v2.0, 2015-03-10, fix [#155](https://github.com/winlinvip/simple-rtmp-server/issues/155), support osx(darwin) for mac pro. 2.0.137. |
| 554 | +* v2.0, 2015-03-08, fix [#316](https://github.com/winlinvip/simple-rtmp-server/issues/316), http api provides stream/vhost/srs/server bytes, codec and count. 2.0.136. | ||
| 555 | +* v2.0, 2015-03-08, fix [#310](https://github.com/winlinvip/simple-rtmp-server/issues/310), refine aac LC, support aac HE/HEv2. 2.0.134. | ||
| 556 | +* v2.0, 2015-03-06, for [#322](https://github.com/winlinvip/simple-rtmp-server/issues/322), fix http-flv stream bug, support multiple streams. 2.0.133. | ||
| 557 | +* v2.0, 2015-03-06, refine http request parse. 2.0.132. | ||
| 558 | +* v2.0, 2015-03-01, for [#179](https://github.com/winlinvip/simple-rtmp-server/issues/179), revert dvr http api. 2.0.128. | ||
| 559 | +* v2.0, 2015-02-24, for [#304](https://github.com/winlinvip/simple-rtmp-server/issues/304), fix hls bug, write pts/dts error. 2.0.124 | ||
| 537 | * v2.0, 2015-02-19, refine dvr, append file when dvr file exists. 2.0.122. | 560 | * v2.0, 2015-02-19, refine dvr, append file when dvr file exists. 2.0.122. |
| 538 | * v2.0, 2015-02-19, refine pithy print to more easyer to use. 2.0.121. | 561 | * v2.0, 2015-02-19, refine pithy print to more easyer to use. 2.0.121. |
| 539 | * v2.0, 2015-02-18, fix [#133](https://github.com/winlinvip/simple-rtmp-server/issues/133), support push rtsp to srs. 2.0.120. | 562 | * v2.0, 2015-02-18, fix [#133](https://github.com/winlinvip/simple-rtmp-server/issues/133), support push rtsp to srs. 2.0.120. |
trunk/3rdparty/libaacplus-2.0.2.zip
已删除
100644 → 0
不能预览此文件类型
不能预览此文件类型
trunk/3rdparty/patches/2.http.parser.patch
0 → 100644
| 1 | +diff -r -c ./Makefile ../http-parser-2.1/Makefile | ||
| 2 | +*** ./Makefile Tue Mar 10 10:44:19 2015 | ||
| 3 | +--- ../http-parser-2.1/Makefile Wed Mar 27 06:35:20 2013 | ||
| 4 | +*************** | ||
| 5 | +*** 12,22 **** | ||
| 6 | + CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) | ||
| 7 | + CFLAGS_LIB = $(CFLAGS_FAST) -fPIC | ||
| 8 | + | ||
| 9 | +- # patch by winlin | ||
| 10 | +- CPPFLAGS_FAST = $(CPPFLAGS_DEBUG) | ||
| 11 | +- CFLAGS_FAST = $(CFLAGS_DEBUG) | ||
| 12 | +- CFLAGS_LIB = $(CFLAGS_FAST) -fPIC | ||
| 13 | +- | ||
| 14 | + test: test_g test_fast | ||
| 15 | + ./test_g | ||
| 16 | + ./test_fast | ||
| 17 | +--- 12,17 ---- |
| @@ -16,8 +16,6 @@ CherryPy-3.2.4.zip | @@ -16,8 +16,6 @@ CherryPy-3.2.4.zip | ||
| 16 | ffmpeg-2.1.1.tar.gz | 16 | ffmpeg-2.1.1.tar.gz |
| 17 | yasm-1.2.0.tar.gz | 17 | yasm-1.2.0.tar.gz |
| 18 | lame-3.99.5.tar.gz | 18 | lame-3.99.5.tar.gz |
| 19 | -libaacplus-2.0.2.tar.gz | ||
| 20 | -libaacplus-patch-26410-800.zip (26410-800.zip) | ||
| 21 | speex-1.2rc1.zip | 19 | speex-1.2rc1.zip |
| 22 | x264-snapshot-20131129-2245-stable.tar.bz2 (core.138) | 20 | x264-snapshot-20131129-2245-stable.tar.bz2 (core.138) |
| 23 | for srs to support live stream transcoding. | 21 | for srs to support live stream transcoding. |
| @@ -55,12 +53,6 @@ links: | @@ -55,12 +53,6 @@ links: | ||
| 55 | lame: | 53 | lame: |
| 56 | http://sourceforge.net/projects/lame/ | 54 | http://sourceforge.net/projects/lame/ |
| 57 | http://nchc.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz | 55 | http://nchc.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz |
| 58 | - aacplus: | ||
| 59 | - http://217.20.164.161/~tipok/aacplus/ | ||
| 60 | - http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz | ||
| 61 | - aacplus-patch: | ||
| 62 | - http://www.3gpp.org/DynaReport/26410.htm | ||
| 63 | - http://www.3gpp.org/ftp/Specs/archive/26_series/26.410/26410-800.zip | ||
| 64 | yasm: | 56 | yasm: |
| 65 | http://yasm.tortall.net/ | 57 | http://yasm.tortall.net/ |
| 66 | http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | 58 | http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz |
trunk/auto/auto_headers.sh
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +# output variables: | ||
| 4 | +# SRS_AUTO_HEADERS_H: the auto generated header file. | ||
| 5 | + | ||
| 6 | +SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" | ||
| 7 | + | ||
| 8 | +# write user options to headers | ||
| 9 | +echo "// auto generated by configure" > $SRS_AUTO_HEADERS_H | ||
| 10 | +echo "#ifndef SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H | ||
| 11 | +echo "#define SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H | ||
| 12 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 13 | + | ||
| 14 | +echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H | ||
| 15 | +echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H | ||
| 16 | +echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H | ||
| 17 | +echo "#define SRS_AUTO_USER_CONFIGURE \"${SRS_AUTO_USER_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | ||
| 18 | +echo "#define SRS_AUTO_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | ||
| 19 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 20 | + | ||
| 21 | +# export the preset. | ||
| 22 | +if [ $SRS_OSX = YES ]; then | ||
| 23 | + echo "#define SRS_OSX" >> $SRS_AUTO_HEADERS_H | ||
| 24 | +fi | ||
| 25 | +if [ $SRS_X86_X64 = YES ]; then | ||
| 26 | + echo "#define SRS_X86_X64" >> $SRS_AUTO_HEADERS_H | ||
| 27 | +fi | ||
| 28 | +if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 29 | + echo "#define SRS_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 30 | +fi | ||
| 31 | +if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 32 | + echo "#define SRS_MIPS_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 33 | +fi | ||
| 34 | +if [ $SRS_PI = YES ]; then | ||
| 35 | + echo "#define SRS_PI" >> $SRS_AUTO_HEADERS_H | ||
| 36 | +fi | ||
| 37 | +if [ $SRS_CUBIE = YES ]; then | ||
| 38 | + echo "#define SRS_CUBIE" >> $SRS_AUTO_HEADERS_H | ||
| 39 | +fi | ||
| 40 | + | ||
| 41 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 42 | + | ||
| 43 | +##################################################################################### | ||
| 44 | +# generate auto headers file, depends on the finished of options.sh | ||
| 45 | +##################################################################################### | ||
| 46 | +if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 47 | + __SrsArmCC="arm-linux-gnueabi-gcc"; | ||
| 48 | + __SrsArmGCC="arm-linux-gnueabi-gcc"; | ||
| 49 | + __SrsArmCXX="arm-linux-gnueabi-g++"; | ||
| 50 | + __SrsArmAR="arm-linux-gnueabi-ar"; | ||
| 51 | + __SrsArmLD="arm-linux-gnueabi-ld"; | ||
| 52 | + __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; | ||
| 53 | +fi | ||
| 54 | +if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 55 | + __SrsArmCC="mipsel-openwrt-linux-gcc"; | ||
| 56 | + __SrsArmGCC="mipsel-openwrt-linux-gcc"; | ||
| 57 | + __SrsArmCXX="mipsel-openwrt-linux-g++"; | ||
| 58 | + __SrsArmAR="mipsel-openwrt-linux-ar"; | ||
| 59 | + __SrsArmLD="mipsel-openwrt-linux-ld"; | ||
| 60 | + __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; | ||
| 61 | +fi | ||
| 62 | +# the arm-ubuntu12 options for make for depends | ||
| 63 | +if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi | ||
| 64 | +if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi | ||
| 65 | +if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi | ||
| 66 | +if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi | ||
| 67 | +if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi | ||
| 68 | +if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi | ||
| 69 | +# write to source file | ||
| 70 | +if [ $SRS_EMBEDED_CPU = YES ]; then | ||
| 71 | + echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" | ||
| 72 | + echo "#define SRS_AUTO_EMBEDED_TOOL_CHAIN \"cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB\"" >> $SRS_AUTO_HEADERS_H | ||
| 73 | +else | ||
| 74 | + echo "#define SRS_AUTO_EMBEDED_TOOL_CHAIN \"normal x86/x64 gcc\"" >> $SRS_AUTO_HEADERS_H | ||
| 75 | +fi | ||
| 76 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 77 | + | ||
| 78 | +# auto headers in depends. | ||
| 79 | +if [ $SRS_HTTP_PARSER = YES ]; then | ||
| 80 | + echo "#define SRS_AUTO_HTTP_PARSER" >> $SRS_AUTO_HEADERS_H | ||
| 81 | +else | ||
| 82 | + echo "#undef SRS_AUTO_HTTP_PARSER" >> $SRS_AUTO_HEADERS_H | ||
| 83 | +fi | ||
| 84 | + | ||
| 85 | +if [ $SRS_HTTP_SERVER = YES ]; then | ||
| 86 | + echo "#define SRS_AUTO_HTTP_SERVER" >> $SRS_AUTO_HEADERS_H | ||
| 87 | +else | ||
| 88 | + echo "#undef SRS_AUTO_HTTP_SERVER" >> $SRS_AUTO_HEADERS_H | ||
| 89 | +fi | ||
| 90 | + | ||
| 91 | +if [ $SRS_STREAM_CASTER = YES ]; then | ||
| 92 | + echo "#define SRS_AUTO_STREAM_CASTER" >> $SRS_AUTO_HEADERS_H | ||
| 93 | +else | ||
| 94 | + echo "#undef SRS_AUTO_STREAM_CASTER" >> $SRS_AUTO_HEADERS_H | ||
| 95 | +fi | ||
| 96 | + | ||
| 97 | +if [ $SRS_HTTP_API = YES ]; then | ||
| 98 | + echo "#define SRS_AUTO_HTTP_API" >> $SRS_AUTO_HEADERS_H | ||
| 99 | +else | ||
| 100 | + echo "#undef SRS_AUTO_HTTP_API" >> $SRS_AUTO_HEADERS_H | ||
| 101 | +fi | ||
| 102 | + | ||
| 103 | +if [ $SRS_NGINX = YES ]; then | ||
| 104 | + echo "#define SRS_AUTO_NGINX" >> $SRS_AUTO_HEADERS_H | ||
| 105 | +else | ||
| 106 | + echo "#undef SRS_AUTO_NGINX" >> $SRS_AUTO_HEADERS_H | ||
| 107 | +fi | ||
| 108 | + | ||
| 109 | +if [ $SRS_DVR = YES ]; then | ||
| 110 | + echo "#define SRS_AUTO_DVR" >> $SRS_AUTO_HEADERS_H | ||
| 111 | +else | ||
| 112 | + echo "#undef SRS_AUTO_DVR" >> $SRS_AUTO_HEADERS_H | ||
| 113 | +fi | ||
| 114 | + | ||
| 115 | +if [ $SRS_HLS = YES ]; then | ||
| 116 | + echo "#define SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H | ||
| 117 | +else | ||
| 118 | + echo "#undef SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H | ||
| 119 | +fi | ||
| 120 | + | ||
| 121 | +if [ $SRS_HTTP_CALLBACK = YES ]; then | ||
| 122 | + echo "#define SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H | ||
| 123 | +else | ||
| 124 | + echo "#undef SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H | ||
| 125 | +fi | ||
| 126 | + | ||
| 127 | +if [ $SRS_SSL = YES ]; then | ||
| 128 | + echo "#define SRS_AUTO_SSL" >> $SRS_AUTO_HEADERS_H | ||
| 129 | +else | ||
| 130 | + echo "#undef SRS_AUTO_SSL" >> $SRS_AUTO_HEADERS_H | ||
| 131 | +fi | ||
| 132 | + | ||
| 133 | +# whether compile ffmpeg tool | ||
| 134 | +if [ $SRS_FFMPEG_TOOL = YES ]; then | ||
| 135 | + echo "#define SRS_AUTO_FFMPEG_TOOL" >> $SRS_AUTO_HEADERS_H | ||
| 136 | +else | ||
| 137 | + echo "#undef SRS_AUTO_FFMPEG_TOOL" >> $SRS_AUTO_HEADERS_H | ||
| 138 | +fi | ||
| 139 | + | ||
| 140 | +# whatever the FFMPEG tools, if transcode and ingest specified, | ||
| 141 | +# srs always compile the FFMPEG tool stub which used to start the FFMPEG process. | ||
| 142 | +if [ $SRS_FFMPEG_STUB = YES ]; then | ||
| 143 | + echo "#define SRS_AUTO_FFMPEG_STUB" >> $SRS_AUTO_HEADERS_H | ||
| 144 | +else | ||
| 145 | + echo "#undef SRS_AUTO_FFMPEG_STUB" >> $SRS_AUTO_HEADERS_H | ||
| 146 | +fi | ||
| 147 | + | ||
| 148 | +if [ $SRS_TRANSCODE = YES ]; then | ||
| 149 | + echo "#define SRS_AUTO_TRANSCODE" >> $SRS_AUTO_HEADERS_H | ||
| 150 | +else | ||
| 151 | + echo "#undef SRS_AUTO_TRANSCODE" >> $SRS_AUTO_HEADERS_H | ||
| 152 | +fi | ||
| 153 | + | ||
| 154 | +if [ $SRS_INGEST = YES ]; then | ||
| 155 | + echo "#define SRS_AUTO_INGEST" >> $SRS_AUTO_HEADERS_H | ||
| 156 | +else | ||
| 157 | + echo "#undef SRS_AUTO_INGEST" >> $SRS_AUTO_HEADERS_H | ||
| 158 | +fi | ||
| 159 | + | ||
| 160 | +# for statistic. | ||
| 161 | +if [ $SRS_STAT = YES ]; then | ||
| 162 | + echo "#define SRS_AUTO_STAT" >> $SRS_AUTO_HEADERS_H | ||
| 163 | +else | ||
| 164 | + echo "#undef SRS_AUTO_STAT" >> $SRS_AUTO_HEADERS_H | ||
| 165 | +fi | ||
| 166 | + | ||
| 167 | +if [ $SRS_GPERF = YES ]; then | ||
| 168 | + echo "#define SRS_AUTO_GPERF" >> $SRS_AUTO_HEADERS_H | ||
| 169 | +else | ||
| 170 | + echo "#undef SRS_AUTO_GPERF" >> $SRS_AUTO_HEADERS_H | ||
| 171 | +fi | ||
| 172 | +if [ $SRS_GPERF_MC = YES ]; then | ||
| 173 | + echo "#define SRS_AUTO_GPERF_MC" >> $SRS_AUTO_HEADERS_H | ||
| 174 | +else | ||
| 175 | + echo "#undef SRS_AUTO_GPERF_MC" >> $SRS_AUTO_HEADERS_H | ||
| 176 | +fi | ||
| 177 | +if [ $SRS_GPERF_MP = YES ]; then | ||
| 178 | + echo "#define SRS_AUTO_GPERF_MP" >> $SRS_AUTO_HEADERS_H | ||
| 179 | +else | ||
| 180 | + echo "#undef SRS_AUTO_GPERF_MP" >> $SRS_AUTO_HEADERS_H | ||
| 181 | +fi | ||
| 182 | +if [ $SRS_GPERF_CP = YES ]; then | ||
| 183 | + echo "#define SRS_AUTO_GPERF_CP" >> $SRS_AUTO_HEADERS_H | ||
| 184 | +else | ||
| 185 | + echo "#undef SRS_AUTO_GPERF_CP" >> $SRS_AUTO_HEADERS_H | ||
| 186 | +fi | ||
| 187 | + | ||
| 188 | +##################################################################################### | ||
| 189 | +# for embeded. | ||
| 190 | +##################################################################################### | ||
| 191 | +if [ $SRS_EMBEDED_CPU = YES ]; then | ||
| 192 | + echo "#define SRS_AUTO_EMBEDED_CPU" >> $SRS_AUTO_HEADERS_H | ||
| 193 | +else | ||
| 194 | + echo "#undef SRS_AUTO_EMBEDED_CPU" >> $SRS_AUTO_HEADERS_H | ||
| 195 | +fi | ||
| 196 | + | ||
| 197 | +# arm | ||
| 198 | +if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 199 | + echo "#define SRS_AUTO_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 200 | +else | ||
| 201 | + echo "#undef SRS_AUTO_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 202 | +fi | ||
| 203 | + | ||
| 204 | +# mips | ||
| 205 | +if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 206 | + echo "#define SRS_AUTO_MIPS_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 207 | +else | ||
| 208 | + echo "#undef SRS_AUTO_MIPS_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 209 | +fi | ||
| 210 | + | ||
| 211 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 212 | +# for log level compile settings | ||
| 213 | +if [ $SRS_LOG_VERBOSE = YES ]; then | ||
| 214 | + echo "#define SRS_AUTO_VERBOSE" >> $SRS_AUTO_HEADERS_H | ||
| 215 | +else | ||
| 216 | + echo "#undef SRS_AUTO_VERBOSE" >> $SRS_AUTO_HEADERS_H | ||
| 217 | +fi | ||
| 218 | +if [ $SRS_LOG_INFO = YES ]; then | ||
| 219 | + echo "#define SRS_AUTO_INFO" >> $SRS_AUTO_HEADERS_H | ||
| 220 | +else | ||
| 221 | + echo "#undef SRS_AUTO_INFO" >> $SRS_AUTO_HEADERS_H | ||
| 222 | +fi | ||
| 223 | +if [ $SRS_LOG_TRACE = YES ]; then | ||
| 224 | + echo "#define SRS_AUTO_TRACE" >> $SRS_AUTO_HEADERS_H | ||
| 225 | +else | ||
| 226 | + echo "#undef SRS_AUTO_TRACE" >> $SRS_AUTO_HEADERS_H | ||
| 227 | +fi | ||
| 228 | + | ||
| 229 | +# prefix | ||
| 230 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 231 | +echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H | ||
| 232 | + | ||
| 233 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 234 | + | ||
| 235 | +##################################################################################### | ||
| 236 | +# generated the contributors from AUTHORS.txt | ||
| 237 | +##################################################################################### | ||
| 238 | +SRS_CONSTRIBUTORS=`cat ../AUTHORS.txt|grep "*"|awk '{print $2}'` | ||
| 239 | +echo "#define SRS_AUTO_CONSTRIBUTORS \"\\" >> $SRS_AUTO_HEADERS_H | ||
| 240 | +for CONTRIBUTOR in $SRS_CONSTRIBUTORS; do | ||
| 241 | + echo "${CONTRIBUTOR} \\" >> $SRS_AUTO_HEADERS_H | ||
| 242 | +done | ||
| 243 | +echo "\"" >> $SRS_AUTO_HEADERS_H | ||
| 244 | + | ||
| 245 | +# new empty line to auto headers file. | ||
| 246 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 247 | + | ||
| 248 | +# auto header EOF. | ||
| 249 | +echo "#endif" >> $SRS_AUTO_HEADERS_H | ||
| 250 | +echo "" >> $SRS_AUTO_HEADERS_H | ||
| 251 | + |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | ff_src_dir="../../3rdparty" | 3 | ff_src_dir="../../3rdparty" |
| 4 | 4 | ||
| 5 | # the jobs to make ffmpeg | 5 | # the jobs to make ffmpeg |
| 6 | -if [[ "" -eq SRS_JOBS ]]; then | 6 | +if [[ "" == $SRS_JOBS ]]; then |
| 7 | export SRS_JOBS="--jobs=1" | 7 | export SRS_JOBS="--jobs=1" |
| 8 | fi | 8 | fi |
| 9 | 9 | ||
| @@ -38,9 +38,6 @@ fi | @@ -38,9 +38,6 @@ fi | ||
| 38 | # ffmpeg can specifies the yasm path when configure it. | 38 | # ffmpeg can specifies the yasm path when configure it. |
| 39 | export PATH=${PATH}:${ff_release_dir}/bin | 39 | export PATH=${PATH}:${ff_release_dir}/bin |
| 40 | 40 | ||
| 41 | -# the aac command for ffmepg. | ||
| 42 | -AAC_FOR_FFMPEG="--enable-libfdk-aac" | ||
| 43 | - | ||
| 44 | # libfdk-aac | 41 | # libfdk-aac |
| 45 | if [[ -f ${ff_release_dir}/lib/libfdk-aac.a ]]; then | 42 | if [[ -f ${ff_release_dir}/lib/libfdk-aac.a ]]; then |
| 46 | echo "libfdk_aac is ok" | 43 | echo "libfdk_aac is ok" |
| @@ -52,24 +49,6 @@ else | @@ -52,24 +49,6 @@ else | ||
| 52 | ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build fdk-aac-0.1.3 failed"; exit 1; fi | 49 | ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build fdk-aac-0.1.3 failed"; exit 1; fi |
| 53 | fi | 50 | fi |
| 54 | 51 | ||
| 55 | -# libaacplus | ||
| 56 | -if [ $UBUNTU14 = NO ]; then | ||
| 57 | - AAC_FOR_FFMPEG="$AAC_FOR_FFMPEG --enable-libaacplus" | ||
| 58 | - | ||
| 59 | - if [[ -f ${ff_release_dir}/lib/libaacplus.a ]]; then | ||
| 60 | - echo "libaacplus is ok" | ||
| 61 | - else | ||
| 62 | - echo "build libaacplus-2.0.2" | ||
| 63 | - cd $ff_current_dir && | ||
| 64 | - rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip && | ||
| 65 | - cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip && | ||
| 66 | - bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install | ||
| 67 | - ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi | ||
| 68 | - fi | ||
| 69 | -fi | ||
| 70 | - | ||
| 71 | -echo "aac for ffmepg: $AAC_FOR_FFMPEG" | ||
| 72 | - | ||
| 73 | # lame-3.99 | 52 | # lame-3.99 |
| 74 | if [[ -f ${ff_release_dir}/lib/libmp3lame.a ]]; then | 53 | if [[ -f ${ff_release_dir}/lib/libmp3lame.a ]]; then |
| 75 | echo "libmp3lame is ok" | 54 | echo "libmp3lame is ok" |
| @@ -128,7 +107,7 @@ else | @@ -128,7 +107,7 @@ else | ||
| 128 | --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \ | 107 | --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \ |
| 129 | --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \ | 108 | --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \ |
| 130 | --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ | 109 | --enable-postproc --enable-bzlib --enable-zlib --enable-parsers \ |
| 131 | - --enable-libx264 --enable-libmp3lame $AAC_FOR_FFMPEG --enable-libspeex \ | 110 | + --enable-libx264 --enable-libmp3lame --enable-libfdk-aac --enable-libspeex \ |
| 132 | --enable-pthreads --extra-libs=-lpthread \ | 111 | --enable-pthreads --extra-libs=-lpthread \ |
| 133 | --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers && | 112 | --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers && |
| 134 | make ${SRS_JOBS} && make install | 113 | make ${SRS_JOBS} && make install |
| @@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
| 3 | # variables, parent script must set it: | 3 | # variables, parent script must set it: |
| 4 | # SRS_JOBS: the build jobs. | 4 | # SRS_JOBS: the build jobs. |
| 5 | # SrsArmMakeOptions: the arm make options for ubuntu12(armhf, v7cpu) | 5 | # SrsArmMakeOptions: the arm make options for ubuntu12(armhf, v7cpu) |
| 6 | -# SRS_AUTO_HEADERS_H: the auto generated header file. | ||
| 7 | 6 | ||
| 8 | ##################################################################################### | 7 | ##################################################################################### |
| 9 | ##################################################################################### | 8 | ##################################################################################### |
| @@ -42,6 +41,24 @@ function Ubuntu_prepare() | @@ -42,6 +41,24 @@ function Ubuntu_prepare() | ||
| 42 | return 0; | 41 | return 0; |
| 43 | fi | 42 | fi |
| 44 | fi | 43 | fi |
| 44 | + | ||
| 45 | + # for arm, install the cross build tool chain. | ||
| 46 | + if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 47 | + $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 48 | + echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" | ||
| 49 | + require_sudoer "sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" | ||
| 50 | + sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 51 | + echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi success" | ||
| 52 | + fi | ||
| 53 | + fi | ||
| 54 | + | ||
| 55 | + # for mips, user must installed the tool chain. | ||
| 56 | + if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 57 | + $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 58 | + echo "user must install the tool chain: $SrsArmCC" | ||
| 59 | + return 2 | ||
| 60 | + fi | ||
| 61 | + fi | ||
| 45 | 62 | ||
| 46 | OS_IS_UBUNTU=YES | 63 | OS_IS_UBUNTU=YES |
| 47 | echo "Ubuntu detected, install tools if needed" | 64 | echo "Ubuntu detected, install tools if needed" |
| @@ -74,6 +91,13 @@ function Ubuntu_prepare() | @@ -74,6 +91,13 @@ function Ubuntu_prepare() | ||
| 74 | echo "install patch success" | 91 | echo "install patch success" |
| 75 | fi | 92 | fi |
| 76 | 93 | ||
| 94 | + unzip --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 95 | + echo "install unzip" | ||
| 96 | + require_sudoer "sudo apt-get install -y --force-yes unzip" | ||
| 97 | + sudo apt-get install -y --force-yes unzip; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 98 | + echo "install unzip success" | ||
| 99 | + fi | ||
| 100 | + | ||
| 77 | if [ $SRS_FFMPEG_TOOL = YES ]; then | 101 | if [ $SRS_FFMPEG_TOOL = YES ]; then |
| 78 | autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | 102 | autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then |
| 79 | echo "install autoconf" | 103 | echo "install autoconf" |
| @@ -104,24 +128,6 @@ function Ubuntu_prepare() | @@ -104,24 +128,6 @@ function Ubuntu_prepare() | ||
| 104 | fi | 128 | fi |
| 105 | fi | 129 | fi |
| 106 | 130 | ||
| 107 | - # for arm, install the cross build tool chain. | ||
| 108 | - if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 109 | - $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 110 | - echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" | ||
| 111 | - require_sudoer "sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" | ||
| 112 | - sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 113 | - echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi success" | ||
| 114 | - fi | ||
| 115 | - fi | ||
| 116 | - | ||
| 117 | - # for mips, user must installed the tool chain. | ||
| 118 | - if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 119 | - $SrsArmCC --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 120 | - echo "user must install the tool chain: $SrsArmCC" | ||
| 121 | - return 2 | ||
| 122 | - fi | ||
| 123 | - fi | ||
| 124 | - | ||
| 125 | echo "Ubuntu install tools success" | 131 | echo "Ubuntu install tools success" |
| 126 | return 0 | 132 | return 0 |
| 127 | } | 133 | } |
| @@ -138,6 +144,12 @@ function Centos_prepare() | @@ -138,6 +144,12 @@ function Centos_prepare() | ||
| 138 | if [[ ! -f /etc/redhat-release ]]; then | 144 | if [[ ! -f /etc/redhat-release ]]; then |
| 139 | return 0; | 145 | return 0; |
| 140 | fi | 146 | fi |
| 147 | + | ||
| 148 | + # for arm, install the cross build tool chain. | ||
| 149 | + if [ $SRS_EMBEDED_CPU = YES ]; then | ||
| 150 | + echo "embeded(arm/mips) is invalid for CentOS" | ||
| 151 | + return 1 | ||
| 152 | + fi | ||
| 141 | 153 | ||
| 142 | OS_IS_CENTOS=YES | 154 | OS_IS_CENTOS=YES |
| 143 | echo "Centos detected, install tools if needed" | 155 | echo "Centos detected, install tools if needed" |
| @@ -170,6 +182,13 @@ function Centos_prepare() | @@ -170,6 +182,13 @@ function Centos_prepare() | ||
| 170 | echo "install patch success" | 182 | echo "install patch success" |
| 171 | fi | 183 | fi |
| 172 | 184 | ||
| 185 | + unzip --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 186 | + echo "install unzip" | ||
| 187 | + require_sudoer "sudo yum install -y unzip" | ||
| 188 | + sudo yum install -y unzip; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 189 | + echo "install unzip success" | ||
| 190 | + fi | ||
| 191 | + | ||
| 173 | if [ $SRS_FFMPEG_TOOL = YES ]; then | 192 | if [ $SRS_FFMPEG_TOOL = YES ]; then |
| 174 | automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | 193 | automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then |
| 175 | echo "install automake" | 194 | echo "install automake" |
| @@ -207,18 +226,146 @@ function Centos_prepare() | @@ -207,18 +226,146 @@ function Centos_prepare() | ||
| 207 | fi | 226 | fi |
| 208 | fi | 227 | fi |
| 209 | 228 | ||
| 229 | + echo "Centos install tools success" | ||
| 230 | + return 0 | ||
| 231 | +} | ||
| 232 | +# donot prepare tools, for srs-librtmp depends only gcc and g++. | ||
| 233 | +if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 234 | + Centos_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "CentOS prepare failed, ret=$ret"; exit $ret; fi | ||
| 235 | +fi | ||
| 236 | +##################################################################################### | ||
| 237 | +# for Centos, auto install tools by yum | ||
| 238 | +##################################################################################### | ||
| 239 | +OS_IS_OSX=NO | ||
| 240 | +function OSX_prepare() | ||
| 241 | +{ | ||
| 242 | + uname -s|grep Darwin >/dev/null 2>&1 | ||
| 243 | + ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 244 | + if [ $SRS_OSX = YES ]; then | ||
| 245 | + echo "OSX check failed, actual is `uname -s`" | ||
| 246 | + exit 1; | ||
| 247 | + fi | ||
| 248 | + return 0; | ||
| 249 | + fi | ||
| 250 | + | ||
| 210 | # for arm, install the cross build tool chain. | 251 | # for arm, install the cross build tool chain. |
| 211 | if [ $SRS_EMBEDED_CPU = YES ]; then | 252 | if [ $SRS_EMBEDED_CPU = YES ]; then |
| 212 | - echo "embeded(arm/mips) is invalid for CentOS" | 253 | + echo "embeded(arm/mips) is invalid for OSX" |
| 213 | return 1 | 254 | return 1 |
| 214 | fi | 255 | fi |
| 256 | + | ||
| 257 | + OS_IS_OSX=YES | ||
| 258 | + echo "OSX detected, install tools if needed" | ||
| 215 | 259 | ||
| 216 | - echo "Centos install tools success" | 260 | + brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then |
| 261 | + echo "install brew" | ||
| 262 | + echo "ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"" | ||
| 263 | + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 264 | + echo "install brew success" | ||
| 265 | + fi | ||
| 266 | + | ||
| 267 | + gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 268 | + echo "install gcc" | ||
| 269 | + echo "brew install gcc" | ||
| 270 | + brew install gcc; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 271 | + echo "install gcc success" | ||
| 272 | + fi | ||
| 273 | + | ||
| 274 | + g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 275 | + echo "install gcc-c++" | ||
| 276 | + echo "brew install gcc-c++" | ||
| 277 | + brew install gcc-c++; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 278 | + echo "install gcc-c++ success" | ||
| 279 | + fi | ||
| 280 | + | ||
| 281 | + make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 282 | + echo "install make" | ||
| 283 | + echo "brew install make" | ||
| 284 | + brew install make; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 285 | + echo "install make success" | ||
| 286 | + fi | ||
| 287 | + | ||
| 288 | + patch --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 289 | + echo "install patch" | ||
| 290 | + echo "brew install patch" | ||
| 291 | + brew install patch; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 292 | + echo "install patch success" | ||
| 293 | + fi | ||
| 294 | + | ||
| 295 | + unzip --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 296 | + echo "install unzip" | ||
| 297 | + echo "brew install unzip" | ||
| 298 | + brew install unzip; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 299 | + echo "install unzip success" | ||
| 300 | + fi | ||
| 301 | + | ||
| 302 | + if [ $SRS_FFMPEG_TOOL = YES ]; then | ||
| 303 | + automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 304 | + echo "install automake" | ||
| 305 | + echo "brew install automake" | ||
| 306 | + brew install automake; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 307 | + echo "install automake success" | ||
| 308 | + fi | ||
| 309 | + | ||
| 310 | + autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 311 | + echo "install autoconf" | ||
| 312 | + echo "brew install autoconf" | ||
| 313 | + brew install autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 314 | + echo "install autoconf success" | ||
| 315 | + fi | ||
| 316 | + | ||
| 317 | + libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then | ||
| 318 | + echo "install libtool" | ||
| 319 | + echo "brew install libtool" | ||
| 320 | + brew install libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 321 | + echo "install libtool success" | ||
| 322 | + fi | ||
| 323 | + | ||
| 324 | + if [[ ! -f /usr/include/pcre.h ]]; then | ||
| 325 | + echo "install pcre-devel" | ||
| 326 | + echo "brew install pcre-devel" | ||
| 327 | + brew install pcre-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 328 | + echo "install pcre-devel success" | ||
| 329 | + fi | ||
| 330 | + | ||
| 331 | + if [[ ! -f /usr/include/zlib.h ]]; then | ||
| 332 | + echo "install zlib-devel" | ||
| 333 | + echo "brew install zlib-devel" | ||
| 334 | + brew install zlib-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi | ||
| 335 | + echo "install zlib-devel success" | ||
| 336 | + fi | ||
| 337 | + fi | ||
| 338 | + | ||
| 339 | + echo "OSX install tools success" | ||
| 217 | return 0 | 340 | return 0 |
| 218 | } | 341 | } |
| 219 | # donot prepare tools, for srs-librtmp depends only gcc and g++. | 342 | # donot prepare tools, for srs-librtmp depends only gcc and g++. |
| 220 | if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | 343 | if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then |
| 221 | - Centos_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "CentOS prepare failed, ret=$ret"; exit $ret; fi | 344 | + OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "OSX prepare failed, ret=$ret"; exit $ret; fi |
| 345 | +fi | ||
| 346 | +# requires the osx when os | ||
| 347 | +if [ $OS_IS_OSX = YES ]; then | ||
| 348 | + if [ $SRS_OSX = NO ]; then | ||
| 349 | + echo "OSX detected, must specifies the --osx" | ||
| 350 | + exit 1 | ||
| 351 | + fi | ||
| 352 | + # TODO: FIXME: support following features. | ||
| 353 | + if [ $SRS_HTTP_API = YES ]; then | ||
| 354 | + echo "OSX does not support http-api, use --without-http-api" | ||
| 355 | + exit 1 | ||
| 356 | + fi | ||
| 357 | + if [ $SRS_STAT = YES ]; then | ||
| 358 | + echo "OSX does not support stat, use --without-stat" | ||
| 359 | + exit 1 | ||
| 360 | + fi | ||
| 361 | + if [ $SRS_FFMPEG_TOOL = YES ]; then | ||
| 362 | + echo "OSX does not support ffmpeg, use --without-ffmpeg" | ||
| 363 | + exit 1 | ||
| 364 | + fi | ||
| 365 | + if [ $SRS_NGINX = YES ]; then | ||
| 366 | + echo "OSX does not support nginx, use --without-nginx" | ||
| 367 | + exit 1 | ||
| 368 | + fi | ||
| 222 | fi | 369 | fi |
| 223 | 370 | ||
| 224 | ##################################################################################### | 371 | ##################################################################################### |
| @@ -226,7 +373,11 @@ fi | @@ -226,7 +373,11 @@ fi | ||
| 226 | ##################################################################################### | 373 | ##################################################################################### |
| 227 | if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | 374 | if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then |
| 228 | # check the arm flag file, if flag changed, need to rebuild the st. | 375 | # check the arm flag file, if flag changed, need to rebuild the st. |
| 229 | - _ST_MAKE=linux-debug | 376 | + _ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_EPOLL" |
| 377 | + # for osx, use darwin for st, donot use epoll. | ||
| 378 | + if [ $OS_IS_OSX = YES ]; then | ||
| 379 | + _ST_MAKE=darwin-debug && _ST_EXTRA_CFLAGS="" | ||
| 380 | + fi | ||
| 230 | # memory leak for linux-optimized | 381 | # memory leak for linux-optimized |
| 231 | # @see: https://github.com/winlinvip/simple-rtmp-server/issues/197 | 382 | # @see: https://github.com/winlinvip/simple-rtmp-server/issues/197 |
| 232 | if [ $SRS_EMBEDED_CPU = YES ]; then | 383 | if [ $SRS_EMBEDED_CPU = YES ]; then |
| @@ -240,9 +391,9 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | @@ -240,9 +391,9 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 240 | ( | 391 | ( |
| 241 | rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} && | 392 | rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} && |
| 242 | unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && | 393 | unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && |
| 243 | - patch -p0 < ../../3rdparty/patches/1.st.arm.patch && | 394 | + patch -p0 -R < ../../3rdparty/patches/1.st.arm.patch && |
| 244 | make CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} \ | 395 | make CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} \ |
| 245 | - EXTRA_CFLAGS="-DMD_HAVE_EPOLL" ${_ST_MAKE} && | 396 | + EXTRA_CFLAGS=${_ST_EXTRA_CFLAGS} ${_ST_MAKE} && |
| 246 | cd .. && rm -rf st && ln -sf st-1.9/obj st && | 397 | cd .. && rm -rf st && ln -sf st-1.9/obj st && |
| 247 | cd .. && touch ${SRS_OBJS}/_flag.st.arm.tmp | 398 | cd .. && touch ${SRS_OBJS}/_flag.st.arm.tmp |
| 248 | ) | 399 | ) |
| @@ -255,7 +406,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | @@ -255,7 +406,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 255 | ( | 406 | ( |
| 256 | rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} && | 407 | rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} && |
| 257 | unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && | 408 | unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 && |
| 258 | - make ${_ST_MAKE} EXTRA_CFLAGS="-DMD_HAVE_EPOLL" && | 409 | + make ${_ST_MAKE} ${_ST_EXTRA_CFLAGS} && |
| 259 | cd .. && rm -rf st && ln -sf st-1.9/obj st && | 410 | cd .. && rm -rf st && ln -sf st-1.9/obj st && |
| 260 | cd .. && rm -f ${SRS_OBJS}/_flag.st.arm.tmp | 411 | cd .. && rm -f ${SRS_OBJS}/_flag.st.arm.tmp |
| 261 | ) | 412 | ) |
| @@ -280,6 +431,7 @@ if [ $SRS_HTTP_PARSER = YES ]; then | @@ -280,6 +431,7 @@ if [ $SRS_HTTP_PARSER = YES ]; then | ||
| 280 | ( | 431 | ( |
| 281 | rm -rf ${SRS_OBJS}/http-parser-2.1 && cd ${SRS_OBJS} && unzip -q ../3rdparty/http-parser-2.1.zip && | 432 | rm -rf ${SRS_OBJS}/http-parser-2.1 && cd ${SRS_OBJS} && unzip -q ../3rdparty/http-parser-2.1.zip && |
| 282 | cd http-parser-2.1 && | 433 | cd http-parser-2.1 && |
| 434 | + patch -p0 -R < ../../3rdparty/patches/2.http.parser.patch && | ||
| 283 | sed -i "s/CPPFLAGS_FAST +=.*$/CPPFLAGS_FAST = \$\(CPPFLAGS_DEBUG\)/g" Makefile && | 435 | sed -i "s/CPPFLAGS_FAST +=.*$/CPPFLAGS_FAST = \$\(CPPFLAGS_DEBUG\)/g" Makefile && |
| 284 | sed -i "s/CFLAGS_FAST =.*$/CFLAGS_FAST = \$\(CFLAGS_DEBUG\)/g" Makefile && | 436 | sed -i "s/CFLAGS_FAST =.*$/CFLAGS_FAST = \$\(CFLAGS_DEBUG\)/g" Makefile && |
| 285 | make CC=${SrsArmCC} AR=${SrsArmAR} package && | 437 | make CC=${SrsArmCC} AR=${SrsArmAR} package && |
| @@ -296,8 +448,7 @@ if [ $SRS_HTTP_PARSER = YES ]; then | @@ -296,8 +448,7 @@ if [ $SRS_HTTP_PARSER = YES ]; then | ||
| 296 | ( | 448 | ( |
| 297 | rm -rf ${SRS_OBJS}/http-parser-2.1 && cd ${SRS_OBJS} && unzip -q ../3rdparty/http-parser-2.1.zip && | 449 | rm -rf ${SRS_OBJS}/http-parser-2.1 && cd ${SRS_OBJS} && unzip -q ../3rdparty/http-parser-2.1.zip && |
| 298 | cd http-parser-2.1 && | 450 | cd http-parser-2.1 && |
| 299 | - sed -i "s/CPPFLAGS_FAST +=.*$/CPPFLAGS_FAST = \$\(CPPFLAGS_DEBUG\)/g" Makefile && | ||
| 300 | - sed -i "s/CFLAGS_FAST =.*$/CFLAGS_FAST = \$\(CFLAGS_DEBUG\)/g" Makefile && | 451 | + patch -p0 -R < ../../3rdparty/patches/2.http.parser.patch && |
| 301 | make package && | 452 | make package && |
| 302 | cd .. && rm -rf hp && ln -sf http-parser-2.1 hp && | 453 | cd .. && rm -rf hp && ln -sf http-parser-2.1 hp && |
| 303 | cd .. && rm -f ${SRS_OBJS}/_flag.st.hp.tmp | 454 | cd .. && rm -f ${SRS_OBJS}/_flag.st.hp.tmp |
| @@ -311,30 +462,6 @@ if [ $SRS_HTTP_PARSER = YES ]; then | @@ -311,30 +462,6 @@ if [ $SRS_HTTP_PARSER = YES ]; then | ||
| 311 | if [[ ! -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then echo "build http-parser-2.1 failed"; exit -1; fi | 462 | if [[ ! -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then echo "build http-parser-2.1 failed"; exit -1; fi |
| 312 | fi | 463 | fi |
| 313 | 464 | ||
| 314 | -if [ $SRS_HTTP_PARSER = YES ]; then | ||
| 315 | - echo "#define SRS_AUTO_HTTP_PARSER" >> $SRS_AUTO_HEADERS_H | ||
| 316 | -else | ||
| 317 | - echo "#undef SRS_AUTO_HTTP_PARSER" >> $SRS_AUTO_HEADERS_H | ||
| 318 | -fi | ||
| 319 | - | ||
| 320 | -if [ $SRS_HTTP_SERVER = YES ]; then | ||
| 321 | - echo "#define SRS_AUTO_HTTP_SERVER" >> $SRS_AUTO_HEADERS_H | ||
| 322 | -else | ||
| 323 | - echo "#undef SRS_AUTO_HTTP_SERVER" >> $SRS_AUTO_HEADERS_H | ||
| 324 | -fi | ||
| 325 | - | ||
| 326 | -if [ $SRS_STREAM_CASTER = YES ]; then | ||
| 327 | - echo "#define SRS_AUTO_STREAM_CASTER" >> $SRS_AUTO_HEADERS_H | ||
| 328 | -else | ||
| 329 | - echo "#undef SRS_AUTO_STREAM_CASTER" >> $SRS_AUTO_HEADERS_H | ||
| 330 | -fi | ||
| 331 | - | ||
| 332 | -if [ $SRS_HTTP_API = YES ]; then | ||
| 333 | - echo "#define SRS_AUTO_HTTP_API" >> $SRS_AUTO_HEADERS_H | ||
| 334 | -else | ||
| 335 | - echo "#undef SRS_AUTO_HTTP_API" >> $SRS_AUTO_HEADERS_H | ||
| 336 | -fi | ||
| 337 | - | ||
| 338 | ##################################################################################### | 465 | ##################################################################################### |
| 339 | # nginx for HLS, nginx-1.5.0 | 466 | # nginx for HLS, nginx-1.5.0 |
| 340 | ##################################################################################### | 467 | ##################################################################################### |
| @@ -406,24 +533,6 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | @@ -406,24 +533,6 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 406 | echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html | 533 | echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html |
| 407 | fi | 534 | fi |
| 408 | 535 | ||
| 409 | -if [ $SRS_NGINX = YES ]; then | ||
| 410 | - echo "#define SRS_AUTO_NGINX" >> $SRS_AUTO_HEADERS_H | ||
| 411 | -else | ||
| 412 | - echo "#undef SRS_AUTO_NGINX" >> $SRS_AUTO_HEADERS_H | ||
| 413 | -fi | ||
| 414 | - | ||
| 415 | -if [ $SRS_DVR = YES ]; then | ||
| 416 | - echo "#define SRS_AUTO_DVR" >> $SRS_AUTO_HEADERS_H | ||
| 417 | -else | ||
| 418 | - echo "#undef SRS_AUTO_DVR" >> $SRS_AUTO_HEADERS_H | ||
| 419 | -fi | ||
| 420 | - | ||
| 421 | -if [ $SRS_HLS = YES ]; then | ||
| 422 | - echo "#define SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H | ||
| 423 | -else | ||
| 424 | - echo "#undef SRS_AUTO_HLS" >> $SRS_AUTO_HEADERS_H | ||
| 425 | -fi | ||
| 426 | - | ||
| 427 | ##################################################################################### | 536 | ##################################################################################### |
| 428 | # cherrypy for http hooks callback, CherryPy-3.2.4 | 537 | # cherrypy for http hooks callback, CherryPy-3.2.4 |
| 429 | ##################################################################################### | 538 | ##################################################################################### |
| @@ -431,7 +540,7 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then | @@ -431,7 +540,7 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then | ||
| 431 | if [[ -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]]; then | 540 | if [[ -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]]; then |
| 432 | echo "CherryPy-3.2.4 is ok."; | 541 | echo "CherryPy-3.2.4 is ok."; |
| 433 | else | 542 | else |
| 434 | - require_sudoer "configure --with-http-callback" | 543 | + require_sudoer "install CherryPy-3.2.4" |
| 435 | echo "install CherryPy-3.2.4"; | 544 | echo "install CherryPy-3.2.4"; |
| 436 | ( | 545 | ( |
| 437 | sudo rm -rf ${SRS_OBJS}/CherryPy-3.2.4 && cd ${SRS_OBJS} && | 546 | sudo rm -rf ${SRS_OBJS}/CherryPy-3.2.4 && cd ${SRS_OBJS} && |
| @@ -444,12 +553,6 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then | @@ -444,12 +553,6 @@ if [ $SRS_HTTP_CALLBACK = YES ]; then | ||
| 444 | if [ ! -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]; then echo "build CherryPy-3.2.4 failed."; exit -1; fi | 553 | if [ ! -f ${SRS_OBJS}/CherryPy-3.2.4/setup.py ]; then echo "build CherryPy-3.2.4 failed."; exit -1; fi |
| 445 | fi | 554 | fi |
| 446 | 555 | ||
| 447 | -if [ $SRS_HTTP_CALLBACK = YES ]; then | ||
| 448 | - echo "#define SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H | ||
| 449 | -else | ||
| 450 | - echo "#undef SRS_AUTO_HTTP_CALLBACK" >> $SRS_AUTO_HEADERS_H | ||
| 451 | -fi | ||
| 452 | - | ||
| 453 | if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | 556 | if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then |
| 454 | echo "link players to cherrypy static-dir" | 557 | echo "link players to cherrypy static-dir" |
| 455 | rm -rf research/api-server/static-dir/players && | 558 | rm -rf research/api-server/static-dir/players && |
| @@ -489,9 +592,11 @@ fi | @@ -489,9 +592,11 @@ fi | ||
| 489 | ##################################################################################### | 592 | ##################################################################################### |
| 490 | # extra configure options | 593 | # extra configure options |
| 491 | CONFIGURE_TOOL="./config" | 594 | CONFIGURE_TOOL="./config" |
| 492 | -EXTRA_CONFIGURE="" | ||
| 493 | if [ $SRS_EMBEDED_CPU = YES ]; then | 595 | if [ $SRS_EMBEDED_CPU = YES ]; then |
| 494 | - CONFIGURE_TOOL="./Configure" | 596 | + CONFIGURE_TOOL="./Configure linux-armv4" |
| 597 | +fi | ||
| 598 | +if [ $SRS_OSX = YES ]; then | ||
| 599 | + CONFIGURE_TOOL="./Configure darwin64-`uname -m`-cc" | ||
| 495 | fi | 600 | fi |
| 496 | # @see http://www.openssl.org/news/secadv_20140407.txt | 601 | # @see http://www.openssl.org/news/secadv_20140407.txt |
| 497 | # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately | 602 | # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately |
| @@ -510,7 +615,7 @@ if [ $SRS_SSL = YES ]; then | @@ -510,7 +615,7 @@ if [ $SRS_SSL = YES ]; then | ||
| 510 | ( | 615 | ( |
| 511 | rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && | 616 | rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && |
| 512 | unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && | 617 | unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && |
| 513 | - $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared no-asm linux-armv4 -DOPENSSL_NO_HEARTBEATS ${EXTRA_CONFIGURE} && | 618 | + $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared no-asm && |
| 514 | make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \ | 619 | make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \ |
| 515 | LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} && | 620 | LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} && |
| 516 | make install_sw && | 621 | make install_sw && |
| @@ -527,7 +632,7 @@ if [ $SRS_SSL = YES ]; then | @@ -527,7 +632,7 @@ if [ $SRS_SSL = YES ]; then | ||
| 527 | ( | 632 | ( |
| 528 | rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && | 633 | rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && |
| 529 | unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && | 634 | unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && |
| 530 | - $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared -DOPENSSL_NO_HEARTBEATS ${EXTRA_CONFIGURE} && | 635 | + $CONFIGURE_TOOL --prefix=`pwd`/_release -no-shared && |
| 531 | make && make install_sw && | 636 | make && make install_sw && |
| 532 | cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl && | 637 | cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl && |
| 533 | cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp | 638 | cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp |
| @@ -540,12 +645,6 @@ if [ $SRS_SSL = YES ]; then | @@ -540,12 +645,6 @@ if [ $SRS_SSL = YES ]; then | ||
| 540 | fi | 645 | fi |
| 541 | fi | 646 | fi |
| 542 | 647 | ||
| 543 | -if [ $SRS_SSL = YES ]; then | ||
| 544 | - echo "#define SRS_AUTO_SSL" >> $SRS_AUTO_HEADERS_H | ||
| 545 | -else | ||
| 546 | - echo "#undef SRS_AUTO_SSL" >> $SRS_AUTO_HEADERS_H | ||
| 547 | -fi | ||
| 548 | - | ||
| 549 | ##################################################################################### | 648 | ##################################################################################### |
| 550 | # live transcoding, ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2. | 649 | # live transcoding, ffmpeg-2.1, x264-core138, lame-3.99.5, libaacplus-2.0.2. |
| 551 | ##################################################################################### | 650 | ##################################################################################### |
| @@ -566,40 +665,6 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then | @@ -566,40 +665,6 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then | ||
| 566 | if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-2.1 failed."; exit -1; fi | 665 | if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-2.1 failed."; exit -1; fi |
| 567 | fi | 666 | fi |
| 568 | 667 | ||
| 569 | -# whether compile ffmpeg tool | ||
| 570 | -if [ $SRS_FFMPEG_TOOL = YES ]; then | ||
| 571 | - echo "#define SRS_AUTO_FFMPEG_TOOL" >> $SRS_AUTO_HEADERS_H | ||
| 572 | -else | ||
| 573 | - echo "#undef SRS_AUTO_FFMPEG_TOOL" >> $SRS_AUTO_HEADERS_H | ||
| 574 | -fi | ||
| 575 | - | ||
| 576 | -# whatever the FFMPEG tools, if transcode and ingest specified, | ||
| 577 | -# srs always compile the FFMPEG tool stub which used to start the FFMPEG process. | ||
| 578 | -if [ $SRS_FFMPEG_STUB = YES ]; then | ||
| 579 | - echo "#define SRS_AUTO_FFMPEG_STUB" >> $SRS_AUTO_HEADERS_H | ||
| 580 | -else | ||
| 581 | - echo "#undef SRS_AUTO_FFMPEG_STUB" >> $SRS_AUTO_HEADERS_H | ||
| 582 | -fi | ||
| 583 | - | ||
| 584 | -if [ $SRS_TRANSCODE = YES ]; then | ||
| 585 | - echo "#define SRS_AUTO_TRANSCODE" >> $SRS_AUTO_HEADERS_H | ||
| 586 | -else | ||
| 587 | - echo "#undef SRS_AUTO_TRANSCODE" >> $SRS_AUTO_HEADERS_H | ||
| 588 | -fi | ||
| 589 | - | ||
| 590 | -if [ $SRS_INGEST = YES ]; then | ||
| 591 | - echo "#define SRS_AUTO_INGEST" >> $SRS_AUTO_HEADERS_H | ||
| 592 | -else | ||
| 593 | - echo "#undef SRS_AUTO_INGEST" >> $SRS_AUTO_HEADERS_H | ||
| 594 | -fi | ||
| 595 | - | ||
| 596 | -# for statistic. | ||
| 597 | -if [ $SRS_STAT = YES ]; then | ||
| 598 | - echo "#define SRS_AUTO_STAT" >> $SRS_AUTO_HEADERS_H | ||
| 599 | -else | ||
| 600 | - echo "#undef SRS_AUTO_STAT" >> $SRS_AUTO_HEADERS_H | ||
| 601 | -fi | ||
| 602 | - | ||
| 603 | ##################################################################################### | 668 | ##################################################################################### |
| 604 | # build research code, librtmp | 669 | # build research code, librtmp |
| 605 | ##################################################################################### | 670 | ##################################################################################### |
| @@ -663,89 +728,8 @@ if [ $SRS_GPERF = YES ]; then | @@ -663,89 +728,8 @@ if [ $SRS_GPERF = YES ]; then | ||
| 663 | if [ ! -f ${SRS_OBJS}/gperf/bin/pprof ]; then echo "build gperftools-2.1 failed."; exit -1; fi | 728 | if [ ! -f ${SRS_OBJS}/gperf/bin/pprof ]; then echo "build gperftools-2.1 failed."; exit -1; fi |
| 664 | fi | 729 | fi |
| 665 | 730 | ||
| 666 | -if [ $SRS_GPERF = YES ]; then | ||
| 667 | - echo "#define SRS_AUTO_GPERF" >> $SRS_AUTO_HEADERS_H | ||
| 668 | -else | ||
| 669 | - echo "#undef SRS_AUTO_GPERF" >> $SRS_AUTO_HEADERS_H | ||
| 670 | -fi | ||
| 671 | -if [ $SRS_GPERF_MC = YES ]; then | ||
| 672 | - echo "#define SRS_AUTO_GPERF_MC" >> $SRS_AUTO_HEADERS_H | ||
| 673 | -else | ||
| 674 | - echo "#undef SRS_AUTO_GPERF_MC" >> $SRS_AUTO_HEADERS_H | ||
| 675 | -fi | ||
| 676 | -if [ $SRS_GPERF_MP = YES ]; then | ||
| 677 | - echo "#define SRS_AUTO_GPERF_MP" >> $SRS_AUTO_HEADERS_H | ||
| 678 | -else | ||
| 679 | - echo "#undef SRS_AUTO_GPERF_MP" >> $SRS_AUTO_HEADERS_H | ||
| 680 | -fi | ||
| 681 | -if [ $SRS_GPERF_CP = YES ]; then | ||
| 682 | - echo "#define SRS_AUTO_GPERF_CP" >> $SRS_AUTO_HEADERS_H | ||
| 683 | -else | ||
| 684 | - echo "#undef SRS_AUTO_GPERF_CP" >> $SRS_AUTO_HEADERS_H | ||
| 685 | -fi | ||
| 686 | - | ||
| 687 | -##################################################################################### | ||
| 688 | -# for embeded. | ||
| 689 | -##################################################################################### | ||
| 690 | -if [ $SRS_EMBEDED_CPU = YES ]; then | ||
| 691 | - echo "#define SRS_AUTO_EMBEDED_CPU" >> $SRS_AUTO_HEADERS_H | ||
| 692 | -else | ||
| 693 | - echo "#undef SRS_AUTO_EMBEDED_CPU" >> $SRS_AUTO_HEADERS_H | ||
| 694 | -fi | ||
| 695 | - | ||
| 696 | -# arm | ||
| 697 | -if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 698 | - echo "#define SRS_AUTO_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 699 | -else | ||
| 700 | - echo "#undef SRS_AUTO_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 701 | -fi | ||
| 702 | - | ||
| 703 | -# mips | ||
| 704 | -if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 705 | - echo "#define SRS_AUTO_MIPS_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 706 | -else | ||
| 707 | - echo "#undef SRS_AUTO_MIPS_UBUNTU12" >> $SRS_AUTO_HEADERS_H | ||
| 708 | -fi | ||
| 709 | - | ||
| 710 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 711 | - | ||
| 712 | -# for log level compile settings | ||
| 713 | -if [ $SRS_LOG_VERBOSE = YES ]; then | ||
| 714 | - echo "#define SRS_AUTO_VERBOSE" >> $SRS_AUTO_HEADERS_H | ||
| 715 | -else | ||
| 716 | - echo "#undef SRS_AUTO_VERBOSE" >> $SRS_AUTO_HEADERS_H | ||
| 717 | -fi | ||
| 718 | -if [ $SRS_LOG_INFO = YES ]; then | ||
| 719 | - echo "#define SRS_AUTO_INFO" >> $SRS_AUTO_HEADERS_H | ||
| 720 | -else | ||
| 721 | - echo "#undef SRS_AUTO_INFO" >> $SRS_AUTO_HEADERS_H | ||
| 722 | -fi | ||
| 723 | -if [ $SRS_LOG_TRACE = YES ]; then | ||
| 724 | - echo "#define SRS_AUTO_TRACE" >> $SRS_AUTO_HEADERS_H | ||
| 725 | -else | ||
| 726 | - echo "#undef SRS_AUTO_TRACE" >> $SRS_AUTO_HEADERS_H | ||
| 727 | -fi | ||
| 728 | - | ||
| 729 | -# prefix | ||
| 730 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 731 | -echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H | ||
| 732 | - | ||
| 733 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 734 | - | ||
| 735 | -##################################################################################### | ||
| 736 | -# generated the contributors from AUTHORS.txt | ||
| 737 | -##################################################################################### | ||
| 738 | -SRS_CONSTRIBUTORS=`cat ../AUTHORS.txt|grep "*"|awk '{print $2}'` | ||
| 739 | -echo "#define SRS_AUTO_CONSTRIBUTORS \"\\" >> $SRS_AUTO_HEADERS_H | ||
| 740 | -for CONTRIBUTOR in $SRS_CONSTRIBUTORS; do | ||
| 741 | - echo "${CONTRIBUTOR} \\" >> $SRS_AUTO_HEADERS_H | ||
| 742 | -done | ||
| 743 | -echo "\"" >> $SRS_AUTO_HEADERS_H | ||
| 744 | - | ||
| 745 | -# new empty line to auto headers file. | ||
| 746 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 747 | - | ||
| 748 | ##################################################################################### | 731 | ##################################################################################### |
| 749 | # generated the test script | 732 | # generated the test script |
| 750 | ##################################################################################### | 733 | ##################################################################################### |
| 751 | rm -rf ${SRS_OBJS}/srs.test && ln -sf `pwd`/scripts/srs.test objs/srs.test | 734 | rm -rf ${SRS_OBJS}/srs.test && ln -sf `pwd`/scripts/srs.test objs/srs.test |
| 735 | + |
| @@ -57,7 +57,7 @@ done | @@ -57,7 +57,7 @@ done | ||
| 57 | echo "" >> ${FILE} | 57 | echo "" >> ${FILE} |
| 58 | 58 | ||
| 59 | # parent Makefile, to create module output dir before compile it. | 59 | # parent Makefile, to create module output dir before compile it. |
| 60 | -echo " mkdir -p ${SRS_OBJS_DIR}/include" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | ||
| 61 | -echo " mkdir -p ${SRS_OBJS_DIR}/lib" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | 60 | +echo " @mkdir -p ${SRS_OBJS_DIR}/include" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} |
| 61 | +echo " @mkdir -p ${SRS_OBJS_DIR}/lib" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | ||
| 62 | 62 | ||
| 63 | echo -n "generate lib ${LIB_NAME} ok"; echo '!'; | 63 | echo -n "generate lib ${LIB_NAME} ok"; echo '!'; |
| @@ -85,6 +85,6 @@ done | @@ -85,6 +85,6 @@ done | ||
| 85 | echo "" >> ${FILE} | 85 | echo "" >> ${FILE} |
| 86 | 86 | ||
| 87 | # parent Makefile, to create module output dir before compile it. | 87 | # parent Makefile, to create module output dir before compile it. |
| 88 | -echo " mkdir -p ${SRS_OBJS_DIR}/${MODULE_DIR}" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | 88 | +echo " @mkdir -p ${SRS_OBJS_DIR}/${MODULE_DIR}" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} |
| 89 | 89 | ||
| 90 | echo -n "generate module ${MODULE_ID} ok"; echo '!'; | 90 | echo -n "generate module ${MODULE_ID} ok"; echo '!'; |
| @@ -68,6 +68,8 @@ SRS_EXPORT_LIBRTMP_SINGLE=NO | @@ -68,6 +68,8 @@ SRS_EXPORT_LIBRTMP_SINGLE=NO | ||
| 68 | # presets | 68 | # presets |
| 69 | # for x86/x64 pc/servers | 69 | # for x86/x64 pc/servers |
| 70 | SRS_X86_X64=NO | 70 | SRS_X86_X64=NO |
| 71 | +# for osx system | ||
| 72 | +SRS_OSX=NO | ||
| 71 | # armhf(v7cpu) built on ubuntu12 | 73 | # armhf(v7cpu) built on ubuntu12 |
| 72 | SRS_ARM_UBUNTU12=NO | 74 | SRS_ARM_UBUNTU12=NO |
| 73 | # mips built on ubuntu12 | 75 | # mips built on ubuntu12 |
| @@ -166,6 +168,7 @@ Options: | @@ -166,6 +168,7 @@ Options: | ||
| 166 | 168 | ||
| 167 | Presets: | 169 | Presets: |
| 168 | --x86-x64 [default] for x86/x64 cpu, common pc and servers. | 170 | --x86-x64 [default] for x86/x64 cpu, common pc and servers. |
| 171 | + --osx for osx(darwin) system to build SRS. | ||
| 169 | --pi for raspberry-pi(directly build), open features hls/ssl/static. | 172 | --pi for raspberry-pi(directly build), open features hls/ssl/static. |
| 170 | --cubie for cubieboard(directly build), open features except ffmpeg/nginx. | 173 | --cubie for cubieboard(directly build), open features except ffmpeg/nginx. |
| 171 | --arm alias for --with-arm-ubuntu12, for ubuntu12, arm crossbuild | 174 | --arm alias for --with-arm-ubuntu12, for ubuntu12, arm crossbuild |
| @@ -260,6 +263,7 @@ function parse_user_option() { | @@ -260,6 +263,7 @@ function parse_user_option() { | ||
| 260 | --log-trace) SRS_LOG_TRACE=YES ;; | 263 | --log-trace) SRS_LOG_TRACE=YES ;; |
| 261 | 264 | ||
| 262 | --x86-x64) SRS_X86_X64=YES ;; | 265 | --x86-x64) SRS_X86_X64=YES ;; |
| 266 | + --osx) SRS_OSX=YES ;; | ||
| 263 | --arm) SRS_ARM_UBUNTU12=YES ;; | 267 | --arm) SRS_ARM_UBUNTU12=YES ;; |
| 264 | --mips) SRS_MIPS_UBUNTU12=YES ;; | 268 | --mips) SRS_MIPS_UBUNTU12=YES ;; |
| 265 | --pi) SRS_PI=YES ;; | 269 | --pi) SRS_PI=YES ;; |
| @@ -331,7 +335,9 @@ function apply_user_presets() { | @@ -331,7 +335,9 @@ function apply_user_presets() { | ||
| 331 | if [ $SRS_PI = NO ]; then | 335 | if [ $SRS_PI = NO ]; then |
| 332 | if [ $SRS_CUBIE = NO ]; then | 336 | if [ $SRS_CUBIE = NO ]; then |
| 333 | if [ $SRS_X86_X64 = NO ]; then | 337 | if [ $SRS_X86_X64 = NO ]; then |
| 334 | - SRS_X86_X64=YES; opt="--x86-x64 $opt"; | 338 | + if [ $SRS_OSX = NO ]; then |
| 339 | + SRS_X86_X64=YES; opt="--x86-x64 $opt"; | ||
| 340 | + fi | ||
| 335 | fi | 341 | fi |
| 336 | fi | 342 | fi |
| 337 | fi | 343 | fi |
| @@ -563,6 +569,32 @@ function apply_user_presets() { | @@ -563,6 +569,32 @@ function apply_user_presets() { | ||
| 563 | SRS_STATIC=NO | 569 | SRS_STATIC=NO |
| 564 | fi | 570 | fi |
| 565 | 571 | ||
| 572 | + # for osx(darwin) | ||
| 573 | + if [ $SRS_OSX = YES ]; then | ||
| 574 | + SRS_HLS=YES | ||
| 575 | + SRS_DVR=YES | ||
| 576 | + SRS_NGINX=NO | ||
| 577 | + SRS_SSL=YES | ||
| 578 | + SRS_FFMPEG_TOOL=NO | ||
| 579 | + SRS_TRANSCODE=YES | ||
| 580 | + SRS_INGEST=YES | ||
| 581 | + SRS_STAT=NO | ||
| 582 | + SRS_HTTP_PARSER=YES | ||
| 583 | + SRS_HTTP_CALLBACK=YES | ||
| 584 | + SRS_HTTP_SERVER=YES | ||
| 585 | + SRS_STREAM_CASTER=YES | ||
| 586 | + SRS_HTTP_API=NO | ||
| 587 | + SRS_LIBRTMP=YES | ||
| 588 | + SRS_RESEARCH=NO | ||
| 589 | + SRS_UTEST=NO | ||
| 590 | + SRS_GPERF=NO | ||
| 591 | + SRS_GPERF_MC=NO | ||
| 592 | + SRS_GPERF_MP=NO | ||
| 593 | + SRS_GPERF_CP=NO | ||
| 594 | + SRS_GPROF=NO | ||
| 595 | + SRS_STATIC=NO | ||
| 596 | + fi | ||
| 597 | + | ||
| 566 | # if dev specified, open features if possible. | 598 | # if dev specified, open features if possible. |
| 567 | if [ $SRS_DEV = YES ]; then | 599 | if [ $SRS_DEV = YES ]; then |
| 568 | SRS_HLS=YES | 600 | SRS_HLS=YES |
| @@ -176,6 +176,6 @@ END | @@ -176,6 +176,6 @@ END | ||
| 176 | 176 | ||
| 177 | ##################################################################################### | 177 | ##################################################################################### |
| 178 | # parent Makefile, to create module output dir before compile it. | 178 | # parent Makefile, to create module output dir before compile it. |
| 179 | -echo " mkdir -p ${SRS_OBJS_DIR}/utest" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | 179 | +echo " @mkdir -p ${SRS_OBJS_DIR}/utest" >> ${SRS_WORKDIR}/${SRS_MAKEFILE} |
| 180 | 180 | ||
| 181 | echo -n "generate utest ok"; echo '!'; | 181 | echo -n "generate utest ok"; echo '!'; |
| @@ -82,7 +82,7 @@ vhost demo.srs.com { | @@ -82,7 +82,7 @@ vhost demo.srs.com { | ||
| 82 | vpreset superfast; | 82 | vpreset superfast; |
| 83 | vparams { | 83 | vparams { |
| 84 | } | 84 | } |
| 85 | - acodec libaacplus; | 85 | + acodec libfdk_aac; |
| 86 | abitrate 45; | 86 | abitrate 45; |
| 87 | asample_rate 44100; | 87 | asample_rate 44100; |
| 88 | achannels 2; | 88 | achannels 2; |
| @@ -105,7 +105,7 @@ vhost demo.srs.com { | @@ -105,7 +105,7 @@ vhost demo.srs.com { | ||
| 105 | vpreset fast; | 105 | vpreset fast; |
| 106 | vparams { | 106 | vparams { |
| 107 | } | 107 | } |
| 108 | - acodec libaacplus; | 108 | + acodec libfdk_aac; |
| 109 | abitrate 40; | 109 | abitrate 40; |
| 110 | asample_rate 44100; | 110 | asample_rate 44100; |
| 111 | achannels 2; | 111 | achannels 2; |
| @@ -151,7 +151,7 @@ vhost players { | @@ -151,7 +151,7 @@ vhost players { | ||
| 151 | vparams { | 151 | vparams { |
| 152 | g 100; | 152 | g 100; |
| 153 | } | 153 | } |
| 154 | - acodec libaacplus; | 154 | + acodec libfdk_aac; |
| 155 | abitrate 30; | 155 | abitrate 30; |
| 156 | asample_rate 44100; | 156 | asample_rate 44100; |
| 157 | achannels 2; | 157 | achannels 2; |
| @@ -22,7 +22,7 @@ vhost __defaultVhost__ { | @@ -22,7 +22,7 @@ vhost __defaultVhost__ { | ||
| 22 | vpreset medium; | 22 | vpreset medium; |
| 23 | vparams { | 23 | vparams { |
| 24 | } | 24 | } |
| 25 | - acodec libaacplus; | 25 | + acodec libfdk_aac; |
| 26 | abitrate 70; | 26 | abitrate 70; |
| 27 | asample_rate 44100; | 27 | asample_rate 44100; |
| 28 | achannels 2; | 28 | achannels 2; |
| @@ -180,6 +180,8 @@ stream_caster { | @@ -180,6 +180,8 @@ stream_caster { | ||
| 180 | caster rtsp; | 180 | caster rtsp; |
| 181 | output rtmp://127.0.0.1/[app]/[stream]; | 181 | output rtmp://127.0.0.1/[app]/[stream]; |
| 182 | listen 554; | 182 | listen 554; |
| 183 | + rtp_port_min 57200; | ||
| 184 | + rtp_port_max 57300; | ||
| 183 | } | 185 | } |
| 184 | 186 | ||
| 185 | ############################################################################################# | 187 | ############################################################################################# |
| @@ -288,44 +290,7 @@ vhost dvr.srs.com { | @@ -288,44 +290,7 @@ vhost dvr.srs.com { | ||
| 288 | # session reap flv when session end(unpublish). | 290 | # session reap flv when session end(unpublish). |
| 289 | # segment reap flv when flv duration exceed the specified dvr_duration. | 291 | # segment reap flv when flv duration exceed the specified dvr_duration. |
| 290 | # append always append to flv file, never reap it. | 292 | # append always append to flv file, never reap it. |
| 291 | - # api reap flv when api required. | ||
| 292 | - # about the api plan, the HTTP api to dvr, | ||
| 293 | - # http url to control dvr, for example, http://dev:1985/api/v1/dvrs | ||
| 294 | - # method=GET | ||
| 295 | - # to query dvrs of server. | ||
| 296 | - # request params, for example ?vhost=__defaultVhost__, where: | ||
| 297 | - # vhost, query all dvr of this vhost. | ||
| 298 | - # response in json, where: | ||
| 299 | - # {code:0, dvrs: [{path_tmpl:"./[15].[04].[05].[999].flv", path_dvr:"./22.7.43.312.flv", | ||
| 300 | - # wait_keyframe:true, vhost:"__defaultVhost", callback:"http://127.0.0.1:8085/api/v1/dvrs", | ||
| 301 | - # status:"stop"|"start" | ||
| 302 | - # }]} | ||
| 303 | - # method=POST | ||
| 304 | - # to start dvr of specified vhost. | ||
| 305 | - # request should encode in json, specifies the dvr to create, where: | ||
| 306 | - # {path_tmpl:"./[15].[04].[05].[999].flv", | ||
| 307 | - # wait_keyframe:true, vhost:"__defaultVhost", callback:"http://127.0.0.1:8085/api/v1/dvrs" | ||
| 308 | - # } | ||
| 309 | - # response in json, where: | ||
| 310 | - # {code:0} | ||
| 311 | - # method=DELETE, to stop dvr | ||
| 312 | - # to stop dvr of specified vhost. | ||
| 313 | - # request params, for example ?vhost=__defaultVhost__, where: | ||
| 314 | - # vhost, stop all dvr of this vhost. | ||
| 315 | - # response in json, where: | ||
| 316 | - # {code:0} | ||
| 317 | - # method=PUT, use as RPC(remote process call). | ||
| 318 | - # reap_segment, the request params in json, where: | ||
| 319 | - # {action:"reap_segment", vhost:"__defaultVhost", path_tmpl:"./[15].[04].[05].[999].flv"} | ||
| 320 | - # when reap segment, the callback POST request in json: | ||
| 321 | - # {action:"on_dvr_reap_segment", client_id:100, vhost:"__defaultVhost__", | ||
| 322 | - # app:"live", stream:"livestream", cwd:"/home/winlin/srs", file:"./dvr.flv" | ||
| 323 | - # } | ||
| 324 | - # for the dvr http callback, @see http_hooks.on_dvr of vhost hooks.callback.srs.com | ||
| 325 | - # @read https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#http-callback | ||
| 326 | - # @read https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#http-callback | ||
| 327 | # default: session | 293 | # default: session |
| 328 | - # TODO: FIXME: update wiki for the api plan. | ||
| 329 | dvr_plan session; | 294 | dvr_plan session; |
| 330 | # the dvr output path. | 295 | # the dvr output path. |
| 331 | # we supports some variables to generate the filename. | 296 | # we supports some variables to generate the filename. |
| @@ -361,27 +326,20 @@ vhost dvr.srs.com { | @@ -361,27 +326,20 @@ vhost dvr.srs.com { | ||
| 361 | # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#custom-path | 326 | # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_DVR#custom-path |
| 362 | # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#custom-path | 327 | # @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_EN_DVR#custom-path |
| 363 | # segment,session apply it. | 328 | # segment,session apply it. |
| 364 | - # api apply before api specified the path. | ||
| 365 | # default: ./objs/nginx/html | 329 | # default: ./objs/nginx/html |
| 366 | dvr_path ./objs/nginx/html; | 330 | dvr_path ./objs/nginx/html; |
| 367 | # the duration for dvr file, reap if exeed, in seconds. | 331 | # the duration for dvr file, reap if exeed, in seconds. |
| 368 | # segment apply it. | 332 | # segment apply it. |
| 369 | - # session,api ignore. | 333 | + # session,append ignore. |
| 370 | # default: 30 | 334 | # default: 30 |
| 371 | dvr_duration 30; | 335 | dvr_duration 30; |
| 372 | # whether wait keyframe to reap segment, | 336 | # whether wait keyframe to reap segment, |
| 373 | # if off, reap segment when duration exceed the dvr_duration, | 337 | # if off, reap segment when duration exceed the dvr_duration, |
| 374 | # if on, reap segment when duration exceed and got keyframe. | 338 | # if on, reap segment when duration exceed and got keyframe. |
| 375 | # segment apply it. | 339 | # segment apply it. |
| 376 | - # session,api ignore. | 340 | + # session,append ignore. |
| 377 | # default: on | 341 | # default: on |
| 378 | dvr_wait_keyframe on; | 342 | dvr_wait_keyframe on; |
| 379 | - # whether dvr auto start when publish. | ||
| 380 | - # if off, dvr wait for api to start it. | ||
| 381 | - # api apply it. | ||
| 382 | - # segment,session ignore. | ||
| 383 | - # default: on | ||
| 384 | - dvr_autostart on; | ||
| 385 | # about the stream monotonically increasing: | 343 | # about the stream monotonically increasing: |
| 386 | # 1. video timestamp is monotonically increasing, | 344 | # 1. video timestamp is monotonically increasing, |
| 387 | # 2. audio timestamp is monotonically increasing, | 345 | # 2. audio timestamp is monotonically increasing, |
| @@ -576,7 +534,6 @@ vhost with-hls.srs.com { | @@ -576,7 +534,6 @@ vhost with-hls.srs.com { | ||
| 576 | # the available audio codec: | 534 | # the available audio codec: |
| 577 | # aac, mp3 | 535 | # aac, mp3 |
| 578 | # default: aac | 536 | # default: aac |
| 579 | - # TODO: FIXME: update wiki for it. | ||
| 580 | hls_acodec aac; | 537 | hls_acodec aac; |
| 581 | # the default video codec of hls. | 538 | # the default video codec of hls. |
| 582 | # when codec changed, write the PAT/PMT table, but maybe ok util next ts. | 539 | # when codec changed, write the PAT/PMT table, but maybe ok util next ts. |
| @@ -584,7 +541,6 @@ vhost with-hls.srs.com { | @@ -584,7 +541,6 @@ vhost with-hls.srs.com { | ||
| 584 | # the available video codec: | 541 | # the available video codec: |
| 585 | # h264, vn | 542 | # h264, vn |
| 586 | # default: h264 | 543 | # default: h264 |
| 587 | - # TODO: FIXME: update wiki for it. | ||
| 588 | hls_vcodec h264; | 544 | hls_vcodec h264; |
| 589 | } | 545 | } |
| 590 | } | 546 | } |
| @@ -832,12 +788,11 @@ vhost example.transcode.srs.com { | @@ -832,12 +788,11 @@ vhost example.transcode.srs.com { | ||
| 832 | refs 10; | 788 | refs 10; |
| 833 | } | 789 | } |
| 834 | # audio encoder name. can be: | 790 | # audio encoder name. can be: |
| 835 | - # libaacplus: use aac(libaacplus) audio encoder. | ||
| 836 | # libfdk_aac: use aac(libfdk_aac) audio encoder. | 791 | # libfdk_aac: use aac(libfdk_aac) audio encoder. |
| 837 | # copy: donot encoder the audio stream, copy it. | 792 | # copy: donot encoder the audio stream, copy it. |
| 838 | # an: disable audio output. | 793 | # an: disable audio output. |
| 839 | - acodec libaacplus; | ||
| 840 | - # audio bitrate, in kbps. [16, 72] for libaacplus. | 794 | + acodec libfdk_aac; |
| 795 | + # audio bitrate, in kbps. [16, 72] for libfdk_aac. | ||
| 841 | abitrate 70; | 796 | abitrate 70; |
| 842 | # audio sample rate. for flv/rtmp, it must be: | 797 | # audio sample rate. for flv/rtmp, it must be: |
| 843 | # 44100,22050,11025,5512 | 798 | # 44100,22050,11025,5512 |
| @@ -847,6 +802,7 @@ vhost example.transcode.srs.com { | @@ -847,6 +802,7 @@ vhost example.transcode.srs.com { | ||
| 847 | # other ffmpeg audio params | 802 | # other ffmpeg audio params |
| 848 | aparams { | 803 | aparams { |
| 849 | # audio params, @see: http://ffmpeg.org/ffmpeg-codecs.html#Audio-Encoders | 804 | # audio params, @see: http://ffmpeg.org/ffmpeg-codecs.html#Audio-Encoders |
| 805 | + # @remark SRS supported aac profile for HLS is: aac_low, aac_he, aac_he_v2 | ||
| 850 | profile:a aac_low; | 806 | profile:a aac_low; |
| 851 | } | 807 | } |
| 852 | # output format, can be: | 808 | # output format, can be: |
| @@ -885,7 +841,7 @@ vhost mirror.transcode.srs.com { | @@ -885,7 +841,7 @@ vhost mirror.transcode.srs.com { | ||
| 885 | vpreset superfast; | 841 | vpreset superfast; |
| 886 | vparams { | 842 | vparams { |
| 887 | } | 843 | } |
| 888 | - acodec libaacplus; | 844 | + acodec libfdk_aac; |
| 889 | abitrate 45; | 845 | abitrate 45; |
| 890 | asample_rate 44100; | 846 | asample_rate 44100; |
| 891 | achannels 2; | 847 | achannels 2; |
| @@ -918,7 +874,7 @@ vhost crop.transcode.srs.com { | @@ -918,7 +874,7 @@ vhost crop.transcode.srs.com { | ||
| 918 | vpreset superfast; | 874 | vpreset superfast; |
| 919 | vparams { | 875 | vparams { |
| 920 | } | 876 | } |
| 921 | - acodec libaacplus; | 877 | + acodec libfdk_aac; |
| 922 | abitrate 45; | 878 | abitrate 45; |
| 923 | asample_rate 44100; | 879 | asample_rate 44100; |
| 924 | achannels 2; | 880 | achannels 2; |
| @@ -949,7 +905,7 @@ vhost logo.transcode.srs.com { | @@ -949,7 +905,7 @@ vhost logo.transcode.srs.com { | ||
| 949 | vpreset superfast; | 905 | vpreset superfast; |
| 950 | vparams { | 906 | vparams { |
| 951 | } | 907 | } |
| 952 | - acodec libaacplus; | 908 | + acodec libfdk_aac; |
| 953 | abitrate 45; | 909 | abitrate 45; |
| 954 | asample_rate 44100; | 910 | asample_rate 44100; |
| 955 | achannels 2; | 911 | achannels 2; |
| @@ -969,7 +925,7 @@ vhost audio.transcode.srs.com { | @@ -969,7 +925,7 @@ vhost audio.transcode.srs.com { | ||
| 969 | engine acodec { | 925 | engine acodec { |
| 970 | enabled on; | 926 | enabled on; |
| 971 | vcodec copy; | 927 | vcodec copy; |
| 972 | - acodec libaacplus; | 928 | + acodec libfdk_aac; |
| 973 | abitrate 45; | 929 | abitrate 45; |
| 974 | asample_rate 44100; | 930 | asample_rate 44100; |
| 975 | achannels 2; | 931 | achannels 2; |
| @@ -988,7 +944,7 @@ vhost vn.transcode.srs.com { | @@ -988,7 +944,7 @@ vhost vn.transcode.srs.com { | ||
| 988 | engine vn { | 944 | engine vn { |
| 989 | enabled on; | 945 | enabled on; |
| 990 | vcodec vn; | 946 | vcodec vn; |
| 991 | - acodec libaacplus; | 947 | + acodec libfdk_aac; |
| 992 | abitrate 45; | 948 | abitrate 45; |
| 993 | asample_rate 44100; | 949 | asample_rate 44100; |
| 994 | achannels 2; | 950 | achannels 2; |
| @@ -1040,7 +996,7 @@ vhost all.transcode.srs.com { | @@ -1040,7 +996,7 @@ vhost all.transcode.srs.com { | ||
| 1040 | bf 3; | 996 | bf 3; |
| 1041 | refs 10; | 997 | refs 10; |
| 1042 | } | 998 | } |
| 1043 | - acodec libaacplus; | 999 | + acodec libfdk_aac; |
| 1044 | abitrate 70; | 1000 | abitrate 70; |
| 1045 | asample_rate 44100; | 1001 | asample_rate 44100; |
| 1046 | achannels 2; | 1002 | achannels 2; |
| @@ -1062,7 +1018,7 @@ vhost all.transcode.srs.com { | @@ -1062,7 +1018,7 @@ vhost all.transcode.srs.com { | ||
| 1062 | vpreset medium; | 1018 | vpreset medium; |
| 1063 | vparams { | 1019 | vparams { |
| 1064 | } | 1020 | } |
| 1065 | - acodec libaacplus; | 1021 | + acodec libfdk_aac; |
| 1066 | abitrate 70; | 1022 | abitrate 70; |
| 1067 | asample_rate 44100; | 1023 | asample_rate 44100; |
| 1068 | achannels 2; | 1024 | achannels 2; |
| @@ -1082,7 +1038,7 @@ vhost all.transcode.srs.com { | @@ -1082,7 +1038,7 @@ vhost all.transcode.srs.com { | ||
| 1082 | vpreset fast; | 1038 | vpreset fast; |
| 1083 | vparams { | 1039 | vparams { |
| 1084 | } | 1040 | } |
| 1085 | - acodec libaacplus; | 1041 | + acodec libfdk_aac; |
| 1086 | abitrate 60; | 1042 | abitrate 60; |
| 1087 | asample_rate 44100; | 1043 | asample_rate 44100; |
| 1088 | achannels 2; | 1044 | achannels 2; |
| @@ -1102,7 +1058,7 @@ vhost all.transcode.srs.com { | @@ -1102,7 +1058,7 @@ vhost all.transcode.srs.com { | ||
| 1102 | vpreset superfast; | 1058 | vpreset superfast; |
| 1103 | vparams { | 1059 | vparams { |
| 1104 | } | 1060 | } |
| 1105 | - acodec libaacplus; | 1061 | + acodec libfdk_aac; |
| 1106 | abitrate 45; | 1062 | abitrate 45; |
| 1107 | asample_rate 44100; | 1063 | asample_rate 44100; |
| 1108 | achannels 2; | 1064 | achannels 2; |
| @@ -1113,7 +1069,7 @@ vhost all.transcode.srs.com { | @@ -1113,7 +1069,7 @@ vhost all.transcode.srs.com { | ||
| 1113 | engine vcopy { | 1069 | engine vcopy { |
| 1114 | enabled on; | 1070 | enabled on; |
| 1115 | vcodec copy; | 1071 | vcodec copy; |
| 1116 | - acodec libaacplus; | 1072 | + acodec libfdk_aac; |
| 1117 | abitrate 45; | 1073 | abitrate 45; |
| 1118 | asample_rate 44100; | 1074 | asample_rate 44100; |
| 1119 | achannels 2; | 1075 | achannels 2; |
| @@ -1161,7 +1117,7 @@ vhost ffempty.transcode.srs.com { | @@ -1161,7 +1117,7 @@ vhost ffempty.transcode.srs.com { | ||
| 1161 | vpreset superfast; | 1117 | vpreset superfast; |
| 1162 | vparams { | 1118 | vparams { |
| 1163 | } | 1119 | } |
| 1164 | - acodec libaacplus; | 1120 | + acodec libfdk_aac; |
| 1165 | abitrate 45; | 1121 | abitrate 45; |
| 1166 | asample_rate 44100; | 1122 | asample_rate 44100; |
| 1167 | achannels 2; | 1123 | achannels 2; |
trunk/conf/hds.conf
0 → 100644
| 1 | +# the config for srs to delivery hds | ||
| 2 | +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHDS | ||
| 3 | +# @see full.conf for detail config. | ||
| 4 | + | ||
| 5 | +listen 1935; | ||
| 6 | +max_connections 1000; | ||
| 7 | + | ||
| 8 | +daemon off; | ||
| 9 | +srs_log_tank console; | ||
| 10 | +srs_log_level trace; | ||
| 11 | + | ||
| 12 | +vhost __defaultVhost__ { | ||
| 13 | + hds { | ||
| 14 | + enabled on; | ||
| 15 | + hds_fragment 10; | ||
| 16 | + hds_window 60; | ||
| 17 | + hds_path ./objs/nginx/html; | ||
| 18 | + } | ||
| 19 | +} |
trunk/conf/mac.dev.conf
0 → 100644
| 1 | +# no-daemon and write log to console config for srs. | ||
| 2 | +# @see full.conf for detail config. | ||
| 3 | + | ||
| 4 | +listen 1935; | ||
| 5 | +max_connections 1000; | ||
| 6 | +daemon off; | ||
| 7 | +srs_log_tank console; | ||
| 8 | +http_api { | ||
| 9 | + enabled on; | ||
| 10 | + listen 1985; | ||
| 11 | +} | ||
| 12 | +http_server { | ||
| 13 | + enabled on; | ||
| 14 | + listen 8080; | ||
| 15 | +} | ||
| 16 | +vhost __defaultVhost__ { | ||
| 17 | + hls { | ||
| 18 | + enabled on; | ||
| 19 | + hls_fragment 10; | ||
| 20 | + hls_window 60; | ||
| 21 | + hls_path ./objs/nginx/html; | ||
| 22 | + } | ||
| 23 | + ingest livestream { | ||
| 24 | + enabled on; | ||
| 25 | + input { | ||
| 26 | + type file; | ||
| 27 | + url ./doc/source.200kbps.768x320.flv; | ||
| 28 | + } | ||
| 29 | + #ffmpeg ./objs/ffmpeg/bin/ffmpeg; | ||
| 30 | + ffmpeg ./objs/research/librtmp/srs_ingest_flv; | ||
| 31 | + engine { | ||
| 32 | + enabled off; | ||
| 33 | + output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream; | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | +} |
trunk/conf/push.rtsp.conf
0 → 100644
| 1 | +# push MPEG-TS over UDP to SRS. | ||
| 2 | +# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v2_CN_Streamer#push-mpeg-ts-over-udp | ||
| 3 | +# @see https://github.com/winlinvip/simple-rtmp-server/issues/250#issuecomment-72321769 | ||
| 4 | +# @see full.conf for detail config. | ||
| 5 | + | ||
| 6 | +listen 1935; | ||
| 7 | +max_connections 1000; | ||
| 8 | +stream_caster { | ||
| 9 | + enabled on; | ||
| 10 | + caster rtsp; | ||
| 11 | + output rtmp://127.0.0.1/[app]/[stream]; | ||
| 12 | + listen 554; | ||
| 13 | + rtp_port_min 57200; | ||
| 14 | + rtp_port_max 57300; | ||
| 15 | +} | ||
| 16 | +vhost __defaultVhost__ { | ||
| 17 | +} |
| @@ -17,7 +17,7 @@ vhost __defaultVhost__ { | @@ -17,7 +17,7 @@ vhost __defaultVhost__ { | ||
| 17 | engine ff { | 17 | engine ff { |
| 18 | enabled on; | 18 | enabled on; |
| 19 | vcodec copy; | 19 | vcodec copy; |
| 20 | - acodec libaacplus; | 20 | + acodec libfdk_aac; |
| 21 | abitrate 45; | 21 | abitrate 45; |
| 22 | asample_rate 44100; | 22 | asample_rate 44100; |
| 23 | achannels 2; | 23 | achannels 2; |
| @@ -7,14 +7,24 @@ | @@ -7,14 +7,24 @@ | ||
| 7 | SRS_WORKDIR="." | 7 | SRS_WORKDIR="." |
| 8 | SRS_OBJS_DIR="objs" | 8 | SRS_OBJS_DIR="objs" |
| 9 | SRS_OBJS="${SRS_WORKDIR}/${SRS_OBJS_DIR}" | 9 | SRS_OBJS="${SRS_WORKDIR}/${SRS_OBJS_DIR}" |
| 10 | -mkdir -p ${SRS_OBJS} | 10 | +SRS_MAKEFILE="Makefile" |
| 11 | 11 | ||
| 12 | -##################################################################################### | ||
| 13 | # linux shell color support. | 12 | # linux shell color support. |
| 14 | -RED="\\e[31m" | ||
| 15 | -GREEN="\\e[32m" | ||
| 16 | -YELLOW="\\e[33m" | ||
| 17 | -BLACK="\\e[0m" | 13 | +RED="\\033[31m" |
| 14 | +GREEN="\\033[32m" | ||
| 15 | +YELLOW="\\033[33m" | ||
| 16 | +BLACK="\\033[0m" | ||
| 17 | + | ||
| 18 | +# clean the exists, when not export srs-librtmp. | ||
| 19 | +# do this only when the options is ok. | ||
| 20 | +if [[ -f Makefile ]]; then | ||
| 21 | + make clean | ||
| 22 | +fi | ||
| 23 | +# remove makefile | ||
| 24 | +rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE} | ||
| 25 | + | ||
| 26 | +# create objs | ||
| 27 | +mkdir -p ${SRS_OBJS} | ||
| 18 | 28 | ||
| 19 | ##################################################################################### | 29 | ##################################################################################### |
| 20 | # parse user options, set the variables like: | 30 | # parse user options, set the variables like: |
| @@ -27,82 +37,18 @@ BLACK="\\e[0m" | @@ -27,82 +37,18 @@ BLACK="\\e[0m" | ||
| 27 | # for export srs-librtmp, change target to it. | 37 | # for export srs-librtmp, change target to it. |
| 28 | . auto/generate-srs-librtmp-project.sh | 38 | . auto/generate-srs-librtmp-project.sh |
| 29 | 39 | ||
| 30 | -# the auto generated variables. | ||
| 31 | -SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp" | ||
| 32 | - | ||
| 33 | -# clean the exists, when not export srs-librtmp. | ||
| 34 | -# do this only when the options is ok. | ||
| 35 | -if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 36 | - if [[ -f Makefile ]]; then | ||
| 37 | - make clean | ||
| 38 | - fi | ||
| 39 | -fi | ||
| 40 | - | ||
| 41 | -# write user options to headers | ||
| 42 | -echo "// auto generated by configure" > $SRS_AUTO_HEADERS_H | ||
| 43 | -echo "#ifndef SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H | ||
| 44 | -echo "#define SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H | ||
| 45 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 46 | - | ||
| 47 | -echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H | ||
| 48 | -echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H | ||
| 49 | -echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H | ||
| 50 | -echo "#define SRS_AUTO_USER_CONFIGURE \"${SRS_AUTO_USER_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | ||
| 51 | -echo "#define SRS_AUTO_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | ||
| 52 | - | ||
| 53 | -# new empty line to auto headers file. | ||
| 54 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 55 | - | ||
| 56 | -##################################################################################### | ||
| 57 | -# generate auto headers file, depends on the finished of options.sh | ||
| 58 | -##################################################################################### | ||
| 59 | -if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 60 | - __SrsArmCC="arm-linux-gnueabi-gcc"; | ||
| 61 | - __SrsArmGCC="arm-linux-gnueabi-gcc"; | ||
| 62 | - __SrsArmCXX="arm-linux-gnueabi-g++"; | ||
| 63 | - __SrsArmAR="arm-linux-gnueabi-ar"; | ||
| 64 | - __SrsArmLD="arm-linux-gnueabi-ld"; | ||
| 65 | - __SrsArmRANDLIB="arm-linux-gnueabi-ranlib"; | ||
| 66 | -fi | ||
| 67 | -if [ $SRS_MIPS_UBUNTU12 = YES ]; then | ||
| 68 | - __SrsArmCC="mipsel-openwrt-linux-gcc"; | ||
| 69 | - __SrsArmGCC="mipsel-openwrt-linux-gcc"; | ||
| 70 | - __SrsArmCXX="mipsel-openwrt-linux-g++"; | ||
| 71 | - __SrsArmAR="mipsel-openwrt-linux-ar"; | ||
| 72 | - __SrsArmLD="mipsel-openwrt-linux-ld"; | ||
| 73 | - __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; | ||
| 74 | -fi | ||
| 75 | -# the arm-ubuntu12 options for make for depends | ||
| 76 | -if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi | ||
| 77 | -if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi | ||
| 78 | -if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi | ||
| 79 | -if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi | ||
| 80 | -if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi | ||
| 81 | -if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi | ||
| 82 | -# write to source file | ||
| 83 | -if [ $SRS_EMBEDED_CPU = YES ]; then | ||
| 84 | - echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" | ||
| 85 | - echo "#define SRS_AUTO_EMBEDED_TOOL_CHAIN \"cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB\"" >> $SRS_AUTO_HEADERS_H | ||
| 86 | -else | ||
| 87 | - echo "#define SRS_AUTO_EMBEDED_TOOL_CHAIN \"normal x86/x64 gcc\"" >> $SRS_AUTO_HEADERS_H | ||
| 88 | -fi | ||
| 89 | -echo "" >> $SRS_AUTO_HEADERS_H | ||
| 90 | - | ||
| 91 | # apply user options. | 40 | # apply user options. |
| 92 | . auto/depends.sh | 41 | . auto/depends.sh |
| 93 | 42 | ||
| 94 | -# auto header EOF. | ||
| 95 | -echo "#endif" >> $SRS_AUTO_HEADERS_H | ||
| 96 | -echo "" >> $SRS_AUTO_HEADERS_H | 43 | +# the auto generated variables. |
| 44 | +. auto/auto_headers.sh | ||
| 97 | 45 | ||
| 98 | ##################################################################################### | 46 | ##################################################################################### |
| 99 | # generate Makefile. | 47 | # generate Makefile. |
| 100 | ##################################################################################### | 48 | ##################################################################################### |
| 101 | -SRS_MAKEFILE="Makefile" | ||
| 102 | # ubuntu echo in Makefile cannot display color, use bash instead | 49 | # ubuntu echo in Makefile cannot display color, use bash instead |
| 103 | SRS_BUILD_SUMMARY="_srs_build_summary.sh" | 50 | SRS_BUILD_SUMMARY="_srs_build_summary.sh" |
| 104 | 51 | ||
| 105 | -##################################################################################### | ||
| 106 | # srs-librtmp sample entry | 52 | # srs-librtmp sample entry |
| 107 | SrsLibrtmpSampleEntry="nossl" | 53 | SrsLibrtmpSampleEntry="nossl" |
| 108 | if [ $SRS_SSL = YES ]; then SrsLibrtmpSampleEntry="ssl";fi | 54 | if [ $SRS_SSL = YES ]; then SrsLibrtmpSampleEntry="ssl";fi |
| @@ -111,14 +57,217 @@ SrsUtestMakeEntry="@echo -e \"ignore utest for it's disabled\"" | @@ -111,14 +57,217 @@ SrsUtestMakeEntry="@echo -e \"ignore utest for it's disabled\"" | ||
| 111 | if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS_DIR}/utest; \$(MAKE))"; fi | 57 | if [ $SRS_UTEST = YES ]; then SrsUtestMakeEntry="(cd ${SRS_OBJS_DIR}/utest; \$(MAKE))"; fi |
| 112 | 58 | ||
| 113 | ##################################################################################### | 59 | ##################################################################################### |
| 60 | +# finger out modules to install. | ||
| 61 | +# where srs module is a dir which contains a config file. | ||
| 62 | +SRS_MODULES=() | ||
| 63 | +__mfiles=`find modules -name "config"` && for __mfile in $__mfiles; do | ||
| 64 | + SRS_MODULES+="`dirname $__mfile`" | ||
| 65 | +done | ||
| 66 | + | ||
| 67 | +# variables for makefile for all modules. | ||
| 68 | +__mphonys="" && __mdefaults="" && __mcleanups="" | ||
| 69 | +# add each modules for application | ||
| 70 | +for SRS_MODULE in $SRS_MODULES; do | ||
| 71 | + echo "install module at: $SRS_MODULE" | ||
| 72 | + . $SRS_MODULE/config | ||
| 73 | + __mphonys="$__mphonys $SRS_MODULE_NAME" | ||
| 74 | + __mdefaults="$__mdefaults $SRS_MODULE_NAME" | ||
| 75 | + __mcleanups="$__mcleanups $SRS_MODULE_NAME" | ||
| 76 | +done | ||
| 77 | + | ||
| 78 | +##################################################################################### | ||
| 79 | +# build tools or compiler args. | ||
| 80 | +# enable gdb debug | ||
| 81 | +GDBDebug=" -g -O0" | ||
| 82 | +# the warning level. | ||
| 83 | +WarnLevel=" -Wall" | ||
| 84 | +# the compile standard. | ||
| 85 | +CppStd="-ansi" | ||
| 86 | +# for library compile | ||
| 87 | +LibraryCompile=" -fPIC" | ||
| 88 | +# performance of gprof | ||
| 89 | +SrsGprof=""; SrsGprofLink=""; if [ $SRS_GPROF = YES ]; then SrsGprof=" -pg -lc_p"; SrsGprofLink=" -pg"; fi | ||
| 90 | +# performance of gperf | ||
| 91 | +SrsGperf=""; SrsGperfLink=""; if [ $SRS_GPERF = YES ]; then SrsGperfLink=" -lpthread"; fi | ||
| 92 | +# the cxx flag generated. | ||
| 93 | +CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}" | ||
| 94 | +if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi | ||
| 95 | +cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} | ||
| 96 | +GCC = gcc | ||
| 97 | +CXX = g++ | ||
| 98 | +AR = ar | ||
| 99 | +LINK = g++ | ||
| 100 | +CXXFLAGS = ${CXXFLAGS} | ||
| 101 | + | ||
| 102 | +.PHONY: default srs librtmp | ||
| 103 | + | ||
| 104 | +default: | ||
| 105 | + | ||
| 106 | +END | ||
| 107 | + | ||
| 108 | +##################################################################################### | ||
| 109 | +# Libraries, external library to build in srs, | ||
| 110 | +# header(.h): add to ModuleLibIncs if need the specified library. for example, LibSTRoot | ||
| 111 | +# library(.a): add to ModuleLibFiles if binary need the specifeid library. for example, LibSTfile | ||
| 112 | +# | ||
| 113 | +# st(state-threads) the basic network library for SRS. | ||
| 114 | +LibSTRoot="${SRS_OBJS_DIR}/st"; LibSTfile="${LibSTRoot}/libst.a" | ||
| 115 | +# hp(http-parser) the http request/url parser, for SRS to support HTTP callback. | ||
| 116 | +LibHttpParserRoot=""; LibHttpParserfile="" | ||
| 117 | +if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS_DIR}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi | ||
| 118 | +# openssl-1.0.1f, for the RTMP complex handshake. | ||
| 119 | +LibSSLRoot="";LibSSLfile="" | ||
| 120 | +if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = NO ]; then LibSSLRoot="${SRS_OBJS_DIR}/openssl/include"; LibSSLfile="${SRS_OBJS_DIR}/openssl/lib/libssl.a ${SRS_OBJS_DIR}/openssl/lib/libcrypto.a"; fi fi | ||
| 121 | +# gperftools-2.1, for mem check and mem/cpu profile | ||
| 122 | +LibGperfRoot=""; LibGperfFile="" | ||
| 123 | +if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS_DIR}/gperf/include"; LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_and_profiler.a"; fi | ||
| 124 | +# the link options, always use static link | ||
| 125 | +SrsLinkOptions="-ldl"; | ||
| 126 | +if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lssl"; fi fi | ||
| 127 | +# if static specified, add static | ||
| 128 | +# TODO: FIXME: remove static. | ||
| 129 | +if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; fi | ||
| 130 | +# if mips, add -lgcc_eh, or stl compile failed. | ||
| 131 | +if [ $SRS_MIPS_UBUNTU12 = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh"; fi | ||
| 132 | + | ||
| 133 | +##################################################################################### | ||
| 134 | +# Modules, compile each module, then link to binary | ||
| 135 | +# | ||
| 136 | +#Core, depends only on system apis. | ||
| 137 | +MODULE_ID="CORE" | ||
| 138 | +MODULE_DEPENDS=() | ||
| 139 | +ModuleLibIncs=(${SRS_OBJS_DIR}) | ||
| 140 | +MODULE_FILES=("srs_core" "srs_core_autofree" "srs_core_performance") | ||
| 141 | +CORE_INCS="src/core"; MODULE_DIR=${CORE_INCS} . auto/modules.sh | ||
| 142 | +CORE_OBJS="${MODULE_OBJS[@]}" | ||
| 143 | +# | ||
| 144 | +#Kernel, depends on core, provides error/log/config, nothing about stream information. | ||
| 145 | +MODULE_ID="KERNEL" | ||
| 146 | +MODULE_DEPENDS=("CORE") | ||
| 147 | +ModuleLibIncs=(${SRS_OBJS_DIR}) | ||
| 148 | +MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_stream" | ||
| 149 | + "srs_kernel_utility" "srs_kernel_flv" "srs_kernel_codec" "srs_kernel_file" | ||
| 150 | + "srs_kernel_consts" "srs_kernel_aac" "srs_kernel_mp3" "srs_kernel_ts" | ||
| 151 | + "srs_kernel_buffer") | ||
| 152 | +KERNEL_INCS="src/kernel"; MODULE_DIR=${KERNEL_INCS} . auto/modules.sh | ||
| 153 | +KERNEL_OBJS="${MODULE_OBJS[@]}" | ||
| 154 | +# | ||
| 155 | +#RTMP Protocol, depends on core/kernel, provides rtmp/htttp protocol features. | ||
| 156 | +MODULE_ID="RTMP" | ||
| 157 | +MODULE_DEPENDS=("CORE" "KERNEL") | ||
| 158 | +ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot}) | ||
| 159 | +MODULE_FILES=("srs_rtmp_amf0" "srs_rtmp_io" "srs_rtmp_stack" "srs_rtmp_sdk" | ||
| 160 | + "srs_rtmp_handshake" "srs_rtmp_utility" "srs_rtmp_msg_array" "srs_rtmp_buffer" | ||
| 161 | + "srs_raw_avc" "srs_rtsp_stack") | ||
| 162 | +RTMP_INCS="src/protocol"; MODULE_DIR=${RTMP_INCS} . auto/modules.sh | ||
| 163 | +RTMP_OBJS="${MODULE_OBJS[@]}" | ||
| 164 | +# | ||
| 165 | +#App Module | ||
| 166 | +if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 167 | + MODULE_ID="APP" | ||
| 168 | + MODULE_DEPENDS=("CORE" "KERNEL" "RTMP") | ||
| 169 | + ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS_DIR}) | ||
| 170 | + MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_st_socket" "srs_app_source" | ||
| 171 | + "srs_app_refer" "srs_app_hls" "srs_app_forward" "srs_app_encoder" "srs_app_http" | ||
| 172 | + "srs_app_thread" "srs_app_bandwidth" "srs_app_st" "srs_app_log" "srs_app_config" | ||
| 173 | + "srs_app_pithy_print" "srs_app_reload" "srs_app_http_api" "srs_app_http_conn" "srs_app_http_hooks" | ||
| 174 | + "srs_app_json" "srs_app_ingest" "srs_app_ffmpeg" "srs_app_utility" "srs_app_dvr" "srs_app_edge" | ||
| 175 | + "srs_app_kbps" "srs_app_heartbeat" "srs_app_empty" "srs_app_http_client" | ||
| 176 | + "srs_app_recv_thread" "srs_app_security" "srs_app_statistic" | ||
| 177 | + "srs_app_mpegts_udp" "srs_app_rtsp" "srs_app_listener") | ||
| 178 | + # add each modules for app | ||
| 179 | + for SRS_MODULE in $SRS_MODULES; do | ||
| 180 | + . $SRS_MODULE/config | ||
| 181 | + MODULE_FILES+=($SRS_MODULE_APP) | ||
| 182 | + done | ||
| 183 | + APP_INCS="src/app"; MODULE_DIR=${APP_INCS} . auto/modules.sh | ||
| 184 | + APP_OBJS="${MODULE_OBJS[@]}" | ||
| 185 | +fi | ||
| 186 | +# | ||
| 187 | +#LIBS Module, build libsrs.a for static link. | ||
| 188 | +MODULE_ID="LIBS" | ||
| 189 | +MODULE_DEPENDS=("CORE" "KERNEL" "RTMP") | ||
| 190 | +ModuleLibIncs=(${SRS_OBJS_DIR}) | ||
| 191 | +MODULE_FILES=("srs_librtmp" "srs_lib_simple_socket" "srs_lib_bandwidth") | ||
| 192 | +LIBS_INCS="src/libs"; MODULE_DIR=${LIBS_INCS} . auto/modules.sh | ||
| 193 | +LIBS_OBJS="${MODULE_OBJS[@]}" | ||
| 194 | +# | ||
| 195 | +#Main Module | ||
| 196 | +if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 197 | + MODULE_ID="MAIN" | ||
| 198 | + MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP") | ||
| 199 | + ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot} ${LibHttpParserRoot}) | ||
| 200 | + MODULE_FILES=("srs_main_server") | ||
| 201 | + # add each modules for main | ||
| 202 | + for SRS_MODULE in $SRS_MODULES; do | ||
| 203 | + . $SRS_MODULE/config | ||
| 204 | + MODULE_FILES+=($SRS_MODULE_MAIN) | ||
| 205 | + done | ||
| 206 | + MAIN_INCS="src/main"; MODULE_DIR=${MAIN_INCS} . auto/modules.sh | ||
| 207 | + MAIN_OBJS="${MODULE_OBJS[@]}" | ||
| 208 | +fi | ||
| 209 | + | ||
| 210 | +##################################################################################### | ||
| 211 | +# Binaries, main entrances, link the module and its depends modules, | ||
| 212 | +# then link to a binary, for example, objs/srs | ||
| 213 | +# | ||
| 214 | +# disable all app when export librtmp | ||
| 215 | +if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 216 | + # all main entrances | ||
| 217 | + MAIN_ENTRANCES=("srs_main_server") | ||
| 218 | + # add each modules for main | ||
| 219 | + for SRS_MODULE in $SRS_MODULES; do | ||
| 220 | + . $SRS_MODULE/config | ||
| 221 | + MAIN_ENTRANCES+=($SRS_MODULE_MAIN) | ||
| 222 | + done | ||
| 223 | + # | ||
| 224 | + # all depends libraries | ||
| 225 | + ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile} ${LibGperfFile}) | ||
| 226 | + # all depends objects | ||
| 227 | + MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}" | ||
| 228 | + LINK_OPTIONS="${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}" | ||
| 229 | + # | ||
| 230 | + # srs: srs(simple rtmp server) over st(state-threads) | ||
| 231 | + BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh | ||
| 232 | + # add each modules for application | ||
| 233 | + for SRS_MODULE in $SRS_MODULES; do | ||
| 234 | + . $SRS_MODULE/config | ||
| 235 | + BUILD_KEY="$SRS_MODULE_NAME" APP_MAIN="$SRS_MODULE_MAIN" APP_NAME="$SRS_MODULE_NAME" . auto/apps.sh | ||
| 236 | + done | ||
| 237 | +fi | ||
| 238 | +# srs librtmp | ||
| 239 | +if [ $SRS_LIBRTMP = YES ]; then | ||
| 240 | + MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${LIBS_OBJS[@]}" | ||
| 241 | + BUILD_KEY="librtmp" LIB_NAME="lib/srs_librtmp" . auto/libs.sh | ||
| 242 | +fi | ||
| 243 | +# | ||
| 244 | +# utest, the unit-test cases of srs, base on gtest1.6 | ||
| 245 | +if [ $SRS_UTEST = YES ]; then | ||
| 246 | + MODULE_FILES=("srs_utest" "srs_utest_amf0" "srs_utest_protocol" | ||
| 247 | + "srs_utest_kernel" "srs_utest_core" "srs_utest_config" | ||
| 248 | + "srs_utest_reload") | ||
| 249 | + ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibSSLRoot}) | ||
| 250 | + ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile}) | ||
| 251 | + MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP") | ||
| 252 | + MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${APP_OBJS[@]}" | ||
| 253 | + LINK_OPTIONS="-lpthread ${SrsLinkOptions}" MODULE_DIR="src/utest" APP_NAME="srs_utest" . auto/utest.sh | ||
| 254 | +fi | ||
| 255 | + | ||
| 256 | +##################################################################################### | ||
| 114 | # generate colorful summary script | 257 | # generate colorful summary script |
| 115 | . auto/summary.sh | 258 | . auto/summary.sh |
| 116 | 259 | ||
| 117 | ##################################################################################### | 260 | ##################################################################################### |
| 118 | # makefile | 261 | # makefile |
| 119 | echo "generate Makefile" | 262 | echo "generate Makefile" |
| 263 | + | ||
| 264 | +# backup old makefile. | ||
| 265 | +rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk && | ||
| 266 | +mv ${SRS_WORKDIR}/${SRS_MAKEFILE} ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk | ||
| 267 | + | ||
| 268 | +# generate phony header | ||
| 120 | cat << END > ${SRS_WORKDIR}/${SRS_MAKEFILE} | 269 | cat << END > ${SRS_WORKDIR}/${SRS_MAKEFILE} |
| 121 | -.PHONY: default _default install install-api help clean server librtmp utest _prepare_dir | 270 | +.PHONY: default _default install install-api help clean server librtmp utest _prepare_dir $__mphonys |
| 122 | 271 | ||
| 123 | # install prefix. | 272 | # install prefix. |
| 124 | SRS_PREFIX=${SRS_PREFIX} | 273 | SRS_PREFIX=${SRS_PREFIX} |
| @@ -146,23 +295,27 @@ fi | @@ -146,23 +295,27 @@ fi | ||
| 146 | # the server, librtmp and utest | 295 | # the server, librtmp and utest |
| 147 | # where the bellow will check and disable some entry by only echo. | 296 | # where the bellow will check and disable some entry by only echo. |
| 148 | cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | 297 | cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE} |
| 149 | -_default: server librtmp utest | 298 | +_default: server librtmp utest $__mdefaults |
| 150 | @bash objs/_srs_build_summary.sh | 299 | @bash objs/_srs_build_summary.sh |
| 151 | 300 | ||
| 152 | help: | 301 | help: |
| 153 | @echo "Usage: make <help>|<clean>|<server>|<librtmp>|<utest>|<install>|<install-api>|<uninstall>" | 302 | @echo "Usage: make <help>|<clean>|<server>|<librtmp>|<utest>|<install>|<install-api>|<uninstall>" |
| 154 | - @echo " help display this help menu" | ||
| 155 | - @echo " clean cleanup project" | ||
| 156 | - @echo " server build the srs(simple rtmp server) over st(state-threads)" | ||
| 157 | - @echo " librtmp build the client publish/play library, and samples" | ||
| 158 | - @echo " utest build the utest for srs" | ||
| 159 | - @echo " install install srs to the prefix path" | ||
| 160 | - @echo " install-api install srs and api-server to the prefix path" | ||
| 161 | - @echo " uninstall uninstall srs from prefix path" | 303 | + @echo " help display this help menu" |
| 304 | + @echo " clean cleanup project" | ||
| 305 | + @echo " server build the srs(simple rtmp server) over st(state-threads)" | ||
| 306 | + @echo " librtmp build the client publish/play library, and samples" | ||
| 307 | + @echo " utest build the utest for srs" | ||
| 308 | + @echo " install install srs to the prefix path" | ||
| 309 | + @echo " install-api install srs and api-server to the prefix path" | ||
| 310 | + @echo " uninstall uninstall srs from prefix path" | ||
| 311 | + @echo "@remark all modules will auto genearted and build" | ||
| 312 | + @echo "For example:" | ||
| 313 | + @echo " make" | ||
| 314 | + @echo " make help" | ||
| 162 | 315 | ||
| 163 | clean: | 316 | clean: |
| 164 | - (cd ${SRS_OBJS_DIR}; rm -rf srs srs_utest) | ||
| 165 | - (cd ${SRS_OBJS_DIR}; rm -rf src research include lib) | 317 | + (cd ${SRS_OBJS_DIR}; rm -rf srs srs_utest $__mcleanups) |
| 318 | + (cd ${SRS_OBJS_DIR}; rm -rf src include lib) | ||
| 166 | (cd ${SRS_OBJS_DIR}/utest; rm -rf *.o *.a) | 319 | (cd ${SRS_OBJS_DIR}/utest; rm -rf *.o *.a) |
| 167 | (cd research/librtmp; make clean) | 320 | (cd research/librtmp; make clean) |
| 168 | (cd research/api-server/static-dir; rm -rf crossdomain.xml forward live players) | 321 | (cd research/api-server/static-dir; rm -rf crossdomain.xml forward live players) |
| @@ -184,6 +337,25 @@ server: _prepare_dir | @@ -184,6 +337,25 @@ server: _prepare_dir | ||
| 184 | 337 | ||
| 185 | END | 338 | END |
| 186 | fi | 339 | fi |
| 340 | +# generate all modules entry | ||
| 341 | +for SRS_MODULE in $SRS_MODULES; do | ||
| 342 | + . $SRS_MODULE/config | ||
| 343 | + # if export librtmp, donot build the bravo-ingest. | ||
| 344 | + if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then | ||
| 345 | + cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | ||
| 346 | +$SRS_MODULE_NAME: _prepare_dir | ||
| 347 | + @echo "donot build the $SRS_MODULE_NAME for srs-librtmp" | ||
| 348 | + | ||
| 349 | +END | ||
| 350 | + else | ||
| 351 | + cat << END >> ${SRS_WORKDIR}/${SRS_MAKEFILE} | ||
| 352 | +$SRS_MODULE_NAME: _prepare_dir | ||
| 353 | + @echo "build the $SRS_MODULE_NAME over SRS" | ||
| 354 | + \$(MAKE) -f ${SRS_OBJS_DIR}/${SRS_MAKEFILE} $SRS_MODULE_NAME | ||
| 355 | + | ||
| 356 | +END | ||
| 357 | + fi | ||
| 358 | +done | ||
| 187 | 359 | ||
| 188 | # disable install entry for srs-librtmp | 360 | # disable install entry for srs-librtmp |
| 189 | if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then | 361 | if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then |
| @@ -293,164 +465,9 @@ _prepare_dir: | @@ -293,164 +465,9 @@ _prepare_dir: | ||
| 293 | @mkdir -p ${SRS_OBJS_DIR} | 465 | @mkdir -p ${SRS_OBJS_DIR} |
| 294 | END | 466 | END |
| 295 | 467 | ||
| 296 | -##################################################################################### | ||
| 297 | -# build tools or compiler args. | ||
| 298 | -# enable gdb debug | ||
| 299 | -GDBDebug=" -g -O0" | ||
| 300 | -# the warning level. | ||
| 301 | -WarnLevel=" -Wall" | ||
| 302 | -# the compile standard. | ||
| 303 | -CppStd="-ansi" | ||
| 304 | -# for library compile | ||
| 305 | -LibraryCompile=" -fPIC" | ||
| 306 | -# performance of gprof | ||
| 307 | -SrsGprof=""; SrsGprofLink=""; if [ $SRS_GPROF = YES ]; then SrsGprof=" -pg -lc_p"; SrsGprofLink=" -pg"; fi | ||
| 308 | -# performance of gperf | ||
| 309 | -SrsGperf=""; SrsGperfLink=""; if [ $SRS_GPERF = YES ]; then SrsGperfLink=" -lpthread"; fi | ||
| 310 | -# the cxx flag generated. | ||
| 311 | -CXXFLAGS="${CppStd}${WarnLevel}${GDBDebug}${LibraryCompile}${SrsGprof}" | ||
| 312 | -if [ $SRS_GPERF = YES ]; then CXXFLAGS="${CXXFLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"; fi | ||
| 313 | -cat << END > ${SRS_OBJS}/${SRS_MAKEFILE} | ||
| 314 | -GCC = gcc | ||
| 315 | -CXX = g++ | ||
| 316 | -AR = ar | ||
| 317 | -LINK = g++ | ||
| 318 | -CXXFLAGS = ${CXXFLAGS} | ||
| 319 | - | ||
| 320 | -.PHONY: default srs librtmp | ||
| 321 | - | ||
| 322 | -default: | ||
| 323 | - | ||
| 324 | -END | ||
| 325 | - | ||
| 326 | -##################################################################################### | ||
| 327 | -# Libraries, external library to build in srs, | ||
| 328 | -# header(.h): add to ModuleLibIncs if need the specified library. for example, LibSTRoot | ||
| 329 | -# library(.a): add to ModuleLibFiles if binary need the specifeid library. for example, LibSTfile | ||
| 330 | -# | ||
| 331 | -# st(state-threads) the basic network library for SRS. | ||
| 332 | -LibSTRoot="${SRS_OBJS_DIR}/st"; LibSTfile="${LibSTRoot}/libst.a" | ||
| 333 | -# hp(http-parser) the http request/url parser, for SRS to support HTTP callback. | ||
| 334 | -LibHttpParserRoot=""; LibHttpParserfile="" | ||
| 335 | -if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS_DIR}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi | ||
| 336 | -# openssl-1.0.1f, for the RTMP complex handshake. | ||
| 337 | -LibSSLRoot="";LibSSLfile="" | ||
| 338 | -if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = NO ]; then LibSSLRoot="${SRS_OBJS_DIR}/openssl/include"; LibSSLfile="${SRS_OBJS_DIR}/openssl/lib/libssl.a ${SRS_OBJS_DIR}/openssl/lib/libcrypto.a"; fi fi | ||
| 339 | -# gperftools-2.1, for mem check and mem/cpu profile | ||
| 340 | -LibGperfRoot=""; LibGperfFile="" | ||
| 341 | -if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS_DIR}/gperf/include"; LibGperfFile="${SRS_OBJS_DIR}/gperf/lib/libtcmalloc_and_profiler.a"; fi | ||
| 342 | -# the link options, always use static link | ||
| 343 | -SrsLinkOptions="-ldl"; | ||
| 344 | -if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lssl"; fi fi | ||
| 345 | -# if static specified, add static | ||
| 346 | -# TODO: FIXME: remove static. | ||
| 347 | -if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; fi | ||
| 348 | -# if mips, add -lgcc_eh, or stl compile failed. | ||
| 349 | -if [ $SRS_MIPS_UBUNTU12 = YES ]; then SrsLinkOptions="${SrsLinkOptions} -lgcc_eh"; fi | ||
| 350 | - | ||
| 351 | -##################################################################################### | ||
| 352 | -# Modules, compile each module, then link to binary | ||
| 353 | -# | ||
| 354 | -#Core, depends only on system apis. | ||
| 355 | -MODULE_ID="CORE" | ||
| 356 | -MODULE_DEPENDS=() | ||
| 357 | -ModuleLibIncs=(${SRS_OBJS_DIR}) | ||
| 358 | -MODULE_FILES=("srs_core" "srs_core_autofree" "srs_core_performance") | ||
| 359 | -CORE_INCS="src/core"; MODULE_DIR=${CORE_INCS} . auto/modules.sh | ||
| 360 | -CORE_OBJS="${MODULE_OBJS[@]}" | ||
| 361 | -# | ||
| 362 | -#Kernel, depends on core, provides error/log/config, nothing about stream information. | ||
| 363 | -MODULE_ID="KERNEL" | ||
| 364 | -MODULE_DEPENDS=("CORE") | ||
| 365 | -ModuleLibIncs=(${SRS_OBJS_DIR}) | ||
| 366 | -MODULE_FILES=("srs_kernel_error" "srs_kernel_log" "srs_kernel_stream" | ||
| 367 | - "srs_kernel_utility" "srs_kernel_flv" "srs_kernel_codec" "srs_kernel_file" | ||
| 368 | - "srs_kernel_consts" "srs_kernel_aac" "srs_kernel_mp3" "srs_kernel_ts" | ||
| 369 | - "srs_kernel_buffer") | ||
| 370 | -KERNEL_INCS="src/kernel"; MODULE_DIR=${KERNEL_INCS} . auto/modules.sh | ||
| 371 | -KERNEL_OBJS="${MODULE_OBJS[@]}" | ||
| 372 | -# | ||
| 373 | -#RTMP Protocol, depends on core/kernel, provides rtmp/htttp protocol features. | ||
| 374 | -MODULE_ID="RTMP" | ||
| 375 | -MODULE_DEPENDS=("CORE" "KERNEL") | ||
| 376 | -ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot}) | ||
| 377 | -MODULE_FILES=("srs_rtmp_amf0" "srs_rtmp_io" "srs_rtmp_stack" "srs_rtmp_sdk" | ||
| 378 | - "srs_rtmp_handshake" "srs_rtmp_utility" "srs_rtmp_msg_array" "srs_rtmp_buffer" | ||
| 379 | - "srs_raw_avc" "srs_rtsp_stack") | ||
| 380 | -RTMP_INCS="src/protocol"; MODULE_DIR=${RTMP_INCS} . auto/modules.sh | ||
| 381 | -RTMP_OBJS="${MODULE_OBJS[@]}" | ||
| 382 | -# | ||
| 383 | -#App Module | ||
| 384 | -if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 385 | - MODULE_ID="APP" | ||
| 386 | - MODULE_DEPENDS=("CORE" "KERNEL" "RTMP") | ||
| 387 | - ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${SRS_OBJS_DIR}) | ||
| 388 | - MODULE_FILES=("srs_app_server" "srs_app_conn" "srs_app_rtmp_conn" "srs_app_st_socket" "srs_app_source" | ||
| 389 | - "srs_app_refer" "srs_app_hls" "srs_app_forward" "srs_app_encoder" "srs_app_http" | ||
| 390 | - "srs_app_thread" "srs_app_bandwidth" "srs_app_st" "srs_app_log" "srs_app_config" | ||
| 391 | - "srs_app_pithy_print" "srs_app_reload" "srs_app_http_api" "srs_app_http_conn" "srs_app_http_hooks" | ||
| 392 | - "srs_app_json" "srs_app_ingest" "srs_app_ffmpeg" "srs_app_utility" "srs_app_dvr" "srs_app_edge" | ||
| 393 | - "srs_app_kbps" "srs_app_heartbeat" "srs_app_empty" "srs_app_http_client" | ||
| 394 | - "srs_app_recv_thread" "srs_app_security" "srs_app_statistic" | ||
| 395 | - "srs_app_mpegts_udp" "srs_app_rtsp" "srs_app_listener" "srs_app_hds") | ||
| 396 | - APP_INCS="src/app"; MODULE_DIR=${APP_INCS} . auto/modules.sh | ||
| 397 | - APP_OBJS="${MODULE_OBJS[@]}" | ||
| 398 | -fi | ||
| 399 | -# | ||
| 400 | -#LIBS Module, build libsrs.a for static link. | ||
| 401 | -MODULE_ID="LIBS" | ||
| 402 | -MODULE_DEPENDS=("CORE" "KERNEL" "RTMP") | ||
| 403 | -ModuleLibIncs=(${SRS_OBJS_DIR}) | ||
| 404 | -MODULE_FILES=("srs_librtmp" "srs_lib_simple_socket" "srs_lib_bandwidth") | ||
| 405 | -LIBS_INCS="src/libs"; MODULE_DIR=${LIBS_INCS} . auto/modules.sh | ||
| 406 | -LIBS_OBJS="${MODULE_OBJS[@]}" | ||
| 407 | -# | ||
| 408 | -#Main Module | ||
| 409 | -if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 410 | - MODULE_ID="MAIN" | ||
| 411 | - MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP") | ||
| 412 | - ModuleLibIncs=(${LibSTRoot} ${SRS_OBJS_DIR} ${LibGperfRoot}) | ||
| 413 | - MODULE_FILES=("srs_main_server") | ||
| 414 | - MAIN_INCS="src/main"; MODULE_DIR=${MAIN_INCS} . auto/modules.sh | ||
| 415 | - MAIN_OBJS="${MODULE_OBJS[@]}" | ||
| 416 | -fi | ||
| 417 | - | ||
| 418 | -##################################################################################### | ||
| 419 | -# Binaries, main entrances, link the module and its depends modules, | ||
| 420 | -# then link to a binary, for example, objs/srs | ||
| 421 | -# | ||
| 422 | -# disable all app when export librtmp | ||
| 423 | -if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 424 | - # all main entrances | ||
| 425 | - MAIN_ENTRANCES=("srs_main_server") | ||
| 426 | - # | ||
| 427 | - # all depends libraries | ||
| 428 | - ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile} ${LibGperfFile}) | ||
| 429 | - # all depends objects | ||
| 430 | - MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${APP_OBJS[@]} ${MAIN_OBJS[@]}" | ||
| 431 | - LINK_OPTIONS="${SrsLinkOptions}${SrsGprofLink}${SrsGperfLink}" | ||
| 432 | - # | ||
| 433 | - # srs: | ||
| 434 | - # srs(simple rtmp server) over st(state-threads) | ||
| 435 | - BUILD_KEY="srs" APP_MAIN="srs_main_server" APP_NAME="srs" . auto/apps.sh | ||
| 436 | -fi | ||
| 437 | -# srs librtmp | ||
| 438 | -if [ $SRS_LIBRTMP = YES ]; then | ||
| 439 | - MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${LIBS_OBJS[@]}" | ||
| 440 | - BUILD_KEY="librtmp" LIB_NAME="lib/srs_librtmp" . auto/libs.sh | ||
| 441 | -fi | ||
| 442 | -# | ||
| 443 | -# utest, the unit-test cases of srs, base on gtest1.6 | ||
| 444 | -if [ $SRS_UTEST = YES ]; then | ||
| 445 | - MODULE_FILES=("srs_utest" "srs_utest_amf0" "srs_utest_protocol" | ||
| 446 | - "srs_utest_kernel" "srs_utest_core" "srs_utest_config" | ||
| 447 | - "srs_utest_reload") | ||
| 448 | - ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSTRoot} ${LibSSLRoot}) | ||
| 449 | - ModuleLibFiles=(${LibSTfile} ${LibHttpParserfile} ${LibSSLfile}) | ||
| 450 | - MODULE_DEPENDS=("CORE" "KERNEL" "RTMP" "APP") | ||
| 451 | - MODULE_OBJS="${CORE_OBJS[@]} ${KERNEL_OBJS[@]} ${RTMP_OBJS[@]} ${APP_OBJS[@]}" | ||
| 452 | - LINK_OPTIONS="-lpthread ${SrsLinkOptions}" MODULE_DIR="src/utest" APP_NAME="srs_utest" . auto/utest.sh | ||
| 453 | -fi | 468 | +# generate makefile ok, append the tails. |
| 469 | +cat ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk >> ${SRS_WORKDIR}/${SRS_MAKEFILE} && | ||
| 470 | +rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}.bk | ||
| 454 | 471 | ||
| 455 | echo 'configure ok! ' | 472 | echo 'configure ok! ' |
| 456 | 473 | ||
| @@ -571,6 +588,10 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | @@ -571,6 +588,10 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 571 | else | 588 | else |
| 572 | echo -e "${GREEN}note: mips-ubuntu12 for srs are not builded${BLACK}" | 589 | echo -e "${GREEN}note: mips-ubuntu12 for srs are not builded${BLACK}" |
| 573 | fi | 590 | fi |
| 591 | + # add each modules for application | ||
| 592 | + for SRS_MODULE in $SRS_MODULES; do | ||
| 593 | + echo -e "${GREEN}module: $SRS_MODULE${BLACK}" | ||
| 594 | + done | ||
| 574 | fi | 595 | fi |
| 575 | 596 | ||
| 576 | ##################################################################################### | 597 | ##################################################################################### |
| @@ -21,11 +21,11 @@ DEFAULT_LOG_FILE='./objs/srs.log' | @@ -21,11 +21,11 @@ DEFAULT_LOG_FILE='./objs/srs.log' | ||
| 21 | ######################################################################## | 21 | ######################################################################## |
| 22 | # utility functions | 22 | # utility functions |
| 23 | ######################################################################## | 23 | ######################################################################## |
| 24 | -RED="\\e[31m" | ||
| 25 | -GREEN="\\e[32m" | ||
| 26 | -YELLOW="\\e[33m" | ||
| 27 | -BLACK="\\e[0m" | ||
| 28 | -POS="\\e[60G" | 24 | +RED="\\033[31m" |
| 25 | +GREEN="\\033[32m" | ||
| 26 | +YELLOW="\\033[33m" | ||
| 27 | +BLACK="\\033[0m" | ||
| 28 | +POS="\\033[60G" | ||
| 29 | 29 | ||
| 30 | ok_msg() { | 30 | ok_msg() { |
| 31 | echo -e "${1}${POS}${BLACK}[${GREEN} OK ${BLACK}]" | 31 | echo -e "${1}${POS}${BLACK}[${GREEN} OK ${BLACK}]" |
trunk/ide/readme.txt
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE QtCreatorProject> | 2 | <!DOCTYPE QtCreatorProject> |
| 3 | -<!-- Written by QtCreator 3.1.1, 2015-01-29T11:22:06. --> | 3 | +<!-- Written by QtCreator 3.1.1, 2015-03-05T20:44:44. --> |
| 4 | <qtcreator> | 4 | <qtcreator> |
| 5 | <data> | 5 | <data> |
| 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
| @@ -56,12 +56,12 @@ | @@ -56,12 +56,12 @@ | ||
| 56 | <valuemap type="QVariantMap"> | 56 | <valuemap type="QVariantMap"> |
| 57 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | 57 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> |
| 58 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | 58 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
| 59 | - <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{fa2d28f9-85de-4a75-8e79-69d805f974bf}</value> | 59 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{fdda5a74-8ef6-4e67-b28c-c5be6c667578}</value> |
| 60 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | 60 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
| 61 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | 61 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
| 62 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | 62 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
| 63 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | 63 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
| 64 | - <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/winlin/git/simple-rtmp-server/trunk/src/build-qt-Desktop-Debug</value> | 64 | + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/winlin/git/simple-rtmp-server/trunk/ide/build-srs-qt-Desktop-Debug</value> |
| 65 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | 65 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
| 66 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | 66 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
| 67 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | 67 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
| @@ -119,7 +119,66 @@ | @@ -119,7 +119,66 @@ | ||
| 119 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | 119 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> |
| 120 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | 120 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
| 121 | </valuemap> | 121 | </valuemap> |
| 122 | - <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | 122 | + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
| 123 | + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/winlin/git/simple-rtmp-server/trunk/ide/build-srs-qt-Desktop-Release</value> | ||
| 124 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | ||
| 125 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | ||
| 126 | + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | ||
| 127 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | ||
| 128 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
| 129 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | ||
| 130 | + <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | ||
| 131 | + <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | ||
| 132 | + <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | ||
| 133 | + <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | ||
| 134 | + </valuemap> | ||
| 135 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | ||
| 136 | + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | ||
| 137 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | ||
| 138 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
| 139 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | ||
| 140 | + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | ||
| 141 | + <value type="QString">-w</value> | ||
| 142 | + <value type="QString">-r</value> | ||
| 143 | + </valuelist> | ||
| 144 | + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | ||
| 145 | + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | ||
| 146 | + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | ||
| 147 | + </valuemap> | ||
| 148 | + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | ||
| 149 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | ||
| 150 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
| 151 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | ||
| 152 | + </valuemap> | ||
| 153 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | ||
| 154 | + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | ||
| 155 | + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | ||
| 156 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | ||
| 157 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
| 158 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | ||
| 159 | + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | ||
| 160 | + <value type="QString">-w</value> | ||
| 161 | + <value type="QString">-r</value> | ||
| 162 | + </valuelist> | ||
| 163 | + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | ||
| 164 | + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | ||
| 165 | + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | ||
| 166 | + </valuemap> | ||
| 167 | + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | ||
| 168 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | ||
| 169 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
| 170 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | ||
| 171 | + </valuemap> | ||
| 172 | + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | ||
| 173 | + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | ||
| 174 | + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | ||
| 175 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | ||
| 176 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | ||
| 177 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | ||
| 178 | + <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | ||
| 179 | + <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | ||
| 180 | + </valuemap> | ||
| 181 | + <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> | ||
| 123 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | 182 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
| 124 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | 183 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
| 125 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | 184 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
| @@ -172,13 +231,13 @@ | @@ -172,13 +231,13 @@ | ||
| 172 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | 231 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
| 173 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | 232 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
| 174 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">srs-qt</value> | 233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">srs-qt</value> |
| 175 | - <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">srs-qt2</value> | 234 | + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
| 176 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/winlin/git/simple-rtmp-server/trunk/ide/srs_qt/srs-qt.pro</value> | 235 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/winlin/git/simple-rtmp-server/trunk/ide/srs_qt/srs-qt.pro</value> |
| 177 | - <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments">-c console.conf</value> | 236 | + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
| 178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">srs-qt.pro</value> | 237 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">srs-qt.pro</value> |
| 179 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | 238 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
| 180 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | 239 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
| 181 | - <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory">/home/winlin/srs</value> | 240 | + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
| 182 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | 241 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
| 183 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | 242 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> |
| 184 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | 243 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
trunk/ide/srs_upp/init
100644 → 100755
| @@ -36,8 +36,8 @@ file | @@ -36,8 +36,8 @@ file | ||
| 36 | ../../src/kernel/srs_kernel_log.cpp, | 36 | ../../src/kernel/srs_kernel_log.cpp, |
| 37 | ../../src/kernel/srs_kernel_mp3.hpp, | 37 | ../../src/kernel/srs_kernel_mp3.hpp, |
| 38 | ../../src/kernel/srs_kernel_mp3.cpp, | 38 | ../../src/kernel/srs_kernel_mp3.cpp, |
| 39 | - ../../src/kernel/srs_rtsp_stack.hpp, | ||
| 40 | - ../../src/kernel/srs_rtsp_stack.cpp, | 39 | + ../../src/kernel/srs_rtsp_stack.hpp, |
| 40 | + ../../src/kernel/srs_rtsp_stack.cpp, | ||
| 41 | ../../src/kernel/srs_kernel_stream.hpp, | 41 | ../../src/kernel/srs_kernel_stream.hpp, |
| 42 | ../../src/kernel/srs_kernel_stream.cpp, | 42 | ../../src/kernel/srs_kernel_stream.cpp, |
| 43 | ../../src/kernel/srs_kernel_ts.cpp, | 43 | ../../src/kernel/srs_kernel_ts.cpp, |
| @@ -45,8 +45,8 @@ file | @@ -45,8 +45,8 @@ file | ||
| 45 | ../../src/kernel/srs_kernel_utility.hpp, | 45 | ../../src/kernel/srs_kernel_utility.hpp, |
| 46 | ../../src/kernel/srs_kernel_utility.cpp, | 46 | ../../src/kernel/srs_kernel_utility.cpp, |
| 47 | protocol readonly separator, | 47 | protocol readonly separator, |
| 48 | - ../../src/protocol/srs_raw_avc.hpp, | ||
| 49 | - ../../src/protocol/srs_raw_avc.cpp, | 48 | + ../../src/protocol/srs_raw_avc.hpp, |
| 49 | + ../../src/protocol/srs_raw_avc.cpp, | ||
| 50 | ../../src/protocol/srs_rtmp_amf0.hpp, | 50 | ../../src/protocol/srs_rtmp_amf0.hpp, |
| 51 | ../../src/protocol/srs_rtmp_amf0.cpp, | 51 | ../../src/protocol/srs_rtmp_amf0.cpp, |
| 52 | ../../src/protocol/srs_rtmp_buffer.hpp, | 52 | ../../src/protocol/srs_rtmp_buffer.hpp, |
| @@ -102,8 +102,8 @@ file | @@ -102,8 +102,8 @@ file | ||
| 102 | ../../src/app/srs_app_json.cpp, | 102 | ../../src/app/srs_app_json.cpp, |
| 103 | ../../src/app/srs_app_kbps.hpp, | 103 | ../../src/app/srs_app_kbps.hpp, |
| 104 | ../../src/app/srs_app_kbps.cpp, | 104 | ../../src/app/srs_app_kbps.cpp, |
| 105 | - ../../src/app/srs_app_listener.hpp, | ||
| 106 | - ../../src/app/srs_app_listener.cpp, | 105 | + ../../src/app/srs_app_listener.hpp, |
| 106 | + ../../src/app/srs_app_listener.cpp, | ||
| 107 | ../../src/app/srs_app_log.hpp, | 107 | ../../src/app/srs_app_log.hpp, |
| 108 | ../../src/app/srs_app_log.cpp, | 108 | ../../src/app/srs_app_log.cpp, |
| 109 | ../../src/app/srs_app_mpegts_udp.hpp, | 109 | ../../src/app/srs_app_mpegts_udp.hpp, |
| @@ -116,8 +116,8 @@ file | @@ -116,8 +116,8 @@ file | ||
| 116 | ../../src/app/srs_app_reload.cpp, | 116 | ../../src/app/srs_app_reload.cpp, |
| 117 | ../../src/app/srs_app_rtmp_conn.hpp, | 117 | ../../src/app/srs_app_rtmp_conn.hpp, |
| 118 | ../../src/app/srs_app_rtmp_conn.cpp, | 118 | ../../src/app/srs_app_rtmp_conn.cpp, |
| 119 | - ../../src/app/srs_app_rtsp.hpp, | ||
| 120 | - ../../src/app/srs_app_rtsp.cpp, | 119 | + ../../src/app/srs_app_rtsp.hpp, |
| 120 | + ../../src/app/srs_app_rtsp.cpp, | ||
| 121 | ../../src/app/srs_app_pithy_print.hpp, | 121 | ../../src/app/srs_app_pithy_print.hpp, |
| 122 | ../../src/app/srs_app_pithy_print.cpp, | 122 | ../../src/app/srs_app_pithy_print.cpp, |
| 123 | ../../src/app/srs_app_security.hpp, | 123 | ../../src/app/srs_app_security.hpp, |
| 1 | +// !$*UTF8*$! | ||
| 2 | +{ | ||
| 3 | + archiveVersion = 1; | ||
| 4 | + classes = { | ||
| 5 | + }; | ||
| 6 | + objectVersion = 46; | ||
| 7 | + objects = { | ||
| 8 | + | ||
| 9 | +/* Begin PBXBuildFile section */ | ||
| 10 | + 3C1231F61AAE652D00CE8F6C /* srs_core_autofree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */; }; | ||
| 11 | + 3C1231F71AAE652D00CE8F6C /* srs_core_performance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */; }; | ||
| 12 | + 3C1231F81AAE652D00CE8F6C /* srs_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F41AAE652D00CE8F6C /* srs_core.cpp */; }; | ||
| 13 | + 3C1232061AAE812C00CE8F6C /* srs_main_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232051AAE812C00CE8F6C /* srs_main_server.cpp */; }; | ||
| 14 | + 3C1232201AAE814D00CE8F6C /* srs_kernel_aac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232081AAE814D00CE8F6C /* srs_kernel_aac.cpp */; }; | ||
| 15 | + 3C1232211AAE814D00CE8F6C /* srs_kernel_buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12320A1AAE814D00CE8F6C /* srs_kernel_buffer.cpp */; }; | ||
| 16 | + 3C1232221AAE814D00CE8F6C /* srs_kernel_codec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12320C1AAE814D00CE8F6C /* srs_kernel_codec.cpp */; }; | ||
| 17 | + 3C1232231AAE814D00CE8F6C /* srs_kernel_consts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12320E1AAE814D00CE8F6C /* srs_kernel_consts.cpp */; }; | ||
| 18 | + 3C1232241AAE814D00CE8F6C /* srs_kernel_error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232101AAE814D00CE8F6C /* srs_kernel_error.cpp */; }; | ||
| 19 | + 3C1232251AAE814D00CE8F6C /* srs_kernel_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232121AAE814D00CE8F6C /* srs_kernel_file.cpp */; }; | ||
| 20 | + 3C1232261AAE814D00CE8F6C /* srs_kernel_flv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232141AAE814D00CE8F6C /* srs_kernel_flv.cpp */; }; | ||
| 21 | + 3C1232271AAE814D00CE8F6C /* srs_kernel_log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232161AAE814D00CE8F6C /* srs_kernel_log.cpp */; }; | ||
| 22 | + 3C1232281AAE814D00CE8F6C /* srs_kernel_mp3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232181AAE814D00CE8F6C /* srs_kernel_mp3.cpp */; }; | ||
| 23 | + 3C1232291AAE814D00CE8F6C /* srs_kernel_stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12321A1AAE814D00CE8F6C /* srs_kernel_stream.cpp */; }; | ||
| 24 | + 3C12322A1AAE814D00CE8F6C /* srs_kernel_ts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12321C1AAE814D00CE8F6C /* srs_kernel_ts.cpp */; }; | ||
| 25 | + 3C12322B1AAE814D00CE8F6C /* srs_kernel_utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12321E1AAE814D00CE8F6C /* srs_kernel_utility.cpp */; }; | ||
| 26 | + 3C1232411AAE81A400CE8F6C /* srs_raw_avc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12322D1AAE81A400CE8F6C /* srs_raw_avc.cpp */; }; | ||
| 27 | + 3C1232421AAE81A400CE8F6C /* srs_rtmp_amf0.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12322F1AAE81A400CE8F6C /* srs_rtmp_amf0.cpp */; }; | ||
| 28 | + 3C1232431AAE81A400CE8F6C /* srs_rtmp_buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232311AAE81A400CE8F6C /* srs_rtmp_buffer.cpp */; }; | ||
| 29 | + 3C1232441AAE81A400CE8F6C /* srs_rtmp_handshake.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232331AAE81A400CE8F6C /* srs_rtmp_handshake.cpp */; }; | ||
| 30 | + 3C1232451AAE81A400CE8F6C /* srs_rtmp_io.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232351AAE81A400CE8F6C /* srs_rtmp_io.cpp */; }; | ||
| 31 | + 3C1232461AAE81A400CE8F6C /* srs_rtmp_msg_array.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232371AAE81A400CE8F6C /* srs_rtmp_msg_array.cpp */; }; | ||
| 32 | + 3C1232471AAE81A400CE8F6C /* srs_rtmp_sdk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232391AAE81A400CE8F6C /* srs_rtmp_sdk.cpp */; }; | ||
| 33 | + 3C1232481AAE81A400CE8F6C /* srs_rtmp_stack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12323B1AAE81A400CE8F6C /* srs_rtmp_stack.cpp */; }; | ||
| 34 | + 3C1232491AAE81A400CE8F6C /* srs_rtmp_utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12323D1AAE81A400CE8F6C /* srs_rtmp_utility.cpp */; }; | ||
| 35 | + 3C12324A1AAE81A400CE8F6C /* srs_rtsp_stack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12323F1AAE81A400CE8F6C /* srs_rtsp_stack.cpp */; }; | ||
| 36 | + 3C1232941AAE81D900CE8F6C /* srs_app_bandwidth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12324C1AAE81D900CE8F6C /* srs_app_bandwidth.cpp */; }; | ||
| 37 | + 3C1232951AAE81D900CE8F6C /* srs_app_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12324E1AAE81D900CE8F6C /* srs_app_config.cpp */; }; | ||
| 38 | + 3C1232961AAE81D900CE8F6C /* srs_app_conn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232501AAE81D900CE8F6C /* srs_app_conn.cpp */; }; | ||
| 39 | + 3C1232971AAE81D900CE8F6C /* srs_app_dvr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232521AAE81D900CE8F6C /* srs_app_dvr.cpp */; }; | ||
| 40 | + 3C1232981AAE81D900CE8F6C /* srs_app_edge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232541AAE81D900CE8F6C /* srs_app_edge.cpp */; }; | ||
| 41 | + 3C1232991AAE81D900CE8F6C /* srs_app_empty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232561AAE81D900CE8F6C /* srs_app_empty.cpp */; }; | ||
| 42 | + 3C12329A1AAE81D900CE8F6C /* srs_app_encoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232581AAE81D900CE8F6C /* srs_app_encoder.cpp */; }; | ||
| 43 | + 3C12329B1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12325A1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp */; }; | ||
| 44 | + 3C12329C1AAE81D900CE8F6C /* srs_app_forward.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12325C1AAE81D900CE8F6C /* srs_app_forward.cpp */; }; | ||
| 45 | + 3C12329D1AAE81D900CE8F6C /* srs_app_heartbeat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12325E1AAE81D900CE8F6C /* srs_app_heartbeat.cpp */; }; | ||
| 46 | + 3C12329E1AAE81D900CE8F6C /* srs_app_hls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232601AAE81D900CE8F6C /* srs_app_hls.cpp */; }; | ||
| 47 | + 3C12329F1AAE81D900CE8F6C /* srs_app_http_api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232621AAE81D900CE8F6C /* srs_app_http_api.cpp */; }; | ||
| 48 | + 3C1232A01AAE81D900CE8F6C /* srs_app_http_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232641AAE81D900CE8F6C /* srs_app_http_client.cpp */; }; | ||
| 49 | + 3C1232A11AAE81D900CE8F6C /* srs_app_http_conn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232661AAE81D900CE8F6C /* srs_app_http_conn.cpp */; }; | ||
| 50 | + 3C1232A21AAE81D900CE8F6C /* srs_app_http_hooks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232681AAE81D900CE8F6C /* srs_app_http_hooks.cpp */; }; | ||
| 51 | + 3C1232A31AAE81D900CE8F6C /* srs_app_http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12326A1AAE81D900CE8F6C /* srs_app_http.cpp */; }; | ||
| 52 | + 3C1232A41AAE81D900CE8F6C /* srs_app_ingest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12326C1AAE81D900CE8F6C /* srs_app_ingest.cpp */; }; | ||
| 53 | + 3C1232A51AAE81D900CE8F6C /* srs_app_json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12326E1AAE81D900CE8F6C /* srs_app_json.cpp */; }; | ||
| 54 | + 3C1232A61AAE81D900CE8F6C /* srs_app_kbps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232701AAE81D900CE8F6C /* srs_app_kbps.cpp */; }; | ||
| 55 | + 3C1232A71AAE81D900CE8F6C /* srs_app_listener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232721AAE81D900CE8F6C /* srs_app_listener.cpp */; }; | ||
| 56 | + 3C1232A81AAE81D900CE8F6C /* srs_app_log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232741AAE81D900CE8F6C /* srs_app_log.cpp */; }; | ||
| 57 | + 3C1232A91AAE81D900CE8F6C /* srs_app_mpegts_udp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232761AAE81D900CE8F6C /* srs_app_mpegts_udp.cpp */; }; | ||
| 58 | + 3C1232AA1AAE81D900CE8F6C /* srs_app_pithy_print.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232781AAE81D900CE8F6C /* srs_app_pithy_print.cpp */; }; | ||
| 59 | + 3C1232AB1AAE81D900CE8F6C /* srs_app_recv_thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12327A1AAE81D900CE8F6C /* srs_app_recv_thread.cpp */; }; | ||
| 60 | + 3C1232AC1AAE81D900CE8F6C /* srs_app_refer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12327C1AAE81D900CE8F6C /* srs_app_refer.cpp */; }; | ||
| 61 | + 3C1232AD1AAE81D900CE8F6C /* srs_app_reload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12327E1AAE81D900CE8F6C /* srs_app_reload.cpp */; }; | ||
| 62 | + 3C1232AE1AAE81D900CE8F6C /* srs_app_rtmp_conn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232801AAE81D900CE8F6C /* srs_app_rtmp_conn.cpp */; }; | ||
| 63 | + 3C1232AF1AAE81D900CE8F6C /* srs_app_rtsp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232821AAE81D900CE8F6C /* srs_app_rtsp.cpp */; }; | ||
| 64 | + 3C1232B01AAE81D900CE8F6C /* srs_app_security.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232841AAE81D900CE8F6C /* srs_app_security.cpp */; }; | ||
| 65 | + 3C1232B11AAE81D900CE8F6C /* srs_app_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232861AAE81D900CE8F6C /* srs_app_server.cpp */; }; | ||
| 66 | + 3C1232B21AAE81D900CE8F6C /* srs_app_source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232881AAE81D900CE8F6C /* srs_app_source.cpp */; }; | ||
| 67 | + 3C1232B31AAE81D900CE8F6C /* srs_app_st_socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12328A1AAE81D900CE8F6C /* srs_app_st_socket.cpp */; }; | ||
| 68 | + 3C1232B41AAE81D900CE8F6C /* srs_app_st.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12328C1AAE81D900CE8F6C /* srs_app_st.cpp */; }; | ||
| 69 | + 3C1232B51AAE81D900CE8F6C /* srs_app_statistic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C12328E1AAE81D900CE8F6C /* srs_app_statistic.cpp */; }; | ||
| 70 | + 3C1232B61AAE81D900CE8F6C /* srs_app_thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232901AAE81D900CE8F6C /* srs_app_thread.cpp */; }; | ||
| 71 | + 3C1232B71AAE81D900CE8F6C /* srs_app_utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1232921AAE81D900CE8F6C /* srs_app_utility.cpp */; }; | ||
| 72 | + 3C1232D31AAEA56B00CE8F6C /* libst.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232D21AAEA56B00CE8F6C /* libst.a */; }; | ||
| 73 | + 3C1232E91AAEA5D000CE8F6C /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232E71AAEA5D000CE8F6C /* libcrypto.a */; }; | ||
| 74 | + 3C1232EA1AAEA5D000CE8F6C /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232E81AAEA5D000CE8F6C /* libssl.a */; }; | ||
| 75 | + 3C1232ED1AAEA70F00CE8F6C /* libhttp_parser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232EC1AAEA70F00CE8F6C /* libhttp_parser.a */; }; | ||
| 76 | + 3C663F0E1AB0155100286D8B /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F011AB0155100286D8B /* Makefile */; }; | ||
| 77 | + 3C663F0F1AB0155100286D8B /* srs_aac_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */; }; | ||
| 78 | + 3C663F101AB0155100286D8B /* srs_audio_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */; }; | ||
| 79 | + 3C663F111AB0155100286D8B /* srs_bandwidth_check.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F041AB0155100286D8B /* srs_bandwidth_check.c */; }; | ||
| 80 | + 3C663F121AB0155100286D8B /* srs_detect_rtmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F051AB0155100286D8B /* srs_detect_rtmp.c */; }; | ||
| 81 | + 3C663F131AB0155100286D8B /* srs_flv_injecter.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F061AB0155100286D8B /* srs_flv_injecter.c */; }; | ||
| 82 | + 3C663F141AB0155100286D8B /* srs_flv_parser.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F071AB0155100286D8B /* srs_flv_parser.c */; }; | ||
| 83 | + 3C663F151AB0155100286D8B /* srs_h264_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F081AB0155100286D8B /* srs_h264_raw_publish.c */; }; | ||
| 84 | + 3C663F161AB0155100286D8B /* srs_ingest_flv.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F091AB0155100286D8B /* srs_ingest_flv.c */; }; | ||
| 85 | + 3C663F171AB0155100286D8B /* srs_ingest_rtmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F0A1AB0155100286D8B /* srs_ingest_rtmp.c */; }; | ||
| 86 | + 3C663F181AB0155100286D8B /* srs_play.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F0B1AB0155100286D8B /* srs_play.c */; }; | ||
| 87 | + 3C663F191AB0155100286D8B /* srs_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F0C1AB0155100286D8B /* srs_publish.c */; }; | ||
| 88 | + 3C663F1A1AB0155100286D8B /* srs_rtmp_dump.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F0D1AB0155100286D8B /* srs_rtmp_dump.c */; }; | ||
| 89 | +/* End PBXBuildFile section */ | ||
| 90 | + | ||
| 91 | +/* Begin PBXCopyFilesBuildPhase section */ | ||
| 92 | + 3C1231E31AAE64A400CE8F6C /* CopyFiles */ = { | ||
| 93 | + isa = PBXCopyFilesBuildPhase; | ||
| 94 | + buildActionMask = 2147483647; | ||
| 95 | + dstPath = /usr/share/man/man1/; | ||
| 96 | + dstSubfolderSpec = 0; | ||
| 97 | + files = ( | ||
| 98 | + ); | ||
| 99 | + runOnlyForDeploymentPostprocessing = 1; | ||
| 100 | + }; | ||
| 101 | +/* End PBXCopyFilesBuildPhase section */ | ||
| 102 | + | ||
| 103 | +/* Begin PBXFileReference section */ | ||
| 104 | + 3C1231E51AAE64A400CE8F6C /* srs_xcode */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; includeInIndex = 0; path = srs_xcode; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 105 | + 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_autofree.cpp; path = ../../../src/core/srs_core_autofree.cpp; sourceTree = "<group>"; }; | ||
| 106 | + 3C1231F11AAE652C00CE8F6C /* srs_core_autofree.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core_autofree.hpp; path = ../../../src/core/srs_core_autofree.hpp; sourceTree = "<group>"; }; | ||
| 107 | + 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_performance.cpp; path = ../../../src/core/srs_core_performance.cpp; sourceTree = "<group>"; }; | ||
| 108 | + 3C1231F31AAE652C00CE8F6C /* srs_core_performance.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core_performance.hpp; path = ../../../src/core/srs_core_performance.hpp; sourceTree = "<group>"; }; | ||
| 109 | + 3C1231F41AAE652D00CE8F6C /* srs_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core.cpp; path = ../../../src/core/srs_core.cpp; sourceTree = "<group>"; }; | ||
| 110 | + 3C1231F51AAE652D00CE8F6C /* srs_core.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core.hpp; path = ../../../src/core/srs_core.hpp; sourceTree = "<group>"; }; | ||
| 111 | + 3C1231FB1AAE673100CE8F6C /* srs_auto_headers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_auto_headers.hpp; path = ../../../objs/srs_auto_headers.hpp; sourceTree = "<group>"; }; | ||
| 112 | + 3C1232051AAE812C00CE8F6C /* srs_main_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_main_server.cpp; path = ../../../src/main/srs_main_server.cpp; sourceTree = "<group>"; }; | ||
| 113 | + 3C1232081AAE814D00CE8F6C /* srs_kernel_aac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_aac.cpp; path = ../../../src/kernel/srs_kernel_aac.cpp; sourceTree = "<group>"; }; | ||
| 114 | + 3C1232091AAE814D00CE8F6C /* srs_kernel_aac.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_aac.hpp; path = ../../../src/kernel/srs_kernel_aac.hpp; sourceTree = "<group>"; }; | ||
| 115 | + 3C12320A1AAE814D00CE8F6C /* srs_kernel_buffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_buffer.cpp; path = ../../../src/kernel/srs_kernel_buffer.cpp; sourceTree = "<group>"; }; | ||
| 116 | + 3C12320B1AAE814D00CE8F6C /* srs_kernel_buffer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_buffer.hpp; path = ../../../src/kernel/srs_kernel_buffer.hpp; sourceTree = "<group>"; }; | ||
| 117 | + 3C12320C1AAE814D00CE8F6C /* srs_kernel_codec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_codec.cpp; path = ../../../src/kernel/srs_kernel_codec.cpp; sourceTree = "<group>"; }; | ||
| 118 | + 3C12320D1AAE814D00CE8F6C /* srs_kernel_codec.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_codec.hpp; path = ../../../src/kernel/srs_kernel_codec.hpp; sourceTree = "<group>"; }; | ||
| 119 | + 3C12320E1AAE814D00CE8F6C /* srs_kernel_consts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_consts.cpp; path = ../../../src/kernel/srs_kernel_consts.cpp; sourceTree = "<group>"; }; | ||
| 120 | + 3C12320F1AAE814D00CE8F6C /* srs_kernel_consts.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_consts.hpp; path = ../../../src/kernel/srs_kernel_consts.hpp; sourceTree = "<group>"; }; | ||
| 121 | + 3C1232101AAE814D00CE8F6C /* srs_kernel_error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_error.cpp; path = ../../../src/kernel/srs_kernel_error.cpp; sourceTree = "<group>"; }; | ||
| 122 | + 3C1232111AAE814D00CE8F6C /* srs_kernel_error.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_error.hpp; path = ../../../src/kernel/srs_kernel_error.hpp; sourceTree = "<group>"; }; | ||
| 123 | + 3C1232121AAE814D00CE8F6C /* srs_kernel_file.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_file.cpp; path = ../../../src/kernel/srs_kernel_file.cpp; sourceTree = "<group>"; }; | ||
| 124 | + 3C1232131AAE814D00CE8F6C /* srs_kernel_file.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_file.hpp; path = ../../../src/kernel/srs_kernel_file.hpp; sourceTree = "<group>"; }; | ||
| 125 | + 3C1232141AAE814D00CE8F6C /* srs_kernel_flv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_flv.cpp; path = ../../../src/kernel/srs_kernel_flv.cpp; sourceTree = "<group>"; }; | ||
| 126 | + 3C1232151AAE814D00CE8F6C /* srs_kernel_flv.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_flv.hpp; path = ../../../src/kernel/srs_kernel_flv.hpp; sourceTree = "<group>"; }; | ||
| 127 | + 3C1232161AAE814D00CE8F6C /* srs_kernel_log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_log.cpp; path = ../../../src/kernel/srs_kernel_log.cpp; sourceTree = "<group>"; }; | ||
| 128 | + 3C1232171AAE814D00CE8F6C /* srs_kernel_log.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_log.hpp; path = ../../../src/kernel/srs_kernel_log.hpp; sourceTree = "<group>"; }; | ||
| 129 | + 3C1232181AAE814D00CE8F6C /* srs_kernel_mp3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_mp3.cpp; path = ../../../src/kernel/srs_kernel_mp3.cpp; sourceTree = "<group>"; }; | ||
| 130 | + 3C1232191AAE814D00CE8F6C /* srs_kernel_mp3.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_mp3.hpp; path = ../../../src/kernel/srs_kernel_mp3.hpp; sourceTree = "<group>"; }; | ||
| 131 | + 3C12321A1AAE814D00CE8F6C /* srs_kernel_stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_stream.cpp; path = ../../../src/kernel/srs_kernel_stream.cpp; sourceTree = "<group>"; }; | ||
| 132 | + 3C12321B1AAE814D00CE8F6C /* srs_kernel_stream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_stream.hpp; path = ../../../src/kernel/srs_kernel_stream.hpp; sourceTree = "<group>"; }; | ||
| 133 | + 3C12321C1AAE814D00CE8F6C /* srs_kernel_ts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_ts.cpp; path = ../../../src/kernel/srs_kernel_ts.cpp; sourceTree = "<group>"; }; | ||
| 134 | + 3C12321D1AAE814D00CE8F6C /* srs_kernel_ts.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_ts.hpp; path = ../../../src/kernel/srs_kernel_ts.hpp; sourceTree = "<group>"; }; | ||
| 135 | + 3C12321E1AAE814D00CE8F6C /* srs_kernel_utility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_kernel_utility.cpp; path = ../../../src/kernel/srs_kernel_utility.cpp; sourceTree = "<group>"; }; | ||
| 136 | + 3C12321F1AAE814D00CE8F6C /* srs_kernel_utility.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_kernel_utility.hpp; path = ../../../src/kernel/srs_kernel_utility.hpp; sourceTree = "<group>"; }; | ||
| 137 | + 3C12322D1AAE81A400CE8F6C /* srs_raw_avc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_raw_avc.cpp; path = ../../../src/protocol/srs_raw_avc.cpp; sourceTree = "<group>"; }; | ||
| 138 | + 3C12322E1AAE81A400CE8F6C /* srs_raw_avc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_raw_avc.hpp; path = ../../../src/protocol/srs_raw_avc.hpp; sourceTree = "<group>"; }; | ||
| 139 | + 3C12322F1AAE81A400CE8F6C /* srs_rtmp_amf0.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_amf0.cpp; path = ../../../src/protocol/srs_rtmp_amf0.cpp; sourceTree = "<group>"; }; | ||
| 140 | + 3C1232301AAE81A400CE8F6C /* srs_rtmp_amf0.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_amf0.hpp; path = ../../../src/protocol/srs_rtmp_amf0.hpp; sourceTree = "<group>"; }; | ||
| 141 | + 3C1232311AAE81A400CE8F6C /* srs_rtmp_buffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_buffer.cpp; path = ../../../src/protocol/srs_rtmp_buffer.cpp; sourceTree = "<group>"; }; | ||
| 142 | + 3C1232321AAE81A400CE8F6C /* srs_rtmp_buffer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_buffer.hpp; path = ../../../src/protocol/srs_rtmp_buffer.hpp; sourceTree = "<group>"; }; | ||
| 143 | + 3C1232331AAE81A400CE8F6C /* srs_rtmp_handshake.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_handshake.cpp; path = ../../../src/protocol/srs_rtmp_handshake.cpp; sourceTree = "<group>"; }; | ||
| 144 | + 3C1232341AAE81A400CE8F6C /* srs_rtmp_handshake.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_handshake.hpp; path = ../../../src/protocol/srs_rtmp_handshake.hpp; sourceTree = "<group>"; }; | ||
| 145 | + 3C1232351AAE81A400CE8F6C /* srs_rtmp_io.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_io.cpp; path = ../../../src/protocol/srs_rtmp_io.cpp; sourceTree = "<group>"; }; | ||
| 146 | + 3C1232361AAE81A400CE8F6C /* srs_rtmp_io.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_io.hpp; path = ../../../src/protocol/srs_rtmp_io.hpp; sourceTree = "<group>"; }; | ||
| 147 | + 3C1232371AAE81A400CE8F6C /* srs_rtmp_msg_array.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_msg_array.cpp; path = ../../../src/protocol/srs_rtmp_msg_array.cpp; sourceTree = "<group>"; }; | ||
| 148 | + 3C1232381AAE81A400CE8F6C /* srs_rtmp_msg_array.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_msg_array.hpp; path = ../../../src/protocol/srs_rtmp_msg_array.hpp; sourceTree = "<group>"; }; | ||
| 149 | + 3C1232391AAE81A400CE8F6C /* srs_rtmp_sdk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_sdk.cpp; path = ../../../src/protocol/srs_rtmp_sdk.cpp; sourceTree = "<group>"; }; | ||
| 150 | + 3C12323A1AAE81A400CE8F6C /* srs_rtmp_sdk.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_sdk.hpp; path = ../../../src/protocol/srs_rtmp_sdk.hpp; sourceTree = "<group>"; }; | ||
| 151 | + 3C12323B1AAE81A400CE8F6C /* srs_rtmp_stack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_stack.cpp; path = ../../../src/protocol/srs_rtmp_stack.cpp; sourceTree = "<group>"; }; | ||
| 152 | + 3C12323C1AAE81A400CE8F6C /* srs_rtmp_stack.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_stack.hpp; path = ../../../src/protocol/srs_rtmp_stack.hpp; sourceTree = "<group>"; }; | ||
| 153 | + 3C12323D1AAE81A400CE8F6C /* srs_rtmp_utility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtmp_utility.cpp; path = ../../../src/protocol/srs_rtmp_utility.cpp; sourceTree = "<group>"; }; | ||
| 154 | + 3C12323E1AAE81A400CE8F6C /* srs_rtmp_utility.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtmp_utility.hpp; path = ../../../src/protocol/srs_rtmp_utility.hpp; sourceTree = "<group>"; }; | ||
| 155 | + 3C12323F1AAE81A400CE8F6C /* srs_rtsp_stack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_rtsp_stack.cpp; path = ../../../src/protocol/srs_rtsp_stack.cpp; sourceTree = "<group>"; }; | ||
| 156 | + 3C1232401AAE81A400CE8F6C /* srs_rtsp_stack.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_rtsp_stack.hpp; path = ../../../src/protocol/srs_rtsp_stack.hpp; sourceTree = "<group>"; }; | ||
| 157 | + 3C12324C1AAE81D900CE8F6C /* srs_app_bandwidth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_bandwidth.cpp; path = ../../../src/app/srs_app_bandwidth.cpp; sourceTree = "<group>"; }; | ||
| 158 | + 3C12324D1AAE81D900CE8F6C /* srs_app_bandwidth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_bandwidth.hpp; path = ../../../src/app/srs_app_bandwidth.hpp; sourceTree = "<group>"; }; | ||
| 159 | + 3C12324E1AAE81D900CE8F6C /* srs_app_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_config.cpp; path = ../../../src/app/srs_app_config.cpp; sourceTree = "<group>"; }; | ||
| 160 | + 3C12324F1AAE81D900CE8F6C /* srs_app_config.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_config.hpp; path = ../../../src/app/srs_app_config.hpp; sourceTree = "<group>"; }; | ||
| 161 | + 3C1232501AAE81D900CE8F6C /* srs_app_conn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_conn.cpp; path = ../../../src/app/srs_app_conn.cpp; sourceTree = "<group>"; }; | ||
| 162 | + 3C1232511AAE81D900CE8F6C /* srs_app_conn.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_conn.hpp; path = ../../../src/app/srs_app_conn.hpp; sourceTree = "<group>"; }; | ||
| 163 | + 3C1232521AAE81D900CE8F6C /* srs_app_dvr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_dvr.cpp; path = ../../../src/app/srs_app_dvr.cpp; sourceTree = "<group>"; }; | ||
| 164 | + 3C1232531AAE81D900CE8F6C /* srs_app_dvr.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_dvr.hpp; path = ../../../src/app/srs_app_dvr.hpp; sourceTree = "<group>"; }; | ||
| 165 | + 3C1232541AAE81D900CE8F6C /* srs_app_edge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_edge.cpp; path = ../../../src/app/srs_app_edge.cpp; sourceTree = "<group>"; }; | ||
| 166 | + 3C1232551AAE81D900CE8F6C /* srs_app_edge.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_edge.hpp; path = ../../../src/app/srs_app_edge.hpp; sourceTree = "<group>"; }; | ||
| 167 | + 3C1232561AAE81D900CE8F6C /* srs_app_empty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_empty.cpp; path = ../../../src/app/srs_app_empty.cpp; sourceTree = "<group>"; }; | ||
| 168 | + 3C1232571AAE81D900CE8F6C /* srs_app_empty.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_empty.hpp; path = ../../../src/app/srs_app_empty.hpp; sourceTree = "<group>"; }; | ||
| 169 | + 3C1232581AAE81D900CE8F6C /* srs_app_encoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_encoder.cpp; path = ../../../src/app/srs_app_encoder.cpp; sourceTree = "<group>"; }; | ||
| 170 | + 3C1232591AAE81D900CE8F6C /* srs_app_encoder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_encoder.hpp; path = ../../../src/app/srs_app_encoder.hpp; sourceTree = "<group>"; }; | ||
| 171 | + 3C12325A1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_ffmpeg.cpp; path = ../../../src/app/srs_app_ffmpeg.cpp; sourceTree = "<group>"; }; | ||
| 172 | + 3C12325B1AAE81D900CE8F6C /* srs_app_ffmpeg.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_ffmpeg.hpp; path = ../../../src/app/srs_app_ffmpeg.hpp; sourceTree = "<group>"; }; | ||
| 173 | + 3C12325C1AAE81D900CE8F6C /* srs_app_forward.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_forward.cpp; path = ../../../src/app/srs_app_forward.cpp; sourceTree = "<group>"; }; | ||
| 174 | + 3C12325D1AAE81D900CE8F6C /* srs_app_forward.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_forward.hpp; path = ../../../src/app/srs_app_forward.hpp; sourceTree = "<group>"; }; | ||
| 175 | + 3C12325E1AAE81D900CE8F6C /* srs_app_heartbeat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_heartbeat.cpp; path = ../../../src/app/srs_app_heartbeat.cpp; sourceTree = "<group>"; }; | ||
| 176 | + 3C12325F1AAE81D900CE8F6C /* srs_app_heartbeat.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_heartbeat.hpp; path = ../../../src/app/srs_app_heartbeat.hpp; sourceTree = "<group>"; }; | ||
| 177 | + 3C1232601AAE81D900CE8F6C /* srs_app_hls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_hls.cpp; path = ../../../src/app/srs_app_hls.cpp; sourceTree = "<group>"; }; | ||
| 178 | + 3C1232611AAE81D900CE8F6C /* srs_app_hls.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_hls.hpp; path = ../../../src/app/srs_app_hls.hpp; sourceTree = "<group>"; }; | ||
| 179 | + 3C1232621AAE81D900CE8F6C /* srs_app_http_api.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_http_api.cpp; path = ../../../src/app/srs_app_http_api.cpp; sourceTree = "<group>"; }; | ||
| 180 | + 3C1232631AAE81D900CE8F6C /* srs_app_http_api.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_http_api.hpp; path = ../../../src/app/srs_app_http_api.hpp; sourceTree = "<group>"; }; | ||
| 181 | + 3C1232641AAE81D900CE8F6C /* srs_app_http_client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_http_client.cpp; path = ../../../src/app/srs_app_http_client.cpp; sourceTree = "<group>"; }; | ||
| 182 | + 3C1232651AAE81D900CE8F6C /* srs_app_http_client.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_http_client.hpp; path = ../../../src/app/srs_app_http_client.hpp; sourceTree = "<group>"; }; | ||
| 183 | + 3C1232661AAE81D900CE8F6C /* srs_app_http_conn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_http_conn.cpp; path = ../../../src/app/srs_app_http_conn.cpp; sourceTree = "<group>"; }; | ||
| 184 | + 3C1232671AAE81D900CE8F6C /* srs_app_http_conn.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_http_conn.hpp; path = ../../../src/app/srs_app_http_conn.hpp; sourceTree = "<group>"; }; | ||
| 185 | + 3C1232681AAE81D900CE8F6C /* srs_app_http_hooks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_http_hooks.cpp; path = ../../../src/app/srs_app_http_hooks.cpp; sourceTree = "<group>"; }; | ||
| 186 | + 3C1232691AAE81D900CE8F6C /* srs_app_http_hooks.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_http_hooks.hpp; path = ../../../src/app/srs_app_http_hooks.hpp; sourceTree = "<group>"; }; | ||
| 187 | + 3C12326A1AAE81D900CE8F6C /* srs_app_http.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_http.cpp; path = ../../../src/app/srs_app_http.cpp; sourceTree = "<group>"; }; | ||
| 188 | + 3C12326B1AAE81D900CE8F6C /* srs_app_http.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_http.hpp; path = ../../../src/app/srs_app_http.hpp; sourceTree = "<group>"; }; | ||
| 189 | + 3C12326C1AAE81D900CE8F6C /* srs_app_ingest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_ingest.cpp; path = ../../../src/app/srs_app_ingest.cpp; sourceTree = "<group>"; }; | ||
| 190 | + 3C12326D1AAE81D900CE8F6C /* srs_app_ingest.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_ingest.hpp; path = ../../../src/app/srs_app_ingest.hpp; sourceTree = "<group>"; }; | ||
| 191 | + 3C12326E1AAE81D900CE8F6C /* srs_app_json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_json.cpp; path = ../../../src/app/srs_app_json.cpp; sourceTree = "<group>"; }; | ||
| 192 | + 3C12326F1AAE81D900CE8F6C /* srs_app_json.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_json.hpp; path = ../../../src/app/srs_app_json.hpp; sourceTree = "<group>"; }; | ||
| 193 | + 3C1232701AAE81D900CE8F6C /* srs_app_kbps.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_kbps.cpp; path = ../../../src/app/srs_app_kbps.cpp; sourceTree = "<group>"; }; | ||
| 194 | + 3C1232711AAE81D900CE8F6C /* srs_app_kbps.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_kbps.hpp; path = ../../../src/app/srs_app_kbps.hpp; sourceTree = "<group>"; }; | ||
| 195 | + 3C1232721AAE81D900CE8F6C /* srs_app_listener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_listener.cpp; path = ../../../src/app/srs_app_listener.cpp; sourceTree = "<group>"; }; | ||
| 196 | + 3C1232731AAE81D900CE8F6C /* srs_app_listener.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_listener.hpp; path = ../../../src/app/srs_app_listener.hpp; sourceTree = "<group>"; }; | ||
| 197 | + 3C1232741AAE81D900CE8F6C /* srs_app_log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_log.cpp; path = ../../../src/app/srs_app_log.cpp; sourceTree = "<group>"; }; | ||
| 198 | + 3C1232751AAE81D900CE8F6C /* srs_app_log.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_log.hpp; path = ../../../src/app/srs_app_log.hpp; sourceTree = "<group>"; }; | ||
| 199 | + 3C1232761AAE81D900CE8F6C /* srs_app_mpegts_udp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_mpegts_udp.cpp; path = ../../../src/app/srs_app_mpegts_udp.cpp; sourceTree = "<group>"; }; | ||
| 200 | + 3C1232771AAE81D900CE8F6C /* srs_app_mpegts_udp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_mpegts_udp.hpp; path = ../../../src/app/srs_app_mpegts_udp.hpp; sourceTree = "<group>"; }; | ||
| 201 | + 3C1232781AAE81D900CE8F6C /* srs_app_pithy_print.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_pithy_print.cpp; path = ../../../src/app/srs_app_pithy_print.cpp; sourceTree = "<group>"; }; | ||
| 202 | + 3C1232791AAE81D900CE8F6C /* srs_app_pithy_print.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_pithy_print.hpp; path = ../../../src/app/srs_app_pithy_print.hpp; sourceTree = "<group>"; }; | ||
| 203 | + 3C12327A1AAE81D900CE8F6C /* srs_app_recv_thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_recv_thread.cpp; path = ../../../src/app/srs_app_recv_thread.cpp; sourceTree = "<group>"; }; | ||
| 204 | + 3C12327B1AAE81D900CE8F6C /* srs_app_recv_thread.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_recv_thread.hpp; path = ../../../src/app/srs_app_recv_thread.hpp; sourceTree = "<group>"; }; | ||
| 205 | + 3C12327C1AAE81D900CE8F6C /* srs_app_refer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_refer.cpp; path = ../../../src/app/srs_app_refer.cpp; sourceTree = "<group>"; }; | ||
| 206 | + 3C12327D1AAE81D900CE8F6C /* srs_app_refer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_refer.hpp; path = ../../../src/app/srs_app_refer.hpp; sourceTree = "<group>"; }; | ||
| 207 | + 3C12327E1AAE81D900CE8F6C /* srs_app_reload.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_reload.cpp; path = ../../../src/app/srs_app_reload.cpp; sourceTree = "<group>"; }; | ||
| 208 | + 3C12327F1AAE81D900CE8F6C /* srs_app_reload.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_reload.hpp; path = ../../../src/app/srs_app_reload.hpp; sourceTree = "<group>"; }; | ||
| 209 | + 3C1232801AAE81D900CE8F6C /* srs_app_rtmp_conn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_rtmp_conn.cpp; path = ../../../src/app/srs_app_rtmp_conn.cpp; sourceTree = "<group>"; }; | ||
| 210 | + 3C1232811AAE81D900CE8F6C /* srs_app_rtmp_conn.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_rtmp_conn.hpp; path = ../../../src/app/srs_app_rtmp_conn.hpp; sourceTree = "<group>"; }; | ||
| 211 | + 3C1232821AAE81D900CE8F6C /* srs_app_rtsp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_rtsp.cpp; path = ../../../src/app/srs_app_rtsp.cpp; sourceTree = "<group>"; }; | ||
| 212 | + 3C1232831AAE81D900CE8F6C /* srs_app_rtsp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_rtsp.hpp; path = ../../../src/app/srs_app_rtsp.hpp; sourceTree = "<group>"; }; | ||
| 213 | + 3C1232841AAE81D900CE8F6C /* srs_app_security.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_security.cpp; path = ../../../src/app/srs_app_security.cpp; sourceTree = "<group>"; }; | ||
| 214 | + 3C1232851AAE81D900CE8F6C /* srs_app_security.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_security.hpp; path = ../../../src/app/srs_app_security.hpp; sourceTree = "<group>"; }; | ||
| 215 | + 3C1232861AAE81D900CE8F6C /* srs_app_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_server.cpp; path = ../../../src/app/srs_app_server.cpp; sourceTree = "<group>"; }; | ||
| 216 | + 3C1232871AAE81D900CE8F6C /* srs_app_server.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_server.hpp; path = ../../../src/app/srs_app_server.hpp; sourceTree = "<group>"; }; | ||
| 217 | + 3C1232881AAE81D900CE8F6C /* srs_app_source.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_source.cpp; path = ../../../src/app/srs_app_source.cpp; sourceTree = "<group>"; }; | ||
| 218 | + 3C1232891AAE81D900CE8F6C /* srs_app_source.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_source.hpp; path = ../../../src/app/srs_app_source.hpp; sourceTree = "<group>"; }; | ||
| 219 | + 3C12328A1AAE81D900CE8F6C /* srs_app_st_socket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_st_socket.cpp; path = ../../../src/app/srs_app_st_socket.cpp; sourceTree = "<group>"; }; | ||
| 220 | + 3C12328B1AAE81D900CE8F6C /* srs_app_st_socket.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_st_socket.hpp; path = ../../../src/app/srs_app_st_socket.hpp; sourceTree = "<group>"; }; | ||
| 221 | + 3C12328C1AAE81D900CE8F6C /* srs_app_st.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_st.cpp; path = ../../../src/app/srs_app_st.cpp; sourceTree = "<group>"; }; | ||
| 222 | + 3C12328D1AAE81D900CE8F6C /* srs_app_st.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_st.hpp; path = ../../../src/app/srs_app_st.hpp; sourceTree = "<group>"; }; | ||
| 223 | + 3C12328E1AAE81D900CE8F6C /* srs_app_statistic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_statistic.cpp; path = ../../../src/app/srs_app_statistic.cpp; sourceTree = "<group>"; }; | ||
| 224 | + 3C12328F1AAE81D900CE8F6C /* srs_app_statistic.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_statistic.hpp; path = ../../../src/app/srs_app_statistic.hpp; sourceTree = "<group>"; }; | ||
| 225 | + 3C1232901AAE81D900CE8F6C /* srs_app_thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_thread.cpp; path = ../../../src/app/srs_app_thread.cpp; sourceTree = "<group>"; }; | ||
| 226 | + 3C1232911AAE81D900CE8F6C /* srs_app_thread.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_thread.hpp; path = ../../../src/app/srs_app_thread.hpp; sourceTree = "<group>"; }; | ||
| 227 | + 3C1232921AAE81D900CE8F6C /* srs_app_utility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_utility.cpp; path = ../../../src/app/srs_app_utility.cpp; sourceTree = "<group>"; }; | ||
| 228 | + 3C1232931AAE81D900CE8F6C /* srs_app_utility.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_utility.hpp; path = ../../../src/app/srs_app_utility.hpp; sourceTree = "<group>"; }; | ||
| 229 | + 3C1232B81AAE824500CE8F6C /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = configure; path = ../../../configure; sourceTree = "<group>"; }; | ||
| 230 | + 3C1232BB1AAE827E00CE8F6C /* apps.sh */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; name = apps.sh; path = ../../../auto/apps.sh; sourceTree = "<group>"; }; | ||
| 231 | + 3C1232BC1AAE827E00CE8F6C /* auto_headers.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = auto_headers.sh; path = ../../../auto/auto_headers.sh; sourceTree = "<group>"; }; | ||
| 232 | + 3C1232BD1AAE827E00CE8F6C /* build_ffmpeg.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = build_ffmpeg.sh; path = ../../../auto/build_ffmpeg.sh; sourceTree = "<group>"; }; | ||
| 233 | + 3C1232BE1AAE827E00CE8F6C /* depends.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = depends.sh; path = ../../../auto/depends.sh; sourceTree = "<group>"; }; | ||
| 234 | + 3C1232BF1AAE827E00CE8F6C /* generate_header.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = generate_header.sh; path = ../../../auto/generate_header.sh; sourceTree = "<group>"; }; | ||
| 235 | + 3C1232C01AAE827E00CE8F6C /* generate-srs-librtmp-project.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "generate-srs-librtmp-project.sh"; path = "../../../auto/generate-srs-librtmp-project.sh"; sourceTree = "<group>"; }; | ||
| 236 | + 3C1232C11AAE827E00CE8F6C /* generate-srs-librtmp-single.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "generate-srs-librtmp-single.sh"; path = "../../../auto/generate-srs-librtmp-single.sh"; sourceTree = "<group>"; }; | ||
| 237 | + 3C1232C21AAE827E00CE8F6C /* libs.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = libs.sh; path = ../../../auto/libs.sh; sourceTree = "<group>"; }; | ||
| 238 | + 3C1232C31AAE827E00CE8F6C /* local_ip.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = local_ip.sh; path = ../../../auto/local_ip.sh; sourceTree = "<group>"; }; | ||
| 239 | + 3C1232C41AAE827E00CE8F6C /* modules.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = modules.sh; path = ../../../auto/modules.sh; sourceTree = "<group>"; }; | ||
| 240 | + 3C1232C51AAE827E00CE8F6C /* options.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = options.sh; path = ../../../auto/options.sh; sourceTree = "<group>"; }; | ||
| 241 | + 3C1232C61AAE827E00CE8F6C /* summary.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = summary.sh; path = ../../../auto/summary.sh; sourceTree = "<group>"; }; | ||
| 242 | + 3C1232C71AAE827E00CE8F6C /* utest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = utest.sh; path = ../../../auto/utest.sh; sourceTree = "<group>"; }; | ||
| 243 | + 3C1232C81AAE833300CE8F6C /* _log.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = _log.sh; path = ../../../scripts/_log.sh; sourceTree = "<group>"; }; | ||
| 244 | + 3C1232C91AAE833300CE8F6C /* build.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = build.sh; path = ../../../scripts/build.sh; sourceTree = "<group>"; }; | ||
| 245 | + 3C1232CA1AAE833300CE8F6C /* git.commit.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = git.commit.sh; path = ../../../scripts/git.commit.sh; sourceTree = "<group>"; }; | ||
| 246 | + 3C1232CB1AAE833300CE8F6C /* git2unix.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = git2unix.sh; path = ../../../scripts/git2unix.sh; sourceTree = "<group>"; }; | ||
| 247 | + 3C1232CC1AAE833300CE8F6C /* install.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = install.sh; path = ../../../scripts/install.sh; sourceTree = "<group>"; }; | ||
| 248 | + 3C1232CD1AAE833300CE8F6C /* package.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = package.sh; path = ../../../scripts/package.sh; sourceTree = "<group>"; }; | ||
| 249 | + 3C1232CE1AAE833300CE8F6C /* run.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = run.sh; path = ../../../scripts/run.sh; sourceTree = "<group>"; }; | ||
| 250 | + 3C1232CF1AAE833300CE8F6C /* srs.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = srs.test; path = ../../../scripts/srs.test; sourceTree = "<group>"; }; | ||
| 251 | + 3C1232D01AAE833300CE8F6C /* stop.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = stop.sh; path = ../../../scripts/stop.sh; sourceTree = "<group>"; }; | ||
| 252 | + 3C1232D11AAE833300CE8F6C /* test_configure.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = test_configure.sh; path = ../../../scripts/test_configure.sh; sourceTree = "<group>"; }; | ||
| 253 | + 3C1232D21AAEA56B00CE8F6C /* libst.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libst.a; path = "../../objs/st-1.9/DARWIN_14.0.0_DBG/libst.a"; sourceTree = "<group>"; }; | ||
| 254 | + 3C1232E71AAEA5D000CE8F6C /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "../../objs/openssl-1.0.1f/_release/lib/libcrypto.a"; sourceTree = "<group>"; }; | ||
| 255 | + 3C1232E81AAEA5D000CE8F6C /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = "../../objs/openssl-1.0.1f/_release/lib/libssl.a"; sourceTree = "<group>"; }; | ||
| 256 | + 3C1232EC1AAEA70F00CE8F6C /* libhttp_parser.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libhttp_parser.a; path = "../../objs/http-parser-2.1/libhttp_parser.a"; sourceTree = "<group>"; }; | ||
| 257 | + 3C1232F11AAEAC7000CE8F6C /* srs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = srs; path = ../../../etc/init.d/srs; sourceTree = "<group>"; }; | ||
| 258 | + 3C1232F21AAEAC7000CE8F6C /* srs-api */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-api"; path = "../../../etc/init.d/srs-api"; sourceTree = "<group>"; }; | ||
| 259 | + 3C1232F31AAEAC7000CE8F6C /* srs-demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-demo"; path = "../../../etc/init.d/srs-demo"; sourceTree = "<group>"; }; | ||
| 260 | + 3C1232F41AAEAC7000CE8F6C /* srs-demo-19350 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-demo-19350"; path = "../../../etc/init.d/srs-demo-19350"; sourceTree = "<group>"; }; | ||
| 261 | + 3C663F011AB0155100286D8B /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../../research/librtmp/Makefile; sourceTree = "<group>"; }; | ||
| 262 | + 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_aac_raw_publish.c; path = ../../../research/librtmp/srs_aac_raw_publish.c; sourceTree = "<group>"; }; | ||
| 263 | + 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_audio_raw_publish.c; path = ../../../research/librtmp/srs_audio_raw_publish.c; sourceTree = "<group>"; }; | ||
| 264 | + 3C663F041AB0155100286D8B /* srs_bandwidth_check.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_bandwidth_check.c; path = ../../../research/librtmp/srs_bandwidth_check.c; sourceTree = "<group>"; }; | ||
| 265 | + 3C663F051AB0155100286D8B /* srs_detect_rtmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_detect_rtmp.c; path = ../../../research/librtmp/srs_detect_rtmp.c; sourceTree = "<group>"; }; | ||
| 266 | + 3C663F061AB0155100286D8B /* srs_flv_injecter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_flv_injecter.c; path = ../../../research/librtmp/srs_flv_injecter.c; sourceTree = "<group>"; }; | ||
| 267 | + 3C663F071AB0155100286D8B /* srs_flv_parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_flv_parser.c; path = ../../../research/librtmp/srs_flv_parser.c; sourceTree = "<group>"; }; | ||
| 268 | + 3C663F081AB0155100286D8B /* srs_h264_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_h264_raw_publish.c; path = ../../../research/librtmp/srs_h264_raw_publish.c; sourceTree = "<group>"; }; | ||
| 269 | + 3C663F091AB0155100286D8B /* srs_ingest_flv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_ingest_flv.c; path = ../../../research/librtmp/srs_ingest_flv.c; sourceTree = "<group>"; }; | ||
| 270 | + 3C663F0A1AB0155100286D8B /* srs_ingest_rtmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_ingest_rtmp.c; path = ../../../research/librtmp/srs_ingest_rtmp.c; sourceTree = "<group>"; }; | ||
| 271 | + 3C663F0B1AB0155100286D8B /* srs_play.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_play.c; path = ../../../research/librtmp/srs_play.c; sourceTree = "<group>"; }; | ||
| 272 | + 3C663F0C1AB0155100286D8B /* srs_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_publish.c; path = ../../../research/librtmp/srs_publish.c; sourceTree = "<group>"; }; | ||
| 273 | + 3C663F0D1AB0155100286D8B /* srs_rtmp_dump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_rtmp_dump.c; path = ../../../research/librtmp/srs_rtmp_dump.c; sourceTree = "<group>"; }; | ||
| 274 | +/* End PBXFileReference section */ | ||
| 275 | + | ||
| 276 | +/* Begin PBXFrameworksBuildPhase section */ | ||
| 277 | + 3C1231E21AAE64A400CE8F6C /* Frameworks */ = { | ||
| 278 | + isa = PBXFrameworksBuildPhase; | ||
| 279 | + buildActionMask = 2147483647; | ||
| 280 | + files = ( | ||
| 281 | + 3C1232ED1AAEA70F00CE8F6C /* libhttp_parser.a in Frameworks */, | ||
| 282 | + 3C1232E91AAEA5D000CE8F6C /* libcrypto.a in Frameworks */, | ||
| 283 | + 3C1232EA1AAEA5D000CE8F6C /* libssl.a in Frameworks */, | ||
| 284 | + 3C1232D31AAEA56B00CE8F6C /* libst.a in Frameworks */, | ||
| 285 | + ); | ||
| 286 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 287 | + }; | ||
| 288 | +/* End PBXFrameworksBuildPhase section */ | ||
| 289 | + | ||
| 290 | +/* Begin PBXGroup section */ | ||
| 291 | + 3C1231DC1AAE64A400CE8F6C = { | ||
| 292 | + isa = PBXGroup; | ||
| 293 | + children = ( | ||
| 294 | + 3C1231E61AAE64A400CE8F6C /* Products */, | ||
| 295 | + 3C1232EE1AAEA71C00CE8F6C /* links */, | ||
| 296 | + 3C1231E71AAE64A400CE8F6C /* srs_xcode */, | ||
| 297 | + 3C663F001AB014B500286D8B /* research */, | ||
| 298 | + ); | ||
| 299 | + sourceTree = "<group>"; | ||
| 300 | + }; | ||
| 301 | + 3C1231E61AAE64A400CE8F6C /* Products */ = { | ||
| 302 | + isa = PBXGroup; | ||
| 303 | + children = ( | ||
| 304 | + 3C1231E51AAE64A400CE8F6C /* srs_xcode */, | ||
| 305 | + ); | ||
| 306 | + name = Products; | ||
| 307 | + sourceTree = "<group>"; | ||
| 308 | + }; | ||
| 309 | + 3C1231E71AAE64A400CE8F6C /* srs_xcode */ = { | ||
| 310 | + isa = PBXGroup; | ||
| 311 | + children = ( | ||
| 312 | + 3C1232B81AAE824500CE8F6C /* configure */, | ||
| 313 | + 3C1232EF1AAEAC5800CE8F6C /* etc */, | ||
| 314 | + 3C1232BA1AAE826F00CE8F6C /* auto */, | ||
| 315 | + 3C1232B91AAE825100CE8F6C /* scripts */, | ||
| 316 | + 3C12324B1AAE81CE00CE8F6C /* app */, | ||
| 317 | + 3C12322C1AAE819900CE8F6C /* protocol */, | ||
| 318 | + 3C1232071AAE814200CE8F6C /* kernel */, | ||
| 319 | + 3C1232041AAE80CB00CE8F6C /* main */, | ||
| 320 | + 3C1231F91AAE670E00CE8F6C /* objs */, | ||
| 321 | + 3C1231EF1AAE651100CE8F6C /* core */, | ||
| 322 | + ); | ||
| 323 | + path = srs_xcode; | ||
| 324 | + sourceTree = "<group>"; | ||
| 325 | + }; | ||
| 326 | + 3C1231EF1AAE651100CE8F6C /* core */ = { | ||
| 327 | + isa = PBXGroup; | ||
| 328 | + children = ( | ||
| 329 | + 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */, | ||
| 330 | + 3C1231F11AAE652C00CE8F6C /* srs_core_autofree.hpp */, | ||
| 331 | + 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */, | ||
| 332 | + 3C1231F31AAE652C00CE8F6C /* srs_core_performance.hpp */, | ||
| 333 | + 3C1231F41AAE652D00CE8F6C /* srs_core.cpp */, | ||
| 334 | + 3C1231F51AAE652D00CE8F6C /* srs_core.hpp */, | ||
| 335 | + ); | ||
| 336 | + name = core; | ||
| 337 | + sourceTree = "<group>"; | ||
| 338 | + }; | ||
| 339 | + 3C1231F91AAE670E00CE8F6C /* objs */ = { | ||
| 340 | + isa = PBXGroup; | ||
| 341 | + children = ( | ||
| 342 | + 3C1231FB1AAE673100CE8F6C /* srs_auto_headers.hpp */, | ||
| 343 | + ); | ||
| 344 | + name = objs; | ||
| 345 | + sourceTree = "<group>"; | ||
| 346 | + }; | ||
| 347 | + 3C1232041AAE80CB00CE8F6C /* main */ = { | ||
| 348 | + isa = PBXGroup; | ||
| 349 | + children = ( | ||
| 350 | + 3C1232051AAE812C00CE8F6C /* srs_main_server.cpp */, | ||
| 351 | + ); | ||
| 352 | + name = main; | ||
| 353 | + sourceTree = "<group>"; | ||
| 354 | + }; | ||
| 355 | + 3C1232071AAE814200CE8F6C /* kernel */ = { | ||
| 356 | + isa = PBXGroup; | ||
| 357 | + children = ( | ||
| 358 | + 3C1232081AAE814D00CE8F6C /* srs_kernel_aac.cpp */, | ||
| 359 | + 3C1232091AAE814D00CE8F6C /* srs_kernel_aac.hpp */, | ||
| 360 | + 3C12320A1AAE814D00CE8F6C /* srs_kernel_buffer.cpp */, | ||
| 361 | + 3C12320B1AAE814D00CE8F6C /* srs_kernel_buffer.hpp */, | ||
| 362 | + 3C12320C1AAE814D00CE8F6C /* srs_kernel_codec.cpp */, | ||
| 363 | + 3C12320D1AAE814D00CE8F6C /* srs_kernel_codec.hpp */, | ||
| 364 | + 3C12320E1AAE814D00CE8F6C /* srs_kernel_consts.cpp */, | ||
| 365 | + 3C12320F1AAE814D00CE8F6C /* srs_kernel_consts.hpp */, | ||
| 366 | + 3C1232101AAE814D00CE8F6C /* srs_kernel_error.cpp */, | ||
| 367 | + 3C1232111AAE814D00CE8F6C /* srs_kernel_error.hpp */, | ||
| 368 | + 3C1232121AAE814D00CE8F6C /* srs_kernel_file.cpp */, | ||
| 369 | + 3C1232131AAE814D00CE8F6C /* srs_kernel_file.hpp */, | ||
| 370 | + 3C1232141AAE814D00CE8F6C /* srs_kernel_flv.cpp */, | ||
| 371 | + 3C1232151AAE814D00CE8F6C /* srs_kernel_flv.hpp */, | ||
| 372 | + 3C1232161AAE814D00CE8F6C /* srs_kernel_log.cpp */, | ||
| 373 | + 3C1232171AAE814D00CE8F6C /* srs_kernel_log.hpp */, | ||
| 374 | + 3C1232181AAE814D00CE8F6C /* srs_kernel_mp3.cpp */, | ||
| 375 | + 3C1232191AAE814D00CE8F6C /* srs_kernel_mp3.hpp */, | ||
| 376 | + 3C12321A1AAE814D00CE8F6C /* srs_kernel_stream.cpp */, | ||
| 377 | + 3C12321B1AAE814D00CE8F6C /* srs_kernel_stream.hpp */, | ||
| 378 | + 3C12321C1AAE814D00CE8F6C /* srs_kernel_ts.cpp */, | ||
| 379 | + 3C12321D1AAE814D00CE8F6C /* srs_kernel_ts.hpp */, | ||
| 380 | + 3C12321E1AAE814D00CE8F6C /* srs_kernel_utility.cpp */, | ||
| 381 | + 3C12321F1AAE814D00CE8F6C /* srs_kernel_utility.hpp */, | ||
| 382 | + ); | ||
| 383 | + name = kernel; | ||
| 384 | + sourceTree = "<group>"; | ||
| 385 | + }; | ||
| 386 | + 3C12322C1AAE819900CE8F6C /* protocol */ = { | ||
| 387 | + isa = PBXGroup; | ||
| 388 | + children = ( | ||
| 389 | + 3C12322D1AAE81A400CE8F6C /* srs_raw_avc.cpp */, | ||
| 390 | + 3C12322E1AAE81A400CE8F6C /* srs_raw_avc.hpp */, | ||
| 391 | + 3C12322F1AAE81A400CE8F6C /* srs_rtmp_amf0.cpp */, | ||
| 392 | + 3C1232301AAE81A400CE8F6C /* srs_rtmp_amf0.hpp */, | ||
| 393 | + 3C1232311AAE81A400CE8F6C /* srs_rtmp_buffer.cpp */, | ||
| 394 | + 3C1232321AAE81A400CE8F6C /* srs_rtmp_buffer.hpp */, | ||
| 395 | + 3C1232331AAE81A400CE8F6C /* srs_rtmp_handshake.cpp */, | ||
| 396 | + 3C1232341AAE81A400CE8F6C /* srs_rtmp_handshake.hpp */, | ||
| 397 | + 3C1232351AAE81A400CE8F6C /* srs_rtmp_io.cpp */, | ||
| 398 | + 3C1232361AAE81A400CE8F6C /* srs_rtmp_io.hpp */, | ||
| 399 | + 3C1232371AAE81A400CE8F6C /* srs_rtmp_msg_array.cpp */, | ||
| 400 | + 3C1232381AAE81A400CE8F6C /* srs_rtmp_msg_array.hpp */, | ||
| 401 | + 3C1232391AAE81A400CE8F6C /* srs_rtmp_sdk.cpp */, | ||
| 402 | + 3C12323A1AAE81A400CE8F6C /* srs_rtmp_sdk.hpp */, | ||
| 403 | + 3C12323B1AAE81A400CE8F6C /* srs_rtmp_stack.cpp */, | ||
| 404 | + 3C12323C1AAE81A400CE8F6C /* srs_rtmp_stack.hpp */, | ||
| 405 | + 3C12323D1AAE81A400CE8F6C /* srs_rtmp_utility.cpp */, | ||
| 406 | + 3C12323E1AAE81A400CE8F6C /* srs_rtmp_utility.hpp */, | ||
| 407 | + 3C12323F1AAE81A400CE8F6C /* srs_rtsp_stack.cpp */, | ||
| 408 | + 3C1232401AAE81A400CE8F6C /* srs_rtsp_stack.hpp */, | ||
| 409 | + ); | ||
| 410 | + name = protocol; | ||
| 411 | + sourceTree = "<group>"; | ||
| 412 | + }; | ||
| 413 | + 3C12324B1AAE81CE00CE8F6C /* app */ = { | ||
| 414 | + isa = PBXGroup; | ||
| 415 | + children = ( | ||
| 416 | + 3C12324C1AAE81D900CE8F6C /* srs_app_bandwidth.cpp */, | ||
| 417 | + 3C12324D1AAE81D900CE8F6C /* srs_app_bandwidth.hpp */, | ||
| 418 | + 3C12324E1AAE81D900CE8F6C /* srs_app_config.cpp */, | ||
| 419 | + 3C12324F1AAE81D900CE8F6C /* srs_app_config.hpp */, | ||
| 420 | + 3C1232501AAE81D900CE8F6C /* srs_app_conn.cpp */, | ||
| 421 | + 3C1232511AAE81D900CE8F6C /* srs_app_conn.hpp */, | ||
| 422 | + 3C1232521AAE81D900CE8F6C /* srs_app_dvr.cpp */, | ||
| 423 | + 3C1232531AAE81D900CE8F6C /* srs_app_dvr.hpp */, | ||
| 424 | + 3C1232541AAE81D900CE8F6C /* srs_app_edge.cpp */, | ||
| 425 | + 3C1232551AAE81D900CE8F6C /* srs_app_edge.hpp */, | ||
| 426 | + 3C1232561AAE81D900CE8F6C /* srs_app_empty.cpp */, | ||
| 427 | + 3C1232571AAE81D900CE8F6C /* srs_app_empty.hpp */, | ||
| 428 | + 3C1232581AAE81D900CE8F6C /* srs_app_encoder.cpp */, | ||
| 429 | + 3C1232591AAE81D900CE8F6C /* srs_app_encoder.hpp */, | ||
| 430 | + 3C12325A1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp */, | ||
| 431 | + 3C12325B1AAE81D900CE8F6C /* srs_app_ffmpeg.hpp */, | ||
| 432 | + 3C12325C1AAE81D900CE8F6C /* srs_app_forward.cpp */, | ||
| 433 | + 3C12325D1AAE81D900CE8F6C /* srs_app_forward.hpp */, | ||
| 434 | + 3C12325E1AAE81D900CE8F6C /* srs_app_heartbeat.cpp */, | ||
| 435 | + 3C12325F1AAE81D900CE8F6C /* srs_app_heartbeat.hpp */, | ||
| 436 | + 3C1232601AAE81D900CE8F6C /* srs_app_hls.cpp */, | ||
| 437 | + 3C1232611AAE81D900CE8F6C /* srs_app_hls.hpp */, | ||
| 438 | + 3C1232621AAE81D900CE8F6C /* srs_app_http_api.cpp */, | ||
| 439 | + 3C1232631AAE81D900CE8F6C /* srs_app_http_api.hpp */, | ||
| 440 | + 3C1232641AAE81D900CE8F6C /* srs_app_http_client.cpp */, | ||
| 441 | + 3C1232651AAE81D900CE8F6C /* srs_app_http_client.hpp */, | ||
| 442 | + 3C1232661AAE81D900CE8F6C /* srs_app_http_conn.cpp */, | ||
| 443 | + 3C1232671AAE81D900CE8F6C /* srs_app_http_conn.hpp */, | ||
| 444 | + 3C1232681AAE81D900CE8F6C /* srs_app_http_hooks.cpp */, | ||
| 445 | + 3C1232691AAE81D900CE8F6C /* srs_app_http_hooks.hpp */, | ||
| 446 | + 3C12326A1AAE81D900CE8F6C /* srs_app_http.cpp */, | ||
| 447 | + 3C12326B1AAE81D900CE8F6C /* srs_app_http.hpp */, | ||
| 448 | + 3C12326C1AAE81D900CE8F6C /* srs_app_ingest.cpp */, | ||
| 449 | + 3C12326D1AAE81D900CE8F6C /* srs_app_ingest.hpp */, | ||
| 450 | + 3C12326E1AAE81D900CE8F6C /* srs_app_json.cpp */, | ||
| 451 | + 3C12326F1AAE81D900CE8F6C /* srs_app_json.hpp */, | ||
| 452 | + 3C1232701AAE81D900CE8F6C /* srs_app_kbps.cpp */, | ||
| 453 | + 3C1232711AAE81D900CE8F6C /* srs_app_kbps.hpp */, | ||
| 454 | + 3C1232721AAE81D900CE8F6C /* srs_app_listener.cpp */, | ||
| 455 | + 3C1232731AAE81D900CE8F6C /* srs_app_listener.hpp */, | ||
| 456 | + 3C1232741AAE81D900CE8F6C /* srs_app_log.cpp */, | ||
| 457 | + 3C1232751AAE81D900CE8F6C /* srs_app_log.hpp */, | ||
| 458 | + 3C1232761AAE81D900CE8F6C /* srs_app_mpegts_udp.cpp */, | ||
| 459 | + 3C1232771AAE81D900CE8F6C /* srs_app_mpegts_udp.hpp */, | ||
| 460 | + 3C1232781AAE81D900CE8F6C /* srs_app_pithy_print.cpp */, | ||
| 461 | + 3C1232791AAE81D900CE8F6C /* srs_app_pithy_print.hpp */, | ||
| 462 | + 3C12327A1AAE81D900CE8F6C /* srs_app_recv_thread.cpp */, | ||
| 463 | + 3C12327B1AAE81D900CE8F6C /* srs_app_recv_thread.hpp */, | ||
| 464 | + 3C12327C1AAE81D900CE8F6C /* srs_app_refer.cpp */, | ||
| 465 | + 3C12327D1AAE81D900CE8F6C /* srs_app_refer.hpp */, | ||
| 466 | + 3C12327E1AAE81D900CE8F6C /* srs_app_reload.cpp */, | ||
| 467 | + 3C12327F1AAE81D900CE8F6C /* srs_app_reload.hpp */, | ||
| 468 | + 3C1232801AAE81D900CE8F6C /* srs_app_rtmp_conn.cpp */, | ||
| 469 | + 3C1232811AAE81D900CE8F6C /* srs_app_rtmp_conn.hpp */, | ||
| 470 | + 3C1232821AAE81D900CE8F6C /* srs_app_rtsp.cpp */, | ||
| 471 | + 3C1232831AAE81D900CE8F6C /* srs_app_rtsp.hpp */, | ||
| 472 | + 3C1232841AAE81D900CE8F6C /* srs_app_security.cpp */, | ||
| 473 | + 3C1232851AAE81D900CE8F6C /* srs_app_security.hpp */, | ||
| 474 | + 3C1232861AAE81D900CE8F6C /* srs_app_server.cpp */, | ||
| 475 | + 3C1232871AAE81D900CE8F6C /* srs_app_server.hpp */, | ||
| 476 | + 3C1232881AAE81D900CE8F6C /* srs_app_source.cpp */, | ||
| 477 | + 3C1232891AAE81D900CE8F6C /* srs_app_source.hpp */, | ||
| 478 | + 3C12328A1AAE81D900CE8F6C /* srs_app_st_socket.cpp */, | ||
| 479 | + 3C12328B1AAE81D900CE8F6C /* srs_app_st_socket.hpp */, | ||
| 480 | + 3C12328C1AAE81D900CE8F6C /* srs_app_st.cpp */, | ||
| 481 | + 3C12328D1AAE81D900CE8F6C /* srs_app_st.hpp */, | ||
| 482 | + 3C12328E1AAE81D900CE8F6C /* srs_app_statistic.cpp */, | ||
| 483 | + 3C12328F1AAE81D900CE8F6C /* srs_app_statistic.hpp */, | ||
| 484 | + 3C1232901AAE81D900CE8F6C /* srs_app_thread.cpp */, | ||
| 485 | + 3C1232911AAE81D900CE8F6C /* srs_app_thread.hpp */, | ||
| 486 | + 3C1232921AAE81D900CE8F6C /* srs_app_utility.cpp */, | ||
| 487 | + 3C1232931AAE81D900CE8F6C /* srs_app_utility.hpp */, | ||
| 488 | + ); | ||
| 489 | + name = app; | ||
| 490 | + sourceTree = "<group>"; | ||
| 491 | + }; | ||
| 492 | + 3C1232B91AAE825100CE8F6C /* scripts */ = { | ||
| 493 | + isa = PBXGroup; | ||
| 494 | + children = ( | ||
| 495 | + 3C1232C81AAE833300CE8F6C /* _log.sh */, | ||
| 496 | + 3C1232C91AAE833300CE8F6C /* build.sh */, | ||
| 497 | + 3C1232CA1AAE833300CE8F6C /* git.commit.sh */, | ||
| 498 | + 3C1232CB1AAE833300CE8F6C /* git2unix.sh */, | ||
| 499 | + 3C1232CC1AAE833300CE8F6C /* install.sh */, | ||
| 500 | + 3C1232CD1AAE833300CE8F6C /* package.sh */, | ||
| 501 | + 3C1232CE1AAE833300CE8F6C /* run.sh */, | ||
| 502 | + 3C1232CF1AAE833300CE8F6C /* srs.test */, | ||
| 503 | + 3C1232D01AAE833300CE8F6C /* stop.sh */, | ||
| 504 | + 3C1232D11AAE833300CE8F6C /* test_configure.sh */, | ||
| 505 | + ); | ||
| 506 | + name = scripts; | ||
| 507 | + sourceTree = "<group>"; | ||
| 508 | + }; | ||
| 509 | + 3C1232BA1AAE826F00CE8F6C /* auto */ = { | ||
| 510 | + isa = PBXGroup; | ||
| 511 | + children = ( | ||
| 512 | + 3C1232BB1AAE827E00CE8F6C /* apps.sh */, | ||
| 513 | + 3C1232BC1AAE827E00CE8F6C /* auto_headers.sh */, | ||
| 514 | + 3C1232BD1AAE827E00CE8F6C /* build_ffmpeg.sh */, | ||
| 515 | + 3C1232BE1AAE827E00CE8F6C /* depends.sh */, | ||
| 516 | + 3C1232BF1AAE827E00CE8F6C /* generate_header.sh */, | ||
| 517 | + 3C1232C01AAE827E00CE8F6C /* generate-srs-librtmp-project.sh */, | ||
| 518 | + 3C1232C11AAE827E00CE8F6C /* generate-srs-librtmp-single.sh */, | ||
| 519 | + 3C1232C21AAE827E00CE8F6C /* libs.sh */, | ||
| 520 | + 3C1232C31AAE827E00CE8F6C /* local_ip.sh */, | ||
| 521 | + 3C1232C41AAE827E00CE8F6C /* modules.sh */, | ||
| 522 | + 3C1232C51AAE827E00CE8F6C /* options.sh */, | ||
| 523 | + 3C1232C61AAE827E00CE8F6C /* summary.sh */, | ||
| 524 | + 3C1232C71AAE827E00CE8F6C /* utest.sh */, | ||
| 525 | + ); | ||
| 526 | + name = auto; | ||
| 527 | + sourceTree = "<group>"; | ||
| 528 | + }; | ||
| 529 | + 3C1232EE1AAEA71C00CE8F6C /* links */ = { | ||
| 530 | + isa = PBXGroup; | ||
| 531 | + children = ( | ||
| 532 | + 3C1232EC1AAEA70F00CE8F6C /* libhttp_parser.a */, | ||
| 533 | + 3C1232D21AAEA56B00CE8F6C /* libst.a */, | ||
| 534 | + 3C1232E81AAEA5D000CE8F6C /* libssl.a */, | ||
| 535 | + 3C1232E71AAEA5D000CE8F6C /* libcrypto.a */, | ||
| 536 | + ); | ||
| 537 | + name = links; | ||
| 538 | + sourceTree = "<group>"; | ||
| 539 | + }; | ||
| 540 | + 3C1232EF1AAEAC5800CE8F6C /* etc */ = { | ||
| 541 | + isa = PBXGroup; | ||
| 542 | + children = ( | ||
| 543 | + 3C1232F01AAEAC5D00CE8F6C /* init.d */, | ||
| 544 | + ); | ||
| 545 | + name = etc; | ||
| 546 | + sourceTree = "<group>"; | ||
| 547 | + }; | ||
| 548 | + 3C1232F01AAEAC5D00CE8F6C /* init.d */ = { | ||
| 549 | + isa = PBXGroup; | ||
| 550 | + children = ( | ||
| 551 | + 3C1232F11AAEAC7000CE8F6C /* srs */, | ||
| 552 | + 3C1232F21AAEAC7000CE8F6C /* srs-api */, | ||
| 553 | + 3C1232F31AAEAC7000CE8F6C /* srs-demo */, | ||
| 554 | + 3C1232F41AAEAC7000CE8F6C /* srs-demo-19350 */, | ||
| 555 | + ); | ||
| 556 | + name = init.d; | ||
| 557 | + sourceTree = "<group>"; | ||
| 558 | + }; | ||
| 559 | + 3C663F001AB014B500286D8B /* research */ = { | ||
| 560 | + isa = PBXGroup; | ||
| 561 | + children = ( | ||
| 562 | + 3C663F011AB0155100286D8B /* Makefile */, | ||
| 563 | + 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */, | ||
| 564 | + 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */, | ||
| 565 | + 3C663F041AB0155100286D8B /* srs_bandwidth_check.c */, | ||
| 566 | + 3C663F051AB0155100286D8B /* srs_detect_rtmp.c */, | ||
| 567 | + 3C663F061AB0155100286D8B /* srs_flv_injecter.c */, | ||
| 568 | + 3C663F071AB0155100286D8B /* srs_flv_parser.c */, | ||
| 569 | + 3C663F081AB0155100286D8B /* srs_h264_raw_publish.c */, | ||
| 570 | + 3C663F091AB0155100286D8B /* srs_ingest_flv.c */, | ||
| 571 | + 3C663F0A1AB0155100286D8B /* srs_ingest_rtmp.c */, | ||
| 572 | + 3C663F0B1AB0155100286D8B /* srs_play.c */, | ||
| 573 | + 3C663F0C1AB0155100286D8B /* srs_publish.c */, | ||
| 574 | + 3C663F0D1AB0155100286D8B /* srs_rtmp_dump.c */, | ||
| 575 | + ); | ||
| 576 | + name = research; | ||
| 577 | + path = srs_xcode; | ||
| 578 | + sourceTree = "<group>"; | ||
| 579 | + }; | ||
| 580 | +/* End PBXGroup section */ | ||
| 581 | + | ||
| 582 | +/* Begin PBXNativeTarget section */ | ||
| 583 | + 3C1231E41AAE64A400CE8F6C /* srs_xcode */ = { | ||
| 584 | + isa = PBXNativeTarget; | ||
| 585 | + buildConfigurationList = 3C1231EC1AAE64A400CE8F6C /* Build configuration list for PBXNativeTarget "srs_xcode" */; | ||
| 586 | + buildPhases = ( | ||
| 587 | + 3C1231E11AAE64A400CE8F6C /* Sources */, | ||
| 588 | + 3C1231E21AAE64A400CE8F6C /* Frameworks */, | ||
| 589 | + 3C1231E31AAE64A400CE8F6C /* CopyFiles */, | ||
| 590 | + ); | ||
| 591 | + buildRules = ( | ||
| 592 | + ); | ||
| 593 | + dependencies = ( | ||
| 594 | + ); | ||
| 595 | + name = srs_xcode; | ||
| 596 | + productName = srs_xcode; | ||
| 597 | + productReference = 3C1231E51AAE64A400CE8F6C /* srs_xcode */; | ||
| 598 | + productType = "com.apple.product-type.tool"; | ||
| 599 | + }; | ||
| 600 | +/* End PBXNativeTarget section */ | ||
| 601 | + | ||
| 602 | +/* Begin PBXProject section */ | ||
| 603 | + 3C1231DD1AAE64A400CE8F6C /* Project object */ = { | ||
| 604 | + isa = PBXProject; | ||
| 605 | + attributes = { | ||
| 606 | + LastUpgradeCheck = 0610; | ||
| 607 | + ORGANIZATIONNAME = winlin; | ||
| 608 | + TargetAttributes = { | ||
| 609 | + 3C1231E41AAE64A400CE8F6C = { | ||
| 610 | + CreatedOnToolsVersion = 6.1.1; | ||
| 611 | + }; | ||
| 612 | + }; | ||
| 613 | + }; | ||
| 614 | + buildConfigurationList = 3C1231E01AAE64A400CE8F6C /* Build configuration list for PBXProject "srs_xcode" */; | ||
| 615 | + compatibilityVersion = "Xcode 3.2"; | ||
| 616 | + developmentRegion = English; | ||
| 617 | + hasScannedForEncodings = 0; | ||
| 618 | + knownRegions = ( | ||
| 619 | + en, | ||
| 620 | + ); | ||
| 621 | + mainGroup = 3C1231DC1AAE64A400CE8F6C; | ||
| 622 | + productRefGroup = 3C1231E61AAE64A400CE8F6C /* Products */; | ||
| 623 | + projectDirPath = ""; | ||
| 624 | + projectRoot = ""; | ||
| 625 | + targets = ( | ||
| 626 | + 3C1231E41AAE64A400CE8F6C /* srs_xcode */, | ||
| 627 | + ); | ||
| 628 | + }; | ||
| 629 | +/* End PBXProject section */ | ||
| 630 | + | ||
| 631 | +/* Begin PBXSourcesBuildPhase section */ | ||
| 632 | + 3C1231E11AAE64A400CE8F6C /* Sources */ = { | ||
| 633 | + isa = PBXSourcesBuildPhase; | ||
| 634 | + buildActionMask = 2147483647; | ||
| 635 | + files = ( | ||
| 636 | + 3C1232951AAE81D900CE8F6C /* srs_app_config.cpp in Sources */, | ||
| 637 | + 3C663F0F1AB0155100286D8B /* srs_aac_raw_publish.c in Sources */, | ||
| 638 | + 3C1232961AAE81D900CE8F6C /* srs_app_conn.cpp in Sources */, | ||
| 639 | + 3C12322A1AAE814D00CE8F6C /* srs_kernel_ts.cpp in Sources */, | ||
| 640 | + 3C12329E1AAE81D900CE8F6C /* srs_app_hls.cpp in Sources */, | ||
| 641 | + 3C663F171AB0155100286D8B /* srs_ingest_rtmp.c in Sources */, | ||
| 642 | + 3C663F131AB0155100286D8B /* srs_flv_injecter.c in Sources */, | ||
| 643 | + 3C1232971AAE81D900CE8F6C /* srs_app_dvr.cpp in Sources */, | ||
| 644 | + 3C1232271AAE814D00CE8F6C /* srs_kernel_log.cpp in Sources */, | ||
| 645 | + 3C1232A81AAE81D900CE8F6C /* srs_app_log.cpp in Sources */, | ||
| 646 | + 3C1232A41AAE81D900CE8F6C /* srs_app_ingest.cpp in Sources */, | ||
| 647 | + 3C1232B41AAE81D900CE8F6C /* srs_app_st.cpp in Sources */, | ||
| 648 | + 3C1232481AAE81A400CE8F6C /* srs_rtmp_stack.cpp in Sources */, | ||
| 649 | + 3C1232B01AAE81D900CE8F6C /* srs_app_security.cpp in Sources */, | ||
| 650 | + 3C12322B1AAE814D00CE8F6C /* srs_kernel_utility.cpp in Sources */, | ||
| 651 | + 3C12324A1AAE81A400CE8F6C /* srs_rtsp_stack.cpp in Sources */, | ||
| 652 | + 3C1232A51AAE81D900CE8F6C /* srs_app_json.cpp in Sources */, | ||
| 653 | + 3C12329F1AAE81D900CE8F6C /* srs_app_http_api.cpp in Sources */, | ||
| 654 | + 3C663F101AB0155100286D8B /* srs_audio_raw_publish.c in Sources */, | ||
| 655 | + 3C663F111AB0155100286D8B /* srs_bandwidth_check.c in Sources */, | ||
| 656 | + 3C1232A11AAE81D900CE8F6C /* srs_app_http_conn.cpp in Sources */, | ||
| 657 | + 3C1232AC1AAE81D900CE8F6C /* srs_app_refer.cpp in Sources */, | ||
| 658 | + 3C1232991AAE81D900CE8F6C /* srs_app_empty.cpp in Sources */, | ||
| 659 | + 3C1232201AAE814D00CE8F6C /* srs_kernel_aac.cpp in Sources */, | ||
| 660 | + 3C1232941AAE81D900CE8F6C /* srs_app_bandwidth.cpp in Sources */, | ||
| 661 | + 3C1232221AAE814D00CE8F6C /* srs_kernel_codec.cpp in Sources */, | ||
| 662 | + 3C1232B71AAE81D900CE8F6C /* srs_app_utility.cpp in Sources */, | ||
| 663 | + 3C1232AB1AAE81D900CE8F6C /* srs_app_recv_thread.cpp in Sources */, | ||
| 664 | + 3C663F151AB0155100286D8B /* srs_h264_raw_publish.c in Sources */, | ||
| 665 | + 3C1231F61AAE652D00CE8F6C /* srs_core_autofree.cpp in Sources */, | ||
| 666 | + 3C1232411AAE81A400CE8F6C /* srs_raw_avc.cpp in Sources */, | ||
| 667 | + 3C1232491AAE81A400CE8F6C /* srs_rtmp_utility.cpp in Sources */, | ||
| 668 | + 3C663F191AB0155100286D8B /* srs_publish.c in Sources */, | ||
| 669 | + 3C1232A01AAE81D900CE8F6C /* srs_app_http_client.cpp in Sources */, | ||
| 670 | + 3C12329B1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp in Sources */, | ||
| 671 | + 3C1232421AAE81A400CE8F6C /* srs_rtmp_amf0.cpp in Sources */, | ||
| 672 | + 3C1232AA1AAE81D900CE8F6C /* srs_app_pithy_print.cpp in Sources */, | ||
| 673 | + 3C12329C1AAE81D900CE8F6C /* srs_app_forward.cpp in Sources */, | ||
| 674 | + 3C1232251AAE814D00CE8F6C /* srs_kernel_file.cpp in Sources */, | ||
| 675 | + 3C1232AD1AAE81D900CE8F6C /* srs_app_reload.cpp in Sources */, | ||
| 676 | + 3C1231F81AAE652D00CE8F6C /* srs_core.cpp in Sources */, | ||
| 677 | + 3C1232A21AAE81D900CE8F6C /* srs_app_http_hooks.cpp in Sources */, | ||
| 678 | + 3C663F121AB0155100286D8B /* srs_detect_rtmp.c in Sources */, | ||
| 679 | + 3C1232B11AAE81D900CE8F6C /* srs_app_server.cpp in Sources */, | ||
| 680 | + 3C1232B31AAE81D900CE8F6C /* srs_app_st_socket.cpp in Sources */, | ||
| 681 | + 3C1232061AAE812C00CE8F6C /* srs_main_server.cpp in Sources */, | ||
| 682 | + 3C1232281AAE814D00CE8F6C /* srs_kernel_mp3.cpp in Sources */, | ||
| 683 | + 3C1232B21AAE81D900CE8F6C /* srs_app_source.cpp in Sources */, | ||
| 684 | + 3C1231F71AAE652D00CE8F6C /* srs_core_performance.cpp in Sources */, | ||
| 685 | + 3C1232981AAE81D900CE8F6C /* srs_app_edge.cpp in Sources */, | ||
| 686 | + 3C1232461AAE81A400CE8F6C /* srs_rtmp_msg_array.cpp in Sources */, | ||
| 687 | + 3C1232A71AAE81D900CE8F6C /* srs_app_listener.cpp in Sources */, | ||
| 688 | + 3C1232261AAE814D00CE8F6C /* srs_kernel_flv.cpp in Sources */, | ||
| 689 | + 3C663F1A1AB0155100286D8B /* srs_rtmp_dump.c in Sources */, | ||
| 690 | + 3C1232241AAE814D00CE8F6C /* srs_kernel_error.cpp in Sources */, | ||
| 691 | + 3C1232441AAE81A400CE8F6C /* srs_rtmp_handshake.cpp in Sources */, | ||
| 692 | + 3C1232291AAE814D00CE8F6C /* srs_kernel_stream.cpp in Sources */, | ||
| 693 | + 3C663F181AB0155100286D8B /* srs_play.c in Sources */, | ||
| 694 | + 3C1232B61AAE81D900CE8F6C /* srs_app_thread.cpp in Sources */, | ||
| 695 | + 3C1232A91AAE81D900CE8F6C /* srs_app_mpegts_udp.cpp in Sources */, | ||
| 696 | + 3C1232AE1AAE81D900CE8F6C /* srs_app_rtmp_conn.cpp in Sources */, | ||
| 697 | + 3C1232B51AAE81D900CE8F6C /* srs_app_statistic.cpp in Sources */, | ||
| 698 | + 3C663F161AB0155100286D8B /* srs_ingest_flv.c in Sources */, | ||
| 699 | + 3C663F141AB0155100286D8B /* srs_flv_parser.c in Sources */, | ||
| 700 | + 3C1232451AAE81A400CE8F6C /* srs_rtmp_io.cpp in Sources */, | ||
| 701 | + 3C1232431AAE81A400CE8F6C /* srs_rtmp_buffer.cpp in Sources */, | ||
| 702 | + 3C663F0E1AB0155100286D8B /* Makefile in Sources */, | ||
| 703 | + 3C1232211AAE814D00CE8F6C /* srs_kernel_buffer.cpp in Sources */, | ||
| 704 | + 3C1232471AAE81A400CE8F6C /* srs_rtmp_sdk.cpp in Sources */, | ||
| 705 | + 3C1232A61AAE81D900CE8F6C /* srs_app_kbps.cpp in Sources */, | ||
| 706 | + 3C12329D1AAE81D900CE8F6C /* srs_app_heartbeat.cpp in Sources */, | ||
| 707 | + 3C1232231AAE814D00CE8F6C /* srs_kernel_consts.cpp in Sources */, | ||
| 708 | + 3C1232AF1AAE81D900CE8F6C /* srs_app_rtsp.cpp in Sources */, | ||
| 709 | + 3C1232A31AAE81D900CE8F6C /* srs_app_http.cpp in Sources */, | ||
| 710 | + 3C12329A1AAE81D900CE8F6C /* srs_app_encoder.cpp in Sources */, | ||
| 711 | + ); | ||
| 712 | + runOnlyForDeploymentPostprocessing = 0; | ||
| 713 | + }; | ||
| 714 | +/* End PBXSourcesBuildPhase section */ | ||
| 715 | + | ||
| 716 | +/* Begin XCBuildConfiguration section */ | ||
| 717 | + 3C1231EA1AAE64A400CE8F6C /* Debug */ = { | ||
| 718 | + isa = XCBuildConfiguration; | ||
| 719 | + buildSettings = { | ||
| 720 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 721 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 722 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 723 | + CLANG_ENABLE_MODULES = YES; | ||
| 724 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 725 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 726 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 727 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 728 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 729 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 730 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 731 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 732 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 733 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 734 | + COPY_PHASE_STRIP = NO; | ||
| 735 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 736 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 737 | + GCC_DYNAMIC_NO_PIC = NO; | ||
| 738 | + GCC_OPTIMIZATION_LEVEL = 0; | ||
| 739 | + GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 740 | + "DEBUG=1", | ||
| 741 | + "$(inherited)", | ||
| 742 | + ); | ||
| 743 | + GCC_SYMBOLS_PRIVATE_EXTERN = NO; | ||
| 744 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 745 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 746 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 747 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 748 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 749 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 750 | + MACOSX_DEPLOYMENT_TARGET = 10.10; | ||
| 751 | + MTL_ENABLE_DEBUG_INFO = YES; | ||
| 752 | + ONLY_ACTIVE_ARCH = YES; | ||
| 753 | + SDKROOT = macosx; | ||
| 754 | + }; | ||
| 755 | + name = Debug; | ||
| 756 | + }; | ||
| 757 | + 3C1231EB1AAE64A400CE8F6C /* Release */ = { | ||
| 758 | + isa = XCBuildConfiguration; | ||
| 759 | + buildSettings = { | ||
| 760 | + ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 761 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
| 762 | + CLANG_CXX_LIBRARY = "libc++"; | ||
| 763 | + CLANG_ENABLE_MODULES = YES; | ||
| 764 | + CLANG_ENABLE_OBJC_ARC = YES; | ||
| 765 | + CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 766 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 767 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 768 | + CLANG_WARN_EMPTY_BODY = YES; | ||
| 769 | + CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 770 | + CLANG_WARN_INT_CONVERSION = YES; | ||
| 771 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 772 | + CLANG_WARN_UNREACHABLE_CODE = YES; | ||
| 773 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
| 774 | + COPY_PHASE_STRIP = YES; | ||
| 775 | + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 776 | + ENABLE_NS_ASSERTIONS = NO; | ||
| 777 | + ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 778 | + GCC_C_LANGUAGE_STANDARD = gnu99; | ||
| 779 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 780 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 781 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
| 782 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 783 | + GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 784 | + GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 785 | + MACOSX_DEPLOYMENT_TARGET = 10.10; | ||
| 786 | + MTL_ENABLE_DEBUG_INFO = NO; | ||
| 787 | + SDKROOT = macosx; | ||
| 788 | + }; | ||
| 789 | + name = Release; | ||
| 790 | + }; | ||
| 791 | + 3C1231ED1AAE64A400CE8F6C /* Debug */ = { | ||
| 792 | + isa = XCBuildConfiguration; | ||
| 793 | + buildSettings = { | ||
| 794 | + ALWAYS_SEARCH_USER_PATHS = YES; | ||
| 795 | + CLANG_CXX_LANGUAGE_STANDARD = "c++98"; | ||
| 796 | + CLANG_CXX_LIBRARY = "libstdc++"; | ||
| 797 | + LIBRARY_SEARCH_PATHS = ( | ||
| 798 | + "../../objs/**", | ||
| 799 | + "/Users/winlin/Desktop/git/simple-rtmp-server/trunk/objs/http-parser-2.1", | ||
| 800 | + ); | ||
| 801 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 802 | + "USER_HEADER_SEARCH_PATHS[arch=*]" = "../../src/** ../../objs ../../objs/st ../../objs/hp ../../objs/openssl"; | ||
| 803 | + }; | ||
| 804 | + name = Debug; | ||
| 805 | + }; | ||
| 806 | + 3C1231EE1AAE64A400CE8F6C /* Release */ = { | ||
| 807 | + isa = XCBuildConfiguration; | ||
| 808 | + buildSettings = { | ||
| 809 | + ALWAYS_SEARCH_USER_PATHS = YES; | ||
| 810 | + CLANG_CXX_LANGUAGE_STANDARD = "c++98"; | ||
| 811 | + CLANG_CXX_LIBRARY = "libstdc++"; | ||
| 812 | + LIBRARY_SEARCH_PATHS = ( | ||
| 813 | + "../../objs/**", | ||
| 814 | + "/Users/winlin/Desktop/git/simple-rtmp-server/trunk/objs/http-parser-2.1", | ||
| 815 | + ); | ||
| 816 | + PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 817 | + }; | ||
| 818 | + name = Release; | ||
| 819 | + }; | ||
| 820 | +/* End XCBuildConfiguration section */ | ||
| 821 | + | ||
| 822 | +/* Begin XCConfigurationList section */ | ||
| 823 | + 3C1231E01AAE64A400CE8F6C /* Build configuration list for PBXProject "srs_xcode" */ = { | ||
| 824 | + isa = XCConfigurationList; | ||
| 825 | + buildConfigurations = ( | ||
| 826 | + 3C1231EA1AAE64A400CE8F6C /* Debug */, | ||
| 827 | + 3C1231EB1AAE64A400CE8F6C /* Release */, | ||
| 828 | + ); | ||
| 829 | + defaultConfigurationIsVisible = 0; | ||
| 830 | + defaultConfigurationName = Release; | ||
| 831 | + }; | ||
| 832 | + 3C1231EC1AAE64A400CE8F6C /* Build configuration list for PBXNativeTarget "srs_xcode" */ = { | ||
| 833 | + isa = XCConfigurationList; | ||
| 834 | + buildConfigurations = ( | ||
| 835 | + 3C1231ED1AAE64A400CE8F6C /* Debug */, | ||
| 836 | + 3C1231EE1AAE64A400CE8F6C /* Release */, | ||
| 837 | + ); | ||
| 838 | + defaultConfigurationIsVisible = 0; | ||
| 839 | + defaultConfigurationName = Release; | ||
| 840 | + }; | ||
| 841 | +/* End XCConfigurationList section */ | ||
| 842 | + }; | ||
| 843 | + rootObject = 3C1231DD1AAE64A400CE8F6C /* Project object */; | ||
| 844 | +} |
trunk/ide/srs_xcode/srs_xcode/readme.txt
0 → 100644
| 1 | +the xcode project for osx. |
trunk/modules/readme.txt
0 → 100644
| @@ -53,7 +53,8 @@ int main(int argc, char** argv) | @@ -53,7 +53,8 @@ int main(int argc, char** argv) | ||
| 53 | // user option parse index. | 53 | // user option parse index. |
| 54 | int opt = 0; | 54 | int opt = 0; |
| 55 | // user options. | 55 | // user options. |
| 56 | - char* in_flv_file; char* out_rtmp_url; | 56 | + char* in_flv_file = NULL; |
| 57 | + char* out_rtmp_url = NULL; | ||
| 57 | // rtmp handler | 58 | // rtmp handler |
| 58 | srs_rtmp_t ortmp; | 59 | srs_rtmp_t ortmp; |
| 59 | // flv handler | 60 | // flv handler |
| @@ -75,20 +76,37 @@ int main(int argc, char** argv) | @@ -75,20 +76,37 @@ int main(int argc, char** argv) | ||
| 75 | exit(-1); | 76 | exit(-1); |
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | - // parse options in FFMPEG format. | ||
| 79 | - while ((opt = getopt(argc, argv, "i:y:")) != -1) { | ||
| 80 | - switch (opt) { | ||
| 81 | - case 'i': | ||
| 82 | - in_flv_file = optarg; | ||
| 83 | - break; | ||
| 84 | - case 'y': | ||
| 85 | - out_rtmp_url = optarg; | ||
| 86 | - break; | ||
| 87 | - default: | ||
| 88 | - break; | 79 | + for (opt = 0; opt < argc; opt++) { |
| 80 | + srs_human_trace("argv[%d]=%s", opt, argv[opt]); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + // fill the options for mac | ||
| 84 | + for (opt = 0; opt < argc - 1; opt++) { | ||
| 85 | + // ignore all options except -i and -y. | ||
| 86 | + char* p = argv[opt]; | ||
| 87 | + | ||
| 88 | + // only accept -x | ||
| 89 | + if (p[0] != '-' || p[1] == 0 || p[2] != 0) { | ||
| 90 | + continue; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + // parse according the option name. | ||
| 94 | + switch (p[1]) { | ||
| 95 | + case 'i': in_flv_file = argv[opt + 1]; break; | ||
| 96 | + case 'y': out_rtmp_url = argv[opt + 1]; break; | ||
| 97 | + default: break; | ||
| 89 | } | 98 | } |
| 90 | } | 99 | } |
| 91 | 100 | ||
| 101 | + if (!in_flv_file) { | ||
| 102 | + srs_human_trace("input invalid, use -i <input>"); | ||
| 103 | + return -1; | ||
| 104 | + } | ||
| 105 | + if (!out_rtmp_url) { | ||
| 106 | + srs_human_trace("output invalid, use -y <output>"); | ||
| 107 | + return -1; | ||
| 108 | + } | ||
| 109 | + | ||
| 92 | srs_human_trace("input: %s", in_flv_file); | 110 | srs_human_trace("input: %s", in_flv_file); |
| 93 | srs_human_trace("output: %s", out_rtmp_url); | 111 | srs_human_trace("output: %s", out_rtmp_url); |
| 94 | 112 |
| @@ -41,7 +41,8 @@ int main(int argc, char** argv) | @@ -41,7 +41,8 @@ int main(int argc, char** argv) | ||
| 41 | // user option parse index. | 41 | // user option parse index. |
| 42 | int opt = 0; | 42 | int opt = 0; |
| 43 | // user options. | 43 | // user options. |
| 44 | - char* in_rtmp_url; char* out_rtmp_url; | 44 | + char* in_rtmp_url = NULL; |
| 45 | + char* out_rtmp_url = NULL; | ||
| 45 | // rtmp handler | 46 | // rtmp handler |
| 46 | srs_rtmp_t irtmp, ortmp; | 47 | srs_rtmp_t irtmp, ortmp; |
| 47 | 48 | ||
| @@ -60,20 +61,33 @@ int main(int argc, char** argv) | @@ -60,20 +61,33 @@ int main(int argc, char** argv) | ||
| 60 | exit(-1); | 61 | exit(-1); |
| 61 | } | 62 | } |
| 62 | 63 | ||
| 63 | - // parse options in FFMPEG format. | ||
| 64 | - while ((opt = getopt(argc, argv, "i:y:")) != -1) { | ||
| 65 | - switch (opt) { | ||
| 66 | - case 'i': | ||
| 67 | - in_rtmp_url = optarg; | ||
| 68 | - break; | ||
| 69 | - case 'y': | ||
| 70 | - out_rtmp_url = optarg; | ||
| 71 | - break; | ||
| 72 | - default: | ||
| 73 | - break; | 64 | + // fill the options for mac |
| 65 | + for (opt = 0; opt < argc - 1; opt++) { | ||
| 66 | + // ignore all options except -i and -y. | ||
| 67 | + char* p = argv[opt]; | ||
| 68 | + | ||
| 69 | + // only accept -x | ||
| 70 | + if (p[0] != '-' || p[1] == 0 || p[2] != 0) { | ||
| 71 | + continue; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + // parse according the option name. | ||
| 75 | + switch (p[1]) { | ||
| 76 | + case 'i': in_rtmp_url = argv[opt + 1]; break; | ||
| 77 | + case 'y': out_rtmp_url = argv[opt + 1]; break; | ||
| 78 | + default: break; | ||
| 74 | } | 79 | } |
| 75 | } | 80 | } |
| 76 | 81 | ||
| 82 | + if (!in_rtmp_url) { | ||
| 83 | + srs_human_trace("input invalid, use -i <input>"); | ||
| 84 | + return -1; | ||
| 85 | + } | ||
| 86 | + if (!out_rtmp_url) { | ||
| 87 | + srs_human_trace("output invalid, use -y <output>"); | ||
| 88 | + return -1; | ||
| 89 | + } | ||
| 90 | + | ||
| 77 | srs_human_trace("input: %s", in_rtmp_url); | 91 | srs_human_trace("input: %s", in_rtmp_url); |
| 78 | srs_human_trace("output: %s", out_rtmp_url); | 92 | srs_human_trace("output: %s", out_rtmp_url); |
| 79 | 93 |
| @@ -4,11 +4,11 @@ | @@ -4,11 +4,11 @@ | ||
| 4 | ####################################### | 4 | ####################################### |
| 5 | # color echo. | 5 | # color echo. |
| 6 | ####################################### | 6 | ####################################### |
| 7 | -RED="\\e[31m" | ||
| 8 | -GREEN="\\e[32m" | ||
| 9 | -YELLOW="\\e[33m" | ||
| 10 | -BLACK="\\e[0m" | ||
| 11 | -POS="\\e[103G" | 7 | +RED="\\033[31m" |
| 8 | +GREEN="\\033[32m" | ||
| 9 | +YELLOW="\\033[33m" | ||
| 10 | +BLACK="\\033[0m" | ||
| 11 | +POS="\\033[103G" | ||
| 12 | 12 | ||
| 13 | # if need to log to file, change the log path. | 13 | # if need to log to file, change the log path. |
| 14 | if [[ ! $log ]]; then | 14 | if [[ ! $log ]]; then |
| @@ -1419,7 +1419,6 @@ int SrsConfig::check_config() | @@ -1419,7 +1419,6 @@ int SrsConfig::check_config() | ||
| 1419 | string m = conf->at(j)->name.c_str(); | 1419 | string m = conf->at(j)->name.c_str(); |
| 1420 | if (m != "enabled" && m != "dvr_path" && m != "dvr_plan" | 1420 | if (m != "enabled" && m != "dvr_path" && m != "dvr_plan" |
| 1421 | && m != "dvr_duration" && m != "dvr_wait_keyframe" && m != "time_jitter" | 1421 | && m != "dvr_duration" && m != "dvr_wait_keyframe" && m != "time_jitter" |
| 1422 | - && m != "dvr_autostart" | ||
| 1423 | ) { | 1422 | ) { |
| 1424 | ret = ERROR_SYSTEM_CONFIG_INVALID; | 1423 | ret = ERROR_SYSTEM_CONFIG_INVALID; |
| 1425 | srs_error("unsupported vhost dvr directive %s, ret=%d", m.c_str(), ret); | 1424 | srs_error("unsupported vhost dvr directive %s, ret=%d", m.c_str(), ret); |
| @@ -1978,38 +1977,6 @@ int SrsConfig::get_stream_caster_rtp_port_max(SrsConfDirective* sc) | @@ -1978,38 +1977,6 @@ int SrsConfig::get_stream_caster_rtp_port_max(SrsConfDirective* sc) | ||
| 1978 | return ::atoi(conf->arg0().c_str()); | 1977 | return ::atoi(conf->arg0().c_str()); |
| 1979 | } | 1978 | } |
| 1980 | 1979 | ||
| 1981 | -SrsConfDirective* SrsConfig::create_directive(string vhost, string directive, string sub_directive) | ||
| 1982 | -{ | ||
| 1983 | - SrsConfDirective* vhost_conf = get_vhost(vhost); | ||
| 1984 | - | ||
| 1985 | - if (!vhost_conf) { | ||
| 1986 | - vhost_conf = new SrsConfDirective(); | ||
| 1987 | - root->directives.push_back(vhost_conf); | ||
| 1988 | - } | ||
| 1989 | - | ||
| 1990 | - if (directive.empty()) { | ||
| 1991 | - return vhost_conf; | ||
| 1992 | - } | ||
| 1993 | - | ||
| 1994 | - SrsConfDirective* dir = vhost_conf->get(directive); | ||
| 1995 | - if (!dir) { | ||
| 1996 | - dir = new SrsConfDirective(); | ||
| 1997 | - vhost_conf->directives.push_back(dir); | ||
| 1998 | - } | ||
| 1999 | - | ||
| 2000 | - if (sub_directive.empty()) { | ||
| 2001 | - return dir; | ||
| 2002 | - } | ||
| 2003 | - | ||
| 2004 | - SrsConfDirective* sdir = dir->get(sub_directive); | ||
| 2005 | - if (!sdir) { | ||
| 2006 | - sdir = new SrsConfDirective(); | ||
| 2007 | - dir->directives.push_back(sdir); | ||
| 2008 | - } | ||
| 2009 | - | ||
| 2010 | - return sdir; | ||
| 2011 | -} | ||
| 2012 | - | ||
| 2013 | SrsConfDirective* SrsConfig::get_vhost(string vhost) | 1980 | SrsConfDirective* SrsConfig::get_vhost(string vhost) |
| 2014 | { | 1981 | { |
| 2015 | srs_assert(root); | 1982 | srs_assert(root); |
| @@ -3422,13 +3389,6 @@ bool SrsConfig::get_dvr_enabled(string vhost) | @@ -3422,13 +3389,6 @@ bool SrsConfig::get_dvr_enabled(string vhost) | ||
| 3422 | return false; | 3389 | return false; |
| 3423 | } | 3390 | } |
| 3424 | 3391 | ||
| 3425 | -void SrsConfig::set_dvr_enabled(string vhost, bool enabled) | ||
| 3426 | -{ | ||
| 3427 | - SrsConfDirective* conf = create_directive(vhost, "dvr", "enabled"); | ||
| 3428 | - conf->args.clear(); | ||
| 3429 | - conf->args.push_back(enabled? "on":"off"); | ||
| 3430 | -} | ||
| 3431 | - | ||
| 3432 | string SrsConfig::get_dvr_path(string vhost) | 3392 | string SrsConfig::get_dvr_path(string vhost) |
| 3433 | { | 3393 | { |
| 3434 | SrsConfDirective* dvr = get_dvr(vhost); | 3394 | SrsConfDirective* dvr = get_dvr(vhost); |
| @@ -3446,13 +3406,6 @@ string SrsConfig::get_dvr_path(string vhost) | @@ -3446,13 +3406,6 @@ string SrsConfig::get_dvr_path(string vhost) | ||
| 3446 | return conf->arg0(); | 3406 | return conf->arg0(); |
| 3447 | } | 3407 | } |
| 3448 | 3408 | ||
| 3449 | -void SrsConfig::set_dvr_path(string vhost, string path) | ||
| 3450 | -{ | ||
| 3451 | - SrsConfDirective* conf = create_directive(vhost, "dvr", "dvr_path"); | ||
| 3452 | - conf->args.clear(); | ||
| 3453 | - conf->args.push_back(path); | ||
| 3454 | -} | ||
| 3455 | - | ||
| 3456 | string SrsConfig::get_dvr_plan(string vhost) | 3409 | string SrsConfig::get_dvr_plan(string vhost) |
| 3457 | { | 3410 | { |
| 3458 | SrsConfDirective* dvr = get_dvr(vhost); | 3411 | SrsConfDirective* dvr = get_dvr(vhost); |
| @@ -3504,30 +3457,6 @@ bool SrsConfig::get_dvr_wait_keyframe(string vhost) | @@ -3504,30 +3457,6 @@ bool SrsConfig::get_dvr_wait_keyframe(string vhost) | ||
| 3504 | return false; | 3457 | return false; |
| 3505 | } | 3458 | } |
| 3506 | 3459 | ||
| 3507 | -void SrsConfig::set_dvr_wait_keyframe(string vhost, bool wait_keyframe) | ||
| 3508 | -{ | ||
| 3509 | - SrsConfDirective* conf = create_directive(vhost, "dvr", "dvr_wait_keyframe"); | ||
| 3510 | - conf->args.clear(); | ||
| 3511 | - conf->args.push_back(wait_keyframe? "on":"off"); | ||
| 3512 | -} | ||
| 3513 | - | ||
| 3514 | -bool SrsConfig::get_dvr_autostart(string vhost) | ||
| 3515 | -{ | ||
| 3516 | - SrsConfDirective* dvr = get_dvr(vhost); | ||
| 3517 | - | ||
| 3518 | - if (!dvr) { | ||
| 3519 | - return true; | ||
| 3520 | - } | ||
| 3521 | - | ||
| 3522 | - SrsConfDirective* conf = dvr->get("dvr_autostart"); | ||
| 3523 | - | ||
| 3524 | - if (!conf || conf->arg0() != "off") { | ||
| 3525 | - return true; | ||
| 3526 | - } | ||
| 3527 | - | ||
| 3528 | - return false; | ||
| 3529 | -} | ||
| 3530 | - | ||
| 3531 | int SrsConfig::get_dvr_time_jitter(string vhost) | 3460 | int SrsConfig::get_dvr_time_jitter(string vhost) |
| 3532 | { | 3461 | { |
| 3533 | SrsConfDirective* dvr = get_dvr(vhost); | 3462 | SrsConfDirective* dvr = get_dvr(vhost); |
| @@ -61,7 +61,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -61,7 +61,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 61 | #define SRS_CONF_DEFAULT_DVR_PLAN_SESSION "session" | 61 | #define SRS_CONF_DEFAULT_DVR_PLAN_SESSION "session" |
| 62 | #define SRS_CONF_DEFAULT_DVR_PLAN_SEGMENT "segment" | 62 | #define SRS_CONF_DEFAULT_DVR_PLAN_SEGMENT "segment" |
| 63 | #define SRS_CONF_DEFAULT_DVR_PLAN_APPEND "append" | 63 | #define SRS_CONF_DEFAULT_DVR_PLAN_APPEND "append" |
| 64 | -#define SRS_CONF_DEFAULT_DVR_PLAN_API "api" | ||
| 65 | #define SRS_CONF_DEFAULT_DVR_PLAN SRS_CONF_DEFAULT_DVR_PLAN_SESSION | 64 | #define SRS_CONF_DEFAULT_DVR_PLAN SRS_CONF_DEFAULT_DVR_PLAN_SESSION |
| 66 | #define SRS_CONF_DEFAULT_DVR_DURATION 30 | 65 | #define SRS_CONF_DEFAULT_DVR_DURATION 30 |
| 67 | #define SRS_CONF_DEFAULT_TIME_JITTER "full" | 66 | #define SRS_CONF_DEFAULT_TIME_JITTER "full" |
| @@ -357,11 +356,11 @@ private: | @@ -357,11 +356,11 @@ private: | ||
| 357 | * print help and exit. | 356 | * print help and exit. |
| 358 | */ | 357 | */ |
| 359 | virtual void print_help(char** argv); | 358 | virtual void print_help(char** argv); |
| 359 | +public: | ||
| 360 | /** | 360 | /** |
| 361 | * parse the config file, which is specified by cli. | 361 | * parse the config file, which is specified by cli. |
| 362 | */ | 362 | */ |
| 363 | virtual int parse_file(const char* filename); | 363 | virtual int parse_file(const char* filename); |
| 364 | -public: | ||
| 365 | /** | 364 | /** |
| 366 | * check the parsed config. | 365 | * check the parsed config. |
| 367 | */ | 366 | */ |
| @@ -457,14 +456,6 @@ public: | @@ -457,14 +456,6 @@ public: | ||
| 457 | * get the max udp port for rtp of stream caster rtsp. | 456 | * get the max udp port for rtp of stream caster rtsp. |
| 458 | */ | 457 | */ |
| 459 | virtual int get_stream_caster_rtp_port_max(SrsConfDirective* sc); | 458 | virtual int get_stream_caster_rtp_port_max(SrsConfDirective* sc); |
| 460 | -private: | ||
| 461 | - /** | ||
| 462 | - * create directive under vhost. | ||
| 463 | - * @param directive, get the directive of vhost. get vhost if directive is empty. | ||
| 464 | - * @param sub_directive, get the sub directive of vhost. get directive if sub-directive is empty. | ||
| 465 | - * @return the vhost(empty directive and sub-directive); the directive(empty sub-directive); the sub-directive. | ||
| 466 | - */ | ||
| 467 | - virtual SrsConfDirective* create_directive(std::string vhost, std::string directive, std::string sub_directive); | ||
| 468 | // vhost specified section | 459 | // vhost specified section |
| 469 | public: | 460 | public: |
| 470 | /** | 461 | /** |
| @@ -954,12 +945,10 @@ public: | @@ -954,12 +945,10 @@ public: | ||
| 954 | * whether dvr is enabled. | 945 | * whether dvr is enabled. |
| 955 | */ | 946 | */ |
| 956 | virtual bool get_dvr_enabled(std::string vhost); | 947 | virtual bool get_dvr_enabled(std::string vhost); |
| 957 | - virtual void set_dvr_enabled(std::string vhost, bool enabled); | ||
| 958 | /** | 948 | /** |
| 959 | * get the dvr path, the flv file to save in. | 949 | * get the dvr path, the flv file to save in. |
| 960 | */ | 950 | */ |
| 961 | virtual std::string get_dvr_path(std::string vhost); | 951 | virtual std::string get_dvr_path(std::string vhost); |
| 962 | - virtual void set_dvr_path(std::string vhost, std::string path); | ||
| 963 | /** | 952 | /** |
| 964 | * get the plan of dvr, how to reap the flv file. | 953 | * get the plan of dvr, how to reap the flv file. |
| 965 | */ | 954 | */ |
| @@ -972,11 +961,6 @@ public: | @@ -972,11 +961,6 @@ public: | ||
| 972 | * whether wait keyframe to reap segment. | 961 | * whether wait keyframe to reap segment. |
| 973 | */ | 962 | */ |
| 974 | virtual bool get_dvr_wait_keyframe(std::string vhost); | 963 | virtual bool get_dvr_wait_keyframe(std::string vhost); |
| 975 | - virtual void set_dvr_wait_keyframe(std::string vhost, bool wait_keyframe); | ||
| 976 | - /** | ||
| 977 | - * whether autostart for dvr. wait api to start dvr if false. | ||
| 978 | - */ | ||
| 979 | - virtual bool get_dvr_autostart(std::string vhost); | ||
| 980 | /** | 964 | /** |
| 981 | * get the time_jitter algorithm for dvr. | 965 | * get the time_jitter algorithm for dvr. |
| 982 | */ | 966 | */ |
| @@ -1148,3 +1132,4 @@ bool srs_directive_equals(SrsConfDirective* a, SrsConfDirective* b); | @@ -1148,3 +1132,4 @@ bool srs_directive_equals(SrsConfDirective* a, SrsConfDirective* b); | ||
| 1148 | extern SrsConfig* _srs_config; | 1132 | extern SrsConfig* _srs_config; |
| 1149 | 1133 | ||
| 1150 | #endif | 1134 | #endif |
| 1135 | + |
| @@ -30,6 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -30,6 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 30 | 30 | ||
| 31 | SrsConnection::SrsConnection(SrsServer* srs_server, st_netfd_t client_stfd) | 31 | SrsConnection::SrsConnection(SrsServer* srs_server, st_netfd_t client_stfd) |
| 32 | { | 32 | { |
| 33 | + id = 0; | ||
| 33 | server = srs_server; | 34 | server = srs_server; |
| 34 | stfd = client_stfd; | 35 | stfd = client_stfd; |
| 35 | 36 | ||
| @@ -55,6 +56,8 @@ int SrsConnection::cycle() | @@ -55,6 +56,8 @@ int SrsConnection::cycle() | ||
| 55 | int ret = ERROR_SUCCESS; | 56 | int ret = ERROR_SUCCESS; |
| 56 | 57 | ||
| 57 | _srs_context->generate_id(); | 58 | _srs_context->generate_id(); |
| 59 | + id = _srs_context->get_id(); | ||
| 60 | + | ||
| 58 | ip = srs_get_peer_ip(st_netfd_fileno(stfd)); | 61 | ip = srs_get_peer_ip(st_netfd_fileno(stfd)); |
| 59 | 62 | ||
| 60 | ret = do_cycle(); | 63 | ret = do_cycle(); |
| @@ -86,6 +89,11 @@ void SrsConnection::on_thread_stop() | @@ -86,6 +89,11 @@ void SrsConnection::on_thread_stop() | ||
| 86 | server->remove(this); | 89 | server->remove(this); |
| 87 | } | 90 | } |
| 88 | 91 | ||
| 92 | +int SrsConnection::srs_id() | ||
| 93 | +{ | ||
| 94 | + return id; | ||
| 95 | +} | ||
| 96 | + | ||
| 89 | void SrsConnection::stop() | 97 | void SrsConnection::stop() |
| 90 | { | 98 | { |
| 91 | srs_close_stfd(stfd); | 99 | srs_close_stfd(stfd); |
| @@ -51,6 +51,10 @@ private: | @@ -51,6 +51,10 @@ private: | ||
| 51 | * when thread stop, the connection will be delete by server. | 51 | * when thread stop, the connection will be delete by server. |
| 52 | */ | 52 | */ |
| 53 | SrsThread* pthread; | 53 | SrsThread* pthread; |
| 54 | + /** | ||
| 55 | + * the id of connection. | ||
| 56 | + */ | ||
| 57 | + int id; | ||
| 54 | protected: | 58 | protected: |
| 55 | /** | 59 | /** |
| 56 | * the server object to manage the connection. | 60 | * the server object to manage the connection. |
| @@ -92,13 +96,9 @@ public: | @@ -92,13 +96,9 @@ public: | ||
| 92 | virtual void on_thread_stop(); | 96 | virtual void on_thread_stop(); |
| 93 | public: | 97 | public: |
| 94 | /** | 98 | /** |
| 95 | - * when server to get the kbps of connection, | ||
| 96 | - * it cannot wait the connection terminated then get the kbps, | ||
| 97 | - * it must sample the kbps every some interval, for instance, 9s to sample all connections kbps, | ||
| 98 | - * all connections will extends from IKbpsDelta which provides the bytes delta, | ||
| 99 | - * while the delta must be update by the sample which invoke by the kbps_resample(). | 99 | + * get the srs id which identify the client. |
| 100 | */ | 100 | */ |
| 101 | - virtual void kbps_resample() = 0; | 101 | + virtual int srs_id(); |
| 102 | protected: | 102 | protected: |
| 103 | /** | 103 | /** |
| 104 | * for concrete connection to do the cycle. | 104 | * for concrete connection to do the cycle. |
| @@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 28 | #include <fcntl.h> | 28 | #include <fcntl.h> |
| 29 | #include <sstream> | 29 | #include <sstream> |
| 30 | #include <sys/time.h> | 30 | #include <sys/time.h> |
| 31 | +#include <algorithm> | ||
| 31 | using namespace std; | 32 | using namespace std; |
| 32 | 33 | ||
| 33 | #include <srs_app_config.hpp> | 34 | #include <srs_app_config.hpp> |
| @@ -54,7 +55,6 @@ using namespace std; | @@ -54,7 +55,6 @@ using namespace std; | ||
| 54 | SrsFlvSegment::SrsFlvSegment(SrsDvrPlan* p) | 55 | SrsFlvSegment::SrsFlvSegment(SrsDvrPlan* p) |
| 55 | { | 56 | { |
| 56 | req = NULL; | 57 | req = NULL; |
| 57 | - source = NULL; | ||
| 58 | jitter = NULL; | 58 | jitter = NULL; |
| 59 | plan = p; | 59 | plan = p; |
| 60 | 60 | ||
| @@ -85,11 +85,10 @@ SrsFlvSegment::~SrsFlvSegment() | @@ -85,11 +85,10 @@ SrsFlvSegment::~SrsFlvSegment() | ||
| 85 | srs_freep(enc); | 85 | srs_freep(enc); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | -int SrsFlvSegment::initialize(SrsSource* s, SrsRequest* r) | 88 | +int SrsFlvSegment::initialize(SrsRequest* r) |
| 89 | { | 89 | { |
| 90 | int ret = ERROR_SUCCESS; | 90 | int ret = ERROR_SUCCESS; |
| 91 | 91 | ||
| 92 | - source = s; | ||
| 93 | req = r; | 92 | req = r; |
| 94 | jitter_algorithm = (SrsRtmpJitterAlgorithm)_srs_config->get_dvr_time_jitter(req->vhost); | 93 | jitter_algorithm = (SrsRtmpJitterAlgorithm)_srs_config->get_dvr_time_jitter(req->vhost); |
| 95 | 94 | ||
| @@ -308,10 +307,10 @@ int SrsFlvSegment::write_video(SrsSharedPtrMessage* __video) | @@ -308,10 +307,10 @@ int SrsFlvSegment::write_video(SrsSharedPtrMessage* __video) | ||
| 308 | char* payload = video->payload; | 307 | char* payload = video->payload; |
| 309 | int size = video->size; | 308 | int size = video->size; |
| 310 | 309 | ||
| 310 | + bool is_sequence_header = SrsFlvCodec::video_is_sequence_header(payload, size); | ||
| 311 | #ifdef SRS_AUTO_HTTP_CALLBACK | 311 | #ifdef SRS_AUTO_HTTP_CALLBACK |
| 312 | bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size) | 312 | bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size) |
| 313 | - && SrsFlvCodec::video_is_keyframe(payload, size) | ||
| 314 | - && !SrsFlvCodec::video_is_sequence_header(payload, size); | 313 | + && SrsFlvCodec::video_is_keyframe(payload, size) && !is_sequence_header; |
| 315 | if (is_key_frame) { | 314 | if (is_key_frame) { |
| 316 | has_keyframe = true; | 315 | has_keyframe = true; |
| 317 | if ((ret = plan->on_video_keyframe()) != ERROR_SUCCESS) { | 316 | if ((ret = plan->on_video_keyframe()) != ERROR_SUCCESS) { |
| @@ -320,6 +319,16 @@ int SrsFlvSegment::write_video(SrsSharedPtrMessage* __video) | @@ -320,6 +319,16 @@ int SrsFlvSegment::write_video(SrsSharedPtrMessage* __video) | ||
| 320 | } | 319 | } |
| 321 | srs_verbose("dvr video is key: %d", is_key_frame); | 320 | srs_verbose("dvr video is key: %d", is_key_frame); |
| 322 | #endif | 321 | #endif |
| 322 | + | ||
| 323 | + // accept the sequence header here. | ||
| 324 | + // when got no keyframe, ignore when should wait keyframe. | ||
| 325 | + if (!has_keyframe && !is_sequence_header) { | ||
| 326 | + bool wait_keyframe = _srs_config->get_dvr_wait_keyframe(req->vhost); | ||
| 327 | + if (wait_keyframe) { | ||
| 328 | + srs_info("dvr: ignore when wait keyframe."); | ||
| 329 | + return ret; | ||
| 330 | + } | ||
| 331 | + } | ||
| 323 | 332 | ||
| 324 | if ((jitter->correct(video, 0, 0, jitter_algorithm)) != ERROR_SUCCESS) { | 333 | if ((jitter->correct(video, 0, 0, jitter_algorithm)) != ERROR_SUCCESS) { |
| 325 | return ret; | 334 | return ret; |
| @@ -617,48 +626,6 @@ string SrsDvrAsyncCallOnDvr::to_string() | @@ -617,48 +626,6 @@ string SrsDvrAsyncCallOnDvr::to_string() | ||
| 617 | return ss.str(); | 626 | return ss.str(); |
| 618 | } | 627 | } |
| 619 | 628 | ||
| 620 | -SrsDvrAsyncCallOnSegment::SrsDvrAsyncCallOnSegment(SrsRequest* r, string c, string p) | ||
| 621 | -{ | ||
| 622 | - req = r; | ||
| 623 | - callback = c; | ||
| 624 | - path = p; | ||
| 625 | -} | ||
| 626 | - | ||
| 627 | -SrsDvrAsyncCallOnSegment::~SrsDvrAsyncCallOnSegment() | ||
| 628 | -{ | ||
| 629 | -} | ||
| 630 | - | ||
| 631 | -int SrsDvrAsyncCallOnSegment::call() | ||
| 632 | -{ | ||
| 633 | - int ret = ERROR_SUCCESS; | ||
| 634 | - | ||
| 635 | -#ifdef SRS_AUTO_HTTP_CALLBACK | ||
| 636 | - // HTTP: callback | ||
| 637 | - if (callback.empty()) { | ||
| 638 | - srs_warn("dvr: ignore for callback empty, vhost=%s", req->vhost.c_str()); | ||
| 639 | - return ret; | ||
| 640 | - } | ||
| 641 | - | ||
| 642 | - int connection_id = _srs_context->get_id(); | ||
| 643 | - std::string cwd = _srs_config->cwd(); | ||
| 644 | - std::string file = path; | ||
| 645 | - std::string url = callback; | ||
| 646 | - if ((ret = SrsHttpHooks::on_dvr_reap_segment(url, connection_id, req, cwd, file)) != ERROR_SUCCESS) { | ||
| 647 | - srs_error("hook client on_dvr_reap_segment failed. url=%s, ret=%d", url.c_str(), ret); | ||
| 648 | - return ret; | ||
| 649 | - } | ||
| 650 | -#endif | ||
| 651 | - | ||
| 652 | - return ret; | ||
| 653 | -} | ||
| 654 | - | ||
| 655 | -string SrsDvrAsyncCallOnSegment::to_string() | ||
| 656 | -{ | ||
| 657 | - std::stringstream ss; | ||
| 658 | - ss << "vhost=" << req->vhost << ", file=" << path << "callback=" << callback; | ||
| 659 | - return ss.str(); | ||
| 660 | -} | ||
| 661 | - | ||
| 662 | SrsDvrAsyncCallThread::SrsDvrAsyncCallThread() | 629 | SrsDvrAsyncCallThread::SrsDvrAsyncCallThread() |
| 663 | { | 630 | { |
| 664 | pthread = new SrsThread("async", this, SRS_AUTO_ASYNC_CALLBACL_SLEEP_US, true); | 631 | pthread = new SrsThread("async", this, SRS_AUTO_ASYNC_CALLBACL_SLEEP_US, true); |
| @@ -717,7 +684,6 @@ int SrsDvrAsyncCallThread::cycle() | @@ -717,7 +684,6 @@ int SrsDvrAsyncCallThread::cycle() | ||
| 717 | 684 | ||
| 718 | SrsDvrPlan::SrsDvrPlan() | 685 | SrsDvrPlan::SrsDvrPlan() |
| 719 | { | 686 | { |
| 720 | - source = NULL; | ||
| 721 | req = NULL; | 687 | req = NULL; |
| 722 | 688 | ||
| 723 | dvr_enabled = false; | 689 | dvr_enabled = false; |
| @@ -731,14 +697,13 @@ SrsDvrPlan::~SrsDvrPlan() | @@ -731,14 +697,13 @@ SrsDvrPlan::~SrsDvrPlan() | ||
| 731 | srs_freep(async); | 697 | srs_freep(async); |
| 732 | } | 698 | } |
| 733 | 699 | ||
| 734 | -int SrsDvrPlan::initialize(SrsSource* s, SrsRequest* r) | 700 | +int SrsDvrPlan::initialize(SrsRequest* r) |
| 735 | { | 701 | { |
| 736 | int ret = ERROR_SUCCESS; | 702 | int ret = ERROR_SUCCESS; |
| 737 | - | ||
| 738 | - source = s; | 703 | + |
| 739 | req = r; | 704 | req = r; |
| 740 | 705 | ||
| 741 | - if ((ret = segment->initialize(s, r)) != ERROR_SUCCESS) { | 706 | + if ((ret = segment->initialize(r)) != ERROR_SUCCESS) { |
| 742 | return ret; | 707 | return ret; |
| 743 | } | 708 | } |
| 744 | 709 | ||
| @@ -749,18 +714,6 @@ int SrsDvrPlan::initialize(SrsSource* s, SrsRequest* r) | @@ -749,18 +714,6 @@ int SrsDvrPlan::initialize(SrsSource* s, SrsRequest* r) | ||
| 749 | return ret; | 714 | return ret; |
| 750 | } | 715 | } |
| 751 | 716 | ||
| 752 | -int SrsDvrPlan::on_dvr_request_sh() | ||
| 753 | -{ | ||
| 754 | - int ret = ERROR_SUCCESS; | ||
| 755 | - | ||
| 756 | - // the dvr is enabled, notice the source to push the data. | ||
| 757 | - if ((ret = source->on_dvr_request_sh()) != ERROR_SUCCESS) { | ||
| 758 | - return ret; | ||
| 759 | - } | ||
| 760 | - | ||
| 761 | - return ret; | ||
| 762 | -} | ||
| 763 | - | ||
| 764 | int SrsDvrPlan::on_video_keyframe() | 717 | int SrsDvrPlan::on_video_keyframe() |
| 765 | { | 718 | { |
| 766 | return ERROR_SUCCESS; | 719 | return ERROR_SUCCESS; |
| @@ -832,8 +785,6 @@ SrsDvrPlan* SrsDvrPlan::create_plan(string vhost) | @@ -832,8 +785,6 @@ SrsDvrPlan* SrsDvrPlan::create_plan(string vhost) | ||
| 832 | return new SrsDvrSessionPlan(); | 785 | return new SrsDvrSessionPlan(); |
| 833 | } else if (plan == SRS_CONF_DEFAULT_DVR_PLAN_APPEND) { | 786 | } else if (plan == SRS_CONF_DEFAULT_DVR_PLAN_APPEND) { |
| 834 | return new SrsDvrAppendPlan(); | 787 | return new SrsDvrAppendPlan(); |
| 835 | - } else if (plan == SRS_CONF_DEFAULT_DVR_PLAN_API) { | ||
| 836 | - return new SrsDvrApiPlan(); | ||
| 837 | } else { | 788 | } else { |
| 838 | srs_error("invalid dvr plan=%s, vhost=%s", plan.c_str(), vhost.c_str()); | 789 | srs_error("invalid dvr plan=%s, vhost=%s", plan.c_str(), vhost.c_str()); |
| 839 | srs_assert(false); | 790 | srs_assert(false); |
| @@ -890,320 +841,6 @@ void SrsDvrSessionPlan::on_unpublish() | @@ -890,320 +841,6 @@ void SrsDvrSessionPlan::on_unpublish() | ||
| 890 | dvr_enabled = false; | 841 | dvr_enabled = false; |
| 891 | } | 842 | } |
| 892 | 843 | ||
| 893 | -SrsDvrApiPlan::SrsDvrApiPlan() | ||
| 894 | -{ | ||
| 895 | - autostart = false; | ||
| 896 | - started = false; | ||
| 897 | - | ||
| 898 | - metadata = sh_audio = sh_video = NULL; | ||
| 899 | -} | ||
| 900 | - | ||
| 901 | -SrsDvrApiPlan::~SrsDvrApiPlan() | ||
| 902 | -{ | ||
| 903 | - srs_freep(metadata); | ||
| 904 | - srs_freep(sh_audio); | ||
| 905 | - srs_freep(sh_video); | ||
| 906 | -} | ||
| 907 | - | ||
| 908 | -int SrsDvrApiPlan::initialize(SrsSource* s, SrsRequest* r) | ||
| 909 | -{ | ||
| 910 | - int ret = ERROR_SUCCESS; | ||
| 911 | - | ||
| 912 | - if ((ret = SrsDvrPlan::initialize(s, r)) != ERROR_SUCCESS) { | ||
| 913 | - return ret; | ||
| 914 | - } | ||
| 915 | - | ||
| 916 | - SrsApiDvrPool* pool = SrsApiDvrPool::instance(); | ||
| 917 | - if ((ret = pool->add_dvr(this)) != ERROR_SUCCESS) { | ||
| 918 | - return ret; | ||
| 919 | - } | ||
| 920 | - | ||
| 921 | - autostart = _srs_config->get_dvr_autostart(r->vhost); | ||
| 922 | - | ||
| 923 | - return ret; | ||
| 924 | -} | ||
| 925 | - | ||
| 926 | -int SrsDvrApiPlan::on_publish() | ||
| 927 | -{ | ||
| 928 | - int ret = ERROR_SUCCESS; | ||
| 929 | - | ||
| 930 | - // support multiple publish. | ||
| 931 | - if (dvr_enabled) { | ||
| 932 | - return ret; | ||
| 933 | - } | ||
| 934 | - | ||
| 935 | - if (!_srs_config->get_dvr_enabled(req->vhost)) { | ||
| 936 | - return ret; | ||
| 937 | - } | ||
| 938 | - | ||
| 939 | - // api disabled dvr when not autostart. | ||
| 940 | - bool autostart = _srs_config->get_dvr_autostart(req->vhost); | ||
| 941 | - if (!autostart && !started) { | ||
| 942 | - srs_warn("dvr: api not start and disabled for not autostart."); | ||
| 943 | - return ret; | ||
| 944 | - } | ||
| 945 | - | ||
| 946 | - dvr_enabled = true; | ||
| 947 | - | ||
| 948 | - if ((ret = segment->close()) != ERROR_SUCCESS) { | ||
| 949 | - return ret; | ||
| 950 | - } | ||
| 951 | - | ||
| 952 | - if ((ret = segment->open()) != ERROR_SUCCESS) { | ||
| 953 | - return ret; | ||
| 954 | - } | ||
| 955 | - | ||
| 956 | - // update sequence header | ||
| 957 | - if (metadata && (ret = SrsDvrPlan::on_meta_data(metadata)) != ERROR_SUCCESS) { | ||
| 958 | - return ret; | ||
| 959 | - } | ||
| 960 | - if (sh_video && (ret = SrsDvrPlan::on_video(sh_video)) != ERROR_SUCCESS) { | ||
| 961 | - return ret; | ||
| 962 | - } | ||
| 963 | - if (sh_audio && (ret = SrsDvrPlan::on_audio(sh_audio)) != ERROR_SUCCESS) { | ||
| 964 | - return ret; | ||
| 965 | - } | ||
| 966 | - | ||
| 967 | - return ret; | ||
| 968 | -} | ||
| 969 | - | ||
| 970 | -void SrsDvrApiPlan::on_unpublish() | ||
| 971 | -{ | ||
| 972 | -} | ||
| 973 | - | ||
| 974 | -int SrsDvrApiPlan::on_meta_data(SrsSharedPtrMessage* __metadata) | ||
| 975 | -{ | ||
| 976 | - int ret = ERROR_SUCCESS; | ||
| 977 | - | ||
| 978 | - srs_freep(metadata); | ||
| 979 | - metadata = __metadata->copy(); | ||
| 980 | - | ||
| 981 | - return ret; | ||
| 982 | -} | ||
| 983 | - | ||
| 984 | -int SrsDvrApiPlan::on_audio(SrsSharedPtrMessage* __audio) | ||
| 985 | -{ | ||
| 986 | - int ret = ERROR_SUCCESS; | ||
| 987 | - | ||
| 988 | - if (SrsFlvCodec::audio_is_sequence_header(__audio->payload, __audio->size)) { | ||
| 989 | - srs_freep(sh_audio); | ||
| 990 | - sh_audio = __audio->copy(); | ||
| 991 | - } | ||
| 992 | - | ||
| 993 | - if ((ret = SrsDvrPlan::on_audio(__audio)) != ERROR_SUCCESS) { | ||
| 994 | - return ret; | ||
| 995 | - } | ||
| 996 | - | ||
| 997 | - return ret; | ||
| 998 | -} | ||
| 999 | - | ||
| 1000 | -int SrsDvrApiPlan::on_video(SrsSharedPtrMessage* __video) | ||
| 1001 | -{ | ||
| 1002 | - int ret = ERROR_SUCCESS; | ||
| 1003 | - | ||
| 1004 | - if (SrsFlvCodec::video_is_sequence_header(__video->payload, __video->size)) { | ||
| 1005 | - srs_freep(sh_video); | ||
| 1006 | - sh_video = __video->copy(); | ||
| 1007 | - } | ||
| 1008 | - | ||
| 1009 | - if ((ret = check_user_actions(__video)) != ERROR_SUCCESS) { | ||
| 1010 | - return ret; | ||
| 1011 | - } | ||
| 1012 | - | ||
| 1013 | - if ((ret = SrsDvrPlan::on_video(__video)) != ERROR_SUCCESS) { | ||
| 1014 | - return ret; | ||
| 1015 | - } | ||
| 1016 | - | ||
| 1017 | - return ret; | ||
| 1018 | -} | ||
| 1019 | - | ||
| 1020 | -int SrsDvrApiPlan::set_path_tmpl(string path_tmpl) | ||
| 1021 | -{ | ||
| 1022 | - _srs_config->set_dvr_path(req->vhost, path_tmpl); | ||
| 1023 | - return ERROR_SUCCESS; | ||
| 1024 | -} | ||
| 1025 | - | ||
| 1026 | -int SrsDvrApiPlan::set_callback(string value) | ||
| 1027 | -{ | ||
| 1028 | - callback = value; | ||
| 1029 | - return ERROR_SUCCESS; | ||
| 1030 | -} | ||
| 1031 | - | ||
| 1032 | -int SrsDvrApiPlan::set_wait_keyframe(bool wait_keyframe) | ||
| 1033 | -{ | ||
| 1034 | - _srs_config->set_dvr_wait_keyframe(req->vhost, wait_keyframe); | ||
| 1035 | - return ERROR_SUCCESS; | ||
| 1036 | -} | ||
| 1037 | - | ||
| 1038 | -int SrsDvrApiPlan::start() | ||
| 1039 | -{ | ||
| 1040 | - int ret = ERROR_SUCCESS; | ||
| 1041 | - | ||
| 1042 | - if (started) { | ||
| 1043 | - return ret; | ||
| 1044 | - } | ||
| 1045 | - | ||
| 1046 | - // enable the config. | ||
| 1047 | - _srs_config->set_dvr_enabled(req->vhost, true); | ||
| 1048 | - | ||
| 1049 | - // stop dvr | ||
| 1050 | - if (dvr_enabled) { | ||
| 1051 | - // ignore error. | ||
| 1052 | - int ret = segment->close(); | ||
| 1053 | - if (ret != ERROR_SUCCESS) { | ||
| 1054 | - srs_warn("ignore flv close error. ret=%d", ret); | ||
| 1055 | - } | ||
| 1056 | - | ||
| 1057 | - dvr_enabled = false; | ||
| 1058 | - } | ||
| 1059 | - | ||
| 1060 | - // start dvr | ||
| 1061 | - if ((ret = on_publish()) != ERROR_SUCCESS) { | ||
| 1062 | - return ret; | ||
| 1063 | - } | ||
| 1064 | - | ||
| 1065 | - started = true; | ||
| 1066 | - return ret; | ||
| 1067 | -} | ||
| 1068 | - | ||
| 1069 | -int SrsDvrApiPlan::dumps(stringstream& ss) | ||
| 1070 | -{ | ||
| 1071 | - int ret = ERROR_SUCCESS; | ||
| 1072 | - | ||
| 1073 | - bool wait_keyframe = _srs_config->get_dvr_wait_keyframe(req->vhost); | ||
| 1074 | - std::string path_template = _srs_config->get_dvr_path(req->vhost); | ||
| 1075 | - | ||
| 1076 | - ss << __SRS_JOBJECT_START | ||
| 1077 | - << __SRS_JFIELD_STR("path_tmpl", path_template) << __SRS_JFIELD_CONT | ||
| 1078 | - << __SRS_JFIELD_STR("path_dvr", segment->get_path()) << __SRS_JFIELD_CONT | ||
| 1079 | - << __SRS_JFIELD_BOOL("wait_keyframe", wait_keyframe) << __SRS_JFIELD_CONT | ||
| 1080 | - << __SRS_JFIELD_STR("vhost", req->vhost) << __SRS_JFIELD_CONT | ||
| 1081 | - << __SRS_JFIELD_STR("callback", callback) << __SRS_JFIELD_CONT | ||
| 1082 | - << __SRS_JFIELD_STR("status", (dvr_enabled? "start":"stop")) | ||
| 1083 | - << __SRS_JOBJECT_END; | ||
| 1084 | - | ||
| 1085 | - return ret; | ||
| 1086 | -} | ||
| 1087 | - | ||
| 1088 | -int SrsDvrApiPlan::stop() | ||
| 1089 | -{ | ||
| 1090 | - int ret = ERROR_SUCCESS; | ||
| 1091 | - | ||
| 1092 | - _srs_config->set_dvr_enabled(req->vhost, false); | ||
| 1093 | - started = false; | ||
| 1094 | - | ||
| 1095 | - // stop dvr | ||
| 1096 | - if (dvr_enabled) { | ||
| 1097 | - // ignore error. | ||
| 1098 | - int ret = segment->close(); | ||
| 1099 | - if (ret != ERROR_SUCCESS) { | ||
| 1100 | - srs_warn("ignore flv close error. ret=%d", ret); | ||
| 1101 | - } | ||
| 1102 | - | ||
| 1103 | - dvr_enabled = false; | ||
| 1104 | - } | ||
| 1105 | - | ||
| 1106 | - srs_trace("dvr: stop dvr of vhost=%s", req->vhost.c_str()); | ||
| 1107 | - | ||
| 1108 | - return ret; | ||
| 1109 | -} | ||
| 1110 | - | ||
| 1111 | -int SrsDvrApiPlan::rpc(SrsJsonObject* obj) | ||
| 1112 | -{ | ||
| 1113 | - int ret = ERROR_SUCCESS; | ||
| 1114 | - | ||
| 1115 | - SrsJsonAny* prop = NULL; | ||
| 1116 | - if ((prop = obj->ensure_property_string("action")) == NULL) { | ||
| 1117 | - ret = ERROR_HTTP_DVR_REQUEST; | ||
| 1118 | - srs_error("dvr: rpc required action request. ret=%d", ret); | ||
| 1119 | - return ret; | ||
| 1120 | - } | ||
| 1121 | - | ||
| 1122 | - action = prop->to_str(); | ||
| 1123 | - if (action == SRS_DVR_USER_ACTION_REAP_SEGMENT) { | ||
| 1124 | - if ((prop = obj->ensure_property_string("path_tmpl")) != NULL) { | ||
| 1125 | - path_template = prop->to_str(); | ||
| 1126 | - } | ||
| 1127 | - } else { | ||
| 1128 | - ret = ERROR_HTTP_DVR_REQUEST; | ||
| 1129 | - } | ||
| 1130 | - | ||
| 1131 | - return ret; | ||
| 1132 | -} | ||
| 1133 | - | ||
| 1134 | -int SrsDvrApiPlan::on_reap_segment() | ||
| 1135 | -{ | ||
| 1136 | - int ret = ERROR_SUCCESS; | ||
| 1137 | - | ||
| 1138 | - if ((ret = SrsDvrPlan::on_reap_segment()) != ERROR_SUCCESS) { | ||
| 1139 | - return ret; | ||
| 1140 | - } | ||
| 1141 | - | ||
| 1142 | - if ((ret = async->call(new SrsDvrAsyncCallOnSegment(req, callback, segment->get_path()))) != ERROR_SUCCESS) { | ||
| 1143 | - return ret; | ||
| 1144 | - } | ||
| 1145 | - | ||
| 1146 | - return ret; | ||
| 1147 | -} | ||
| 1148 | - | ||
| 1149 | -int SrsDvrApiPlan::check_user_actions(SrsSharedPtrMessage* msg) | ||
| 1150 | -{ | ||
| 1151 | - int ret = ERROR_SUCCESS; | ||
| 1152 | - | ||
| 1153 | - srs_assert(segment); | ||
| 1154 | - | ||
| 1155 | - if (action == SRS_DVR_USER_ACTION_REAP_SEGMENT) { | ||
| 1156 | - // when wait keyframe, ignore if no frame arrived. | ||
| 1157 | - // @see https://github.com/winlinvip/simple-rtmp-server/issues/177 | ||
| 1158 | - if (_srs_config->get_dvr_wait_keyframe(req->vhost)) { | ||
| 1159 | - if (!msg->is_video()) { | ||
| 1160 | - return ret; | ||
| 1161 | - } | ||
| 1162 | - | ||
| 1163 | - char* payload = msg->payload; | ||
| 1164 | - int size = msg->size; | ||
| 1165 | - bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size) | ||
| 1166 | - && SrsFlvCodec::video_is_keyframe(payload, size) | ||
| 1167 | - && !SrsFlvCodec::video_is_sequence_header(payload, size); | ||
| 1168 | - if (!is_key_frame) { | ||
| 1169 | - return ret; | ||
| 1170 | - } | ||
| 1171 | - } | ||
| 1172 | - | ||
| 1173 | - // reap segment | ||
| 1174 | - if ((ret = segment->close()) != ERROR_SUCCESS) { | ||
| 1175 | - return ret; | ||
| 1176 | - } | ||
| 1177 | - | ||
| 1178 | - // use new path template if user specified. | ||
| 1179 | - if (!path_template.empty() && (ret = set_path_tmpl(path_template)) != ERROR_SUCCESS) { | ||
| 1180 | - return ret; | ||
| 1181 | - } | ||
| 1182 | - | ||
| 1183 | - // open new flv file | ||
| 1184 | - if ((ret = segment->open()) != ERROR_SUCCESS) { | ||
| 1185 | - return ret; | ||
| 1186 | - } | ||
| 1187 | - | ||
| 1188 | - // update sequence header | ||
| 1189 | - if (metadata && (ret = SrsDvrPlan::on_meta_data(metadata)) != ERROR_SUCCESS) { | ||
| 1190 | - return ret; | ||
| 1191 | - } | ||
| 1192 | - if (sh_video && (ret = SrsDvrPlan::on_video(sh_video)) != ERROR_SUCCESS) { | ||
| 1193 | - return ret; | ||
| 1194 | - } | ||
| 1195 | - if (sh_audio && (ret = SrsDvrPlan::on_audio(sh_audio)) != ERROR_SUCCESS) { | ||
| 1196 | - return ret; | ||
| 1197 | - } | ||
| 1198 | - } | ||
| 1199 | - | ||
| 1200 | - // reset rcp params. | ||
| 1201 | - action = ""; | ||
| 1202 | - path_template = ""; | ||
| 1203 | - | ||
| 1204 | - return ret; | ||
| 1205 | -} | ||
| 1206 | - | ||
| 1207 | SrsDvrAppendPlan::SrsDvrAppendPlan() | 844 | SrsDvrAppendPlan::SrsDvrAppendPlan() |
| 1208 | { | 845 | { |
| 1209 | last_update_time = 0; | 846 | last_update_time = 0; |
| @@ -1309,11 +946,11 @@ SrsDvrSegmentPlan::~SrsDvrSegmentPlan() | @@ -1309,11 +946,11 @@ SrsDvrSegmentPlan::~SrsDvrSegmentPlan() | ||
| 1309 | srs_freep(metadata); | 946 | srs_freep(metadata); |
| 1310 | } | 947 | } |
| 1311 | 948 | ||
| 1312 | -int SrsDvrSegmentPlan::initialize(SrsSource* source, SrsRequest* req) | 949 | +int SrsDvrSegmentPlan::initialize(SrsRequest* req) |
| 1313 | { | 950 | { |
| 1314 | int ret = ERROR_SUCCESS; | 951 | int ret = ERROR_SUCCESS; |
| 1315 | 952 | ||
| 1316 | - if ((ret = SrsDvrPlan::initialize(source, req)) != ERROR_SUCCESS) { | 953 | + if ((ret = SrsDvrPlan::initialize(req)) != ERROR_SUCCESS) { |
| 1317 | return ret; | 954 | return ret; |
| 1318 | } | 955 | } |
| 1319 | 956 | ||
| @@ -1460,183 +1097,9 @@ int SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg) | @@ -1460,183 +1097,9 @@ int SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg) | ||
| 1460 | return ret; | 1097 | return ret; |
| 1461 | } | 1098 | } |
| 1462 | 1099 | ||
| 1463 | -SrsApiDvrPool* SrsApiDvrPool::_instance = new SrsApiDvrPool(); | ||
| 1464 | - | ||
| 1465 | -SrsApiDvrPool* SrsApiDvrPool::instance() | ||
| 1466 | -{ | ||
| 1467 | - return SrsApiDvrPool::_instance; | ||
| 1468 | -} | ||
| 1469 | - | ||
| 1470 | -SrsApiDvrPool::SrsApiDvrPool() | ||
| 1471 | -{ | ||
| 1472 | -} | ||
| 1473 | - | ||
| 1474 | -SrsApiDvrPool::~SrsApiDvrPool() | ||
| 1475 | -{ | ||
| 1476 | - dvrs.clear(); | ||
| 1477 | -} | ||
| 1478 | - | ||
| 1479 | -int SrsApiDvrPool::add_dvr(SrsDvrApiPlan* dvr) | ||
| 1480 | -{ | ||
| 1481 | - dvrs.push_back(dvr); | ||
| 1482 | - return ERROR_SUCCESS; | ||
| 1483 | -} | ||
| 1484 | - | ||
| 1485 | -int SrsApiDvrPool::dumps(string vhost, stringstream& ss) | ||
| 1486 | -{ | ||
| 1487 | - int ret = ERROR_SUCCESS; | ||
| 1488 | - | ||
| 1489 | - ss << __SRS_JARRAY_START; | ||
| 1490 | - | ||
| 1491 | - std::vector<SrsDvrApiPlan*> plans; | ||
| 1492 | - for (int i = 0; i < (int)dvrs.size(); i++) { | ||
| 1493 | - SrsDvrApiPlan* plan = dvrs.at(i); | ||
| 1494 | - if (!vhost.empty() && plan->req->vhost != vhost) { | ||
| 1495 | - continue; | ||
| 1496 | - } | ||
| 1497 | - plans.push_back(plan); | ||
| 1498 | - } | ||
| 1499 | - | ||
| 1500 | - for (int i = 0; i < (int)plans.size(); i++) { | ||
| 1501 | - SrsDvrApiPlan* plan = plans.at(i); | ||
| 1502 | - | ||
| 1503 | - if ((ret = plan->dumps(ss)) != ERROR_SUCCESS) { | ||
| 1504 | - return ret; | ||
| 1505 | - } | ||
| 1506 | - | ||
| 1507 | - if (i < (int)dvrs.size() - 1) { | ||
| 1508 | - ss << __SRS_JFIELD_CONT; | ||
| 1509 | - } | ||
| 1510 | - } | ||
| 1511 | - | ||
| 1512 | - ss << __SRS_JARRAY_END; | ||
| 1513 | - | ||
| 1514 | - return ret; | ||
| 1515 | -} | ||
| 1516 | - | ||
| 1517 | -int SrsApiDvrPool::create(SrsJsonAny* json) | ||
| 1518 | -{ | ||
| 1519 | - int ret = ERROR_SUCCESS; | ||
| 1520 | - | ||
| 1521 | - srs_assert(json); | ||
| 1522 | - if (!json->is_object()) { | ||
| 1523 | - ret = ERROR_HTTP_DVR_CREATE_REQUEST; | ||
| 1524 | - srs_error("dvr: api create dvr request requires json object. ret=%d", ret); | ||
| 1525 | - return ret; | ||
| 1526 | - } | ||
| 1527 | - | ||
| 1528 | - SrsJsonObject* obj = json->to_object(); | ||
| 1529 | - SrsJsonAny* prop = NULL; | ||
| 1530 | - if ((prop = obj->ensure_property_string("vhost")) == NULL) { | ||
| 1531 | - ret = ERROR_HTTP_DVR_CREATE_REQUEST; | ||
| 1532 | - srs_error("dvr: api create dvr request requires vhost. ret=%d", ret); | ||
| 1533 | - return ret; | ||
| 1534 | - } | ||
| 1535 | - | ||
| 1536 | - std::string vhost = prop->to_str(); | ||
| 1537 | - SrsDvrApiPlan* dvr = NULL; | ||
| 1538 | - for (int i = 0; i < (int)dvrs.size(); i++) { | ||
| 1539 | - SrsDvrApiPlan* plan = dvrs.at(i); | ||
| 1540 | - if (!vhost.empty() && plan->req->vhost != vhost) { | ||
| 1541 | - continue; | ||
| 1542 | - } | ||
| 1543 | - dvr = plan; | ||
| 1544 | - break; | ||
| 1545 | - } | ||
| 1546 | - | ||
| 1547 | - if (!dvr) { | ||
| 1548 | - ret = ERROR_HTTP_DVR_CREATE_REQUEST; | ||
| 1549 | - srs_error("dvr: api create dvr request vhost invalid. vhost=%s. ret=%d", vhost.c_str(), ret); | ||
| 1550 | - return ret; | ||
| 1551 | - } | ||
| 1552 | - | ||
| 1553 | - // update optional parameters for plan. | ||
| 1554 | - if ((prop = obj->ensure_property_string("path_tmpl")) != NULL) { | ||
| 1555 | - if ((ret = dvr->set_path_tmpl(prop->to_str())) != ERROR_SUCCESS) { | ||
| 1556 | - return ret; | ||
| 1557 | - } | ||
| 1558 | - } | ||
| 1559 | - if ((prop = obj->ensure_property_boolean("wait_keyframe")) != NULL) { | ||
| 1560 | - if ((ret = dvr->set_wait_keyframe(prop->to_boolean())) != ERROR_SUCCESS) { | ||
| 1561 | - return ret; | ||
| 1562 | - } | ||
| 1563 | - } | ||
| 1564 | - if ((prop = obj->ensure_property_string("callback")) != NULL) { | ||
| 1565 | - if ((ret = dvr->set_callback(prop->to_str())) != ERROR_SUCCESS) { | ||
| 1566 | - return ret; | ||
| 1567 | - } | ||
| 1568 | - } | ||
| 1569 | - | ||
| 1570 | - return dvr->start(); | ||
| 1571 | -} | ||
| 1572 | - | ||
| 1573 | -int SrsApiDvrPool::stop(string vhost) | ||
| 1574 | -{ | ||
| 1575 | - int ret = ERROR_SUCCESS; | ||
| 1576 | - | ||
| 1577 | - std::vector<SrsDvrApiPlan*> plans; | ||
| 1578 | - for (int i = 0; i < (int)dvrs.size(); i++) { | ||
| 1579 | - SrsDvrApiPlan* plan = dvrs.at(i); | ||
| 1580 | - if (!vhost.empty() && plan->req->vhost != vhost) { | ||
| 1581 | - continue; | ||
| 1582 | - } | ||
| 1583 | - plans.push_back(plan); | ||
| 1584 | - } | ||
| 1585 | - | ||
| 1586 | - for (int i = 0; i < (int)plans.size(); i++) { | ||
| 1587 | - SrsDvrApiPlan* plan = plans.at(i); | ||
| 1588 | - | ||
| 1589 | - if ((ret = plan->stop()) != ERROR_SUCCESS) { | ||
| 1590 | - return ret; | ||
| 1591 | - } | ||
| 1592 | - } | ||
| 1593 | - | ||
| 1594 | - return ret; | ||
| 1595 | -} | ||
| 1596 | - | ||
| 1597 | -int SrsApiDvrPool::rpc(SrsJsonAny* json) | 1100 | +SrsDvr::SrsDvr() |
| 1598 | { | 1101 | { |
| 1599 | - int ret = ERROR_SUCCESS; | ||
| 1600 | - | ||
| 1601 | - if (!json->is_object()) { | ||
| 1602 | - ret = ERROR_HTTP_DVR_REQUEST; | ||
| 1603 | - srs_error("dvr: rpc required object request. ret=%d", ret); | ||
| 1604 | - return ret; | ||
| 1605 | - } | ||
| 1606 | - | ||
| 1607 | - SrsJsonObject* obj = json->to_object(); | ||
| 1608 | - | ||
| 1609 | - SrsJsonAny* prop = NULL; | ||
| 1610 | - if ((prop = obj->ensure_property_string("vhost")) == NULL) { | ||
| 1611 | - ret = ERROR_HTTP_DVR_REQUEST; | ||
| 1612 | - srs_error("dvr: rpc required vhost request. ret=%d", ret); | ||
| 1613 | - return ret; | ||
| 1614 | - } | ||
| 1615 | - std::string vhost = prop->to_str(); | ||
| 1616 | - | ||
| 1617 | - std::vector<SrsDvrApiPlan*> plans; | ||
| 1618 | - for (int i = 0; i < (int)dvrs.size(); i++) { | ||
| 1619 | - SrsDvrApiPlan* plan = dvrs.at(i); | ||
| 1620 | - if (!vhost.empty() && plan->req->vhost != vhost) { | ||
| 1621 | - continue; | ||
| 1622 | - } | ||
| 1623 | - plans.push_back(plan); | ||
| 1624 | - } | ||
| 1625 | - | ||
| 1626 | - for (int i = 0; i < (int)plans.size(); i++) { | ||
| 1627 | - SrsDvrApiPlan* plan = plans.at(i); | ||
| 1628 | - | ||
| 1629 | - if ((ret = plan->rpc(obj)) != ERROR_SUCCESS) { | ||
| 1630 | - return ret; | ||
| 1631 | - } | ||
| 1632 | - } | ||
| 1633 | - | ||
| 1634 | - return ret; | ||
| 1635 | -} | ||
| 1636 | - | ||
| 1637 | -SrsDvr::SrsDvr(SrsSource* s) | ||
| 1638 | -{ | ||
| 1639 | - source = s; | 1102 | + source = NULL; |
| 1640 | plan = NULL; | 1103 | plan = NULL; |
| 1641 | } | 1104 | } |
| 1642 | 1105 | ||
| @@ -1645,14 +1108,20 @@ SrsDvr::~SrsDvr() | @@ -1645,14 +1108,20 @@ SrsDvr::~SrsDvr() | ||
| 1645 | srs_freep(plan); | 1108 | srs_freep(plan); |
| 1646 | } | 1109 | } |
| 1647 | 1110 | ||
| 1648 | -int SrsDvr::initialize(SrsRequest* r) | 1111 | +int SrsDvr::initialize(SrsSource* s, SrsRequest* r) |
| 1649 | { | 1112 | { |
| 1650 | int ret = ERROR_SUCCESS; | 1113 | int ret = ERROR_SUCCESS; |
| 1114 | + | ||
| 1115 | + source = s; | ||
| 1651 | 1116 | ||
| 1652 | srs_freep(plan); | 1117 | srs_freep(plan); |
| 1653 | plan = SrsDvrPlan::create_plan(r->vhost); | 1118 | plan = SrsDvrPlan::create_plan(r->vhost); |
| 1654 | 1119 | ||
| 1655 | - if ((ret = plan->initialize(source, r)) != ERROR_SUCCESS) { | 1120 | + if ((ret = plan->initialize(r)) != ERROR_SUCCESS) { |
| 1121 | + return ret; | ||
| 1122 | + } | ||
| 1123 | + | ||
| 1124 | + if ((ret = source->on_dvr_request_sh()) != ERROR_SUCCESS) { | ||
| 1656 | return ret; | 1125 | return ret; |
| 1657 | } | 1126 | } |
| 1658 | 1127 | ||
| @@ -1675,6 +1144,7 @@ void SrsDvr::on_unpublish() | @@ -1675,6 +1144,7 @@ void SrsDvr::on_unpublish() | ||
| 1675 | plan->on_unpublish(); | 1144 | plan->on_unpublish(); |
| 1676 | } | 1145 | } |
| 1677 | 1146 | ||
| 1147 | +// TODO: FIXME: source should use shared message instead. | ||
| 1678 | int SrsDvr::on_meta_data(SrsOnMetaDataPacket* m) | 1148 | int SrsDvr::on_meta_data(SrsOnMetaDataPacket* m) |
| 1679 | { | 1149 | { |
| 1680 | int ret = ERROR_SUCCESS; | 1150 | int ret = ERROR_SUCCESS; |
| @@ -58,7 +58,6 @@ class SrsThread; | @@ -58,7 +58,6 @@ class SrsThread; | ||
| 58 | class SrsFlvSegment : public ISrsReloadHandler | 58 | class SrsFlvSegment : public ISrsReloadHandler |
| 59 | { | 59 | { |
| 60 | private: | 60 | private: |
| 61 | - SrsSource* source; | ||
| 62 | SrsRequest* req; | 61 | SrsRequest* req; |
| 63 | SrsDvrPlan* plan; | 62 | SrsDvrPlan* plan; |
| 64 | private: | 63 | private: |
| @@ -121,7 +120,7 @@ public: | @@ -121,7 +120,7 @@ public: | ||
| 121 | /** | 120 | /** |
| 122 | * initialize the segment. | 121 | * initialize the segment. |
| 123 | */ | 122 | */ |
| 124 | - virtual int initialize(SrsSource* s, SrsRequest* r); | 123 | + virtual int initialize(SrsRequest* r); |
| 125 | /** | 124 | /** |
| 126 | * whether segment is overflow. | 125 | * whether segment is overflow. |
| 127 | */ | 126 | */ |
| @@ -200,19 +199,6 @@ public: | @@ -200,19 +199,6 @@ public: | ||
| 200 | virtual int call(); | 199 | virtual int call(); |
| 201 | virtual std::string to_string(); | 200 | virtual std::string to_string(); |
| 202 | }; | 201 | }; |
| 203 | -class SrsDvrAsyncCallOnSegment : public ISrsDvrAsyncCall | ||
| 204 | -{ | ||
| 205 | -private: | ||
| 206 | - std::string callback; | ||
| 207 | - std::string path; | ||
| 208 | - SrsRequest* req; | ||
| 209 | -public: | ||
| 210 | - SrsDvrAsyncCallOnSegment(SrsRequest* r, std::string c, std::string p); | ||
| 211 | - virtual ~SrsDvrAsyncCallOnSegment(); | ||
| 212 | -public: | ||
| 213 | - virtual int call(); | ||
| 214 | - virtual std::string to_string(); | ||
| 215 | -}; | ||
| 216 | 202 | ||
| 217 | /** | 203 | /** |
| 218 | * the async callback for dvr. | 204 | * the async callback for dvr. |
| @@ -247,7 +233,6 @@ public: | @@ -247,7 +233,6 @@ public: | ||
| 247 | public: | 233 | public: |
| 248 | SrsRequest* req; | 234 | SrsRequest* req; |
| 249 | protected: | 235 | protected: |
| 250 | - SrsSource* source; | ||
| 251 | SrsFlvSegment* segment; | 236 | SrsFlvSegment* segment; |
| 252 | SrsDvrAsyncCallThread* async; | 237 | SrsDvrAsyncCallThread* async; |
| 253 | bool dvr_enabled; | 238 | bool dvr_enabled; |
| @@ -255,7 +240,7 @@ public: | @@ -255,7 +240,7 @@ public: | ||
| 255 | SrsDvrPlan(); | 240 | SrsDvrPlan(); |
| 256 | virtual ~SrsDvrPlan(); | 241 | virtual ~SrsDvrPlan(); |
| 257 | public: | 242 | public: |
| 258 | - virtual int initialize(SrsSource* s, SrsRequest* r); | 243 | + virtual int initialize(SrsRequest* r); |
| 259 | virtual int on_publish() = 0; | 244 | virtual int on_publish() = 0; |
| 260 | virtual void on_unpublish() = 0; | 245 | virtual void on_unpublish() = 0; |
| 261 | /** | 246 | /** |
| @@ -272,7 +257,6 @@ public: | @@ -272,7 +257,6 @@ public: | ||
| 272 | virtual int on_video(SrsSharedPtrMessage* __video); | 257 | virtual int on_video(SrsSharedPtrMessage* __video); |
| 273 | protected: | 258 | protected: |
| 274 | virtual int on_reap_segment(); | 259 | virtual int on_reap_segment(); |
| 275 | - virtual int on_dvr_request_sh(); | ||
| 276 | virtual int on_video_keyframe(); | 260 | virtual int on_video_keyframe(); |
| 277 | virtual int64_t filter_timestamp(int64_t timestamp); | 261 | virtual int64_t filter_timestamp(int64_t timestamp); |
| 278 | public: | 262 | public: |
| @@ -293,48 +277,6 @@ public: | @@ -293,48 +277,6 @@ public: | ||
| 293 | }; | 277 | }; |
| 294 | 278 | ||
| 295 | /** | 279 | /** |
| 296 | -* api plan: reap flv by api. | ||
| 297 | -*/ | ||
| 298 | -class SrsDvrApiPlan : public SrsDvrPlan | ||
| 299 | -{ | ||
| 300 | -private: | ||
| 301 | - // cache the metadata and sequence header, for new segment maybe opened. | ||
| 302 | - SrsSharedPtrMessage* sh_audio; | ||
| 303 | - SrsSharedPtrMessage* sh_video; | ||
| 304 | - SrsSharedPtrMessage* metadata; | ||
| 305 | -private: | ||
| 306 | - std::string callback; | ||
| 307 | - bool autostart; | ||
| 308 | - bool started; | ||
| 309 | -private: | ||
| 310 | - // user action, reap_segment. | ||
| 311 | - std::string action; | ||
| 312 | - std::string path_template; | ||
| 313 | -public: | ||
| 314 | - SrsDvrApiPlan(); | ||
| 315 | - virtual ~SrsDvrApiPlan(); | ||
| 316 | -public: | ||
| 317 | - virtual int initialize(SrsSource* s, SrsRequest* r); | ||
| 318 | - virtual int on_publish(); | ||
| 319 | - virtual void on_unpublish(); | ||
| 320 | - virtual int on_meta_data(SrsSharedPtrMessage* __metadata); | ||
| 321 | - virtual int on_audio(SrsSharedPtrMessage* __audio); | ||
| 322 | - virtual int on_video(SrsSharedPtrMessage* __video); | ||
| 323 | -public: | ||
| 324 | - virtual int set_path_tmpl(std::string path_tmpl); | ||
| 325 | - virtual int set_callback(std::string value); | ||
| 326 | - virtual int set_wait_keyframe(bool wait_keyframe); | ||
| 327 | - virtual int start(); | ||
| 328 | - virtual int dumps(std::stringstream& ss); | ||
| 329 | - virtual int stop(); | ||
| 330 | - virtual int rpc(SrsJsonObject* obj); | ||
| 331 | -protected: | ||
| 332 | - virtual int on_reap_segment(); | ||
| 333 | -private: | ||
| 334 | - virtual int check_user_actions(SrsSharedPtrMessage* msg); | ||
| 335 | -}; | ||
| 336 | - | ||
| 337 | -/** | ||
| 338 | * always append to flv file, never reap it. | 280 | * always append to flv file, never reap it. |
| 339 | */ | 281 | */ |
| 340 | class SrsDvrAppendPlan : public SrsDvrPlan | 282 | class SrsDvrAppendPlan : public SrsDvrPlan |
| @@ -368,7 +310,7 @@ public: | @@ -368,7 +310,7 @@ public: | ||
| 368 | SrsDvrSegmentPlan(); | 310 | SrsDvrSegmentPlan(); |
| 369 | virtual ~SrsDvrSegmentPlan(); | 311 | virtual ~SrsDvrSegmentPlan(); |
| 370 | public: | 312 | public: |
| 371 | - virtual int initialize(SrsSource* source, SrsRequest* req); | 313 | + virtual int initialize(SrsRequest* req); |
| 372 | virtual int on_publish(); | 314 | virtual int on_publish(); |
| 373 | virtual void on_unpublish(); | 315 | virtual void on_unpublish(); |
| 374 | virtual int on_meta_data(SrsSharedPtrMessage* __metadata); | 316 | virtual int on_meta_data(SrsSharedPtrMessage* __metadata); |
| @@ -379,28 +321,6 @@ private: | @@ -379,28 +321,6 @@ private: | ||
| 379 | }; | 321 | }; |
| 380 | 322 | ||
| 381 | /** | 323 | /** |
| 382 | -* the api dvr pool. | ||
| 383 | -*/ | ||
| 384 | -class SrsApiDvrPool | ||
| 385 | -{ | ||
| 386 | -private: | ||
| 387 | - std::vector<SrsDvrApiPlan*> dvrs; | ||
| 388 | - static SrsApiDvrPool* _instance; | ||
| 389 | -private: | ||
| 390 | - SrsApiDvrPool(); | ||
| 391 | -public: | ||
| 392 | - static SrsApiDvrPool* instance(); | ||
| 393 | - virtual ~SrsApiDvrPool(); | ||
| 394 | -public: | ||
| 395 | - virtual int add_dvr(SrsDvrApiPlan* dvr); | ||
| 396 | -public: | ||
| 397 | - virtual int dumps(std::string vhost, std::stringstream& ss); | ||
| 398 | - virtual int create(SrsJsonAny* json); | ||
| 399 | - virtual int stop(std::string vhost); | ||
| 400 | - virtual int rpc(SrsJsonAny* json); | ||
| 401 | -}; | ||
| 402 | - | ||
| 403 | -/** | ||
| 404 | * dvr(digital video recorder) to record RTMP stream to flv file. | 324 | * dvr(digital video recorder) to record RTMP stream to flv file. |
| 405 | * TODO: FIXME: add utest for it. | 325 | * TODO: FIXME: add utest for it. |
| 406 | */ | 326 | */ |
| @@ -411,7 +331,7 @@ private: | @@ -411,7 +331,7 @@ private: | ||
| 411 | private: | 331 | private: |
| 412 | SrsDvrPlan* plan; | 332 | SrsDvrPlan* plan; |
| 413 | public: | 333 | public: |
| 414 | - SrsDvr(SrsSource* s); | 334 | + SrsDvr(); |
| 415 | virtual ~SrsDvr(); | 335 | virtual ~SrsDvr(); |
| 416 | public: | 336 | public: |
| 417 | /** | 337 | /** |
| @@ -419,7 +339,7 @@ public: | @@ -419,7 +339,7 @@ public: | ||
| 419 | * when system initialize(encoder publish at first time, or reload), | 339 | * when system initialize(encoder publish at first time, or reload), |
| 420 | * initialize the dvr will reinitialize the plan, the whole dvr framework. | 340 | * initialize the dvr will reinitialize the plan, the whole dvr framework. |
| 421 | */ | 341 | */ |
| 422 | - virtual int initialize(SrsRequest* r); | 342 | + virtual int initialize(SrsSource* s, SrsRequest* r); |
| 423 | /** | 343 | /** |
| 424 | * publish stream event, | 344 | * publish stream event, |
| 425 | * when encoder start to publish RTMP stream. | 345 | * when encoder start to publish RTMP stream. |
| @@ -432,8 +432,8 @@ int SrsFFMPEG::start() | @@ -432,8 +432,8 @@ int SrsFFMPEG::start() | ||
| 432 | // memory leak in child process, it's ok. | 432 | // memory leak in child process, it's ok. |
| 433 | char** charpv_params = new char*[params.size() + 1]; | 433 | char** charpv_params = new char*[params.size() + 1]; |
| 434 | for (int i = 0; i < (int)params.size(); i++) { | 434 | for (int i = 0; i < (int)params.size(); i++) { |
| 435 | - std::string p = params[i]; | ||
| 436 | - charpv_params[i] = (char*)p.c_str(); | 435 | + std::string& p = params[i]; |
| 436 | + charpv_params[i] = (char*)p.data(); | ||
| 437 | } | 437 | } |
| 438 | // EOF: NULL | 438 | // EOF: NULL |
| 439 | charpv_params[params.size()] = NULL; | 439 | charpv_params[params.size()] = NULL; |
| @@ -35,6 +35,7 @@ using namespace std; | @@ -35,6 +35,7 @@ using namespace std; | ||
| 35 | #include <srs_app_json.hpp> | 35 | #include <srs_app_json.hpp> |
| 36 | #include <srs_app_http.hpp> | 36 | #include <srs_app_http.hpp> |
| 37 | #include <srs_app_utility.hpp> | 37 | #include <srs_app_utility.hpp> |
| 38 | +#include <srs_core_autofree.hpp> | ||
| 38 | 39 | ||
| 39 | SrsHttpHeartbeat::SrsHttpHeartbeat() | 40 | SrsHttpHeartbeat::SrsHttpHeartbeat() |
| 40 | { | 41 | { |
| @@ -73,21 +74,31 @@ void SrsHttpHeartbeat::heartbeat() | @@ -73,21 +74,31 @@ void SrsHttpHeartbeat::heartbeat() | ||
| 73 | srs_api_dump_summaries(ss); | 74 | srs_api_dump_summaries(ss); |
| 74 | } | 75 | } |
| 75 | ss << __SRS_JOBJECT_END; | 76 | ss << __SRS_JOBJECT_END; |
| 76 | - std::string data = ss.str(); | ||
| 77 | - std::string res; | ||
| 78 | - int status_code; | 77 | + |
| 78 | + std::string req = ss.str(); | ||
| 79 | 79 | ||
| 80 | SrsHttpClient http; | 80 | SrsHttpClient http; |
| 81 | - if ((ret = http.post(&uri, data, status_code, res)) != ERROR_SUCCESS) { | 81 | + if ((ret = http.initialize(uri.get_host(), uri.get_port())) != ERROR_SUCCESS) { |
| 82 | + return; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + SrsHttpMessage* msg = NULL; | ||
| 86 | + if ((ret = http.post(uri.get_path(), req, &msg)) != ERROR_SUCCESS) { | ||
| 82 | srs_info("http post hartbeart uri failed. " | 87 | srs_info("http post hartbeart uri failed. " |
| 83 | "url=%s, request=%s, response=%s, ret=%d", | 88 | "url=%s, request=%s, response=%s, ret=%d", |
| 84 | - url.c_str(), data.c_str(), res.c_str(), ret); | 89 | + url.c_str(), req.c_str(), res.c_str(), ret); |
| 90 | + return; | ||
| 91 | + } | ||
| 92 | + SrsAutoFree(SrsHttpMessage, msg); | ||
| 93 | + | ||
| 94 | + std::string res; | ||
| 95 | + if ((ret = msg->body_read_all(res)) != ERROR_SUCCESS) { | ||
| 85 | return; | 96 | return; |
| 86 | } | 97 | } |
| 87 | 98 | ||
| 88 | srs_info("http hook hartbeart success. " | 99 | srs_info("http hook hartbeart success. " |
| 89 | "url=%s, request=%s, status_code=%d, response=%s, ret=%d", | 100 | "url=%s, request=%s, status_code=%d, response=%s, ret=%d", |
| 90 | - url.c_str(), data.c_str(), status_code, res.c_str(), ret); | 101 | + url.c_str(), req.c_str(), status_code, res.c_str(), ret); |
| 91 | 102 | ||
| 92 | return; | 103 | return; |
| 93 | } | 104 | } |
| @@ -163,10 +163,10 @@ void SrsHlsSegment::update_duration(int64_t current_frame_dts) | @@ -163,10 +163,10 @@ void SrsHlsSegment::update_duration(int64_t current_frame_dts) | ||
| 163 | return; | 163 | return; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | -SrsHlsMuxer::SrsHlsMuxer(ISrsHlsHandler* h) | 166 | +SrsHlsMuxer::SrsHlsMuxer() |
| 167 | { | 167 | { |
| 168 | req = NULL; | 168 | req = NULL; |
| 169 | - handler = h; | 169 | + handler = NULL; |
| 170 | hls_fragment = hls_window = 0; | 170 | hls_fragment = hls_window = 0; |
| 171 | target_duration = 0; | 171 | target_duration = 0; |
| 172 | _sequence_no = 0; | 172 | _sequence_no = 0; |
| @@ -189,6 +189,15 @@ SrsHlsMuxer::~SrsHlsMuxer() | @@ -189,6 +189,15 @@ SrsHlsMuxer::~SrsHlsMuxer() | ||
| 189 | srs_freep(req); | 189 | srs_freep(req); |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | +int SrsHlsMuxer::initialize(ISrsHlsHandler* h) | ||
| 193 | +{ | ||
| 194 | + int ret = ERROR_SUCCESS; | ||
| 195 | + | ||
| 196 | + handler = h; | ||
| 197 | + | ||
| 198 | + return ret; | ||
| 199 | +} | ||
| 200 | + | ||
| 192 | int SrsHlsMuxer::sequence_no() | 201 | int SrsHlsMuxer::sequence_no() |
| 193 | { | 202 | { |
| 194 | return _sequence_no; | 203 | return _sequence_no; |
| @@ -811,10 +820,10 @@ int SrsHlsCache::reap_segment(string log_desc, SrsHlsMuxer* muxer, int64_t segme | @@ -811,10 +820,10 @@ int SrsHlsCache::reap_segment(string log_desc, SrsHlsMuxer* muxer, int64_t segme | ||
| 811 | return ret; | 820 | return ret; |
| 812 | } | 821 | } |
| 813 | 822 | ||
| 814 | -SrsHls::SrsHls(SrsSource* s, ISrsHlsHandler* h) | 823 | +SrsHls::SrsHls() |
| 815 | { | 824 | { |
| 816 | - source = s; | ||
| 817 | - handler = h; | 825 | + source = NULL; |
| 826 | + handler = NULL; | ||
| 818 | 827 | ||
| 819 | hls_enabled = false; | 828 | hls_enabled = false; |
| 820 | 829 | ||
| @@ -822,7 +831,7 @@ SrsHls::SrsHls(SrsSource* s, ISrsHlsHandler* h) | @@ -822,7 +831,7 @@ SrsHls::SrsHls(SrsSource* s, ISrsHlsHandler* h) | ||
| 822 | sample = new SrsCodecSample(); | 831 | sample = new SrsCodecSample(); |
| 823 | jitter = new SrsRtmpJitter(); | 832 | jitter = new SrsRtmpJitter(); |
| 824 | 833 | ||
| 825 | - muxer = new SrsHlsMuxer(h); | 834 | + muxer = new SrsHlsMuxer(); |
| 826 | hls_cache = new SrsHlsCache(); | 835 | hls_cache = new SrsHlsCache(); |
| 827 | 836 | ||
| 828 | pprint = SrsPithyPrint::create_hls(); | 837 | pprint = SrsPithyPrint::create_hls(); |
| @@ -841,6 +850,20 @@ SrsHls::~SrsHls() | @@ -841,6 +850,20 @@ SrsHls::~SrsHls() | ||
| 841 | srs_freep(pprint); | 850 | srs_freep(pprint); |
| 842 | } | 851 | } |
| 843 | 852 | ||
| 853 | +int SrsHls::initialize(SrsSource* s, ISrsHlsHandler* h) | ||
| 854 | +{ | ||
| 855 | + int ret = ERROR_SUCCESS; | ||
| 856 | + | ||
| 857 | + source = s; | ||
| 858 | + handler = h; | ||
| 859 | + | ||
| 860 | + if ((ret = muxer->initialize(h)) != ERROR_SUCCESS) { | ||
| 861 | + return ret; | ||
| 862 | + } | ||
| 863 | + | ||
| 864 | + return ret; | ||
| 865 | +} | ||
| 866 | + | ||
| 844 | int SrsHls::on_publish(SrsRequest* req) | 867 | int SrsHls::on_publish(SrsRequest* req) |
| 845 | { | 868 | { |
| 846 | int ret = ERROR_SUCCESS; | 869 | int ret = ERROR_SUCCESS; |
| @@ -195,12 +195,16 @@ private: | @@ -195,12 +195,16 @@ private: | ||
| 195 | */ | 195 | */ |
| 196 | SrsCodecAudio acodec; | 196 | SrsCodecAudio acodec; |
| 197 | public: | 197 | public: |
| 198 | - SrsHlsMuxer(ISrsHlsHandler* h); | 198 | + SrsHlsMuxer(); |
| 199 | virtual ~SrsHlsMuxer(); | 199 | virtual ~SrsHlsMuxer(); |
| 200 | public: | 200 | public: |
| 201 | virtual int sequence_no(); | 201 | virtual int sequence_no(); |
| 202 | public: | 202 | public: |
| 203 | /** | 203 | /** |
| 204 | + * initialize the hls muxer. | ||
| 205 | + */ | ||
| 206 | + virtual int initialize(ISrsHlsHandler* h); | ||
| 207 | + /** | ||
| 204 | * when publish, update the config for muxer. | 208 | * when publish, update the config for muxer. |
| 205 | */ | 209 | */ |
| 206 | virtual int update_config(SrsRequest* r, std::string path, int fragment, int window); | 210 | virtual int update_config(SrsRequest* r, std::string path, int fragment, int window); |
| @@ -325,10 +329,14 @@ private: | @@ -325,10 +329,14 @@ private: | ||
| 325 | */ | 329 | */ |
| 326 | int64_t stream_dts; | 330 | int64_t stream_dts; |
| 327 | public: | 331 | public: |
| 328 | - SrsHls(SrsSource* s, ISrsHlsHandler* h); | 332 | + SrsHls(); |
| 329 | virtual ~SrsHls(); | 333 | virtual ~SrsHls(); |
| 330 | public: | 334 | public: |
| 331 | /** | 335 | /** |
| 336 | + * initialize the hls by handler and source. | ||
| 337 | + */ | ||
| 338 | + virtual int initialize(SrsSource* s, ISrsHlsHandler* h); | ||
| 339 | + /** | ||
| 332 | * publish stream event, continue to write the m3u8, | 340 | * publish stream event, continue to write the m3u8, |
| 333 | * for the muxer object not destroyed. | 341 | * for the muxer object not destroyed. |
| 334 | */ | 342 | */ |
-
请 注册 或 登录 后发表评论