| The Following User Says Thank You to pichlo For This Useful Post: | ||
bool LinuxDeviceWatcher::Start() {
// We deliberately return true in the failure paths here because libudev is
// not a critical component of a Linux system so it may not be present/usable,
// and we don't want to halt LinuxDeviceManager initialization in such a case.
if (!libudev_.Load()) {
LOG(LS_WARNING) << "libudev not present/usable; LinuxDeviceWatcher disabled";
return true;
}
udev_ = libudev_.udev_new()();
if (!udev_) {
LOG_ERR(LS_ERROR) << "udev_new()";
return true;
}
// The second argument here is the event source. It can be either "kernel" or
// "udev", but "udev" is the only correct choice. Apps listen on udev and the
// udev daemon in turn listens on the kernel.
udev_monitor_ = libudev_.udev_monitor_new_from_netlink()(udev_, "udev");
if (!udev_monitor_) {
LOG_ERR(LS_ERROR) << "udev_monitor_new_from_netlink()";
return true;
}
// We only listen for changes in the video devices. Audio devices are more or
// less unimportant because receiving device change notifications really only
// matters for broadcasting updated send/recv capabilities based on whether
// there is at least one device available, and almost all computers have at
// least one audio device. Also, PulseAudio device notifications don't come
// from the udev daemon, they come from the PulseAudio daemon, so we'd only
// want to listen for audio device changes from udev if using ALSA. For
// simplicity, we don't bother with any audio stuff at all.
if (libudev_.udev_monitor_filter_add_match_subsystem_devtype()(
udev_monitor_, "video4linux", NULL) < 0) {
LOG_ERR(LS_ERROR) << "udev_monitor_filter_add_match_subsystem_devtype()";
return true;
}
if (libudev_.udev_monitor_enable_receiving()(udev_monitor_) < 0) {
LOG_ERR(LS_ERROR) << "udev_monitor_enable_receiving()";
return true;
}
static_cast<talk_base::PhysicalSocketServer*>(
talk_base::Thread::Current()->socketserver())->Add(this);
registered_ = true;
return true;
}
if (libudev_.udev_monitor_enable_receiving()(udev_monitor_) < 0) {
LOG_ERR(LS_ERROR) << "udev_monitor_enable_receiving()";
return true;
}
if (!libudev_.Load()) {
LOG(LS_WARNING) << "libudev not present/usable; LinuxDeviceWatcher disabled";
return true;
}
| The Following User Says Thank You to abdel_95 For This Useful Post: | ||
| The Following User Says Thank You to abdel_95 For This Useful Post: | ||
| The Following User Says Thank You to reinob For This Useful Post: | ||
| The Following User Says Thank You to abdel_95 For This Useful Post: | ||
$ wget http://qole.org/repository/pool/fremantle/chromium_5.0.369.2-maemo3_armel.deb --2015-01-29 11:19:04-- http://qole.org/repository/pool/fremantle/chromium_5.0.369.2-maemo3_armel.deb Resolving qole.org (qole.org)... 173.236.183.204 Connecting to qole.org (qole.org)|173.236.183.204|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 18757168 (18M) [application/x-debian-package] Saving to: ‘chromium_5.0.369.2-maemo3_armel.deb’ chromium_5.0.369.2- 100%[=====================>] 17.89M 4.31MB/s in 6.7s 2015-01-29 11:19:11 (2.66 MB/s) - ‘chromium_5.0.369.2-maemo3_armel.deb’ saved [18757168/18757168] $ md5sum chromium_5.0.369.2-maemo3_armel.deb b26cbfb9d01160e6ef01f6a89abd4fb0 chromium_5.0.369.2-maemo3_armel.deb