Exemple #1
0
MFX::PluginModule & MFX::PluginModule::operator = (const MFX::PluginModule & that) 
{
    if (this != &that) 
    {
        Tidy();
        mHmodule = mfx_dll_load(that.mPath);
        mCreatePluginPtr = that.mCreatePluginPtr;
        msdk_disp_char_cpy_s(mPath, sizeof(mPath) / sizeof(*mPath), that.mPath);
    }
    return *this;
}
Exemple #2
0
MFX::PluginModule::PluginModule(const msdk_disp_char * path)
    : mCreatePluginPtr() 
{
    mHmodule = mfx_dll_load(path);
    if (NULL == mHmodule) {
        TRACE_PLUGIN_ERROR("Cannot load module: %S\n", MSDK2WIDE(path));
        return ;
    }
    TRACE_PLUGIN_INFO("Plugin loaded at: %S\n", MSDK2WIDE(path));
    
    mCreatePluginPtr = (CreatePluginPtr_t)mfx_dll_get_addr(mHmodule, CREATE_PLUGIN_FNC);
    if (NULL == mCreatePluginPtr) {
        TRACE_PLUGIN_ERROR("Cannot get procedure address: %s\n", CREATE_PLUGIN_FNC);
        return ;
    }
    
    msdk_disp_char_cpy_s(mPath, sizeof(mPath) / sizeof(*mPath), path);
}
mfxModuleHandle mfx_get_dll_handle(const msdk_disp_char *pFileName) {
    return mfx_dll_load(pFileName);
}
Exemple #4
0
MFX::PluginModule::PluginModule(const PluginModule & that) 
    : mHmodule(mfx_dll_load(that.mPath))
    , mCreatePluginPtr(that.mCreatePluginPtr) 
{
    msdk_disp_char_cpy_s(mPath, sizeof(mPath) / sizeof(*mPath), that.mPath);
}