diff --git a/trunk/configure b/trunk/configure index 24fe192c96..ca4f28a117 100755 --- a/trunk/configure +++ b/trunk/configure @@ -510,7 +510,7 @@ mv ${SRS_MAKEFILE} ${SRS_MAKEFILE}.bk # generate phony header cat << END > ${SRS_MAKEFILE} -.PHONY: default all _default install help clean destroy server srs_ingest_hls utest _prepare_dir $__mphonys +.PHONY: default all _default install help clean destroy server utest _prepare_dir $__mphonys .PHONY: clean_srs clean_modules clean_openssl clean_srtp2 clean_opus clean_ffmpeg clean_st .PHONY: st ffmpeg @@ -543,7 +543,7 @@ default: server all: _default -_default: server srs_ingest_hls utest $__mdefaults +_default: server utest $__mdefaults help: @echo "Usage: make ||||||" diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 76852b6d46..0e4095f65c 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 6.0 Changelog +* v6.0, 2024-03-26, Merge [#4005](https://github.com/ossrs/srs/pull/4005): Build: Fix module failed for main_ingest_hls and mp4_parser. v6.0.119 (#4005) * v6.0, 2024-03-24, Merge [#3989](https://github.com/ossrs/srs/pull/3989): ST: Research adds examples that demos pthread and helloworld. v6.0.118 (#3989) * v6.0, 2024-03-19, Merge [#3958](https://github.com/ossrs/srs/pull/3958): Add a TCP proxy for debugging. v6.0.117 (#3958) * v6.0, 2024-03-20, Merge [#3964](https://github.com/ossrs/srs/pull/3964): WebRTC: Add support for A/V only WHEP/WHEP player. v6.0.116 (#3964) diff --git a/trunk/src/core/srs_core_version6.hpp b/trunk/src/core/srs_core_version6.hpp index 36551a9e00..2bee0ee677 100644 --- a/trunk/src/core/srs_core_version6.hpp +++ b/trunk/src/core/srs_core_version6.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 6 #define VERSION_MINOR 0 -#define VERSION_REVISION 118 +#define VERSION_REVISION 119 #endif diff --git a/trunk/src/main/srs_main_ingest_hls.cpp b/trunk/src/main/srs_main_ingest_hls.cpp index c2038568d1..fc34bf2118 100644 --- a/trunk/src/main/srs_main_ingest_hls.cpp +++ b/trunk/src/main/srs_main_ingest_hls.cpp @@ -30,6 +30,7 @@ using namespace std; #include #include #include +#include // pre-declare srs_error_t proxy_hls2rtmp(std::string hls, std::string rtmp); @@ -44,6 +45,9 @@ SrsConfig* _srs_config = new SrsConfig(); // @global Other variables. bool _srs_in_docker = false; +// Whether setup config by environment variables, see https://github.com/ossrs/srs/issues/2277 +bool _srs_config_by_env = false; + // The binary name of SRS. const char* _srs_binary = NULL; @@ -63,7 +67,14 @@ int main(int argc, char** argv) srs_error("donot support gmc/gmp/gcp/gprof"); exit(-1); #endif - + + srs_error_t err = srs_success; + if ((err = srs_global_initialize()) != srs_success) { + srs_freep(err); + srs_error("global init error"); + return -1; + } + srs_trace("srs_ingest_hls base on %s, to ingest hls live to srs", RTMP_SIG_SRS_SERVER); // parse user options. @@ -105,7 +116,7 @@ int main(int argc, char** argv) srs_trace("input: %s", in_hls_url.c_str()); srs_trace("output: %s", out_rtmp_url.c_str()); - srs_error_t err = proxy_hls2rtmp(in_hls_url, out_rtmp_url); + err = proxy_hls2rtmp(in_hls_url, out_rtmp_url); int ret = srs_error_code(err); srs_freep(err); @@ -604,7 +615,7 @@ int SrsIngestHlsInput::SrsTsPiece::fetch(string m3u8) } // initialize the fresh http client. - if ((ret = client.initialize(uri.get_schema(), uri.get_host(), uri.get_port()) != ERROR_SUCCESS)) { + if ((ret = client.initialize(uri.get_schema(), uri.get_host(), uri.get_port()) != srs_success)) { return ret; } diff --git a/trunk/src/main/srs_main_mp4_parser.cpp b/trunk/src/main/srs_main_mp4_parser.cpp index e9137c8374..72641d9d50 100644 --- a/trunk/src/main/srs_main_mp4_parser.cpp +++ b/trunk/src/main/srs_main_mp4_parser.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -30,9 +31,14 @@ SrsConfig* _srs_config = new SrsConfig(); // @global Other variables. bool _srs_in_docker = false; +// Whether setup config by environment variables, see https://github.com/ossrs/srs/issues/2277 +bool _srs_config_by_env = false; + // The binary name of SRS. const char* _srs_binary = NULL; +extern SrsPps* _srs_pps_cids_get; + srs_error_t parse(std::string mp4_file, bool verbose) { srs_error_t err = srs_success; @@ -88,6 +94,8 @@ srs_error_t parse(std::string mp4_file, bool verbose) int main(int argc, char** argv) { + _srs_pps_cids_get = new SrsPps(); + printf("SRS MP4 parser/%d.%d.%d, parse and show the mp4 boxes structure.\n", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);