Re: Live Source Filter Video and Audio Synchronization
- From: "Troy" <pkferreras@xxxxxxxxx>
- Date: 30 Mar 2006 20:06:23 -0800
hi!
I sincerely thank you for your concern regarding my problem.
Regarding of the Clock problem, I was able to apply a solution to it(I
hope my soultion is rigth) what I did is I pass a NULL value to
SetSyncSource, here is the snippet of the code
I palce this in the method in the filter that will initiate the
rendering of the output pin
IAMGraphStreams * amGraphStreams;
IMediaFilter* mediaFilter;
pGraph = this->GetFilterGraph();
HRESULT hr = pGraph->QueryInterface(IID_IAMGraphStreams
, (void
**)&amGraphStreams);
if(!FAILED(hr)){
amGraphStreams->SyncUsingStreamOffset(TRUE);
}
hr = pGraph->QueryInterface(IID_IMediaFilter, (void **)&mediaFilter);
if(SUCCEEDED(hr)){
mediaFilter->SetSyncSource(NULL);
}
phr = pOutPin->QueryInterface(IID_IPin, (void **)&pPin);
if (SUCCEEDED(phr)) {
pGraph = this->GetFilterGraph();
ASSERT(pGraph);
IGraphBuilder *pBuilder = (IGraphBuilder*)pGraph;
ASSERT(pBuilder);
phr = pBuilder->Render(pOutPin);
}
return phr;
honestly I'm not quite sure if this is the rigth place to set the
amGraphStreams->SyncUsingStreamOffset(TRUE);
mediaFilter->SetSyncSource(NULL);
Do you think that graph filter does not take my filter as its reference
clock?
translate your timestamps to allow for latency.How can I do this??
can you expalin this further? asnippet of code will help alot.
I assume that you get a timestamp from the network with each packetNo I dont get any timeStamp from the packets.
Regarding the time stamp,
StartTime will be equal to EndTime where end tiem initilly equal to
zero;
then
StartTime =EndTime;
EndTime += FPS_30; //where FPS_30 = UNITS/30
this code is in my FillBuffer
I also noticed that GetPushSourceFlags is not being executed,
If my Filter GetMiscFlags returns AM_FILTER_MISC_FLAGS_IS_SOURCE and my
pin exposes IAMPushSource then why does the GetPushSource is not being
called? is there any other possible reason that the filter will not
execute GetMiscFlags?
aslo, the GetMaxStreamOffset was being executed only once, that is for
Audio Output pin only.
Thank you for your kind guidance!
Troy
.
- Follow-Ups:
- Re: Live Source Filter Video and Audio Synchronization
- From: Geraint Davies
- Re: Live Source Filter Video and Audio Synchronization
- References:
- Live Source Filter Video and Audio Synchronization
- From: Troy
- Re: Live Source Filter Video and Audio Synchronization
- From: Geraint Davies
- Live Source Filter Video and Audio Synchronization
- Prev by Date: Re: Getting started with video editing under .NET, C#
- Next by Date: Re: Getting started with video editing under .NET, C#
- Previous by thread: Re: Live Source Filter Video and Audio Synchronization
- Next by thread: Re: Live Source Filter Video and Audio Synchronization
- Index(es):
Relevant Pages
|