Skip to content
Open
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
1 change: 0 additions & 1 deletion GstUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,3 @@ void PlayerCliGstTerm()
{
gst_deinit();
}

2 changes: 1 addition & 1 deletion InterfacePlayerRDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5138,7 +5138,7 @@ void InterfacePlayerRDK::InitializePlayerGstreamerPlugins()
if (!gst_init_check(nullptr, nullptr, nullptr)) {
MW_LOG_ERR("gst_init_check() failed");
}

SocUtils::Init();
#define PLUGINS_TO_LOWER_RANK_MAX 2
static const char *plugins_to_lower_rank[PLUGINS_TO_LOWER_RANK_MAX] = {
"aacparse",
Expand Down
25 changes: 17 additions & 8 deletions SocUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@

namespace SocUtils
{
static std::shared_ptr<SocInterface> socInterface = SocInterface::CreateSocInterface();
static std::shared_ptr<SocInterface> GetSocInterface()
{
static std::shared_ptr<SocInterface> socInterface = SocInterface::CreateSocInterface();
return socInterface;
}

void Init()
{
(void)GetSocInterface();
}
Comment on lines +36 to +39
/**
* @brief Checks if AppSrc should be used for progressive playback.
*
Expand All @@ -38,7 +47,7 @@ namespace SocUtils
*/
bool UseAppSrcForProgressivePlayback( void )
{
return socInterface->UseAppSrc();
return GetSocInterface()->UseAppSrc();
}

/**
Expand All @@ -51,7 +60,7 @@ namespace SocUtils
*/
bool UseWesterosSink( void )
{
return socInterface->UseWesterosSink();
return GetSocInterface()->UseWesterosSink();
}

/**
Expand All @@ -63,7 +72,7 @@ namespace SocUtils
*/
bool IsAudioFragmentSyncSupported( void )
{
return socInterface->IsAudioFragmentSyncSupported();
return GetSocInterface()->IsAudioFragmentSyncSupported();
}

/**
Expand All @@ -76,7 +85,7 @@ namespace SocUtils
*/
bool EnableLiveLatencyCorrection( void )
{
return socInterface->EnableLiveLatencyCorrection();
return GetSocInterface()->EnableLiveLatencyCorrection();
}

/**
Expand All @@ -89,7 +98,7 @@ namespace SocUtils
*/
int RequiredQueuedFrames( void )
{
return socInterface->RequiredQueuedFrames();
return GetSocInterface()->RequiredQueuedFrames();
}

/**
Expand All @@ -102,7 +111,7 @@ namespace SocUtils
*/
bool EnablePTSRestamp(void)
{
return socInterface->EnablePTSRestamp();
return GetSocInterface()->EnablePTSRestamp();
}
/**
* @brief Resets segment event flags during trickplay transitions.
Expand All @@ -111,7 +120,7 @@ namespace SocUtils
*/
bool ResetNewSegmentEvent()
{
return socInterface->ResetNewSegmentEvent();
return GetSocInterface()->ResetNewSegmentEvent();
}
/**
* @brief Check if GST Subtec is enabled
Expand Down
7 changes: 7 additions & 0 deletions SocUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

namespace SocUtils
{
Comment thread
ALSAMEEMA marked this conversation as resolved.
/**
* @brief Initializes access to SOC-specific runtime capabilities.
*
* This function can be used to perform eager initialization during startup.
* SocUtils accessors also perform lazy initialization when needed.
*/
void Init();
/**
* @brief Checks if AppSrc should be used for progressive playback.
*
Expand Down
4 changes: 4 additions & 0 deletions test/utests/fakes/FakeSocUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

namespace SocUtils
{
void Init()
{
}

void InitializePlatformConfigs()
{
}
Expand Down
Loading