0

I'm currently trying to implement my own source filter in order to decode a MOV file given as input. I have been following the various examples available on the web and within the WinSDK 7.1 samples folder and I ended up with the following :

  1. A CSource subclass that implements CreateInstance

  2. A CSourceStream subclass that uimplements the following :

    • DecideBufferSize
    • GetMediaType
    • Notify
    • FillBuffer

Note that I'm currently not implementing any kind of seeking handling.

Currently my filter can be instantiated through graphstudio and exposes 1 video output pin. I am able to render it all the way through the VMR7.

My issue comes when i click play. My FillBuffer method is called once and graphstudio fails reporting an assert failure inside source.cpp @ line 317 : ASSERT(!ThreadExists()).

Could anyone tell me what I'm doing wrong here ? It seems like there is some kind of issue with the ::Active() method of the base pin but I'm not sure what exactly.

I'll be happy to provide with more detailed source code if needed.

Thanks in advance.

asked Sep 13, 2014 at 8:42

2 Answers 2

1

Ok so I finally got it working.

If anyone encounters the same issue, this came from the pin registration from the CSource filter. I was using the AddPin method to register my pin. This somehow caused the CSource internal state to fail in some way. Accessing directly the m_paStreams array as done in the directshow sample resolved my problem.

answered Sep 14, 2014 at 3:30
Sign up to request clarification or add additional context in comments.

Comments

0

The issue is presumably caused by the way you override base classes methods.

Assertion failure suggest that execution reached the place where it should not be at all until filter is stopped and then re-started once again. I would say that it should have returned higher a few lines (line 303) but for some reason it did not. The wrong value of IsActive does not indicate the method itself is wrong, instead it is likely to be something with an override.

answered Sep 13, 2014 at 12:01

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.