0

I develop a directshow filter that have audio and video output pins.

If i connect only one of those pins to related renderer. playing is very smooth and correct.

But when i connect both pins to renderers, playing is failed.

I know i need to synchronize two streams (audio & video) with usage of timestamp of media samples and GetLatency function. but i don't how use and config those.

Thanks for any help or suggestion.

asked Jun 24, 2015 at 9:00

1 Answer 1

1

The given information suggests that you push data from the same thread or otherwise ignore pre-buffering and blocking taking place during delivery. This would add interference between the streams, be sure to push data from independent worker threads.

answered Jun 24, 2015 at 10:19
Sign up to request clarification or add additional context in comments.

4 Comments

Each pin inherits from CSourceStream. So each pin has own thread.
They might have internal lock accessing some internal resources. There is no fundamental problem that prevents from pushing 2+ streams smoothly. Accurate trace of data should show where exactly you under-filling the pipeline in case of video+audio transmission.
Then, no need any synchronization between two streams? and no need to use IAMPushSource interface and GetLatency method?. I couln't find any things that shared between two pins, each pin has own buffer, context, decoder, CCritSec, etc. , could you please tell me more details?
You push streams independently and leave time stamps in order for renderers to be able to synchornize. Video and audio renderers use time stamps and shared clock and schedule presentation in respective way. Your pins needs to simply push/deliver samples as quick as they can.

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.