Changes to the way flushing is handled#1692
Draft
anshephe wants to merge 20 commits into
Draft
Conversation
not being stopped for trickplay
This reverts commit ff897d1.
(Trying to match non-direct rialto behaviour)
changed the code to check the rate
(which appears to be the case of what is happening in live trickplay)
Enabled applied_rate setting following Flush
All void methods in PrivateInstanceAAMPNotifiable now post their work to the AAMP scheduler thread rather than calling PrivateInstanceAAMP directly from the Rialto callback thread. This eliminates the AB/BA deadlock where the AAMP main thread holds mLock or mStreamLock waiting for a Rialto call to return while the Rialto callback thread simultaneously tries to acquire the same lock through NotifyFirstFrameReceived, NotifyEOSReached, NotifySpeedChanged, etc. The two return-value methods (GetState, GetProgressReportIntervalSeconds) remain synchronous — GetState reads a std::atomic and the config read in GetProgressReportIntervalSeconds does not contend with Rialto locks. Test coverage: all 15 PrivateInstanceAAMPNotifiable tests pass. Tests updated to expect ScheduleAsyncTask calls and execute tasks inline to verify correct argument forwarding. New tests added for NotifyBufferUnderflow (both monitor-enabled and monitor-disabled paths) and SendMonitorAvEvent.
SEEKING and SEEK_DONE. ALso clearing the playing and eos flags replicating a flush Changed addSegment and haveData, as the simulator was behaving as if the segment was ready to be processed on the call to addSegment which isn't correct. It is released to Rialto on the haveData call. Reworked the needData notification, to consider request_ids before a flush/setPosition to be stale and ignored. Also it seemed that it was sending all sources the next needData for each haveData response rather than limiting it to the specific source. These changes need further examination
Flush() was reworked to use a pipeline-level setPosition() + SEEK_DONE notification instead of per-source flush() + notifySourceFlushed(), but 11 tests (including 2 new ones added by this branch) still drove flush completion via the now-dead notifySourceFlushed()/OnSourceFlushed() path, so their EXPECT_CALL assertions on pipeline->flush()/setSourcePosition() were never satisfied. Rewired all affected tests to call PostPlaybackState(SEEK_DONE) and assert on setPosition()/setSourcePosition() per the new implementation, correcting two assertions that encoded the old (now incorrect) resetTime/rate semantics. Also added the state-machine onStop/onReconfigure test cases that were missing per-state coverage for the new individual overrides, and removed the now-unused PostSourceFlushed test helper. Files changed: - test/utests/tests/AampRialtoPlayerTests/AampRialtoPlayerTestCases.cpp — rewired 11 tests to the SEEK_DONE flow; removed dead helper - test/utests/tests/AampPlayerStateMachineTests/AampPlayerStateMachineTestCases.cpp — added 5 missing onStop/onReconfigure per-state tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.