This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys, gi, signal, pyinotify | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst, GObject, GLib | |
# init GObject & Co. before importing local classes | |
GObject.threads_init() | |
Gst.init([]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dbus | |
SERVICE_NAME = "org.bluez" | |
ADAPTER_INTERFACE = SERVICE_NAME + ".Adapter1" | |
DEVICE_INTERFACE = SERVICE_NAME + ".Device1" | |
def get_managed_objects(): | |
bus = dbus.SystemBus() | |
manager = dbus.Interface(bus.get_object("org.bluez", "/"), | |
"org.freedesktop.DBus.ObjectManager") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <event.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <limits.h> | |
#include <sys/inotify.h> | |
static void displayInotifyEvent(struct inotify_event *i) | |
{ | |
printf(" wd =%2d; ", i->wd); |