Skip to content

Commit 2199fd2

Browse files
suzp1984winlinvip
andauthored
Build: Fix module failed for main_ingest_hls and mp4_parser. v6.0.119 (#4005)
1. fix src/main/srs_main_ingest_hls.cpp compiling error; 2. fix src/main/srs_main_mp4_parser.cpp compiling error; 3. remove empty target srs_ingest_hls; --------- Co-authored-by: winlin <[email protected]>
1 parent ff91757 commit 2199fd2

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

trunk/configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ mv ${SRS_MAKEFILE} ${SRS_MAKEFILE}.bk
510510

511511
# generate phony header
512512
cat << END > ${SRS_MAKEFILE}
513-
.PHONY: default all _default install help clean destroy server srs_ingest_hls utest _prepare_dir $__mphonys
513+
.PHONY: default all _default install help clean destroy server utest _prepare_dir $__mphonys
514514
.PHONY: clean_srs clean_modules clean_openssl clean_srtp2 clean_opus clean_ffmpeg clean_st
515515
.PHONY: st ffmpeg
516516
@@ -543,7 +543,7 @@ default: server
543543
544544
all: _default
545545
546-
_default: server srs_ingest_hls utest $__mdefaults
546+
_default: server utest $__mdefaults
547547
548548
help:
549549
@echo "Usage: make <help>|<clean>|<destroy>|<server>|<utest>|<install>|<uninstall>"

trunk/doc/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The changelog for SRS.
77
<a name="v6-changes"></a>
88

99
## SRS 6.0 Changelog
10+
* 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)
1011
* 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)
1112
* v6.0, 2024-03-19, Merge [#3958](https://github.com/ossrs/srs/pull/3958): Add a TCP proxy for debugging. v6.0.117 (#3958)
1213
* 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)

trunk/src/core/srs_core_version6.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#define VERSION_MAJOR 6
1111
#define VERSION_MINOR 0
12-
#define VERSION_REVISION 118
12+
#define VERSION_REVISION 119
1313

1414
#endif

trunk/src/main/srs_main_ingest_hls.cpp

+14-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ using namespace std;
3030
#include <srs_protocol_rtmp_conn.hpp>
3131
#include <srs_protocol_utility.hpp>
3232
#include <srs_app_config.hpp>
33+
#include <srs_app_threads.hpp>
3334

3435
// pre-declare
3536
srs_error_t proxy_hls2rtmp(std::string hls, std::string rtmp);
@@ -44,6 +45,9 @@ SrsConfig* _srs_config = new SrsConfig();
4445
// @global Other variables.
4546
bool _srs_in_docker = false;
4647

48+
// Whether setup config by environment variables, see https://github.com/ossrs/srs/issues/2277
49+
bool _srs_config_by_env = false;
50+
4751
// The binary name of SRS.
4852
const char* _srs_binary = NULL;
4953

@@ -63,7 +67,14 @@ int main(int argc, char** argv)
6367
srs_error("donot support gmc/gmp/gcp/gprof");
6468
exit(-1);
6569
#endif
66-
70+
71+
srs_error_t err = srs_success;
72+
if ((err = srs_global_initialize()) != srs_success) {
73+
srs_freep(err);
74+
srs_error("global init error");
75+
return -1;
76+
}
77+
6778
srs_trace("srs_ingest_hls base on %s, to ingest hls live to srs", RTMP_SIG_SRS_SERVER);
6879

6980
// parse user options.
@@ -105,7 +116,7 @@ int main(int argc, char** argv)
105116
srs_trace("input: %s", in_hls_url.c_str());
106117
srs_trace("output: %s", out_rtmp_url.c_str());
107118

108-
srs_error_t err = proxy_hls2rtmp(in_hls_url, out_rtmp_url);
119+
err = proxy_hls2rtmp(in_hls_url, out_rtmp_url);
109120

110121
int ret = srs_error_code(err);
111122
srs_freep(err);
@@ -604,7 +615,7 @@ int SrsIngestHlsInput::SrsTsPiece::fetch(string m3u8)
604615
}
605616

606617
// initialize the fresh http client.
607-
if ((ret = client.initialize(uri.get_schema(), uri.get_host(), uri.get_port()) != ERROR_SUCCESS)) {
618+
if ((ret = client.initialize(uri.get_schema(), uri.get_host(), uri.get_port()) != srs_success)) {
608619
return ret;
609620
}
610621

trunk/src/main/srs_main_mp4_parser.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <srs_kernel_stream.hpp>
1414
#include <srs_core_autofree.hpp>
1515
#include <srs_app_config.hpp>
16+
#include <srs_protocol_kbps.hpp>
1617

1718
#include <stdio.h>
1819
#include <stdlib.h>
@@ -30,9 +31,14 @@ SrsConfig* _srs_config = new SrsConfig();
3031
// @global Other variables.
3132
bool _srs_in_docker = false;
3233

34+
// Whether setup config by environment variables, see https://github.com/ossrs/srs/issues/2277
35+
bool _srs_config_by_env = false;
36+
3337
// The binary name of SRS.
3438
const char* _srs_binary = NULL;
3539

40+
extern SrsPps* _srs_pps_cids_get;
41+
3642
srs_error_t parse(std::string mp4_file, bool verbose)
3743
{
3844
srs_error_t err = srs_success;
@@ -88,6 +94,8 @@ srs_error_t parse(std::string mp4_file, bool verbose)
8894

8995
int main(int argc, char** argv)
9096
{
97+
_srs_pps_cids_get = new SrsPps();
98+
9199
printf("SRS MP4 parser/%d.%d.%d, parse and show the mp4 boxes structure.\n",
92100
VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);
93101

0 commit comments

Comments
 (0)