Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
db2eed2d
Commit
db2eed2d
authored
Oct 23, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/realaudio.c: on win32, use codecs installed by realplayer if available.
parent
5165e593
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
30 deletions
+59
-30
modules/codec/realaudio.c
modules/codec/realaudio.c
+59
-30
No files found.
modules/codec/realaudio.c
View file @
db2eed2d
...
...
@@ -265,7 +265,7 @@ static void Close( vlc_object_t *p_this )
*****************************************************************************/
static
int
OpenDll
(
decoder_t
*
p_dec
)
{
char
*
psz_
codec
,
*
psz_
dll
;
char
*
psz_dll
;
int
i
,
i_result
;
char
*
ppsz_path
[]
=
...
...
@@ -281,50 +281,79 @@ static int OpenDll( decoder_t *p_dec )
"/usr/lib64/RealPlayer9/users/Real/Codecs"
,
"/usr/lib/win32"
,
#endif
NULL
,
NULL
,
NULL
};
switch
(
p_dec
->
fmt_in
.
i_codec
)
{
case
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
):
psz_codec
=
"cook.so.6.0"
;
break
;
case
VLC_FOURCC
(
'2'
,
'8'
,
'_'
,
'8'
):
psz_codec
=
"28_8.so.6.0"
;
break
;
case
VLC_FOURCC
(
'1'
,
'4'
,
'_'
,
'4'
):
psz_codec
=
"14_4.so.6.0"
;
break
;
default:
return
VLC_EGENERIC
;
}
#ifdef WIN32
char
psz_win32_real_codecs
[
MAX_PATH
+
1
];
char
psz_win32_helix_codecs
[
MAX_PATH
+
1
];
#endif
for
(
i
=
0
;
ppsz_path
[
i
];
i
++
)
{
asprintf
(
&
psz_dll
,
"%s/%s"
,
ppsz_path
[
i
],
psz_codec
);
asprintf
(
&
psz_dll
,
"%s/%4.4s.so.6.0"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenNativeDll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
switch
(
p_dec
->
fmt_in
.
i_codec
)
#ifdef WIN32
{
case
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
):
psz_codec
=
"cook3260.dll"
;
break
;
case
VLC_FOURCC
(
'2'
,
'8'
,
'_'
,
'8'
):
psz_codec
=
"28_83260.dll"
;
break
;
case
VLC_FOURCC
(
'1'
,
'4'
,
'_'
,
'4'
):
psz_codec
=
"14_43260.dll"
;
break
;
default:
return
VLC_EGENERIC
;
HKEY
h_key
;
DWORD
i_type
,
i_data
=
MAX_PATH
+
1
,
i_index
=
1
;
char
*
p_data
;
p_data
=
psz_win32_real_codecs
;
if
(
RegOpenKeyEx
(
HKEY_CLASSES_ROOT
,
_T
(
"Software
\\
RealNetworks
\\
Preferences
\\
DT_Codecs"
),
0
,
KEY_READ
,
&
h_key
)
==
ERROR_SUCCESS
)
{
if
(
RegQueryValueEx
(
h_key
,
_T
(
""
),
0
,
&
i_type
,
(
LPBYTE
)
p_data
,
&
i_data
)
==
ERROR_SUCCESS
&&
i_type
==
REG_SZ
)
{
int
i_len
=
strlen
(
p_data
);
if
(
i_len
&&
p_data
[
i_len
-
1
]
==
'\\'
)
p_data
[
i_len
-
1
]
=
0
;
ppsz_path
[
i_index
++
]
=
p_data
;
msg_Err
(
p_dec
,
"Real: %s"
,
p_data
);
}
RegCloseKey
(
h_key
);
}
p_data
=
psz_win32_helix_codecs
;
if
(
RegOpenKeyEx
(
HKEY_CLASSES_ROOT
,
_T
(
"Helix
\\
HelixSDK
\\
10.0
\\
Preferences
\\
DT_Codecs"
),
0
,
KEY_READ
,
&
h_key
)
==
ERROR_SUCCESS
)
{
if
(
RegQueryValueEx
(
h_key
,
_T
(
""
),
0
,
&
i_type
,
(
LPBYTE
)
p_data
,
&
i_data
)
==
ERROR_SUCCESS
&&
i_type
==
REG_SZ
)
{
int
i_len
=
strlen
(
p_data
);
if
(
i_len
&&
p_data
[
i_len
-
1
]
==
'\\'
)
p_data
[
i_len
-
1
]
=
0
;
ppsz_path
[
i_index
++
]
=
p_data
;
msg_Err
(
p_dec
,
"Real: %s"
,
p_data
);
}
RegCloseKey
(
h_key
);
}
}
#endif
for
(
i
=
0
;
ppsz_path
[
i
];
i
++
)
{
asprintf
(
&
psz_dll
,
"%s
\\
%s"
,
ppsz_path
[
i
],
psz_codec
);
/* New format */
asprintf
(
&
psz_dll
,
"%s
\\
%4.4s.dll"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenWin32Dll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
/* Old format */
asprintf
(
&
psz_dll
,
"%s
\\
%4.4s3260.dll"
,
ppsz_path
[
i
],
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
i_result
=
OpenWin32Dll
(
p_dec
,
ppsz_path
[
i
],
psz_dll
);
free
(
psz_dll
);
if
(
i_result
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
...
...
@@ -455,7 +484,7 @@ static int OpenWin32Dll( decoder_t *p_dec, char *psz_path, char *psz_dll )
p_sys
->
i_extra
,
p_sys
->
p_extra
};
msg_
Err
(
p_dec
,
"opening win32 dll '%s'"
,
psz_dll
);
msg_
Dbg
(
p_dec
,
"opening win32 dll '%s'"
,
psz_dll
);
#ifdef LOADER
Setup_LDT_Keeper
();
...
...
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