Be more than mobile, reach every Windows screen
Reach millions of players across phone, PC, and Xbox One
The Internet of your things
The world's most personal digital assistant
I have a problem when I try to access files:
I build a timeline loading an xtl file, then a run the graph.
When media is stopped, I release all resources (I think..)
but when I try to modify some image files (need masks in timeline),
I can't made any disk operation (save, delete, move...) on those files.
Need upgrade DX? (I'm using DX8.1 with VC++6.0)
Please help me.
I have never used DX8, so I can't say for sure. However, my first guess is that something isn't getting released.
Are you using smart pointers for all you COM variables?
Yes, I do.
The actions are very very simple:
CComPtr< IAMTimeline > pTL = NULL;CComPtr< IRenderEngine > pRE = NULL; CComPtr< IXml2Dex > pXML = NULL; CComPtr< IGraphBuilder > pGB = NULL;CComPtr< IMediaControl > pMC = NULL;CComPtr< IMediaEventEx > pME = NULL;
CoCreateInstance(CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, IID_IAMTimeline, (void**)&pTL);CoCreateInstance(CLSID_Xml2Dex, NULL, CLSCTX_INPROC_SERVER, IID_IXml2Dex, (void**)&pXML);CoCreateInstance(CLSID_RenderEngine, NULL, CLSCTX_INPROC_SERVER, IID_IRenderEngine, (void**)&pRE);
pXML->ReadXMLFile(pTL, bstr); //build timeline loading an .xtl file
pRE->SetTimelineObject(pTL); //sets the timeline for the render engine to use
pRE->ConnectFrontEnd( ); //builds the front end of the filter graph
pGB->QueryInterface(IID_IMediaControl, (void **)&pMC);pGB->QueryInterface(IID_IMediaEventEx, (void **)&pME);
pMC->Run(); //run the graph
long evCode;pME->WaitForCompletion(INFINITE, &evCode);
pMC = NULL;pME = NULL;pGB = NULL;pRE = NULL;pXML = NULL;pTL = NULL;
the resources involved (avi, bitmaps..) are unlocked only after application exit.
Where is my mistake?
Thanks in advance.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?