Hi, Is there any standard way in MPlayer to call COM interfaces from Windows DLLs? I mean the whole init procedure - from CoInitialize to getting pointer to the needed function in the needed dll file and CoUninitialize? What is the purpose of the code in the loader subdirectory?
My question continues. As I want to use the EVR renderer as a DirectShow filter, is there any standard way in MPlayer to build a DS graph? My purpose is to build a graph with EVR inside for presentation, but I want to provide each frame. I'm sorry if my question is vague, but I'm new to DirectShow. The purpose is to select the particular EVR DS filter with CLSID CLSID_EnhancedVideoRenderer and provide it with frames at its input pin. Up until now I was trying the Media Foundation approach, but it turned out to be a nightmare (for me) and I will implement the MPC-HC DirectShow approach.
Please ignore this thread, I will start a new one and will ask my question more precisely.
Well, one more COM related question. Please excuse my misunderstanding, but MPlayer is the first non-Microsoft project, which I have to connect to the "Microsoft world" of COM. Please correct me if I got it all wrong: Sincle MPlayer isn't statically linked with any DLL I'm interested in and is coded in C, I have to do the following if I want to use any COM interface: 1. Use LoadLibrary to get a pointer to ole32.dll 2. Use GetProcAddress to get a pointer to CoInitializeEx inside ole32.dll. 3. Call CoInitializeEx to init the COM library. 4. Use GetProcAddress to get a pointer to CoCreateInstance inside ole32.dll. 5. Call CoCreateInstance with the EVR CLSID. 6. Use the pointer from the previous call to handle EVR afterwards. 7. When I'm finished, use GetProcAddress to get a pointer to Release function inside ole32.dll and free the resources. Either I'm missing something or this is the way I'm supposed to proceed. All my current experiments from MSVC with C++ examples were much, Much, MUCH easier and intuitive. I'm literally wasting weeks for so simple things, so some help will be great! I'm also not entirely sure how should I use the interfaces from plain C. I'm sorry I'm wasting your time with my struggles, but I'm lost. After my failure to succeed with Media Foundation (don't even ask), I have to access EVR as a DS filter and I'm frustrated by the difficulties I'm against.
On Wed, Feb 16, 2011 at 1:50 PM, Georgi Petrov <gogothebee@gmail.com> wrote:
Well, one more COM related question.
Please excuse my misunderstanding, but MPlayer is the first non-Microsoft project, which I have to connect to the "Microsoft world" of COM.
Please correct me if I got it all wrong:
Sincle MPlayer isn't statically linked with any DLL I'm interested in and is coded in C, I have to do the following if I want to use any COM interface:
1. Use LoadLibrary to get a pointer to ole32.dll 2. Use GetProcAddress to get a pointer to CoInitializeEx inside ole32.dll. 3. Call CoInitializeEx to init the COM library. 4. Use GetProcAddress to get a pointer to CoCreateInstance inside ole32.dll. 5. Call CoCreateInstance with the EVR CLSID.
Okay, I seem to answer my own questions. MPlayer is linked to ole32.dll and I've found CoInitializeEx & friends, so LoadLibrary and GetProcAddress questions are no longer relevant.
participants (1)
-
Georgi Petrov