Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Fix module failed for main_ingest_hls and mp4_parser. v6.0.119 #4005

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -543,7 +543,7 @@ default: server

all: _default

_default: server srs_ingest_hls utest $__mdefaults
_default: server utest $__mdefaults

help:
@echo "Usage: make <help>|<clean>|<destroy>|<server>|<utest>|<install>|<uninstall>"
Expand Down
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The changelog for SRS.
<a name="v6-changes"></a>

## 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)
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version6.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 6
#define VERSION_MINOR 0
#define VERSION_REVISION 118
#define VERSION_REVISION 119

#endif
17 changes: 14 additions & 3 deletions trunk/src/main/srs_main_ingest_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ using namespace std;
#include <srs_protocol_rtmp_conn.hpp>
#include <srs_protocol_utility.hpp>
#include <srs_app_config.hpp>
#include <srs_app_threads.hpp>

// pre-declare
srs_error_t proxy_hls2rtmp(std::string hls, std::string rtmp);
Expand All @@ -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;

Expand All @@ -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.
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down
8 changes: 8 additions & 0 deletions trunk/src/main/srs_main_mp4_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <srs_kernel_stream.hpp>
#include <srs_core_autofree.hpp>
#include <srs_app_config.hpp>
#include <srs_protocol_kbps.hpp>

#include <stdio.h>
#include <stdlib.h>
Expand All @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
Loading