refine configure, add cubieboard. use IProtocolStatistic in kbps.
正在显示
3 个修改的文件
包含
41 行增加
和
10 行删除
| @@ -62,6 +62,8 @@ SRS_MIPS_UBUNTU12=NO | @@ -62,6 +62,8 @@ SRS_MIPS_UBUNTU12=NO | ||
| 62 | SRS_DEV=NO | 62 | SRS_DEV=NO |
| 63 | # raspberry-pi, open hls/ssl/static | 63 | # raspberry-pi, open hls/ssl/static |
| 64 | SRS_PI=NO | 64 | SRS_PI=NO |
| 65 | +# cubieboard, donot open ffmpeg/nginx. | ||
| 66 | +SRS_CUBIE=NO | ||
| 65 | # the most fast compile, nothing, only support vp6 RTMP. | 67 | # the most fast compile, nothing, only support vp6 RTMP. |
| 66 | SRS_FAST=NO | 68 | SRS_FAST=NO |
| 67 | # only support RTMP with ssl. | 69 | # only support RTMP with ssl. |
| @@ -141,8 +143,9 @@ Options: | @@ -141,8 +143,9 @@ Options: | ||
| 141 | Presets: | 143 | Presets: |
| 142 | --x86-x64 [default] for x86/x64 cpu, common pc and servers. | 144 | --x86-x64 [default] for x86/x64 cpu, common pc and servers. |
| 143 | --pi for raspberry-pi(directly build), open features hls/ssl/static. | 145 | --pi for raspberry-pi(directly build), open features hls/ssl/static. |
| 144 | - --arm alias for --with-arm-ubuntu12 | ||
| 145 | - --mips alias for --with-mips-ubuntu12 | 146 | + --cubie for cubieboard(directly build), open features except ffmpeg/nginx. |
| 147 | + --arm alias for --with-arm-ubuntu12, for ubuntu12, arm crossbuild | ||
| 148 | + --mips alias for --with-mips-ubuntu12, for ubuntu12, mips crossbuild | ||
| 146 | --fast the most fast compile, nothing, only support vp6 RTMP. | 149 | --fast the most fast compile, nothing, only support vp6 RTMP. |
| 147 | --pure-rtmp only support RTMP with ssl. | 150 | --pure-rtmp only support RTMP with ssl. |
| 148 | --rtmp-hls only support RTMP+HLS with ssl. | 151 | --rtmp-hls only support RTMP+HLS with ssl. |
| @@ -227,6 +230,7 @@ function parse_user_option() { | @@ -227,6 +230,7 @@ function parse_user_option() { | ||
| 227 | --arm) SRS_ARM_UBUNTU12=YES ;; | 230 | --arm) SRS_ARM_UBUNTU12=YES ;; |
| 228 | --mips) SRS_MIPS_UBUNTU12=YES ;; | 231 | --mips) SRS_MIPS_UBUNTU12=YES ;; |
| 229 | --pi) SRS_PI=YES ;; | 232 | --pi) SRS_PI=YES ;; |
| 233 | + --cubie) SRS_CUBIE=YES ;; | ||
| 230 | --dev) SRS_DEV=YES ;; | 234 | --dev) SRS_DEV=YES ;; |
| 231 | --fast) SRS_FAST=YES ;; | 235 | --fast) SRS_FAST=YES ;; |
| 232 | --disable-all) SRS_DISABLE_ALL=YES ;; | 236 | --disable-all) SRS_DISABLE_ALL=YES ;; |
| @@ -281,8 +285,10 @@ function apply_user_presets() { | @@ -281,8 +285,10 @@ function apply_user_presets() { | ||
| 281 | if [ $SRS_ARM_UBUNTU12 = NO ]; then | 285 | if [ $SRS_ARM_UBUNTU12 = NO ]; then |
| 282 | if [ $SRS_MIPS_UBUNTU12 = NO ]; then | 286 | if [ $SRS_MIPS_UBUNTU12 = NO ]; then |
| 283 | if [ $SRS_PI = NO ]; then | 287 | if [ $SRS_PI = NO ]; then |
| 284 | - if [ $SRS_X86_X64 = NO ]; then | ||
| 285 | - SRS_X86_X64=YES; opt="--x86-x64 $opt"; | 288 | + if [ $SRS_CUBIE = NO ]; then |
| 289 | + if [ $SRS_X86_X64 = NO ]; then | ||
| 290 | + SRS_X86_X64=YES; opt="--x86-x64 $opt"; | ||
| 291 | + fi | ||
| 286 | fi | 292 | fi |
| 287 | fi | 293 | fi |
| 288 | fi | 294 | fi |
| @@ -552,6 +558,31 @@ function apply_user_presets() { | @@ -552,6 +558,31 @@ function apply_user_presets() { | ||
| 552 | SRS_GPROF=NO | 558 | SRS_GPROF=NO |
| 553 | SRS_STATIC=NO | 559 | SRS_STATIC=NO |
| 554 | fi | 560 | fi |
| 561 | + | ||
| 562 | + # if cubieboard specified, open features except ffmpeg/nginx. | ||
| 563 | + if [ $SRS_CUBIE = YES ]; then | ||
| 564 | + SRS_HLS=YES | ||
| 565 | + SRS_DVR=YES | ||
| 566 | + SRS_NGINX=NO | ||
| 567 | + SRS_SSL=YES | ||
| 568 | + SRS_FFMPEG_TOOL=YES | ||
| 569 | + SRS_TRANSCODE=YES | ||
| 570 | + SRS_INGEST=YES | ||
| 571 | + SRS_HTTP_PARSER=YES | ||
| 572 | + SRS_HTTP_CALLBACK=YES | ||
| 573 | + SRS_HTTP_SERVER=YES | ||
| 574 | + SRS_HTTP_API=YES | ||
| 575 | + SRS_LIBRTMP=YES | ||
| 576 | + SRS_BWTC=NO | ||
| 577 | + SRS_RESEARCH=NO | ||
| 578 | + SRS_UTEST=NO | ||
| 579 | + SRS_GPERF=NO | ||
| 580 | + SRS_GPERF_MC=NO | ||
| 581 | + SRS_GPERF_MP=NO | ||
| 582 | + SRS_GPERF_CP=NO | ||
| 583 | + SRS_GPROF=NO | ||
| 584 | + SRS_STATIC=NO | ||
| 585 | + fi | ||
| 555 | } | 586 | } |
| 556 | apply_user_presets | 587 | apply_user_presets |
| 557 | 588 |
| @@ -106,7 +106,7 @@ SrsKbps::~SrsKbps() | @@ -106,7 +106,7 @@ SrsKbps::~SrsKbps() | ||
| 106 | { | 106 | { |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | -void SrsKbps::set_io(ISrsProtocolReader* in, ISrsProtocolWriter* out) | 109 | +void SrsKbps::set_io(ISrsProtocolStatistic* in, ISrsProtocolStatistic* out) |
| 110 | { | 110 | { |
| 111 | // set input stream | 111 | // set input stream |
| 112 | // now, set start time. | 112 | // now, set start time. |
| @@ -30,8 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -30,8 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 30 | 30 | ||
| 31 | #include <srs_core.hpp> | 31 | #include <srs_core.hpp> |
| 32 | 32 | ||
| 33 | -class ISrsProtocolReader; | ||
| 34 | -class ISrsProtocolWriter; | 33 | +class ISrsProtocolStatistic; |
| 34 | +class ISrsProtocolStatistic; | ||
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * a kbps sample, for example, 1minute kbps, | 37 | * a kbps sample, for example, 1minute kbps, |
| @@ -65,8 +65,8 @@ class SrsKbpsSlice | @@ -65,8 +65,8 @@ class SrsKbpsSlice | ||
| 65 | { | 65 | { |
| 66 | private: | 66 | private: |
| 67 | union slice_io { | 67 | union slice_io { |
| 68 | - ISrsProtocolReader* in; | ||
| 69 | - ISrsProtocolWriter* out; | 68 | + ISrsProtocolStatistic* in; |
| 69 | + ISrsProtocolStatistic* out; | ||
| 70 | }; | 70 | }; |
| 71 | public: | 71 | public: |
| 72 | slice_io io; | 72 | slice_io io; |
| @@ -121,7 +121,7 @@ public: | @@ -121,7 +121,7 @@ public: | ||
| 121 | * @param out the output stream statistic. can be NULL. | 121 | * @param out the output stream statistic. can be NULL. |
| 122 | * @remark if in/out is NULL, use the cached data for kbps. | 122 | * @remark if in/out is NULL, use the cached data for kbps. |
| 123 | */ | 123 | */ |
| 124 | - virtual void set_io(ISrsProtocolReader* in, ISrsProtocolWriter* out); | 124 | + virtual void set_io(ISrsProtocolStatistic* in, ISrsProtocolStatistic* out); |
| 125 | public: | 125 | public: |
| 126 | /** | 126 | /** |
| 127 | * get total kbps, duration is from the startup of io. | 127 | * get total kbps, duration is from the startup of io. |
-
请 注册 或 登录 后发表评论