On Tue Sep 3 13:56:42 2024 +0000, Nikolay Sivov wrote:
I have a couple of comments, or maybe questions. Do you know how do we get in this state when it gets as far as ProcessSample(), but type is not set? SetCurrentMediaType() sets type both the mixer, and notifies the presenter. Do we need the same "loop" when other presenter methods fail similarly? Regarding MEError, is that only to unblock waits? What might be interesting to test is if all common error codes produce MEError and not MENonFatalError. Those are listed at IMFStreamSink::ProcessSample doc page.
The media type is set, but then the game clears it when `IMFTopologyServiceLookupClient::ReleaseServicePointers` is called. We are calling `ReleaseServicePointers` as a result of setting the presentation clock.
The MEError is passed to the application, I guess so it has some idea that an error occurred. The game I was looking at did not seem to use it though.
I tried those errors on the `IMFStreamSink::ProcessSample` doc page, and some don't send a message to the application at all. In all cases however, a `MFVP_MESSAGE_ENDSTREAMING` message is sent to the presenter.
The errors that didn't generate a message to the application were: - MF_E_INVALID_STATE_TRANSITION; - MF_E_INVALIDREQUEST; - MF_E_NO_CLOCK; - MF_E_SHUTDOWN; and - MF_E_STREAMSINK_REMOVED
All the rest send an MEError (including some random error codes I tried, so the list above seem to be exceptions).
I'll now try the other presenter methods with MF_E_TRANSFORM_TYPE_NOT_SET and see if any others enter a loop.