When I do not set any PreferedPositionFormat I get MediaTime as default. Did some more testing with this:
My mpeg-loop has a duration of 1.59 seconds, and contains 32 frames. I.e. a frame rate of about 20FPS. I now step with 0.05 second intervals as follows:
mediaPlayer.MediaPosition = Math.Min(duration, position + 500000);
This shows exactly the same behavior as when stepping with position format Frame. The display is updated only for every second step. I also tried to double the increment to 1000000. I can see that this doubles the length of the steps, but still the display
is only updated once for every two steps.
When using the same DirectShow filters with MediaElement/MediaTimeline I have seen that I can do Seek with an increment/decrement of 0.05 seconds and get a display update for every single step. This indicates that the filters are not the problem here. Renderer
is different though - with the MediaUriElement code I get VideoMixingRenderer9, while MediaElement gives me Enhanced Video Renderer. I tried to check if this was the problem by changing renderer for the MediaUriElement:
m_renderer = AddFilterByName(m_graph, FilterCategory.LegacyAmFilterCategory, "Video Renderer");
This works (display in separate window though), and gives the same behavior regarding stepping - only updates for every second step. Attempting to create "Enhanced Video Renderer" the same way did not work, so I cannot really say for sure whether
or not the renderer is the problem.
Any clues to how I can solve this / what more I can test to figure out where the problem is?