Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
856b6e43
Commit
856b6e43
authored
Aug 24, 2004
by
Jon Lech Johansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./src/libvlc.c: initialize dvd/vcd/cd-audio values using HAL.
parent
e3a6345c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
configure.ac
configure.ac
+7
-0
src/libvlc.c
src/libvlc.c
+59
-0
No files found.
configure.ac
View file @
856b6e43
...
@@ -668,6 +668,13 @@ if test "${x_libraries}" = "NONE"; then
...
@@ -668,6 +668,13 @@ if test "${x_libraries}" = "NONE"; then
x_libraries="/usr/X11R6/lib"
x_libraries="/usr/X11R6/lib"
fi
fi
dnl Check for hal
PKG_CHECK_MODULES(HAL, hal >= 0.2.97,
[AC_DEFINE(HAVE_HAL, [], [Define if you have the HAL library])
VLC_ADD_LDFLAGS([vlc],[$HAL_LIBS])
VLC_ADD_CFLAGS([vlc],[$HAL_CFLAGS])],
[AC_MSG_WARN(HAL library not found)])
dnl Build the gtk_main plugins?
dnl Build the gtk_main plugins?
NEED_GTK_MAIN=no
NEED_GTK_MAIN=no
NEED_GNOME_MAIN=no
NEED_GNOME_MAIN=no
...
...
src/libvlc.c
View file @
856b6e43
...
@@ -62,6 +62,10 @@
...
@@ -62,6 +62,10 @@
# include <locale.h>
# include <locale.h>
#endif
#endif
#ifdef HAVE_HAL
# include <hal/libhal.h>
#endif
#include "vlc_cpu.h"
/* CPU detection */
#include "vlc_cpu.h"
/* CPU detection */
#include "os_specific.h"
#include "os_specific.h"
...
@@ -103,6 +107,8 @@ static int ConsoleWidth ( void );
...
@@ -103,6 +107,8 @@ static int ConsoleWidth ( void );
static
int
VerboseCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
VerboseCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
void
InitDeviceValues
(
vlc_t
*
);
/*****************************************************************************
/*****************************************************************************
* vlc_current_object: return the current object.
* vlc_current_object: return the current object.
*****************************************************************************
*****************************************************************************
...
@@ -488,6 +494,11 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
...
@@ -488,6 +494,11 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
return
VLC_EEXIT
;
return
VLC_EEXIT
;
}
}
/*
* Init device values
*/
InitDeviceValues
(
p_vlc
);
/*
/*
* Override default configuration with config file settings
* Override default configuration with config file settings
*/
*/
...
@@ -2206,3 +2217,51 @@ static int VerboseCallback( vlc_object_t *p_this, const char *psz_variable,
...
@@ -2206,3 +2217,51 @@ static int VerboseCallback( vlc_object_t *p_this, const char *psz_variable,
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
* InitDeviceValues: initialize device values
*****************************************************************************
* This function inits the dvd, vcd and cd-audio values
*****************************************************************************/
static
void
InitDeviceValues
(
vlc_t
*
p_vlc
)
{
#ifdef HAVE_HAL
LibHalContext
*
ctx
;
int
i
,
i_devices
;
char
**
devices
;
char
*
block_dev
;
dbus_bool_t
b_dvd
;
if
(
(
ctx
=
hal_initialize
(
NULL
,
FALSE
)
)
)
{
if
(
(
devices
=
hal_get_all_devices
(
ctx
,
&
i_devices
)
)
)
{
for
(
i
=
0
;
i
<
i_devices
;
i
++
)
{
if
(
!
hal_device_property_exists
(
ctx
,
devices
[
i
],
"storage.cdrom.dvd"
)
)
{
continue
;
}
b_dvd
=
hal_device_get_property_bool
(
ctx
,
devices
[
i
],
"storage.cdrom.dvd"
);
block_dev
=
hal_device_get_property_string
(
ctx
,
devices
[
i
],
"block.device"
);
if
(
b_dvd
)
{
config_PutPsz
(
p_vlc
,
"dvd"
,
block_dev
);
}
config_PutPsz
(
p_vlc
,
"vcd"
,
block_dev
);
config_PutPsz
(
p_vlc
,
"cd-audio"
,
block_dev
);
hal_free_string
(
block_dev
);
}
}
hal_shutdown
(
ctx
);
}
#endif
}
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