[vlc-commits] [Git][videolan/vlc][master] dmo: link with msdmo.lib
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Feb 3 09:24:43 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7117dd09 by Steve Lhomme at 2025-02-03T08:43:43+00:00
dmo: link with msdmo.lib
The DMO code is enabled for non-UWP targets and all Windows targets
have this DLL (since Vista).
msdmo.dll with DMOEnum() is available in vanilla Windows 7.
If for some reason the DLL is not there, the plugin won't be loaded
and it will rightfully be skipped.
- - - - -
3 changed files:
- modules/codec/Makefile.am
- modules/codec/dmo/dmo.c
- modules/codec/meson.build
Changes:
=====================================
modules/codec/Makefile.am
=====================================
@@ -629,7 +629,7 @@ codec_LTLIBRARIES += $(LTLIBqsv)
libdmo_plugin_la_SOURCES = codec/dmo/dmo.c codec/dmo/dmo.h codec/dmo/buffer.c
libdmo_plugin_la_LIBADD = $(LIBM)
if HAVE_WIN32
-libdmo_plugin_la_LIBADD += $(LIBCOM) -luuid
+libdmo_plugin_la_LIBADD += $(LIBCOM) -luuid -lmsdmo
if !HAVE_WINSTORE
codec_LTLIBRARIES += libdmo_plugin.la
endif
=====================================
modules/codec/dmo/dmo.c
=====================================
@@ -609,11 +609,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
DMO_PARTIAL_MEDIATYPE dmo_partial_type;
int i_err;
- long (STDCALL *OurDMOEnum)( const GUID *, DWORD, DWORD,
- const DMO_PARTIAL_MEDIATYPE *,
- DWORD, const DMO_PARTIAL_MEDIATYPE *,
- IEnumDMO ** );
-
IEnumDMO *p_enum_dmo = NULL;
WCHAR *psz_dmo_name;
GUID clsid_dmo;
@@ -645,34 +640,18 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
p_fmt->i_original_fourcc : p_fmt->i_codec;
}
- /* Load msdmo DLL */
- *p_hmsdmo_dll = LoadLibrary( TEXT( "msdmo.dll" ) );
- if( *p_hmsdmo_dll == NULL )
- {
- msg_Dbg( p_this, "failed loading msdmo.dll" );
- return VLC_EGENERIC;
- }
- OurDMOEnum = (void *)GetProcAddress( *p_hmsdmo_dll, "DMOEnum" );
- if( OurDMOEnum == NULL )
- {
- msg_Dbg( p_this, "GetProcAddress failed to find DMOEnum()" );
- FreeLibrary( *p_hmsdmo_dll );
- return VLC_EGENERIC;
- }
-
if( !b_out )
{
- i_err = OurDMOEnum( &GUID_NULL, 1 /*DMO_ENUMF_INCLUDE_KEYED*/,
+ i_err = DMOEnum( &GUID_NULL, 1 /*DMO_ENUMF_INCLUDE_KEYED*/,
1, &dmo_partial_type, 0, NULL, &p_enum_dmo );
}
else
{
- i_err = OurDMOEnum( &GUID_NULL, 1 /*DMO_ENUMF_INCLUDE_KEYED*/,
+ i_err = DMOEnum( &GUID_NULL, 1 /*DMO_ENUMF_INCLUDE_KEYED*/,
0, NULL, 1, &dmo_partial_type, &p_enum_dmo );
}
if( i_err )
{
- FreeLibrary( *p_hmsdmo_dll );
/* return VLC_EGENERIC; */
/* Try loading the dll directly */
goto loader;
@@ -703,7 +682,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
if( !*pp_dmo )
{
- FreeLibrary( *p_hmsdmo_dll );
/* return VLC_EGENERIC; */
/* Try loading the dll directly */
goto loader;
=====================================
modules/codec/meson.build
=====================================
@@ -708,6 +708,7 @@ if host_system == 'windows'
),
'dependencies': [
cc.find_library('uuid'),
+ cc.find_library('msdmo'),
],
'enabled' : have_win_desktop,
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7117dd091bbee593ed8ecea27fd578c6b5143014
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7117dd091bbee593ed8ecea27fd578c6b5143014
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list