Open mjmeans opened 6 years ago
Thanks for the work on the initial port. It was very helpful. I'm quite mystified as to why the Mpeg1Decoder DLL fails to load here:
STDAPI DllGetActivationFactory(In HSTRING activatibleClassId, _Derefout IActivationFactory** ppFactory) { return Platform::Details::GetActivationFactory(Microsoft::WRL::Details::ModuleBase::module_, activatibleClassId, ppFactory); }
With the value of module_ being null as the culprit for the failure. No clue why.
It's particularly curious given that Mpet1Source.dll loads, and executes a chunk of it's code. I'm not able to spot any issue with the way Mpeg1Decoder is built. I did notice parallel execution of the parsing code that I wasn't expecting to see. Perhaps this is the issue since it doesn't appear that the code is written to handle threading?
Finally found the problem for the MPeg1Decoder DLL. I made the following changes after noticing an issue with the pattern used for setting up this particular DLL.
InspectableClass(L"MPEG1Decoder.Decoder", BaseTrust)
Notice, the name change from the previous L"MPEG1Decoder.MPEG1Decoder" variant.
And in the app manifest file I changed it to read as follows:
<ActivatableClass ActivatableClassId="MPEG1Decoder.Decoder" ThreadingModel="both" />
Again, the name was changed. When I noticed the declaration of:
ActivatableClass(CDecoder);
This, I presume, creates the name activation Id; still not sure how the "C" is dropped from the name. That was the issue, the activation id was incorrect. Clearly, the Microsoft sample never worked on WinRT. Lastly, the only file I could find that this MPeg decoder can play is the one included with the sample. So it's an extremely limited implementation.
Was able to get the Grayscale DLL working also. Similar issues to the above with a couple other tweaks needed. So now all the samples work provided you load videos with just the right characteristics so exceptions are not thrown by the various checks in the code.
Thanks. Would you please submit a Pull Request to this repo. Your timing is great. I planned to work on this project again next week.
I made significant modifications to the project structure. I dropped anything that was not related to UWP since that is my focus. I could zip my reworked version of your repo and send it to you in case you wish to maintain your current structure. The other project variants were contributing to my confusion so it was simpler to remove them from the mix. I should add that all the sub modules are now UWP. Your repo only had the Grascale module and the test App implemented as a UWP solution.
Hi @Noemata If you could create your own repo and put your project in it, then I can grab the relevant parts into a separate branch and use git compare.
I wanted to update these samples to VS2019. Work and life kept interrupting.
Here they are: https://github.com/Noemata/MFSamples
Hey, thanks! I’ll try it out next week.
From: Mario Pintaric notifications@github.com Sent: Sunday, November 03, 2019 09:02 To: mjmeans/Media-extensions-sample Media-extensions-sample@noreply.github.com Cc: mjmeans mjmeans@ultrasw.com; Author author@noreply.github.com Subject: Re: [mjmeans/Media-extensions-sample] GrayscaleTransform.Universal doesn't work (#1)
I wanted to update these samples to VS2019. Work and life kept interrupting.
Here they are: https://github.com/Noemata/MFSamples
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mjmeans/Media-extensions-sample/issues/1?email_source=notifications&email_token=AA6JVJ6EYP7BU5IKAIMBQ3LQR3RXPA5CNFSM4FXHWVZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5WINI#issuecomment-549151797 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6JVJZR3CKI2R3WKF6G53LQR3RXPANCNFSM4FXHWVZQ . https://github.com/notifications/beacon/AA6JVJ75ZXWT5ELCFGTUKTDQR3RXPA5CNFSM4FXHWVZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5WINI.gif
While the project compiles without error, it doesn't actually work.
I don't know the cause of this. it could be some of the source files in Common or GrayscaleTransform.Shared won't work in C++/UWP and this project should not refer to shared source files.
It could also be that Windows Universal Runtime Components are broken somehow and can never work with Media Foundation Transforms. Though I hope this is not true.