Same question as Tim Roberts had 9 years ago here:
https://groups.google.com/forum/#!topic/microsoft.public.win32.programmer.directx.video/fZ_SrXPCxqE
It is not entirely clear to me if setting the flag KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY is sufficient to return VFW_S_CANT_CUE - or - if the KSPIN_DISPATCH
SetState also needs to return VFW_S_CANT_CUE when going to PAUSE state?
Thank you in advance,
- Bernard Willaert
Barco
Healthcare Division
Let me rephrase the question correctly now:
It is not entirely clear to me if setting the flag KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY is sufficient to return VFW_S_CANT_CUE - or - if the KSPIN_DISPATCH SetState also needs to return STATUS_NO_DATA_DETECTED when going to PAUSE state?
Thanks,
These are all the flags set on our KSPIN_DESCRIPTOR_EX struct:
m_capturePinDescriptor.Flags = KSPIN_FLAG_GENERATE_MAPPINGS | KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY ;
m_capturePinDescriptor.Flags |= KSPIN_FLAG_HYPERCRITICAL_PROCESSING;
m_capturePinDescriptor.Flags |= KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL;
m_capturePinDescriptor.Flags |= KSPIN_FLAG_ASYNCHRONOUS_PROCESSING;
When I return STATUS_NO_DATA_DETECTED on SetState(PAUSE), the graph refuses to stop in graphedt.
xxxxx@barco.com wrote:
Let me rephrase the question correctly now:
It is not entirely clear to me if setting the flag KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY is sufficient to return VFW_S_CANT_CUE - or - if the KSPIN_DISPATCH SetState also needs to return STATUS_NO_DATA_DETECTED when going to PAUSE state?
The driver in that 9-year-old post returns STATUS_SUCCESS when going to
KSSTATE_PAUSE, and everything works fine.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Thank you, Tim !
This is also exactly what we are doing.
So, setting the flag KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY i sufficient for a kernel mode capture driver to comply with https://msdn.microsoft.com/en-us/library/windows/desktop/dd406917(v=vs.85).aspx?f=255&MSPPError=-2147217396 ?
(If filter cannot deliver data for some reason, it returns VFW_S_CANT_CUE. Live capture filters return this value while paused, because they do not deliver data in the paused state)
Thanks,
xxxxx@barco.com wrote:
Thank you, Tim !
This is also exactly what we are doing.
So, setting the flag KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY i sufficient for a kernel mode capture driver to comply with https://msdn.microsoft.com/en-us/library/windows/desktop/dd406917(v=vs.85).aspx?f=255&MSPPError=-2147217396 ?
(If filter cannot deliver data for some reason, it returns VFW_S_CANT_CUE. Live capture filters return this value while paused, because they do not deliver data in the paused state)
What I can tell you is that the problem no longer happens for me. I
have a capture pin and a still pin, and I was getting graph deadlocks on
the still pin at shutdown until I made that change. Now, it all works fine.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.