winlin

support disable all

@@ -23,11 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -23,11 +23,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23
24 #include <srs_app_hls.hpp> 24 #include <srs_app_hls.hpp>
25 25
26 -/**  
27 -* the HLS section, only available when HLS enabled.  
28 -*/  
29 -#ifdef SRS_AUTO_HLS  
30 -  
31 #include <sys/types.h> 26 #include <sys/types.h>
32 #include <sys/stat.h> 27 #include <sys/stat.h>
33 #include <fcntl.h> 28 #include <fcntl.h>
@@ -72,6 +67,11 @@ ISrsHlsHandler::~ISrsHlsHandler() @@ -72,6 +67,11 @@ ISrsHlsHandler::~ISrsHlsHandler()
72 { 67 {
73 } 68 }
74 69
  70 +/**
  71 + * * the HLS section, only available when HLS enabled.
  72 + * */
  73 +#ifdef SRS_AUTO_HLS
  74 +
75 SrsHlsCacheWriter::SrsHlsCacheWriter(bool write_cache, bool write_file) 75 SrsHlsCacheWriter::SrsHlsCacheWriter(bool write_cache, bool write_file)
76 { 76 {
77 should_write_cache = write_cache; 77 should_write_cache = write_cache;
@@ -29,11 +29,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -29,11 +29,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 */ 29 */
30 #include <srs_core.hpp> 30 #include <srs_core.hpp>
31 31
32 -/**  
33 -* the HLS section, only available when HLS enabled.  
34 -*/  
35 -#ifdef SRS_AUTO_HLS  
36 -  
37 #include <string> 32 #include <string>
38 #include <vector> 33 #include <vector>
39 34
@@ -87,6 +82,11 @@ public: @@ -87,6 +82,11 @@ public:
87 }; 82 };
88 83
89 /** 84 /**
  85 + * * the HLS section, only available when HLS enabled.
  86 + * */
  87 +#ifdef SRS_AUTO_HLS
  88 +
  89 +/**
90 * write to file and cache. 90 * write to file and cache.
91 */ 91 */
92 class SrsHlsCacheWriter : public SrsFileWriter 92 class SrsHlsCacheWriter : public SrsFileWriter
@@ -61,6 +61,8 @@ ISrsThreadContext* _srs_context = new ISrsThreadContext(); @@ -61,6 +61,8 @@ ISrsThreadContext* _srs_context = new ISrsThreadContext();
61 SrsConfig* _srs_config = NULL; 61 SrsConfig* _srs_config = NULL;
62 SrsServer* _srs_server = NULL; 62 SrsServer* _srs_server = NULL;
63 63
  64 +#if defined(SRS_AUTO_HTTP_PARSER)
  65 +
64 /** 66 /**
65 * main entrance. 67 * main entrance.
66 */ 68 */
@@ -1402,3 +1404,15 @@ int proxy_hls2rtmp(string hls, string rtmp) @@ -1402,3 +1404,15 @@ int proxy_hls2rtmp(string hls, string rtmp)
1402 return ret; 1404 return ret;
1403 } 1405 }
1404 1406
  1407 +#else
  1408 +
  1409 +int main(int argc, char** argv)
  1410 +{
  1411 +#ifndef SRS_AUTO_HTTP_PARSER
  1412 + srs_error("ingest requires http-api or http-server");
  1413 +#endif
  1414 + return -1;
  1415 +}
  1416 +
  1417 +#endif
  1418 +