In a udev rule you have the possibility to set properties on the device which gets currently added.
This udev rule
ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", ENV{dynamite_timeout}="10"
adds the property "dynamite_timeout" with a value of "10" to every frontend.
The dynamite udev-monitor now parse this property and sets automatically the timeout for this device. If you only have one specific device for which you want to set a timeout you only have to identify this device in your udev rule, set the timeout and you're done.
But for now this only works for devices which gets attached with the udev-monitor. It is not working for devices which are present when vdr/dynamite starts.
I had to modify the vdr-patch a bit but there shouldn't be any ABI changes.
I add a new command for cDynamicDeviceProbe called "ddpcService". With this command you can queue calls to the dynamite-Service-interface. Since the udev-monitor queues the attach-command for a new dvb-device it can't set the timeout immediately after queueing. It has to be queued, too. Hence the new command which makes this more flexible.
dynamite now offers a service-interface for adding udev-filters to "add"-actions. If you plug in a pvrusb2 udev will generate an event in the video4linux-subsystem with the devicepath the driver created.
pvrinput just has to call the dynamite-service in its initialization:
AddUdevMonitor video4linux /dev/video
If the udev-monitor of dynamite grabs an event of the subsystem "video4linux" whose devnode starts with "/dev/video" it tries to attach this device by calling all "cDynamicDeviceProbe"s. And since pvrinput has registered a handler it will create a cPvrDevice for this video-device. Voilà!
What I have to test now is what happens if an ivtv-device is added - there would be more than one /dev/video and only the first should be used. I think, cPvrDevice::Probe should only react on device-numbers less than 16, what do you think?
For all non-virtual methods of cDevice which are called by plugins or cDvbDevice I have to decide, if it has to be modified. Should it return the value of the sub-device or the parent-device? Or just its value regardless of sub or parent?
cDvbDevice uses "Receiving" and "IsPrimaryDevice" to decide whether it provides the given channel or not. But only the parent device can return the right values so these methods have to be modified by the vdr-patch.
Hopefully the EITScanner won't interfere with live-tv if you have more than one device...
Version 0.7 of plugin is ready for downloading. See HISTORY file for changes.
New version of markad released
The dynamite-plugin is a helper plugin which allows to dynamically attach and detach devices while vdr is running.
This is useful for slow USB-DVB-Sticks or other hardware which would delay the start of vdr and increase boot time.
pvrinput supports some USB hardware (e.g. the "HD PVR" and "PVR USB2" from Hauppauge). These (and of course the PCI cards as well) can now be attached/detached from vdr without stopping it. Just send the right SVDRP command:
svdrpsend plug dynamite attd /dev/video0
or
svdrpsend plug dynamite detd /dev/video0
If you don't use dynamite or have an unpatched vdr - don't worry - pvrinput will behave as it always has... :-)
The source for the dynamite plugin is available at the VDR Portal:
http://vdrportal.de/board/thread.php?threadid=102903
dynamite compatible pvrinput:
http://projects.vdr-developer.org/attachments/download/471/vdr-pvrinput-2011-01-20.tgz
Changes:
- updated italian translation
(provided by Diego Pierotto)
- fixed a bug with displaying the volume bar. If connection to LCDd is lost and
volume is changed in the meantime, the volume bar got mixed up after reconnection.
- adapted to changes in VDR 1.7.11 regarding character set conversion.
- implemented cStatus::SetAudioChannel and SetAudioTrack to display audio track
information on lcd.
- adapted Makefile for VDR >= 1.7.13
- fixed a possible buffer overflow in cLcd::SetRunning which caused an ABRT signal with
recent libc
Nach nun fast einem dreiviertel Jahr geht die Entwicklung des Plugins endlich weiter. Ich habe sehr viele Informationen und Daten von vielen Anwendern erhalten und weiß nun um die Kinderkrankheiten bescheid, Ich möchte mich in erster Linie um folgende Probleme kümmern:
- Verbesserung der Datenbank
- Implementierung der AV-Detektoren als dynamische Plugins.
Beide Punkte sind sehr wichtig. Der erste führte meist dazu, dass die Anwendung fehlerhafte Einträge anzeigt oder erst gar nicht richtig funktioniert. Das zweite ist sowohl aus performance- als auch entwicklungssicht ein notwendiger Schritt, da ich die etwa 1500 Profile nicht alle vollständig selbst implementieren kann. Daher soll dies über Plugins ermöglicht werden, die nach und nach hinzugefügt werden können.
This release contains the following features and bugfixes:
- updated DMH archive part of vdrburn-dvd/-archive.sh (thanks to copperhead@vdr-portal.de)
- made DMH archive optional via compile switch. Enable with ENABLE_DMH_ARCHIVE=1 (thanks to copperhead@vdr-portal.de)
- replaced offsetof by __builtin_ofsetof in scanner.c as it caused problems on some distris (suggested by TomJoad@vdr-portal.de)
- removed support for burning CDs (DVD structures on CD-R)
- removed support for vdrsync.pl, use Project X instead
- added 100MB spare space in requant factor calculation to avoid oversized ISO images
- allowed all chars of VDR locale for titels
- fixed renamed menu names being ignored (reported by mahlzeit@vdr-portal.de)
- added recording title to track edit menu
- converted all po files to UTF-8 (thanks to Ville Skyttä for the fi patch which led to that)