diff --git a/src/projects/config/items/virtual_hosts/applications/publishers/hls_publisher.h b/src/projects/config/items/virtual_hosts/applications/publishers/hls_publisher.h index 50c45e38d..5066b5a9a 100644 --- a/src/projects/config/items/virtual_hosts/applications/publishers/hls_publisher.h +++ b/src/projects/config/items/virtual_hosts/applications/publishers/hls_publisher.h @@ -9,8 +9,10 @@ #pragma once #include "../../../common/cross_domain_support.h" +#include "dumps/dumps.h" #include "hls_options/dvr.h" #include "hls_options/default_query_string.h" +#include "hls_options/cache_control.h" #include "publisher.h" namespace cfg @@ -24,20 +26,31 @@ namespace cfg struct HlsPublisher : public Publisher, public cmn::CrossDomainSupport { protected: + bool _origin_mode = false; + int _segment_count = 5; double _segment_duration = 10; + Dvr _dvr; DefaultQueryString _default_query_string; bool _create_default_playlist = true; + CacheControl _cache_control; + Dumps _dumps; + bool _server_time_based_segment_numbering = false; + public: virtual PublisherType GetType() const override { return PublisherType::Hls; } + CFG_DECLARE_CONST_REF_GETTER_OF(IsOriginMode, _origin_mode) + CFG_DECLARE_CONST_REF_GETTER_OF(IsServerTimeBasedSegmentNumbering, _server_time_based_segment_numbering) CFG_DECLARE_CONST_REF_GETTER_OF(GetSegmentCount, _segment_count) CFG_DECLARE_CONST_REF_GETTER_OF(GetSegmentDuration, _segment_duration) + CFG_DECLARE_CONST_REF_GETTER_OF(GetDumps, _dumps) + CFG_DECLARE_CONST_REF_GETTER_OF(GetCacheControl, _cache_control) CFG_DECLARE_CONST_REF_GETTER_OF(GetDvr, _dvr) CFG_DECLARE_CONST_REF_GETTER_OF(GetDefaultQueryString, _default_query_string) CFG_DECLARE_CONST_REF_GETTER_OF(ShouldCreateDefaultPlaylist, _create_default_playlist) @@ -48,10 +61,14 @@ namespace cfg { Publisher::MakeList(); + Register("OriginMode", &_origin_mode); + Register("ServerTimeBasedSegmentNumbering", &_server_time_based_segment_numbering); Register("SegmentCount", &_segment_count); Register("SegmentDuration", &_segment_duration); Register("CrossDomains", &_cross_domains); Register("DVR", &_dvr); + Register("Dumps", &_dumps); + Register("CacheControl", &_cache_control); Register("DefaultQueryString", &_default_query_string); Register("CreateDefaultPlaylist", &_create_default_playlist); } diff --git a/src/projects/config/items/virtual_hosts/applications/publishers/ll_hls_publisher.h b/src/projects/config/items/virtual_hosts/applications/publishers/ll_hls_publisher.h index 924e2703c..615576695 100644 --- a/src/projects/config/items/virtual_hosts/applications/publishers/ll_hls_publisher.h +++ b/src/projects/config/items/virtual_hosts/applications/publishers/ll_hls_publisher.h @@ -8,8 +8,6 @@ //============================================================================== #pragma once -#include "dumps/dumps.h" -#include "hls_options/cache_control.h" #include "hls_options/drm.h" #include "hls_publisher.h" @@ -24,14 +22,10 @@ namespace cfg struct LLHlsPublisher : public HlsPublisher { protected: - bool _origin_mode = false; double _chunk_duration = 0.5; double _part_hold_back = 0; // it will be set to 3 * chunk_duration automatically - Dumps _dumps; - CacheControl _cache_control; - Drm _drm; - bool _server_time_based_segment_numbering = false; bool _enable_preload_hint = true; + Drm _drm; public: PublisherType GetType() const override @@ -39,29 +33,20 @@ namespace cfg return PublisherType::LLHls; } - CFG_DECLARE_CONST_REF_GETTER_OF(IsOriginMode, _origin_mode) - CFG_DECLARE_CONST_REF_GETTER_OF(IsServerTimeBasedSegmentNumbering, _server_time_based_segment_numbering) CFG_DECLARE_CONST_REF_GETTER_OF(GetChunkDuration, _chunk_duration) CFG_DECLARE_CONST_REF_GETTER_OF(GetPartHoldBack, _part_hold_back) - CFG_DECLARE_CONST_REF_GETTER_OF(GetDumps, _dumps) - CFG_DECLARE_CONST_REF_GETTER_OF(GetCacheControl, _cache_control) - CFG_DECLARE_CONST_REF_GETTER_OF(GetDrm, _drm) CFG_DECLARE_CONST_REF_GETTER_OF(IsPreloadHintEnabled, _enable_preload_hint) + CFG_DECLARE_CONST_REF_GETTER_OF(GetDrm, _drm) protected: void MakeList() override { HlsPublisher::MakeList(); - Register("OriginMode", &_origin_mode); - Register("ServerTimeBasedSegmentNumbering", &_server_time_based_segment_numbering); Register("ChunkDuration", &_chunk_duration); Register("PartHoldBack", &_part_hold_back); - Register("CrossDomains", &_cross_domains); - Register("Dumps", &_dumps); - Register("CacheControl", &_cache_control); - Register("DRM", &_drm); Register("EnablePreloadHint", &_enable_preload_hint); + Register("DRM", &_drm); } }; } // namespace pub