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
2 changes: 1 addition & 1 deletion InterfacePlayerRDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class InterfacePlayerRDK
*/
static gboolean IdleCallbackFirstVideoFrameDisplayed(gpointer user_data);
/*Callback function types for various GStreamer events*/
using BusMessageCallback = std::function<void(const BusEventData)>;
using BusMessageCallback = std::function<void(const BusEventData &)>;
using HandleOnGstBufferUnderflowCb = std::function<void(int mediaType)>;
using HandleOnGstDecodeErrorCb = std::function<void(int CbCount)>;
using HandleOnGstPtsErrorCb = std::function<void(bool isVideo, bool isAudioSink)>;
Expand Down
2 changes: 1 addition & 1 deletion PlayerScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int PlayerScheduler::ScheduleTask(PlayerAsyncTaskObj obj)
mNextTaskId = PLAYER_SCHEDULER_ID_DEFAULT;
}
obj.mId = id;
mTaskQueue.push_back(obj);
mTaskQueue.push_back(std::move(obj));
mQCond.notify_one();
}
else
Expand Down
4 changes: 2 additions & 2 deletions drm/DrmSessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ string _extractSubstring(string parentStr, string startStr, string endStr)
* @return bool - true if keyId is already marked as failed or cached,
* false if key is not cached
*/
bool DrmSessionManager::IsKeyIdProcessed(std::vector<uint8_t> keyIdArray, bool &status)
bool DrmSessionManager::IsKeyIdProcessed(const std::vector<uint8_t> &keyIdArray, bool &status)
{
bool ret = false;
std::lock_guard<std::mutex> guard(cachedKeyMutex);
Expand Down Expand Up @@ -950,7 +950,7 @@ KeyState DrmSessionManager::getDrmSession(int &err, std::shared_ptr<DrmHelper> d
/**
* @brief Initialize the Drm System with InitData(PSSH)
*/
KeyState DrmSessionManager::initializeDrmSession(std::shared_ptr<DrmHelper> drmHelper, int sessionSlot, int &err )
KeyState DrmSessionManager::initializeDrmSession(const std::shared_ptr<DrmHelper> &drmHelper, int sessionSlot, int &err )
{
KeyState code = KEY_ERROR;

Expand Down
4 changes: 2 additions & 2 deletions drm/DrmSessionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class DrmSessionManager
* @return bool - true if keyId is already marked as failed or processed,
* false if key is not cached
*/
bool IsKeyIdProcessed(std::vector<uint8_t> keyIdArray, bool &status);
bool IsKeyIdProcessed(const std::vector<uint8_t> &keyIdArray, bool &status);
/**
* @fn Validate multiple key IDs for a given DRM session slot using the provided DrmHelper
*
Expand Down Expand Up @@ -437,7 +437,7 @@ class DrmSessionManager
/**
* @fn initializeDrmSession
*/
KeyState initializeDrmSession(DrmHelperPtr drmHelper, int sessionSlot, int &err );
KeyState initializeDrmSession(const DrmHelperPtr &drmHelper, int sessionSlot, int &err );
/**
* @fn notifyCleanup
*/
Expand Down
2 changes: 1 addition & 1 deletion drm/helper/ClearKeyHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void ClearKeyHelper::generateLicenseRequest(const ChallengeInfo& challengeInfo,
}
}

void ClearKeyHelper::transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const
void ClearKeyHelper::transformLicenseResponse(const std::shared_ptr<DrmData> &licenseResponse) const
{
// HLS requires the returned key to be transformed into a JWK.
// For DASH it will already be in JWK format
Expand Down
2 changes: 1 addition & 1 deletion drm/helper/ClearKeyHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ClearKeyHelper : public DrmHelper

void generateLicenseRequest(const ChallengeInfo& challengeInfo, LicenseRequest& licenseRequest) const override;

void transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const override;
void transformLicenseResponse(const std::shared_ptr<DrmData> &licenseResponse) const override;

virtual const std::string& friendlyName() const override { return FRIENDLY_NAME; };

Expand Down
2 changes: 1 addition & 1 deletion drm/helper/DrmHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class DrmHelper
* @brief Transform the license response from the server into the necessary format for OCDM
* @param licenseResponse license response from the server to transform
*/
virtual void transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const {}
virtual void transformLicenseResponse(const std::shared_ptr<DrmData> &licenseResponse) const {}

/**
* @brief Get the memory system used to transform data for transmission
Expand Down
2 changes: 1 addition & 1 deletion drm/helper/VerimatrixHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void VerimatrixHelper::generateLicenseRequest(const ChallengeInfo& challengeInfo
licenseRequest.payload = "";
}

void VerimatrixHelper::transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const
void VerimatrixHelper::transformLicenseResponse(const std::shared_ptr<DrmData> &licenseResponse) const
{
if(!licenseResponse)
{
Expand Down
2 changes: 1 addition & 1 deletion drm/helper/VerimatrixHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class VerimatrixHelper: public DrmHelper

void generateLicenseRequest(const ChallengeInfo& challengeInfo, LicenseRequest& licenseRequest) const;

void transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const;
void transformLicenseResponse(const std::shared_ptr<DrmData> &licenseResponse) const;

virtual const std::string& friendlyName() const override { return FRIENDLY_NAME; };

Expand Down
6 changes: 3 additions & 3 deletions externals/PlayerThunderAccessBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class PlayerThunderAccessBase
* @param audData vector to be filled with audio data
* @return string of current track pk
*/
virtual std::string GetAudioTracksOta(std::vector<PlayerAudioData> audData) = 0;
virtual std::string GetAudioTracksOta(std::vector<PlayerAudioData> &audData) = 0;

/**
* @fn SetAudioTrackOta
Expand All @@ -303,7 +303,7 @@ class PlayerThunderAccessBase
* @param txtData vector to be filled with text data
* @return true if successful, false if failed
*/
virtual bool GetTextTracksOta(std::vector<PlayerTextData> txtData) = 0;
virtual bool GetTextTracksOta(std::vector<PlayerTextData> &txtData) = 0;

/**
* @fn DisableContentRestrictionsOta
Expand Down Expand Up @@ -333,7 +333,7 @@ class PlayerThunderAccessBase
* @param onPlayerErrorHandlerCb player error handler callback
* @return true if successful, false if failed
*/
virtual bool StartRmf(std::string url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb) = 0;
virtual bool StartRmf(const std::string &url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb) = 0;

/**
* @fn StopRmf
Expand Down
12 changes: 6 additions & 6 deletions externals/PlayerThunderInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,19 @@ void PlayerThunderInterface::SetPreferredAudioLanguages(PlayerPreferredAudioData
m_pThunderAccess->SetPreferredAudioLanguages(std::move(data), shim);
}

std::string PlayerThunderInterface::GetAudioTracksOta(std::vector<PlayerAudioData> audData)
std::string PlayerThunderInterface::GetAudioTracksOta(std::vector<PlayerAudioData> &audData)
{
return m_pThunderAccess->GetAudioTracksOta(std::move(audData));
return m_pThunderAccess->GetAudioTracksOta(audData);
}

std::string PlayerThunderInterface::SetAudioTrackOta(int index, int primaryKey)
{
return m_pThunderAccess->SetAudioTrackOta(index, primaryKey);
}

bool PlayerThunderInterface::GetTextTracksOta(std::vector<PlayerTextData> txtData)
bool PlayerThunderInterface::GetTextTracksOta(std::vector<PlayerTextData> &txtData)
{
return m_pThunderAccess->GetTextTracksOta(std::move(txtData));
return m_pThunderAccess->GetTextTracksOta(txtData);
}

void PlayerThunderInterface::DisableContentRestrictionsOta(long grace, long time, bool eventChange)
Expand All @@ -401,9 +401,9 @@ bool PlayerThunderInterface::InitRmf()
return m_pThunderAccess->InitRmf();
}

bool PlayerThunderInterface::StartRmf(std::string url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb)
bool PlayerThunderInterface::StartRmf(const std::string &url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb)
{
return m_pThunderAccess->StartRmf(std::move(url), std::move(onPlayerStatusHandlerCb), std::move(onPlayerErrorHandlerCb));
return m_pThunderAccess->StartRmf(url, std::move(onPlayerStatusHandlerCb), std::move(onPlayerErrorHandlerCb));
}

void PlayerThunderInterface::StopRmf()
Expand Down
6 changes: 3 additions & 3 deletions externals/PlayerThunderInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class PlayerThunderInterface
* @param audData vector to be filled with audio data
* @return string of current track pk
*/
std::string GetAudioTracksOta(std::vector<PlayerAudioData> audData);
std::string GetAudioTracksOta(std::vector<PlayerAudioData> &audData);

/**
* @fn SetAudioTrackOta
Expand All @@ -183,7 +183,7 @@ class PlayerThunderInterface
* @param txtData vector to be filled with text data
* @return true if successful, false if failed
*/
bool GetTextTracksOta(std::vector<PlayerTextData> txtData);
bool GetTextTracksOta(std::vector<PlayerTextData> &txtData);

/**
* @fn DisableContentRestrictionsOta
Expand Down Expand Up @@ -217,7 +217,7 @@ class PlayerThunderInterface
* @param onPlayerErrorHandlerCb player error handler callback
* @return true if successful, false if failed
*/
bool StartRmf(std::string url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb);
bool StartRmf(const std::string &url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb);

/**
* @fn StopRmf
Expand Down
6 changes: 3 additions & 3 deletions externals/rdk/PlayerThunderAccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ int PlayerThunderAccess::GetAudioTrackInternal_OTA()
/**
* @brief GetAudioTracks get the available audio tracks for the selected service / media
*/
std::string PlayerThunderAccess::GetAudioTracksOta(std::vector<PlayerAudioData> audData)
std::string PlayerThunderAccess::GetAudioTracksOta(std::vector<PlayerAudioData> &audData)
{
Comment on lines +717 to 718
JsonObject param;
JsonObject result;
Expand Down Expand Up @@ -789,7 +789,7 @@ std::string PlayerThunderAccess::SetAudioTrackOta(int trackId, int primaryKey)
/**
* @brief GetTextTracks get the available text tracks for the selected service / media
*/
bool PlayerThunderAccess::GetTextTracksOta(std::vector<PlayerTextData> txtData)
bool PlayerThunderAccess::GetTextTracksOta(std::vector<PlayerTextData> &txtData)
{
Comment on lines +792 to 793
MW_LOG_TRACE("[OTA_SHIM]");
JsonObject param;
Expand Down Expand Up @@ -930,7 +930,7 @@ void PlayerThunderAccess::onPlayerErrorHandler_RMF(const JsonObject& parameters)
mOnPlayerErrorHandlerCb(std::move(error_message));
}

bool PlayerThunderAccess::StartRmf(std::string url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb)
bool PlayerThunderAccess::StartRmf(const std::string &url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb)
{
bool bRet = true;
mOnPlayerStatusHandlerCb = std::move(onPlayerStatusHandlerCb);
Expand Down
6 changes: 3 additions & 3 deletions externals/rdk/PlayerThunderAccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class PlayerThunderAccess : public PlayerThunderAccessBase
* @param audData vector to be filled with audio data
* @return string of current track pk
*/
std::string GetAudioTracksOta(std::vector<PlayerAudioData> audData) override;
std::string GetAudioTracksOta(std::vector<PlayerAudioData> &audData) override;

/**
* @fn SetAudioTrackOta
Expand All @@ -195,7 +195,7 @@ class PlayerThunderAccess : public PlayerThunderAccessBase
* @param txtData vector to be filled with text data
* @return true if successful, false if failed
*/
bool GetTextTracksOta(std::vector<PlayerTextData> txtData) override;
bool GetTextTracksOta(std::vector<PlayerTextData> &txtData) override;

/**
* @fn DisableContentRestrictionsOta
Expand Down Expand Up @@ -225,7 +225,7 @@ class PlayerThunderAccess : public PlayerThunderAccessBase
* @param onPlayerErrorHandlerCb player error handler callback
* @return true if successful, false if failed
*/
bool StartRmf(std::string url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb) override;
bool StartRmf(const std::string &url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb) override;

/**
* @fn StopRmf
Expand Down
6 changes: 3 additions & 3 deletions test/utests/fakes/FakePlayerThunderInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void PlayerThunderInterface::StopOta()
{
}

std::string PlayerThunderInterface::GetAudioTracksOta(std::vector<PlayerAudioData> audData)
std::string PlayerThunderInterface::GetAudioTracksOta(std::vector<PlayerAudioData> &audData)
{
std::string ret = "";
return ret;
Expand All @@ -96,7 +96,7 @@ std::string PlayerThunderInterface::SetAudioTrackOta(int index, int primaryKey)
return ret;
}

bool PlayerThunderInterface::GetTextTracksOta(std::vector<PlayerTextData> txtData)
bool PlayerThunderInterface::GetTextTracksOta(std::vector<PlayerTextData> &txtData)
{
return false;
}
Expand All @@ -114,7 +114,7 @@ bool PlayerThunderInterface::InitRmf()
return false;
}

bool PlayerThunderInterface::StartRmf(std::string url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb)
bool PlayerThunderInterface::StartRmf(const std::string &url, std::function<void(std::string)> onPlayerStatusHandlerCb, std::function<void(std::string)> onPlayerErrorHandlerCb)
{
return false;
}
Expand Down
Loading