I am trying to open video files using IMFSourceReader->MFCreateSourceReaderFromURL()
or IMFSourceResolver->CreateObjectFromURL()
. But both of them are returning E_ACCESSDENIED General Access denied error.
I am in windows 8.1 desktop and the video is in Pictures Library folder. I have the Capability for Pictures Library checked in Package.appxmanifest page
. But still I am getting access denied error.
any idea how I can get rid of this problem?
Edit: I am passing the video URL with this format L"C:/Users/user.name/Pictures/video.mp4"
If I run the code in console application there is no error using this code here. If I run the same code in WinRT it does not work. CoInitializeEx(0, COINIT_MULTITHREADED); returns cannot change thread mode after it is set
and source reader says access denied. Is the access denied error has something to do with threading?