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
c75dafab
Commit
c75dafab
authored
Jun 02, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove support DBus & HAL APIs
Acked by DBus code maintainers
parent
5b49b6b1
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
221 deletions
+53
-221
configure.ac
configure.ac
+6
-57
extras/buildsystem/cmake/config.h.cmake
extras/buildsystem/cmake/config.h.cmake
+0
-4
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+1
-1
modules/misc/screensaver.c
modules/misc/screensaver.c
+0
-10
modules/services_discovery/hal.c
modules/services_discovery/hal.c
+42
-110
src/libvlc-module.c
src/libvlc-module.c
+1
-1
src/libvlc.c
src/libvlc.c
+3
-38
No files found.
configure.ac
View file @
c75dafab
...
...
@@ -861,20 +861,13 @@ AC_ARG_ENABLE(hal,
if test "${enable_hal}" != "no"
then
PKG_CHECK_MODULES(HAL, hal >= 0.5.0,
[
AC_DEFINE( HAVE_HAL_1, 1 , [Define if you have the new HAL library API])
[
AC_DEFINE( HAVE_HAL, 1, [Define if you have the HAL library] )
VLC_ADD_PLUGIN([hal])
VLC_ADD_PLUGIN([probe_hal])
VLC_ADD_LIBS([libvlc hal probe_hal],[$HAL_LIBS])
VLC_ADD_CFLAGS([libvlc hal probe_hal],[$HAL_CFLAGS])],
dnl No hal 0.5 Test for 0.2
[ PKG_CHECK_MODULES( HAL, hal >= 0.2.97,
[AC_DEFINE(HAVE_HAL, 1, [Define if you have the HAL library])
VLC_ADD_PLUGIN([hal])
VLC_ADD_LIBS([libvlc hal],[$HAL_LIBS])
VLC_ADD_CFLAGS([libvlc hal],[$HAL_CFLAGS])],
[AC_MSG_WARN(HAL library not found)])
]
VLC_ADD_CFLAGS([libvlc hal probe_hal],[$HAL_CFLAGS])],
[AC_MSG_ERROR([libhal >= 0.5.0 was not found. Install libhal-dev ?])]
)
fi
...
...
@@ -887,10 +880,7 @@ if test "${enable_dbus}" != "no"
then
dnl api stable dbus
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
[ AC_DEFINE( HAVE_DBUS_3, 1, [Define if you have the D-BUS library API >= 1.0.0] )
AC_DEFINE( HAVE_DBUS_2, 1, [Define if you have the D-BUS library API >= 0.92] )
AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30] )
AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
[ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
VLC_ADD_LIBS([screensaver libvlc],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver libvlc],[$DBUS_CFLAGS])
dnl Check for dbus control interface
...
...
@@ -912,49 +902,8 @@ then
VLC_ADD_PLUGIN([inhibit])
VLC_ADD_LIBS([inhibit],[$DBUS_LIBS])
VLC_ADD_CFLAGS([inhibit],[$DBUS_CFLAGS])
],
if ${PKG_CONFIG} --exists dbus-1
then
[AC_ARG_ENABLE(old-dbus,
[ --enable-old-dbus Deprecated D-Bus support (default disabled)])]
if test "${enable_old_dbus}" != "yes"
then
echo ""
echo "****** WARNING **** WARNING ***** WARNING *************"
echo "*** Your D-Bus version is < 1.0.0"
echo "*** You are using old and buggy software and so"
echo "*** D-Bus support has been disabled."
echo "*** Please upgrade D-Bus : http://dbus.freedesktop.org"
echo "*** Alternatively you can force the use of your old and"
echo "*** buggy D-Bus version by specifying --enable-old-dbus"
echo "*******************************************************"
echo ""
else
dnl not too old dbus
[ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.92,
[ AC_DEFINE( HAVE_DBUS_2, 1, [Define if you have the D-BUS library API >= 0.92] )
AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30] )
AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
VLC_ADD_LIBS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
dnl older dbus
[ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.30,
[ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30 ] )
AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
VLC_ADD_LIBS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
dnl much older dbus
[ PKG_CHECK_MODULES( DBUS, dbus-1,
[AC_DEFINE(HAVE_DBUS, 1, [Define if you have the D-BUS library])
VLC_ADD_LIBS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
[AC_MSG_WARN(DBUS library not found)])
]
)]
)]
fi
fi
],
[AC_MSG_ERROR([Couldn't find DBus >= 1.0.0, install libdbus-dev ?])]
)
fi
;;
...
...
extras/buildsystem/cmake/config.h.cmake
View file @
c75dafab
...
...
@@ -57,9 +57,6 @@
#cmakedefine HAVE_D3D9_H
#cmakedefine HAVE_DAEMON
#cmakedefine HAVE_DBUS
#cmakedefine HAVE_DBUS_1
#cmakedefine HAVE_DBUS_2
#cmakedefine HAVE_DBUS_3
#cmakedefine HAVE_DCGETTEXT
#cmakedefine HAVE_DDRAW_H
#cmakedefine HAVE_DECL_FEOF_UNLOCKED
...
...
@@ -122,7 +119,6 @@
#cmakedefine HAVE_GMTIME_R
#cmakedefine HAVE_GOOM_GOOM_H
#cmakedefine HAVE_HAL
#cmakedefine HAVE_HAL_1
#cmakedefine HAVE_ICONV
#cmakedefine HAVE_ID3TAG_H
#cmakedefine HAVE_IF_NAMETOINDEX
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
c75dafab
...
...
@@ -497,7 +497,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui
.
updatesDays
->
hide
();
#endif
/* ONE INSTANCE options */
#if defined( WIN32 ) || defined( HAVE_DBUS
_3
) || defined(__APPLE__)
#if defined( WIN32 ) || defined( HAVE_DBUS ) || defined(__APPLE__)
CONFIG_GENERIC
(
"one-instance"
,
Bool
,
NULL
,
OneInterfaceMode
);
CONFIG_GENERIC
(
"playlist-enqueue"
,
Bool
,
NULL
,
EnqueueOneInterfaceMode
);
...
...
modules/misc/screensaver.c
View file @
c75dafab
...
...
@@ -47,7 +47,6 @@
#ifdef HAVE_DBUS
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
#define GS_SERVICE "org.gnome.ScreenSaver"
...
...
@@ -56,11 +55,6 @@
#endif
/* this is for dbus < 0.3 */
#ifndef HAVE_DBUS_1
#define dbus_bus_name_has_owner(connection, name, err) dbus_bus_service_exists(connection, name, err)
#endif
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
@@ -123,11 +117,7 @@ static void Deactivate( vlc_object_t *p_this )
if
(
p_intf
->
p_sys
->
p_connection
)
{
# ifdef HAVE_DBUS_2
dbus_connection_unref
(
p_intf
->
p_sys
->
p_connection
);
# else
dbus_connection_disconnect
(
p_intf
->
p_sys
->
p_connection
);
# endif
}
free
(
p_intf
->
p_sys
);
...
...
modules/services_discovery/hal.c
View file @
c75dafab
This diff is collapsed.
Click to expand it.
src/libvlc-module.c
View file @
c75dafab
...
...
@@ -1824,7 +1824,7 @@ vlc_module_begin();
change_need_restart
();
#endif
#if defined(HAVE_DBUS
_3
)
#if defined(HAVE_DBUS)
add_bool
(
"one-instance"
,
0
,
NULL
,
ONEINSTANCE_DBUS_TEXT
,
ONEINSTANCE_DBUS_LONGTEXT
,
true
);
add_bool
(
"playlist-enqueue"
,
0
,
NULL
,
PLAYLISTENQUEUE_TEXT
,
...
...
src/libvlc.c
View file @
c75dafab
...
...
@@ -67,7 +67,7 @@
# include <locale.h>
#endif
#ifdef HAVE_DBUS
_3
#ifdef HAVE_DBUS
/* used for one-instance mode */
# include <dbus/dbus.h>
#endif
...
...
@@ -506,7 +506,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
system_Configure
(
p_libvlc
,
&
i_argc
,
ppsz_argv
);
/* FIXME: could be replaced by using Unix sockets */
#ifdef HAVE_DBUS
_3
#ifdef HAVE_DBUS
dbus_threads_init_default
();
if
(
config_GetInt
(
p_libvlc
,
"one-instance"
)
>
0
)
...
...
@@ -806,7 +806,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
*/
libvlc_InternalAddIntf
(
p_libvlc
,
"hotkeys,none"
,
false
);
#ifdef HAVE_DBUS
_3
#ifdef HAVE_DBUS
/* loads dbus control interface if in one-instance mode
* we do it only when playlist exists, because dbus module needs it */
if
(
config_GetInt
(
p_libvlc
,
"one-instance"
)
>
0
)
...
...
@@ -1966,7 +1966,6 @@ static void InitDeviceValues( libvlc_int_t *p_vlc )
char
*
block_dev
=
NULL
;
dbus_bool_t
b_dvd
;
#ifdef HAVE_HAL_1
DBusConnection
*
p_connection
=
NULL
;
DBusError
error
;
...
...
@@ -1982,41 +1981,20 @@ static void InitDeviceValues( libvlc_int_t *p_vlc )
}
libhal_ctx_set_dbus_connection
(
ctx
,
p_connection
);
if
(
libhal_ctx_init
(
ctx
,
&
error
)
)
#else
ctx
=
hal_initialize
(
NULL
,
FALSE
);
if
(
ctx
)
#endif
{
#ifdef HAVE_HAL_1
if
(
(
devices
=
libhal_get_all_devices
(
ctx
,
&
i_devices
,
NULL
)
)
)
#else
if
(
(
devices
=
hal_get_all_devices
(
ctx
,
&
i_devices
)
)
)
#endif
{
for
(
i
=
0
;
i
<
i_devices
;
i
++
)
{
#ifdef HAVE_HAL_1
if
(
!
libhal_device_property_exists
(
ctx
,
devices
[
i
],
"storage.cdrom.dvd"
,
NULL
)
)
#else
if
(
!
hal_device_property_exists
(
ctx
,
devices
[
i
],
"storage.cdrom.dvd"
)
)
#endif
{
continue
;
}
#ifdef HAVE_HAL_1
b_dvd
=
libhal_device_get_property_bool
(
ctx
,
devices
[
i
],
"storage.cdrom.dvd"
,
NULL
);
block_dev
=
libhal_device_get_property_string
(
ctx
,
devices
[
i
],
"block.device"
,
NULL
);
#else
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"
);
#endif
if
(
b_dvd
)
{
config_PutPsz
(
p_vlc
,
"dvd"
,
block_dev
);
...
...
@@ -2024,26 +2002,13 @@ static void InitDeviceValues( libvlc_int_t *p_vlc )
config_PutPsz
(
p_vlc
,
"vcd"
,
block_dev
);
config_PutPsz
(
p_vlc
,
"cd-audio"
,
block_dev
);
#ifdef HAVE_HAL_1
libhal_free_string
(
block_dev
);
#else
hal_free_string
(
block_dev
);
#endif
}
#ifdef HAVE_HAL_1
libhal_free_string_array
(
devices
);
#else
hal_free_string_array
(
devices
);
#endif
}
#ifdef HAVE_HAL_1
libhal_ctx_shutdown
(
ctx
,
NULL
);
dbus_connection_unref
(
p_connection
);
libhal_ctx_free
(
ctx
);
#else
hal_shutdown
(
ctx
);
#endif
}
else
{
...
...
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