2 Push Source Filters (Video+Audio)
-
Wednesday, April 11, 2012 2:09 AM
I successfully implemented a few Push Source filters (some Video and Audio),
But on use of 2 Push Source Filters (a Video and an Audio)
Push Source VIDEO + Push Source AUDIO => the graph hangs on WMV creation (and no file is created)On MPEG2, AVI, AVI MJPG graph successfuly runs, but the audio is too slow. (obviously many sample blocks got repeated, althrough
they are locked by WaitForSingleObject calls
All Replies
-
Thursday, April 12, 2012 5:39 AM
CA 2 LA wrote:>>I successfully implemented a few Push Source filters (some Video and Audio), which>run correctly, if they are only used independently in a graph.>>Graph1:>Push Source VIDEO + RenderFile audio => AVI/WMV9/MPEG2 file creation OK>>Graph2:>Push Source AUDIO + RenderFile video => AVI/WMV9/MPEG2 file creation OK>>>But on use of 2 Push Source Filters (a Video and an Audio)>Push Source VIDEO + Push Source AUDIO => the graph hangs (and no file is created)Where are you getting your timestamps? Are you actually fetchingtimestamps from the graph's master clock? If your timestamps are confused,it's quite easy to have one side get so far ahead that the other side runsout of free buffers.--Tim Roberts, timr@probo.comProvidenza & Boekelheide, Inc.
Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.- Marked As Answer by CA 2 LA Friday, March 08, 2013 4:13 AM
-
Thursday, April 12, 2012 11:16 PM
thank you for your answer.
timestamps are set directly on the sample within the FillBuffer methods. They are incremently done based on current frame ID,
as in Microsoft's Push Source Sample:
REFERENCE_TIME rtStart = frameID* m_rtFrameLength;
REFERENCE_TIME rtStop = rtStart + m_rtFrameLength;pSample->SetTime(&rtStart, &rtStop);
rtStart = frameID;
rtStop = frameID + 1;
pSample->SetMediaTime(&rtStart, &rtStop); // this line is not in sample, but it doesn't work with it and also not without it
frameID++;
// Set TRUE on every sample for uncompressed frames
pSample->SetSyncPoint(TRUE); // no influence if TRUE or FALSEpSample->SetDiscontinuity(TRUE); // no influence if TRUE or FALSE
-
Friday, February 15, 2013 1:17 AM
I'm back on this issue. Now the graph already runs on MPEG2 / AVI / AVI_MJPG, sound is ok now.
On WMV the graph still hangs after a few frames.
-
Tuesday, February 26, 2013 7:33 PM
I'm back on this issue. Now the graph already runs on MPEG2 / AVI / AVI_MJPG, sound is ok now.
On WMV the graph still hangs after a few frames.
I already did some improvements for live recording on WMV with Audio+Video PushSource based on http://social.msdn.microsoft.com/Forums/ja/windowsdirectshowdevelopment/thread/31a81f50-a158-463a-9e8c-669b78c173f9
but unfortunately after one second the graph does not submit anymore frames. Finalizing it is ok, but then only a short videp with about 1 second audio+video is written.
And QueryInterface IID_IWMVideoMediaProps returns "not supported interface" 80004002 on MediaProps and on th e Stream Config.
The call Deliver(pSample); method does not return.
What can there be wrong?
I now also built one filter with 2 output pins (video+audio), but same result!
-
Friday, March 08, 2013 3:26 AM
finally both source filters wotk on WMV .


