diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index f62a4b668..46af33a29 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -23,11 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -/** -* the HLS section, only available when HLS enabled. -*/ -#ifdef SRS_AUTO_HLS - #include #include #include @@ -72,6 +67,11 @@ ISrsHlsHandler::~ISrsHlsHandler() { } +/** + * * the HLS section, only available when HLS enabled. + * */ +#ifdef SRS_AUTO_HLS + SrsHlsCacheWriter::SrsHlsCacheWriter(bool write_cache, bool write_file) { should_write_cache = write_cache; diff --git a/trunk/src/app/srs_app_hls.hpp b/trunk/src/app/srs_app_hls.hpp index ccfd72a7e..c47e2114e 100644 --- a/trunk/src/app/srs_app_hls.hpp +++ b/trunk/src/app/srs_app_hls.hpp @@ -29,11 +29,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include -/** -* the HLS section, only available when HLS enabled. -*/ -#ifdef SRS_AUTO_HLS - #include #include @@ -86,6 +81,11 @@ public: virtual int on_hls_unpublish(SrsRequest* req) = 0; }; +/** + * * the HLS section, only available when HLS enabled. + * */ +#ifdef SRS_AUTO_HLS + /** * write to file and cache. */ diff --git a/trunk/src/main/srs_main_ingest_hls.cpp b/trunk/src/main/srs_main_ingest_hls.cpp index f63301166..c90f3318b 100644 --- a/trunk/src/main/srs_main_ingest_hls.cpp +++ b/trunk/src/main/srs_main_ingest_hls.cpp @@ -61,6 +61,8 @@ ISrsThreadContext* _srs_context = new ISrsThreadContext(); SrsConfig* _srs_config = NULL; SrsServer* _srs_server = NULL; +#if defined(SRS_AUTO_HTTP_PARSER) + /** * main entrance. */ @@ -1402,3 +1404,15 @@ int proxy_hls2rtmp(string hls, string rtmp) return ret; } +#else + +int main(int argc, char** argv) +{ +#ifndef SRS_AUTO_HTTP_PARSER + srs_error("ingest requires http-api or http-server"); +#endif + return -1; +} + +#endif +