From 8e04249021e775ab0b7196f50757e506a53d3572 Mon Sep 17 00:00:00 2001 From: liye Date: Thu, 26 Sep 2024 15:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liye --- .../source/http_source/hls/hls_media_downloader.cpp | 8 +++++--- .../plugins/source/http_source/hls/hls_media_downloader.h | 2 +- .../source/http_source/hls/playlist_downloader.cpp | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.cpp b/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.cpp index ef9b90b34..59b3bddc5 100644 --- a/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.cpp +++ b/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.cpp @@ -69,7 +69,7 @@ constexpr size_t MAX_BUFFERING_TIME_OUT = 30 * 1000; // hls manifest, m3u8 --- content get from m3u8 url, we get play list from the content // fragment --- one item in play list, download media data according to the fragment address. -HlsMediaDownloader::HlsMediaDownloader(const std::map& httpHeader) noexcept; +HlsMediaDownloader::HlsMediaDownloader(const std::map& httpHeader) noexcept { cacheMediaBuffer_ = std::make_shared(); cacheMediaBuffer_->Init(MAX_CACHE_BUFFER_SIZE, CHUNK_SIZE); @@ -80,7 +80,8 @@ HlsMediaDownloader::HlsMediaDownloader(const std::map& HlsInit(); } -HlsMediaDownloader::HlsMediaDownloader(int expectBufferDuration, const std::map& httpHeader) noexcept; +HlsMediaDownloader::HlsMediaDownloader(int expectBufferDuration, + const std::map& httpHeader) noexcept { expectDuration_ = static_cast(expectBufferDuration); userDefinedBufferDuration_ = true; @@ -91,7 +92,8 @@ HlsMediaDownloader::HlsMediaDownloader(int expectBufferDuration, const std::map< HlsInit(); } -HlsMediaDownloader::HlsMediaDownloader(std::string mimeType, const std::map& httpHeader) +HlsMediaDownloader::HlsMediaDownloader(std::string mimeType, + const std::map& httpHeader) noexcept { mimeType_ = mimeType; cacheMediaBuffer_ = std::make_shared(); diff --git a/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.h b/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.h index 4378b2c6b..fe0639af8 100644 --- a/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.h +++ b/services/media_engine/plugins/source/http_source/hls/hls_media_downloader.h @@ -52,7 +52,7 @@ constexpr size_t MIN_BUFFER_SIZE = 5 * 1024 * 1024; class HlsMediaDownloader : public MediaDownloader, public PlayListChangeCallback { public: - HlsMediaDownloader( + explicit HlsMediaDownloader( const std::map& httpHeader = std::map()) noexcept; explicit HlsMediaDownloader(int expectBufferDuration, const std::map& httpHeader = std::map()) noexcept; diff --git a/services/media_engine/plugins/source/http_source/hls/playlist_downloader.cpp b/services/media_engine/plugins/source/http_source/hls/playlist_downloader.cpp index c9efb4c56..03718b749 100644 --- a/services/media_engine/plugins/source/http_source/hls/playlist_downloader.cpp +++ b/services/media_engine/plugins/source/http_source/hls/playlist_downloader.cpp @@ -55,7 +55,7 @@ void PlayListDownloader::PlayListDownloaderInit() }); } -PlayListDownloader::PlayListDownloader(const std::map& httpHeader) +PlayListDownloader::PlayListDownloader(const std::map& httpHeader) noexcept { downloader_ = std::make_shared("hlsPlayList"); httpHeader_ = httpHeader; @@ -63,7 +63,7 @@ PlayListDownloader::PlayListDownloader(const std::map& } PlayListDownloader::PlayListDownloader(std::shared_ptr downloader, - const std::map& httpHeader) + const std::map& httpHeader) noexcept { downloader_ = downloader; httpHeader_ = httpHeader;