2 Copyright 2004-2005 Chris Tallon, Marten Richter
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #include "dsallocator.h"
32 typedef HRESULT (__stdcall *FCT_MFCreateVideoSampleFromSurface)(IUnknown* pUnkSurface, IMFSample** ppSample);
34 extern FCT_MFCreateVideoSampleFromSurface ptrMFCreateVideoSampleFromSurface;
37 DsAllocator::DsAllocator() {
52 DsAllocator::~DsAllocator() {
53 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_off);
54 ((OsdWin*)Osd::getInstance())->setExternalDriving(NULL,vwidth,vheight);
59 void DsAllocator::CleanupSurfaces() {
61 while(fullevrsamples.size()>0)
63 IMFSample *sample=fullevrsamples.front();
67 while(emptyevrsamples.size()>0)
69 IMFSample *sample=emptyevrsamples.front();
70 emptyevrsamples.pop();
74 for (int i=0;i<surfaces.size();i++) {
75 if (surfaces[i]!=NULL) surfaces[i]->Release();
81 HRESULT STDMETHODCALLTYPE DsAllocator::InitializeDevice(DWORD_PTR userid,VMR9AllocationInfo* allocinf,DWORD*numbuf){
82 if (!surfallocnotify) return S_FALSE;
86 surfaces.resize(*numbuf);
87 HRESULT hres= surfallocnotify->AllocateSurfaceHelper(allocinf,numbuf,&surfaces.at(0));
88 vheight=allocinf->dwHeight;
89 vwidth=allocinf->dwWidth;
92 sprintf(buffer,"%d * %d",allocinf->dwWidth,allocinf->dwHeight);
93 MessageBox(0,"hi",buffer,0);*/
97 void DsAllocator::LostDevice(IDirect3DDevice9 *d3ddev, IDirect3D9* d3d) {
98 if (!surfallocnotify) return ;
101 // d3ddev=((OsdWin*)Osd::getInstance())->getD3dDev();
102 HMONITOR hmon=d3d->GetAdapterMonitor(D3DADAPTER_DEFAULT);
103 surfallocnotify->ChangeD3DDevice(d3ddev,hmon);
108 HRESULT STDMETHODCALLTYPE DsAllocator::TerminateDevice(DWORD_PTR userid){
111 return S_OK; //Do nothing
113 HRESULT STDMETHODCALLTYPE DsAllocator::GetSurface(DWORD_PTR userid,DWORD surfindex,DWORD surfflags, IDirect3DSurface9** surf)
115 if (surfindex>=surfaces.size()) return E_FAIL;
116 if (surf==NULL) return E_POINTER;
119 surfaces[surfindex]->AddRef();
120 *surf=surfaces[surfindex];
124 HRESULT STDMETHODCALLTYPE DsAllocator::AdviseNotify(IVMRSurfaceAllocatorNotify9* allnoty){
126 surfallocnotify=allnoty;
127 IDirect3DDevice9 *d3ddev;
128 //OK lets set the direct3d object from the osd
129 d3ddev=((OsdWin*)Osd::getInstance())->getD3dDev();
130 HMONITOR hmon=((OsdWin*)Osd::getInstance())->getD3d()->GetAdapterMonitor(D3DADAPTER_DEFAULT);
131 HRESULT hres=surfallocnotify->SetD3DDevice(d3ddev,hmon);
137 HRESULT STDMETHODCALLTYPE DsAllocator::StartPresenting(DWORD_PTR userid){
138 //MessageBox(0,"drive me","drive me",0);
139 ((OsdWin*)Osd::getInstance())->setExternalDriving(this,vwidth,vheight);
143 HRESULT STDMETHODCALLTYPE DsAllocator::StopPresenting(DWORD_PTR userid){
144 ((OsdWin*)Osd::getInstance())->setExternalDriving(NULL,0,0);
148 HRESULT STDMETHODCALLTYPE DsAllocator::PresentImage(DWORD_PTR userid,VMR9PresentationInfo* presinf){
149 ((OsdWin*)Osd::getInstance())->RenderDS(presinf->lpSurf); //render and return
154 HRESULT STDMETHODCALLTYPE DsAllocator::QueryInterface(REFIID refiid,void ** obj){
155 if (obj==NULL) return E_POINTER;
157 if (refiid==IID_IVMRSurfaceAllocator9) {
158 *obj=static_cast<IVMRSurfaceAllocator9*>(this);
161 } else if (refiid==IID_IVMRImagePresenter9) {
162 *obj=static_cast<IVMRImagePresenter9*>(this);
165 } else if (refiid==IID_IMFVideoDeviceID) {
166 *obj=static_cast<IMFVideoDeviceID*> (this);
169 } else if (refiid==IID_IMFTopologyServiceLookupClient ) {
170 *obj=static_cast<IMFTopologyServiceLookupClient*> (this);
173 } else if (refiid==IID_IQualProp ) {
174 *obj=static_cast<IQualProp*> (this);
177 } else if (refiid==IID_IMFGetService) {
178 *obj=static_cast<IMFGetService*> (this);
181 } else if (refiid==IID_IDirect3DDeviceManager9) {
182 IDirect3DDeviceManager9 *d3dman=((OsdWin*)Osd::getInstance())->getD3dMan();
184 return d3dman->QueryInterface(refiid,obj);
188 return E_NOINTERFACE;
191 return E_NOINTERFACE;
196 ULONG STDMETHODCALLTYPE DsAllocator::AddRef(){
197 return InterlockedIncrement(&refcount);
200 ULONG STDMETHODCALLTYPE DsAllocator::Release(){
202 ref=InterlockedDecrement(&refcount);
204 delete this; //Commit suicide
209 HRESULT STDMETHODCALLTYPE DsAllocator::GetDeviceID(IID *pDid)
214 *pDid=__uuidof(IDirect3DDevice9);
218 HRESULT STDMETHODCALLTYPE DsAllocator::InitServicePointers(IMFTopologyServiceLookup *plooky)
220 if (!plooky) return E_POINTER;
223 /* get all interfaces we need*/
226 plooky->LookupService(MF_SERVICE_LOOKUP_GLOBAL,0,MR_VIDEO_MIXER_SERVICE,
227 __uuidof(IMFTransform),(void**)&mftransform, &dwobjcts);
228 plooky->LookupService(MF_SERVICE_LOOKUP_GLOBAL,0,MR_VIDEO_RENDER_SERVICE,
229 __uuidof(IMediaEventSink),(void**)&mediasink, &dwobjcts);
230 plooky->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0, MR_VIDEO_RENDER_SERVICE,
231 __uuidof(IMFClock),(void**)&mfclock,&dwobjcts);
238 HRESULT STDMETHODCALLTYPE DsAllocator::ReleaseServicePointers()
242 /* TODO Set RenderState , sample type etc.*/
244 ((OsdWin*)Osd::getInstance())->setExternalDriving(NULL,0,0);
246 if (mftransform) mftransform->Release();
249 if (mediasink) mediasink->Release();
252 if (mfclock) mfclock->Release();
254 if (mfmediatype) mfmediatype->Release();
261 HRESULT STDMETHODCALLTYPE DsAllocator::GetService(const GUID &guid,const IID &iid,LPVOID *obj)
263 if (guid==MR_VIDEO_ACCELERATION_SERVICE)
265 IDirect3DDeviceManager9 *d3dman=((OsdWin*)Osd::getInstance())->getD3dMan();
268 return d3dman->QueryInterface (__uuidof(IDirect3DDeviceManager9), (void**) obj);
272 return E_NOINTERFACE;
276 else if (guid==MR_VIDEO_RENDER_SERVICE)
278 return QueryInterface(iid,obj);
282 return E_NOINTERFACE;
287 void DsAllocator::GetEVRSamples()
290 MFCLOCK_STATE clockstate;
291 if (mfclock) mfclock->GetState(0,&clockstate);
292 //MessageBox(0,"get samples","samples",0);
294 if (mfclock && clockstate==MFCLOCK_STATE_STOPPED && fullevrsamples.size()>0)
300 while (emptyevrsamples.size()>0)
303 MFT_OUTPUT_DATA_BUFFER outdatabuffer;
304 ZeroMemory(&outdatabuffer,sizeof(outdatabuffer));
305 outdatabuffer.pSample=emptyevrsamples.front();
307 LONGLONG starttime,endtime;
314 mfclock->GetCorrelatedTime(0,&starttime,&dummy);
315 if (lastdelframe) CalcJitter( (starttime-lastdelframe)/10000);
316 lastdelframe=starttime;
319 HRESULT hres=mftransform->ProcessOutput(0,1,&outdatabuffer,&status);
322 if (hres==MF_E_TRANSFORM_NEED_MORE_INPUT)
328 mediasink->Notify(EC_COMPLETE,(LONG_PTR) S_OK,0);
333 else if (hres==MF_E_TRANSFORM_STREAM_CHANGE)
335 if (mfmediatype) mfmediatype->Release();
339 else if (hres==MF_E_TRANSFORM_TYPE_NOT_SET)
341 if (mfmediatype) mfmediatype->Release();
343 RenegotiateEVRMediaType();
349 hres=outdatabuffer.pSample->GetSampleTime(&prestime);
350 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "Got EVR Sample %lld",prestime);
351 IMFSample *temp=emptyevrsamples.front();
352 emptyevrsamples.pop();
356 fullevrsamples.push(temp);
357 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "got evr sample %d, %d",
358 // emptyevrsamples.size(),fullevrsamples.size());
360 mfclock->GetCorrelatedTime(0,&endtime,&dummy);
361 LONGLONG delay=endtime-starttime;
362 mediasink->Notify( EC_PROCESSING_LATENCY,(LONG_PTR)&delay,0);
370 HRESULT STDMETHODCALLTYPE DsAllocator::ProcessMessage(MFVP_MESSAGE_TYPE mess,ULONG_PTR mess_para)
373 case MFVP_MESSAGE_FLUSH:{
374 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_FLUSH received");
375 FlushEVRSamples(); }break;
376 case MFVP_MESSAGE_INVALIDATEMEDIATYPE: {
377 Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_INVALIDATEMEDIATYPE received");
378 if (mfmediatype) mfmediatype->Release();
380 RenegotiateEVRMediaType();}break;
381 case MFVP_MESSAGE_PROCESSINPUTNOTIFY: {
382 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_PROCESSINPUTNOTIFY received");
383 GetEVRSamples(); } break;
384 case MFVP_MESSAGE_BEGINSTREAMING:{
385 Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_BEGINSTREAMING received");
387 ((OsdWin*)Osd::getInstance())->setExternalDriving(this,vwidth,vheight);
388 //((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_started);//No need to do this causes misbehaviout
391 case MFVP_MESSAGE_ENDSTREAMING: {
392 Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_ENDSTREAMING received");
393 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_off);
394 ((OsdWin*)Osd::getInstance())->setExternalDriving(NULL,vwidth,vheight);
396 //if (mfmediatype) mfmediatype->Release();
399 case MFVP_MESSAGE_ENDOFSTREAM: {
400 Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_ENDOFSTREAM received");
401 MessageBox(0,"endofstream","endofstream",0);
404 case MFVP_MESSAGE_STEP: {
405 Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_STEP received");
406 ((OsdWin*)Osd::getInstance())->setExternalDriving(this,vwidth,vheight);
407 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_pause);
408 MessageBox(0,"steppy","steppy",0);
409 FlushEVRSamples(/*LOWORD(mess_para)*/); //Message sending, has to be done after compeletion
411 case MFVP_MESSAGE_CANCELSTEP: {
412 Log::getInstance()->log("DsAllocator", Log::DEBUG , "EVR Message MFVP_MESSAGE_CANCELSTEP received");
416 MessageBox(0,"unhandled","unhandled",0);
421 HRESULT STDMETHODCALLTYPE DsAllocator::OnClockStart(MFTIME systime,LONGLONG startoffset)
423 //((OsdWin*)Osd::getInstance())->SetEVRTimes(systime,startoffset);
426 if (PRESENTATION_CURRENT_POSITION!=startoffset) FlushEVRSamples();
427 ((OsdWin*)Osd::getInstance())->setExternalDriving(this,vwidth,vheight);
428 Log::getInstance()->log("DsAllocator", Log::DEBUG , "OnClockStart");
429 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_started);
435 HRESULT STDMETHODCALLTYPE DsAllocator::OnClockStop(MFTIME systime)
439 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_off);
441 Log::getInstance()->log("DsAllocator", Log::DEBUG , "OnClockStop");
442 ((OsdWin*)Osd::getInstance())->setExternalDriving(NULL,vwidth,vheight);
447 HRESULT STDMETHODCALLTYPE DsAllocator::OnClockPause(MFTIME systime)
450 ((OsdWin*)Osd::getInstance())->setExternalDriving(this,vwidth,vheight);
452 Log::getInstance()->log("DsAllocator", Log::DEBUG , "OnClockPause");
453 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_pause);
457 HRESULT STDMETHODCALLTYPE DsAllocator::OnClockRestart(MFTIME systime)
459 ((OsdWin*)Osd::getInstance())->setExternalDriving(this,vwidth,vheight);
461 Log::getInstance()->log("DsAllocator", Log::DEBUG , "OnClockRestart");
462 ((OsdWin*)Osd::getInstance())->SetEVRStatus(OsdWin::EVR_pres_started);
467 HRESULT STDMETHODCALLTYPE DsAllocator::OnClockSetRate(MFTIME systime,float rate)
473 HRESULT STDMETHODCALLTYPE DsAllocator::GetCurrentMediaType(IMFVideoMediaType **mtype)
474 { MessageBox(0,"mediatype","mediatype",0);
475 if (mtype==NULL) return E_POINTER;
477 if (mfmediatype==NULL)
481 return MF_E_NOT_INITIALIZED;
483 HRESULT hres=mfmediatype->QueryInterface(IID_IMFVideoMediaType,(void**)mtype);
488 void DsAllocator::RenegotiateEVRMediaType()
491 Log::getInstance()->log("DsAllocator", Log::DEBUG , "Cannot renegotiate without transform!");
499 IMFMediaType *mixtype=NULL;
501 if (hres=mftransform->GetOutputAvailableType(0,index++,&mixtype)!=S_OK)
503 Log::getInstance()->log("DsAllocator", Log::DEBUG , "No more types availiable from EVR %d !",hres);
509 mixtype->IsCompressedFormat(&compressed);
516 mixtype->GetUINT32(MF_MT_INTERLACE_MODE,&helper);
517 if (helper!=MFVideoInterlace_Progressive) {
518 Log::getInstance()->log("DsAllocator", Log::DEBUG , "Skip media type interlaced!");
523 mixtype->GetMajorType(&temp);
524 if (temp!=MEDIATYPE_Video) {
525 Log::getInstance()->log("DsAllocator", Log::DEBUG , "Skip media type no video!");
529 if(mftransform->SetOutputType(0,mixtype,MFT_SET_TYPE_TEST_ONLY)!=S_OK)
531 Log::getInstance()->log("DsAllocator", Log::DEBUG , "Skip media type test failed!");
540 if (mfmediatype) mfmediatype->Release();
544 AllocateEVRSurfaces();
547 hres=mftransform->SetOutputType(0,mixtype,0);
554 if (mfmediatype) mfmediatype->Release();
562 Log::getInstance()->log("DsAllocator", Log::DEBUG , "Output type set! %d",hres);
564 if (!gotcha) Log::getInstance()->log("DsAllocator", Log::DEBUG , "No suitable output type!");
570 void DsAllocator::AllocateEVRSurfaces()
573 LARGE_INTEGER temp64;
574 mfmediatype->GetUINT64(MF_MT_FRAME_SIZE, (UINT64*)&temp64);
575 vwidth=temp64.HighPart;
576 vheight=temp64.LowPart;
578 subtype.Data1=D3DFMT_X8R8G8B8;
579 mfmediatype->GetGUID(MF_MT_SUBTYPE,&subtype);
580 D3DFORMAT format=(D3DFORMAT)subtype.Data1;
581 Log::getInstance()->log("DsAllocator", Log::DEBUG , "Surfaceformat is %d, width %d, height %d",format,vwidth,vheight);
582 format=D3DFMT_X8R8G8B8;
586 OsdWin* osdwin=(OsdWin*)Osd::getInstance();
587 LPDIRECT3DDEVICE9 d3ddev=osdwin->getD3dDev();
588 osdwin->BeginPainting();
590 for (int i=0;i<10;i++)
593 LPDIRECT3DSURFACE9 surfy;
595 hres=d3ddev->CreateRenderTarget(vwidth,vheight,format,
596 D3DMULTISAMPLE_NONE,0,FALSE,&surfy,NULL);
606 osdwin->EndPainting();
610 for (int i=0;i<surfaces.size();i++) {
611 if (surfaces[i]!=NULL)
613 IMFSample *sample=NULL;
614 ptrMFCreateVideoSampleFromSurface(surfaces[i],&sample);
615 if (sample) emptyevrsamples.push(sample);
622 void DsAllocator::FlushEVRSamples()
625 while(fullevrsamples.size()>0)
627 IMFSample *sample=fullevrsamples.front();
628 fullevrsamples.pop();
629 emptyevrsamples.push(sample);
635 void DsAllocator::GetNextSurface(LPDIRECT3DSURFACE9* surf,DWORD *waittime)
640 if (fullevrsamples.size()==0) GetEVRSamples();
642 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "Enter Get Next Surface");
644 while (fullevrsamples.size()>0)
646 //MessageBox(0,"Got a sample","got a sample",0);
647 IMFSample *sample=fullevrsamples.front();
650 LONGLONG currenttime=0;
652 HRESULT hres=sample->GetSampleTime(&prestime);
655 if (mfclock) mfclock->GetCorrelatedTime(0,¤ttime,&systime);
657 LONGLONG delta=prestime-currenttime;
661 if (delta<-10000*20 && false) { //SkipIT
662 LONGLONG latency=-delta;
663 //mediasink->Notify(EC_SAMPLE_LATENCY,(LONG_PTR) &latency,0);
664 LARGE_INTEGER helper;
665 helper.QuadPart=-delta;
666 Log::getInstance()->log("DsAllocator", Log::DEBUG , "skip 1 frame %d %d prestime %lld",helper.LowPart,helper.HighPart,prestime);
667 CalcSyncOffsets(delta/10000LL);
668 // emptyevrsamples.size(),fullevrsamples.size());
669 fullevrsamples.pop();
670 emptyevrsamples.push(sample);
675 if (delta<10000*20 || !mfclock )
678 IMFMediaBuffer* buffy=NULL;
679 //MessageBox(0,"its showtime","showtimw",0);
680 CalcSyncOffsets(delta/10000LL);
682 hres=sample->GetBufferByIndex(0,&buffy);
683 //LARGE_INTEGER helper;
684 //helper.QuadPart=-delta;
685 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "Paint 1 frame %d %d, frames %d prestime %lld",
686 // helper.LowPart,helper.HighPart,fullevrsamples.size(),prestime);
687 if (hres!=S_OK) { //SkipIT
688 fullevrsamples.pop();
689 emptyevrsamples.push(sample);
692 IMFGetService* service;
693 hres=buffy->QueryInterface(IID_IMFGetService,(void**)&service);
695 if (hres!=S_OK) { //SkipIT
696 fullevrsamples.pop();
697 emptyevrsamples.push(sample);
700 LPDIRECT3DSURFACE9 tempsurf;
701 hres=service->GetService(MR_BUFFER_SERVICE,IID_IDirect3DSurface9 ,(void**) &tempsurf);
703 if (hres!=S_OK) { //SkipIT
704 fullevrsamples.pop();
705 emptyevrsamples.push(sample);
711 *waittime=delta/10000-10;
721 void DsAllocator::DiscardSurfaceandgetWait(DWORD *waittime)
723 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "Discard surface and get Wait");
725 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "Discard surface and get Wait2");
727 if (fullevrsamples.size()==0) {
732 IMFSample *sample=fullevrsamples.front();
733 fullevrsamples.pop();
734 emptyevrsamples.push(sample);
737 while (fullevrsamples.size()>0)
740 IMFSample *sample=fullevrsamples.front();
743 LONGLONG currenttime=0;
745 HRESULT hres=sample->GetSampleTime(&prestime);
748 if (mfclock) mfclock->GetCorrelatedTime(0,¤ttime,&systime);
750 LONGLONG delta=prestime-currenttime;
753 if (delta<-10000*20 ) { //SkipIT
754 LONGLONG latency=-delta;
755 // mediasink->Notify(EC_SAMPLE_LATENCY,(LONG_PTR) &latency,0);
756 //LARGE_INTEGER helper;
757 //helper.QuadPart=-delta;
758 //Log::getInstance()->log("DsAllocator", Log::DEBUG , "skip 1 frame %d %d time %lld",helper.LowPart,helper.HighPart,prestime);
759 CalcSyncOffsets(delta/10000LL);
760 // emptyevrsamples.size(),fullevrsamples.size());
761 fullevrsamples.pop();
762 emptyevrsamples.push(sample);
767 *waittime=min(delta/10000/2-10,1);
774 void DsAllocator::ResetSyncOffsets()
776 for (int i=0;i<n_stats;i++)
792 void DsAllocator::CalcSyncOffsets(int sync)
794 sync_offset[sync_pos]=sync;
795 sync_pos=(sync_pos +1)%n_stats;
798 for (int i=0;i<n_stats;i++)
800 mean_value+=sync_offset[i];
802 mean_value/=(double) n_stats;
804 for (int i=0;i<n_stats;i++)
806 double temp_dev=(mean_value-(double)sync_offset[i]);
807 std_dev+=temp_dev*temp_dev;
809 std_dev/=(double)n_stats;
810 avg_sync_offset=mean_value;
811 dev_sync_offset=sqrt(std_dev);
814 void DsAllocator::CalcJitter(int jitter)
816 jitter_offset[jitter_pos]=jitter;
817 jitter_pos=(jitter_pos +1)%n_stats;
821 for (int i=0;i<n_stats;i++)
823 mean_value+=jitter_offset[i];
825 mean_value/=(double) n_stats;
826 avgfps=1000./mean_value*100.;
828 for (int i=0;i<n_stats;i++)
830 double temp_dev=(mean_value-(double)jitter_offset[i]);
831 std_dev+=temp_dev*temp_dev;
833 std_dev/=(double)n_stats;
834 jitter=sqrt(std_dev);
838 HRESULT STDMETHODCALLTYPE DsAllocator::get_FramesDrawn(int *val)
844 HRESULT STDMETHODCALLTYPE DsAllocator::get_AvgFrameRate(int *val)
850 HRESULT STDMETHODCALLTYPE DsAllocator::get_Jitter(int *val)
856 HRESULT STDMETHODCALLTYPE DsAllocator::get_AvgSyncOffset(int *val)
858 *val=avg_sync_offset;
862 HRESULT STDMETHODCALLTYPE DsAllocator::get_DevSyncOffset(int *val)
864 *val=dev_sync_offset;
867 HRESULT STDMETHODCALLTYPE DsAllocator::get_FramesDroppedInRenderer(int *val)