Nikolay Sivov (@nsivov) commented about dlls/mf/session.c:
+{
- struct media_source *source;
- struct topo_node *node;
- LIST_FOR_EACH_ENTRY(source, &session->presentation.sources, struct media_source, entry)
- {
source->state = OBJ_STATE_SEEKING;
- }
- LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry)
- {
if (node->type == MF_TOPOLOGY_SOURCESTREAM_NODE || node->type == MF_TOPOLOGY_OUTPUT_NODE)
node->state = OBJ_STATE_SEEKING;
- }
+}
I don't understand this part regarding state transitions. Currently for initial start we do source->Start -> session state == STARTING_SOURCES -> wait for events. Now you call source->Stop(), mark nodes as SEEKING and then start them immediately, while session state is set to STARTING_SOURCES. Does it really work like that? For example what happens if playback is running, you set new position, but source never produces MESourceStopped event? Is that ignored? If it's doing proper transition it would hang waiting for stopped state.
Another thing, calling source->Stop() does not stop the clock, so how does that work?
Regarding output nodes, if the clock is never stopped, do they really ever transition from SEEKING to STARTED?