[ekiga] Removed the video4linux part of the HAL-DBUS component
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Removed the video4linux part of the HAL-DBUS component
- Date: Tue, 4 Mar 2014 13:45:21 +0000 (UTC)
commit 0871f6b0addfe435fb9a59b9dc76d1b6ee6294c0
Author: Julien Puydt <jpuydt free fr>
Date: Tue Mar 4 14:40:42 2014 +0100
Removed the video4linux part of the HAL-DBUS component
The GUDev component does that now
configure.ac | 28 -----
lib/Makefile.am | 6 -
.../components/hal-dbus/hal-manager-dbus.cpp | 109 ++------------------
lib/engine/components/hal-dbus/hal-manager-dbus.h | 1 -
lib/engine/components/hal-dbus/hal-v4l-helper.c | 92 -----------------
lib/engine/components/hal-dbus/hal-v4l-helper.h | 46 --------
6 files changed, 11 insertions(+), 271 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4071156..41d2fb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -369,34 +369,6 @@ fi
AM_CONDITIONAL(HAVE_DBUS, test "x$found_dbus" = "xyes")
AM_CONDITIONAL(INSTALL_DBUS_SERVICE, test "x$DBUS_SERVICE" = "xenabled")
-
-dnl ###############################
-dnl V4L headers
-dnl These are only necessary until HAL has a decent V4L support...
-dnl ###############################
-
-OLDV4L="disabled"
-V4L="disabled"
-V4L2="disabled"
-VIDEO4LINUX="disabled"
-if test "x${win32}" != "x1"; then
- AC_CHECK_HEADER(libv4l1-videodev.h, V4L="enabled")
- AC_CHECK_HEADER(linux/videodev2.h, V4L2="enabled")
- AC_CHECK_HEADER(linux/videodev.h, OLDV4L="enabled")
-
- if test "x${V4L}" != "xdisabled" -a "x${V4L2}" != "xdisabled"; then
- AC_DEFINE(HAVE_V4L,1,[V4L support])
- VIDEO4LINUX="enabled"
- else
- if test "x${OLDV4L}" != "xdisabled"; then
- AC_DEFINE(HAVE_V4L,1,[V4L support])
- AC_DEFINE(HAVE_OLD_V4L,1,[V4L is old style])
- VIDEO4LINUX="enabled"
- fi
- fi
-fi
-AM_CONDITIONAL(HAVE_V4L, test "x${VIDEO4LINUX}" = "xenabled")
-
dnl ###############################
dnl Avahi / mDNS Support
dnl ###############################
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a117138..c57d725 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -542,12 +542,6 @@ libekiga_la_SOURCES += \
engine/components/hal-dbus/hal-main-dbus.h \
engine/components/hal-dbus/hal-main-dbus.cpp
-if HAVE_V4L
-libekiga_la_SOURCES += \
- engine/components/hal-dbus/hal-v4l-helper.h \
- engine/components/hal-dbus/hal-v4l-helper.c
-endif
-
nodist_libekiga_la_SOURCES += \
engine/components/hal-dbus/hal-marshal.h \
engine/components/hal-dbus/hal-marshal.c
diff --git a/lib/engine/components/hal-dbus/hal-manager-dbus.cpp
b/lib/engine/components/hal-dbus/hal-manager-dbus.cpp
index f7fd105..bc9edc9 100644
--- a/lib/engine/components/hal-dbus/hal-manager-dbus.cpp
+++ b/lib/engine/components/hal-dbus/hal-manager-dbus.cpp
@@ -41,12 +41,6 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
-#ifdef HAVE_V4L
-extern "C" {
-#include "hal-v4l-helper.h"
-}
-#endif /* HAVE_V4L */
-
//FIXME: for tracing
#include <ptlib.h>
@@ -143,7 +137,7 @@ void HalManager_dbus::device_added_cb (const char *device)
return;
hal_devices.push_back(hal_device);
- PTRACE(4, "HalManager_dbus\tAdded device " << hal_device.category << "," << hal_device.name << "," <<
hal_device.type << " Video Capabilities: " << hal_device.video_capabilities);
+ PTRACE(4, "HalManager_dbus\tAdded device " << hal_device.category << "," << hal_device.name << "," <<
hal_device.type);
if (hal_device.category == "alsa") {
@@ -158,13 +152,6 @@ void HalManager_dbus::device_added_cb (const char *device)
audioinput_device_added(hal_device.category, hal_device.name);
audiooutput_device_added(hal_device.category, hal_device.name);
}
- else if (hal_device.category == "video4linux") {
- if (hal_device.video_capabilities & 0x01)
- videoinput_device_added(hal_device.category, hal_device.name, 0x01);
- if (hal_device.video_capabilities & 0x02)
- videoinput_device_added(hal_device.category, hal_device.name, 0x02);
- }
-
}
void HalManager_dbus::device_removed_cb (const char *device)
@@ -175,16 +162,16 @@ void HalManager_dbus::device_removed_cb (const char *device)
for (iter = hal_devices.begin ();
iter != hal_devices.end () ;
iter++)
- if (iter->key == device) {
+ if (iter->key == device) {
found = true;
break;
}
if (found) {
- PTRACE(4, "HalManager_dbus\tRemoved device " << iter->category << "," << iter->name << "," << iter->type
<< " Video Capabilities: " << iter->video_capabilities);
+ PTRACE(4, "HalManager_dbus\tRemoved device " << iter->category << "," << iter->name << "," <<
iter->type);
if (iter->category == "alsa") {
-
+
if (iter->type == "capture") {
audioinput_device_removed(iter->category, iter->name);
}
@@ -196,14 +183,6 @@ void HalManager_dbus::device_removed_cb (const char *device)
audioinput_device_removed(iter->category, iter->name);
audiooutput_device_removed(iter->category, iter->name);
}
- else if (iter->category == "video4linux") {
- if (iter->video_capabilities & 0x01)
- videoinput_device_removed(iter->category, iter->name, 0x01);
- if (iter->video_capabilities & 0x02)
- videoinput_device_removed(iter->category, iter->name, 0x02);
-
- }
-
hal_devices.erase(iter);
}
@@ -230,7 +209,7 @@ void HalManager_dbus::interface_no_longer_active_cb (const char *interface)
for (iter = nm_interfaces.begin ();
iter != nm_interfaces.end () ;
iter++)
- if (iter->key == interface) {
+ if (iter->key == interface) {
found = true;
break;
}
@@ -258,7 +237,7 @@ void HalManager_dbus::get_string_property(DBusGProxy *proxy, const char * proper
if (error != NULL)
g_error_free(error);
else
- if (c_value)
+ if (c_value)
value = c_value;
g_free (c_value);
@@ -274,8 +253,6 @@ bool HalManager_dbus::get_device_type_name (const char * device, HalDevice & hal
"org.freedesktop.Hal.Device");
get_string_property(device_proxy, "info.category", hal_device.category);
- hal_device.video_capabilities = 0;
-
if (hal_device.category == "alsa") {
get_string_property(device_proxy, "alsa.card_id", hal_device.name);
get_string_property(device_proxy, "alsa.type", hal_device.type);
@@ -286,72 +263,9 @@ bool HalManager_dbus::get_device_type_name (const char * device, HalDevice & hal
hal_device.type = "";
ret = true;
}
- else if (hal_device.category == "video4linux") {
-
-#ifdef HAVE_V4L
- std::string device_dir;
- char* v4l1_name;
- char* v4l2_name;
- int supported_versions;
-
- get_string_property(device_proxy, "video4linux.device", device_dir);
-
- if (device_dir != "") {
- supported_versions = v4l_get_device_names ((const char*) device_dir.c_str(), &v4l1_name, &v4l2_name);
-
- if (supported_versions == 0) {
- PTRACE(1, "HalManager_dbus\tNo supported V4L version detected for device " << device_dir);
- hal_device.name = device_dir;
- hal_device.type = "";
- }
- else if (supported_versions == -1) {
- PTRACE(1, "HalManager_dbus\tCould not open device " << device_dir);
- hal_device.name = device_dir;
- hal_device.type = "";
- }
- else {
- if (supported_versions && 1) {
- if (v4l1_name) {
- PTRACE(4, "HalManager_dbus\tDetected V4L capabilities on " << device_dir << " name: " <<
v4l1_name);
- hal_device.name = v4l1_name;
- hal_device.type = "capture";
- hal_device.video_capabilities |= V4L_VERSION_1;
- }
- else {
- PTRACE(4, "HalManager_dbus\tSkipped V4L1 device " << device_dir << "without name");
- ret = false;
- }
- }
- if (supported_versions && 2) {
- if (v4l2_name) {
- PTRACE(4, "HalManager_dbus\tDetected V4L2 capabilities on " << device_dir << " name: " <<
v4l2_name);
- hal_device.name = v4l2_name;
- hal_device.type = "capture";
- hal_device.video_capabilities |= V4L_VERSION_2;
- ret = true;
- }
- else {
- PTRACE(4, "HalManager_dbus\tSkipped V4L2 device " << device_dir << "without name");
- ret = false;
- }
- }
-
- }
-
- v4l_free_device_name(&v4l1_name);
- v4l_free_device_name(&v4l2_name);
- }
-#endif /* HAVE_V4L */
- }
g_object_unref(device_proxy);
-
- // FIXME: Hack to support badly named Logitech devices
- // Maybe this should be fixed in hald?
- if (hal_device.name.substr(0, 17) == "Logitech Logitech") {
- hal_device.name = hal_device.name.substr(9);
- }
-
+
return ret;
}
@@ -369,14 +283,14 @@ void HalManager_dbus::get_interface_name_ip (const char * interface, NmInterface
"org.freedesktop.NetworkManager.Properties");
nm_interface.key = interface;
-
+
// getName
dbus_g_proxy_call (interface_proxy, "getName", &error, G_TYPE_INVALID, G_TYPE_STRING, &c_value,
G_TYPE_INVALID);
if (error != NULL)
g_error_free(error);
else
- if (c_value)
+ if (c_value)
nm_interface.name = c_value;
g_free (c_value);
@@ -425,12 +339,11 @@ void HalManager_dbus::populate_devices_list ()
for (device_list_ptr = device_list; *device_list_ptr; device_list_ptr++) {
hal_device.key = *device_list_ptr;
-
+
if (hal_device.key != "/org/freedesktop/Hal/devices/computer") {
if (get_device_type_name(*device_list_ptr, hal_device)) {
if ( (hal_device.category == "alsa") ||
- (hal_device.category == "oss") ||
- (hal_device.category == "video4linux") )
+ (hal_device.category == "oss"))
hal_devices.push_back(hal_device);
}
}
diff --git a/lib/engine/components/hal-dbus/hal-manager-dbus.h
b/lib/engine/components/hal-dbus/hal-manager-dbus.h
index 813e2d0..2388a46 100644
--- a/lib/engine/components/hal-dbus/hal-manager-dbus.h
+++ b/lib/engine/components/hal-dbus/hal-manager-dbus.h
@@ -58,7 +58,6 @@ extern "C" {
std::string category;
std::string name;
std::string type;
- unsigned video_capabilities;
} HalDevice;
typedef struct NmInterface {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]