-
Notifications
You must be signed in to change notification settings - Fork 18
Feature/rdkemw 12692 #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feature/rdkemw 12692 #438
Changes from 11 commits
d8f1b1c
c0ec6dc
0c57f2f
3c0c5ae
d704fc2
c8e44b6
c6fa3c4
7732ba1
77701f6
2cdbf6b
fb0f618
a0c4f24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -188,6 +188,30 @@ class IMediaPipelineIpc | |||||
| */ | ||||||
| virtual bool setImmediateOutput(int32_t sourceId, bool immediateOutput) = 0; | ||||||
|
|
||||||
| /** | ||||||
| * @brief Sets the "Report Decode Errors" property for this source. | ||||||
| * | ||||||
| * This method is asynchronous, it will set the "Report Decode Errors" property | ||||||
| * | ||||||
| * @param[in] sourceId : The source id. Value should be set to the MediaSource.id returned after attachSource() | ||||||
| * @param[in] reportDecodeErrors : Set Report Decode Errors mode on the sink | ||||||
| * | ||||||
| * @retval true on success. | ||||||
| */ | ||||||
| virtual bool setReportDecodeErrors(int32_t sourceId, bool reportDecodeErrors) = 0; | ||||||
|
|
||||||
| /** | ||||||
| * @brief Gets the queued frames for this source. | ||||||
| * | ||||||
| * This method is synchronous, it gets the queued frames property | ||||||
| * | ||||||
| * @param[in] sourceId : The source id. Value should be set to the MediaSource.id returned after attachSource() | ||||||
| * @param[out] queuedFrames : Get queued frames on the decoder | ||||||
|
||||||
| * @param[out] queuedFrames : Get queued frames on the decoder | |
| * @param[out] queuedFrames : The number of queued frames on the decoder |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MediaPipelineIpcMock is missing MOCK_METHOD declarations for the new setReportDecodeErrors and getQueuedFrames methods. These need to be added after the setImmediateOutput/getImmediateOutput methods to maintain consistency with the interface and enable proper unit testing.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -567,6 +567,73 @@ bool MediaPipelineIpc::setImmediateOutput(int32_t sourceId, bool immediateOutput | |
| return true; | ||
| } | ||
|
|
||
| bool MediaPipelineIpc::setReportDecodeErrors(int32_t sourceId, bool reportDecodeErrors) | ||
| { | ||
| if (!reattachChannelIfRequired()) | ||
| { | ||
| RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected"); | ||
| return false; | ||
| } | ||
|
|
||
| firebolt::rialto::ReportDecodeErrorsRequest request; | ||
|
|
||
| request.set_session_id(m_sessionId); | ||
| request.set_source_id(sourceId); | ||
| request.set_report_decode_errors(reportDecodeErrors); | ||
|
|
||
| firebolt::rialto::ReportDecodeErrorsResponse response; | ||
| auto ipcController = m_ipc.createRpcController(); | ||
| auto blockingClosure = m_ipc.createBlockingClosure(); | ||
| m_mediaPipelineStub->setReportDecodeErrors(ipcController.get(), &request, &response, blockingClosure.get()); | ||
|
|
||
| // wait for the call to complete | ||
| blockingClosure->wait(); | ||
|
|
||
| // check the result | ||
| if (ipcController->Failed()) | ||
| { | ||
| RIALTO_CLIENT_LOG_ERROR("failed to set report decode error due to '%s'", ipcController->ErrorText().c_str()); | ||
| return false; | ||
| } | ||
|
|
||
| return true; | ||
| } | ||
|
Comment on lines
+570
to
+600
|
||
|
|
||
| bool MediaPipelineIpc::getQueuedFrames(int32_t sourceId, uint32_t &queuedFrames) | ||
| { | ||
| if (!reattachChannelIfRequired()) | ||
| { | ||
| RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected"); | ||
| return false; | ||
| } | ||
|
|
||
| firebolt::rialto::GetQueuedFramesRequest request; | ||
|
|
||
| request.set_session_id(m_sessionId); | ||
| request.set_source_id(sourceId); | ||
|
|
||
| firebolt::rialto::GetQueuedFramesResponse response; | ||
| auto ipcController = m_ipc.createRpcController(); | ||
| auto blockingClosure = m_ipc.createBlockingClosure(); | ||
| m_mediaPipelineStub->getQueuedFrames(ipcController.get(), &request, &response, blockingClosure.get()); | ||
|
|
||
| // wait for the call to complete | ||
| blockingClosure->wait(); | ||
|
|
||
| // check the result | ||
| if (ipcController->Failed()) | ||
| { | ||
| RIALTO_CLIENT_LOG_ERROR("failed to get queued frames due to '%s'", ipcController->ErrorText().c_str()); | ||
| return false; | ||
| } | ||
| else | ||
| { | ||
| queuedFrames = response.queued_frames(); | ||
| } | ||
|
|
||
| return true; | ||
| } | ||
|
Comment on lines
602
to
635
|
||
|
|
||
| bool MediaPipelineIpc::getImmediateOutput(int32_t sourceId, bool &immediateOutput) | ||
| { | ||
| if (!reattachChannelIfRequired()) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -313,6 +313,16 @@ bool MediaPipeline::setImmediateOutput(int32_t sourceId, bool immediateOutput) | |
| return m_mediaPipelineIpc->setImmediateOutput(sourceId, immediateOutput); | ||
| } | ||
|
|
||
| bool MediaPipeline::setReportDecodeErrors(int32_t sourceId, bool reportDecodeErrors) | ||
| { | ||
| return m_mediaPipelineIpc->setReportDecodeErrors(sourceId, reportDecodeErrors); | ||
| } | ||
|
|
||
| bool MediaPipeline::getQueuedFrames(int32_t sourceId, uint32_t &queuedFrames) | ||
| { | ||
| return m_mediaPipelineIpc->getQueuedFrames(sourceId, queuedFrames); | ||
| } | ||
|
Comment on lines
+316
to
+324
|
||
|
|
||
| bool MediaPipeline::getImmediateOutput(int32_t sourceId, bool &immediateOutput) | ||
| { | ||
| return m_mediaPipelineIpc->getImmediateOutput(sourceId, immediateOutput); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1227,6 +1227,30 @@ class IMediaPipeline | |||||
| */ | ||||||
| virtual bool setImmediateOutput(int32_t sourceId, bool immediateOutput) = 0; | ||||||
|
|
||||||
| /** | ||||||
| * @brief Sets the "Report Decode Errors" property for this source. | ||||||
| * | ||||||
| * This method is asynchronous, it will set the "Report Decode Errors" property | ||||||
| * | ||||||
| * @param[in] sourceId : The source id. Value should be set to the MediaSource.id returned after attachSource() | ||||||
| * @param[in] reportDecodeErrors : Set Report Decode Errors mode on the sink | ||||||
|
||||||
| * @param[in] reportDecodeErrors : Set Report Decode Errors mode on the sink | |
| * @param[in] reportDecodeErrors : Set Report Decode Errors mode on the decoder |
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation says "Get queued frames on the decoder" but this should be more clear about the parameter direction. It should read "The number of queued frames on the decoder" or "Returns the number of queued frames on the decoder" to match the style of similar getter documentation in this interface.
| * @param[out] queuedFrames : Get queued frames on the decoder | |
| * @param[out] queuedFrames : The number of queued frames on the decoder |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -80,6 +80,13 @@ class IGstGenericPlayerPrivate | |||||
| */ | ||||||
| virtual bool setImmediateOutput() = 0; | ||||||
|
|
||||||
| /** | ||||||
| * @brief Sets report decode error. Called by the worker thread. | ||||||
| * | ||||||
| * @retval true on success. | ||||||
| */ | ||||||
| virtual bool setReportDecodeErrors() = 0; | ||||||
|
||||||
| virtual bool setReportDecodeErrors() = 0; | |
| virtual bool setReportDecodeErrors() = 0; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||
| /* | ||||||
| * If not stated otherwise in this file or this component's LICENSE file the | ||||||
| * following copyright and licenses apply: | ||||||
| * | ||||||
| * Copyright 2026 Sky UK | ||||||
|
||||||
| * Copyright 2026 Sky UK | |
| * Copyright 2025 Sky UK |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -196,6 +196,26 @@ class IGstGenericPlayer | |||||||||
| */ | ||||||||||
| virtual bool setImmediateOutput(const MediaSourceType &mediaSourceType, bool immediateOutput) = 0; | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * @brief Sets the "Report Decode Error" property for this source. | ||||||||||
| * | ||||||||||
| * @param[in] mediaSourceType : The media source type | ||||||||||
| * @param[in] reportDecodeErrors : Set report decode error | ||||||||||
| * | ||||||||||
| * @retval true on success. | ||||||||||
| */ | ||||||||||
| virtual bool setReportDecodeErrors(const MediaSourceType &mediaSourceType, bool reportDecodeErrors) = 0; | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * @brief Gets the queued frames for this source. | ||||||||||
| * | ||||||||||
| * @param[in] mediaSourceType : The media source type | ||||||||||
| * @param[out] queuedFrames : Get queued frames mode on the decoder | ||||||||||
|
||||||||||
| * @param[out] queuedFrames : Get queued frames mode on the decoder | |
| * @param[out] queuedFrames : The number of queued frames on the decoder |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "Get queued frames mode on the decoder" is awkwardly phrased. It should be "Number of queued frames on the decoder" or "Gets the number of queued frames on the decoder" to be clearer and match similar documentation patterns in the codebase.
| * @param[out] queuedFrames : Get queued frames mode on the decoder | |
| * @param[out] queuedFrames : Number of queued frames on the decoder |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GstGenericPlayerMock is missing MOCK_METHOD declarations for the new setReportDecodeErrors and getQueuedFrames methods. These need to be added to maintain consistency with the interface and enable proper unit testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation incorrectly states that the property is set "on the sink". The report_decode_errors property is set on the decoder, not the sink. This should be corrected to "Set Report Decode Errors mode on the decoder".