Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
7e19e888
Commit
7e19e888
authored
Apr 02, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DMO: remove loader support
parent
d26304d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
68 deletions
+1
-68
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.c
+1
-68
No files found.
modules/codec/dmo/dmo.c
View file @
7e19e888
...
@@ -34,20 +34,11 @@
...
@@ -34,20 +34,11 @@
#include <vlc_codec.h>
#include <vlc_codec.h>
#include <vlc_codecs.h>
#include <vlc_codecs.h>
#ifndef WIN32
#ifdef WIN32
# define LOADER
#else
# include <objbase.h>
# include <objbase.h>
# include <vlc_charset.h>
# include <vlc_charset.h>
#endif
#endif
#ifdef LOADER
/* Need the w32dll loader from mplayer */
# include <wine/winerror.h>
# include <ldt_keeper.h>
# include <wine/windef.h>
#endif
#include <vlc_codecs.h>
#include <vlc_codecs.h>
#include "dmo.h"
#include "dmo.h"
...
@@ -55,18 +46,6 @@
...
@@ -55,18 +46,6 @@
# define DMO_DEBUG 1
# define DMO_DEBUG 1
#endif
#endif
#ifdef LOADER
/* Not Needed */
long
CoInitialize
(
void
*
pvReserved
)
{
VLC_UNUSED
(
pvReserved
);
return
-
1
;
}
void
CoUninitialize
(
void
)
{
}
/* A few prototypes */
HMODULE
WINAPI
LoadLibraryA
(
LPCSTR
);
#define LoadLibrary LoadLibraryA
FARPROC
WINAPI
GetProcAddress
(
HMODULE
,
LPCSTR
);
int
WINAPI
FreeLibrary
(
HMODULE
);
#endif
/* LOADER */
typedef
long
(
STDCALL
*
GETCLASS
)
(
const
GUID
*
,
const
GUID
*
,
void
**
);
typedef
long
(
STDCALL
*
GETCLASS
)
(
const
GUID
*
,
const
GUID
*
,
void
**
);
static
const
int
pi_channels_maps
[
7
]
=
static
const
int
pi_channels_maps
[
7
]
=
...
@@ -134,10 +113,6 @@ struct decoder_sys_t
...
@@ -134,10 +113,6 @@ struct decoder_sys_t
date_t
end_date
;
date_t
end_date
;
#ifdef LOADER
ldt_fs_t
*
ldt_fs
;
#endif
vlc_thread_t
thread
;
vlc_thread_t
thread
;
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
vlc_cond_t
wait_input
,
wait_output
;
vlc_cond_t
wait_input
,
wait_output
;
...
@@ -375,12 +350,8 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -375,12 +350,8 @@ static int DecOpen( decoder_t *p_dec )
VIDEOINFOHEADER
*
p_vih
=
NULL
;
VIDEOINFOHEADER
*
p_vih
=
NULL
;
WAVEFORMATEX
*
p_wf
=
NULL
;
WAVEFORMATEX
*
p_wf
=
NULL
;
#ifdef LOADER
ldt_fs_t
*
ldt_fs
=
Setup_LDT_Keeper
();
#else
/* Initialize OLE/COM */
/* Initialize OLE/COM */
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
#endif
/* LOADER */
if
(
LoadDMO
(
VLC_OBJECT
(
p_dec
),
&
hmsdmo_dll
,
&
p_dmo
,
&
p_dec
->
fmt_in
,
false
)
if
(
LoadDMO
(
VLC_OBJECT
(
p_dec
),
&
hmsdmo_dll
,
&
p_dmo
,
&
p_dec
->
fmt_in
,
false
)
!=
VLC_SUCCESS
)
!=
VLC_SUCCESS
)
...
@@ -603,9 +574,6 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -603,9 +574,6 @@ static int DecOpen( decoder_t *p_dec )
/* Allocate the memory needed to store the decoder's structure */
/* Allocate the memory needed to store the decoder's structure */
p_sys
->
hmsdmo_dll
=
hmsdmo_dll
;
p_sys
->
hmsdmo_dll
=
hmsdmo_dll
;
p_sys
->
p_dmo
=
p_dmo
;
p_sys
->
p_dmo
=
p_dmo
;
#ifdef LOADER
p_sys
->
ldt_fs
=
ldt_fs
;
#endif
/* Find out some properties of the output */
/* Find out some properties of the output */
{
{
...
@@ -650,12 +618,8 @@ static int DecOpen( decoder_t *p_dec )
...
@@ -650,12 +618,8 @@ static int DecOpen( decoder_t *p_dec )
if
(
p_dmo
)
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_dmo
);
if
(
p_dmo
)
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_dmo
);
if
(
hmsdmo_dll
)
FreeLibrary
(
hmsdmo_dll
);
if
(
hmsdmo_dll
)
FreeLibrary
(
hmsdmo_dll
);
#ifdef LOADER
Restore_LDT_Keeper
(
ldt_fs
);
#else
/* Uninitialize OLE/COM */
/* Uninitialize OLE/COM */
CoUninitialize
();
CoUninitialize
();
#endif
/* LOADER */
free
(
p_vih
);
free
(
p_vih
);
free
(
p_wf
);
free
(
p_wf
);
...
@@ -677,7 +641,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
...
@@ -677,7 +641,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
DMO_PARTIAL_MEDIATYPE
dmo_partial_type
;
DMO_PARTIAL_MEDIATYPE
dmo_partial_type
;
int
i_err
;
int
i_err
;
#ifndef LOADER
long
(
STDCALL
*
OurDMOEnum
)(
const
GUID
*
,
uint32_t
,
uint32_t
,
long
(
STDCALL
*
OurDMOEnum
)(
const
GUID
*
,
uint32_t
,
uint32_t
,
const
DMO_PARTIAL_MEDIATYPE
*
,
const
DMO_PARTIAL_MEDIATYPE
*
,
uint32_t
,
const
DMO_PARTIAL_MEDIATYPE
*
,
uint32_t
,
const
DMO_PARTIAL_MEDIATYPE
*
,
...
@@ -687,7 +650,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
...
@@ -687,7 +650,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
WCHAR
*
psz_dmo_name
;
WCHAR
*
psz_dmo_name
;
GUID
clsid_dmo
;
GUID
clsid_dmo
;
uint32_t
i_dummy
;
uint32_t
i_dummy
;
#endif
GETCLASS
GetClass
;
GETCLASS
GetClass
;
IClassFactory
*
cFactory
=
NULL
;
IClassFactory
*
cFactory
=
NULL
;
...
@@ -712,7 +674,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
...
@@ -712,7 +674,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
dmo_partial_type
.
subtype
.
Data1
=
p_fmt
->
i_original_fourcc
?:
p_fmt
->
i_codec
;
dmo_partial_type
.
subtype
.
Data1
=
p_fmt
->
i_original_fourcc
?:
p_fmt
->
i_codec
;
}
}
#ifndef LOADER
/* Load msdmo DLL */
/* Load msdmo DLL */
*
p_hmsdmo_dll
=
LoadLibraryA
(
"msdmo.dll"
);
*
p_hmsdmo_dll
=
LoadLibraryA
(
"msdmo.dll"
);
if
(
*
p_hmsdmo_dll
==
NULL
)
if
(
*
p_hmsdmo_dll
==
NULL
)
...
@@ -783,7 +744,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
...
@@ -783,7 +744,6 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
loader:
loader:
#endif
/* LOADER */
for
(
i_codec
=
0
;
codecs_table
[
i_codec
].
i_fourcc
!=
0
;
i_codec
++
)
for
(
i_codec
=
0
;
codecs_table
[
i_codec
].
i_fourcc
!=
0
;
i_codec
++
)
{
{
...
@@ -848,14 +808,7 @@ static void DecClose( decoder_t *p_dec )
...
@@ -848,14 +808,7 @@ static void DecClose( decoder_t *p_dec )
if
(
p_sys
->
p_dmo
)
p_sys
->
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_sys
->
p_dmo
);
if
(
p_sys
->
p_dmo
)
p_sys
->
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_sys
->
p_dmo
);
FreeLibrary
(
p_sys
->
hmsdmo_dll
);
FreeLibrary
(
p_sys
->
hmsdmo_dll
);
#ifdef LOADER
#if 0
Restore_LDT_Keeper( p_sys->ldt_fs );
#endif
#else
/* Uninitialize OLE/COM */
CoUninitialize
();
CoUninitialize
();
#endif
free
(
p_sys
->
p_buffer
);
free
(
p_sys
->
p_buffer
);
}
}
...
@@ -1098,9 +1051,6 @@ struct encoder_sys_t
...
@@ -1098,9 +1051,6 @@ struct encoder_sys_t
date_t
end_date
;
date_t
end_date
;
#ifdef LOADER
ldt_fs_t
*
ldt_fs
;
#endif
};
};
/*****************************************************************************
/*****************************************************************************
...
@@ -1425,12 +1375,8 @@ static int EncOpen( vlc_object_t *p_this )
...
@@ -1425,12 +1375,8 @@ static int EncOpen( vlc_object_t *p_this )
IMediaObject
*
p_dmo
=
NULL
;
IMediaObject
*
p_dmo
=
NULL
;
HINSTANCE
hmsdmo_dll
=
NULL
;
HINSTANCE
hmsdmo_dll
=
NULL
;
#ifdef LOADER
ldt_fs_t
*
ldt_fs
=
Setup_LDT_Keeper
();
#else
/* Initialize OLE/COM */
/* Initialize OLE/COM */
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
#endif
/* LOADER */
if
(
LoadDMO
(
p_this
,
&
hmsdmo_dll
,
&
p_dmo
,
&
p_enc
->
fmt_out
,
true
)
if
(
LoadDMO
(
p_this
,
&
hmsdmo_dll
,
&
p_dmo
,
&
p_enc
->
fmt_out
,
true
)
!=
VLC_SUCCESS
)
!=
VLC_SUCCESS
)
...
@@ -1457,9 +1403,6 @@ static int EncOpen( vlc_object_t *p_this )
...
@@ -1457,9 +1403,6 @@ static int EncOpen( vlc_object_t *p_this )
p_sys
->
hmsdmo_dll
=
hmsdmo_dll
;
p_sys
->
hmsdmo_dll
=
hmsdmo_dll
;
p_sys
->
p_dmo
=
p_dmo
;
p_sys
->
p_dmo
=
p_dmo
;
#ifdef LOADER
p_sys
->
ldt_fs
=
ldt_fs
;
#endif
/* Find out some properties of the inputput */
/* Find out some properties of the inputput */
{
{
...
@@ -1504,12 +1447,8 @@ static int EncOpen( vlc_object_t *p_this )
...
@@ -1504,12 +1447,8 @@ static int EncOpen( vlc_object_t *p_this )
if
(
p_dmo
)
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_dmo
);
if
(
p_dmo
)
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_dmo
);
if
(
hmsdmo_dll
)
FreeLibrary
(
hmsdmo_dll
);
if
(
hmsdmo_dll
)
FreeLibrary
(
hmsdmo_dll
);
#ifdef LOADER
Restore_LDT_Keeper
(
ldt_fs
);
#else
/* Uninitialize OLE/COM */
/* Uninitialize OLE/COM */
CoUninitialize
();
CoUninitialize
();
#endif
/* LOADER */
free
(
p_sys
);
free
(
p_sys
);
...
@@ -1686,14 +1625,8 @@ void EncoderClose( vlc_object_t *p_this )
...
@@ -1686,14 +1625,8 @@ void EncoderClose( vlc_object_t *p_this )
if
(
p_sys
->
p_dmo
)
p_sys
->
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_sys
->
p_dmo
);
if
(
p_sys
->
p_dmo
)
p_sys
->
p_dmo
->
vt
->
Release
(
(
IUnknown
*
)
p_sys
->
p_dmo
);
FreeLibrary
(
p_sys
->
hmsdmo_dll
);
FreeLibrary
(
p_sys
->
hmsdmo_dll
);
#ifdef LOADER
#if 0
Restore_LDT_Keeper( p_sys->ldt_fs );
#endif
#else
/* Uninitialize OLE/COM */
/* Uninitialize OLE/COM */
CoUninitialize
();
CoUninitialize
();
#endif
free
(
p_sys
);
free
(
p_sys
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment