manio / vdr-plugin-dvbapi

VDR dvbapi plugin for use with OSCam
http://www.streamboard.tv/wbb2/thread.php?threadid=40060
GNU General Public License v2.0
58 stars 25 forks source link

make plugin #27

Closed jteeuw closed 11 years ago

jteeuw commented 11 years ago

I am getting a error when i make the plugin on a ARM Debian :

ecsa' g++ -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/local/src/s2-liplianin/linux -fexpensive-optimizations -funroll-loops -mmmx -msse -msse2 -msse3 -DPARALLEL_MODE=PARALLEL_128_SSE2 -c FFdecsa.c cc1plus: error: unrecognized command line option â-mmmxâ cc1plus: error: unrecognized command line option â-msseâ cc1plus: error: unrecognized command line option â-msse2â cc1plus: error: unrecognized command line option â-msse3â make[1]: * [FFdecsa.o] Error 1 make[1]: Leaving directory `/usr/local/src/vdr/PLUGINS/src/vdr-plugin-dvbapi/FFdecsa' make: * [FFdecsa/FFdecsa.o] Error 2

manio commented 11 years ago

Hello. Try to adjust FFdecsa flags in Makefile. You can't compile it because you're trying to pass compile flags which are not supported on your ARM platform. You may also consider using libdvbcsa.

jteeuw commented 11 years ago

Thanks for the info, it worked! the compile is successfully, only in oscam nothing is happening and in the log iám not seeing any activity from the plugin.

Apr 22 12:19:15 NAS01 vdr: [26881] DVBAPI: 0.0: doReply changed, reset triggered Apr 22 12:19:15 NAS01 vdr: [26881] DVBAPI: 0.0: now using CAIDs version 16843009 Apr 22 12:19:15 NAS01 vdr: [26881] DVBAPI: 0.0: status 'present' Apr 22 12:19:16 NAS01 vdr: [26881] DVBAPI: 0.0: status 'reset' Apr 22 12:19:16 NAS01 vdr: [26881] DVBAPI: 0.0: status 'ready' Apr 22 12:19:16 NAS01 vdr: [26888] CAM 1: module ready

In oscam : 2013/04/22 11:36:54 1472A0 c plain dvbapi-client granted (vdr, au=auto (6 reader)) 2013/04/22 11:36:54 1472A0 c Detected /dev/dvb/adapter0/demux0 Api: 0

manio commented 11 years ago

I don't see your full log but from this small piece it seems that everything is ok, and you're not starting any encrypted channel.

jteeuw commented 11 years ago

iám seeing only this in the user.log :

Apr 23 09:02:43 NAS01 vdr: [7520] Streamdev: Accepted new client (HTTP) 195.169.103.61:51831 Apr 23 09:02:43 NAS01 vdr: [7520] streamdev: No device provides channel 35 (Film1 Series HD) at priority 0 Apr 23 09:02:43 NAS01 vdr: [7520] streamdev-server: closing HTTP connection to 192.168.1.100:51831 Apr 23 09:02:43 NAS01 vdr: [7520] Streamdev: Accepted new client (HTTP) 192.168.1.100:51832 Apr 23 09:02:43 NAS01 vdr: [7520] streamdev: No device provides channel 35 (Film1 Series HD) at priority 0 Apr 23 09:02:43 NAS01 vdr: [7520] streamdev-server: closing HTTP connection to 192.168.1.100:51832

jteeuw commented 11 years ago

I have added the dvbapi -B0 option but its still not working

Apr 24 09:24:02 NAS01 vdr: [26869] VDR version 1.7.28 started Apr 24 09:24:02 NAS01 vdr: [26869] switched to user 'vdr' Apr 24 09:24:02 NAS01 vdr: [26869] codeset is 'UTF-8' - known Apr 24 09:24:02 NAS01 vdr: [26869] found 29 locales in /usr/share/locale Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-live.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] [live] INFO: validating server ip '0.0.0.0' Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-dvbapi.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-epgsearchonly.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-conflictcheckonly.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-epgsearch.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-quickepgsearch.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-vnsiserver3.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading plugin: /usr/lib/vdr/plugins/libvdr-streamdev-server.so.1.7.28 Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/setup.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/sources.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/diseqc.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/scr.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/channels.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/timers.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/commands.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/reccmds.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/svdrphosts.conf Apr 24 09:24:02 NAS01 vdr: [26869] loading /var/lib/vdr/keymacros.conf Apr 24 09:24:02 NAS01 vdr: [26869] registered source parameters for 'A - ATSC' Apr 24 09:24:02 NAS01 vdr: [26869] registered source parameters for 'C - DVB-C' Apr 24 09:24:02 NAS01 vdr: [26869] registered source parameters for 'S - DVB-S' Apr 24 09:24:02 NAS01 vdr: [26869] registered source parameters for 'T - DVB-T' Apr 24 09:24:02 NAS01 vdr: [26872] epg data reader thread started (pid=26869, tid=26872) Apr 24 09:24:02 NAS01 vdr: [26872] reading EPG data from /var/cache/vdr/epg.data Apr 24 09:24:02 NAS01 vdr: [26871] video directory scanner thread started (pid=26869, tid=26871) Apr 24 09:24:02 NAS01 vdr: [26871] video directory scanner thread ended (pid=26869, tid=26871) Apr 24 09:24:02 NAS01 vdr: [26870] video directory scanner thread started (pid=26869, tid=26870) Apr 24 09:24:02 NAS01 vdr: [26870] video directory scanner thread ended (pid=26869, tid=26870) Apr 24 09:24:03 NAS01 vdr: [26872] epg data reader thread ended (pid=26869, tid=26872) Apr 24 09:24:03 NAS01 vdr: [26869] probing /dev/dvb/adapter0/frontend0 Apr 24 09:24:03 NAS01 vdr: [26869] DVBAPI: Probe: capturing device 0/0 (subsystem ID 00000000) Apr 24 09:24:03 NAS01 vdr: [26869] DVBAPI: creating standard device 0/0 Apr 24 09:24:03 NAS01 vdr: [26869] new device number 1 Apr 24 09:24:03 NAS01 vdr: [26869] frontend 0/0 provides DVB-C with QAM16,QAM32,QAM64,QAM128,QAM256 ("Sundtek DVB-C") Apr 24 09:24:03 NAS01 vdr: [26869] cTimeMs: using monotonic clock (resolution is 1 ns) Apr 24 09:24:03 NAS01 vdr: [26869] DVBAPI: Using software decryption on card 0/0 Apr 24 09:24:03 NAS01 vdr: [26869] DVBAPI: SCCIAdapter: built caid table with 2 caids for 782 channels Apr 24 09:24:03 NAS01 vdr: [26869] found 1 DVB device Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: live (0.2.0): Live Interactive VDR Environment Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: dvbapi (1.0.4): DVBAPI type SOFTCAM Apr 24 09:24:03 NAS01 vdr: [26869] DVBAPI: plugin version 1.0.4 initializing (VDR 1.7.28) Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: epgsearchonly (0.0.1): Direct access to epgsearch's search menu Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: conflictcheckonly (0.0.1): Direct access to epgsearch's conflict check menu Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: epgsearch (1.0.1): search the EPG for repeats and more Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: quickepgsearch (0.0.1): Quick search for broadcasts Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: vnsiserver3 (0.9.1): VDR-Network-Streaming-Interface (VNSI) Server Apr 24 09:24:03 NAS01 vdr: [26869] initializing plugin: streamdev-server (0.6.0): VDR Streaming Server Apr 24 09:24:03 NAS01 vdr: [26869] setting primary device to 1 Apr 24 09:24:03 NAS01 vdr: [26869] device 1 has no MPEG decoder Apr 24 09:24:03 NAS01 vdr: [26869] assuming manual start of VDR Apr 24 09:24:03 NAS01 vdr: [26869] SVDRP listening on port 6419 Apr 24 09:24:03 NAS01 vdr: [26869] setting current skin to "sttng" Apr 24 09:24:03 NAS01 vdr: [26869] loading /var/lib/vdr/themes/sttng-default.theme Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: live Apr 24 09:24:03 NAS01 vdr: [26876] SC-CI adapter on device 0 thread started (pid=26869, tid=26876) Apr 24 09:24:03 NAS01 vdr: [26874] section handler thread started (pid=26869, tid=26874) Apr 24 09:24:03 NAS01 vdr: [26873] tuner on frontend 0/0 thread started (pid=26869, tid=26873) Apr 24 09:24:03 NAS01 vdr: [26869] LIVE: initial file cache has 82 entries and needs 377394 bytes of data! Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: dvbapi Apr 24 09:24:03 NAS01 vdr: [26869] DVBAPI: plugin started Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: epgsearchonly Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: conflictcheckonly Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: epgsearch Apr 24 09:24:03 NAS01 vdr: [26869] loading /var/lib/vdr/plugins/epgsearch/epgsearchcats.conf Apr 24 09:24:03 NAS01 vdr: [26869] loading /var/lib/vdr/plugins/epgsearch/epgsearchmenu.conf Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: quickepgsearch Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: vnsiserver3 Apr 24 09:24:03 NAS01 vdr: [26869] VNSI: VNSI Server started Apr 24 09:24:03 NAS01 vdr: [26869] VNSI: Channel streaming timeout: 10 seconds Apr 24 09:24:03 NAS01 vdr: [26869] starting plugin: streamdev-server Apr 24 09:24:03 NAS01 vdr: [26869] loading /var/lib/vdr/plugins/streamdev-server/streamdevhosts.conf Apr 24 09:24:03 NAS01 vdr: [26869] ERROR (lirc.c,48): /var/run/lirc/lircd: No such file or directory Apr 24 09:24:03 NAS01 vdr: [26869] ERROR: remote control LIRC not ready! Apr 24 09:24:03 NAS01 vdr: [26878] EPGSearch: conflictcheck thread started (pid=26869, tid=26878) Apr 24 09:24:03 NAS01 vdr: [26880] streamdev server thread started (pid=26869, tid=26880) Apr 24 09:24:03 NAS01 vdr: [26880] Streamdev: Listening (VTP) on port 2004 Apr 24 09:24:03 NAS01 vdr: [26880] Streamdev: Listening (HTTP) on port 3000 Apr 24 09:24:03 NAS01 vdr: [26879] VDR VNSI Server thread started (pid=26869, tid=26879) Apr 24 09:24:03 NAS01 vdr: [26877] [live] INFO: attempt to listen on ip = '0.0.0.0' Apr 24 09:24:03 NAS01 vdr: [26877] [live] ERROR: Unable to load cert/key (/var/lib/vdr/plugins/live/live.pem//var/lib/vdr/plugins/live/live-key.pem): No such file or directory Apr 24 09:24:04 NAS01 vdr: [26869] DVBAPI: 0.0: doReply changed, reset triggered Apr 24 09:24:04 NAS01 vdr: [26869] DVBAPI: 0.0: now using CAIDs version 16843009 Apr 24 09:24:04 NAS01 vdr: [26869] DVBAPI: 0.0: status 'present' Apr 24 09:24:04 NAS01 vdr: [26869] DVBAPI: 0.0: status 'reset' Apr 24 09:24:05 NAS01 vdr: [26869] DVBAPI: 0.0: status 'ready' Apr 24 09:24:05 NAS01 vdr: [26876] CAM 1: module ready Apr 24 09:24:33 NAS01 vdr: [26869] not all devices ready after 30 seconds Apr 24 09:24:33 NAS01 vdr: [26869] switching to channel 1 Apr 24 09:24:33 NAS01 vdr: [26869] info: Channel not available! Apr 24 09:24:33 NAS01 vdr: [26869] ERROR: no OSD provider available - using dummy OSD! Apr 24 09:24:35 NAS01 vdr: [26869] setting watchdog timer to 60 seconds Apr 24 09:24:35 NAS01 vdr: [26869] OSD size changed to 720x480 @ 1 Apr 24 09:24:35 NAS01 vdr: [26869] ERROR: no OSD provider available - using dummy OSD! Apr 24 09:24:35 NAS01 vdr: [26878] EPGSearch: timer conflict check started Apr 24 09:24:35 NAS01 vdr: [26878] EPGSearch: timer conflict check finished Apr 24 09:24:39 NAS01 vdr: [26880] Streamdev: Accepted new client (HTTP) 195.169.103.61:51988 Apr 24 09:24:39 NAS01 vdr: [26880] streamdev: No device provides channel 217 (RTL 7 HD) at priority 0 Apr 24 09:24:39 NAS01 vdr: [26880] streamdev-server: closing HTTP connection to 195.169.103.61:51988 Apr 24 09:24:39 NAS01 vdr: [26880] Streamdev: Accepted new client (HTTP) 195.169.103.61:51989 Apr 24 09:24:39 NAS01 vdr: [26880] streamdev: No device provides channel 217 (RTL 7 HD) at priority 0 Apr 24 09:24:39 NAS01 vdr: [26880] streamdev-server: closing HTTP connection to 195.169.103.61:51989 Apr 24 09:24:39 NAS01 vdr: [26880] Streamdev: Accepted new client (HTTP) 195.169.103.61:51990 Apr 24 09:24:39 NAS01 vdr: [26880] streamdev: No device provides channel 217 (RTL 7 HD) at priority 0 Apr 24 09:24:39 NAS01 vdr: [26880] streamdev-server: closing HTTP connection to 195.169.103.61:51990 Apr 24 09:24:41 NAS01 vdr: [26869] max. latency time 1 seconds

manio commented 11 years ago

I don't see any CAM requests from vdr. Are FTA channels working for you?

jteeuw commented 11 years ago

FTA channels are working fine.

manio commented 11 years ago

It's strange. I don't think you need a -B0 switch, do you have a /dev/dvb/adapter0/ca0 device? Can you try to schedule some recording on crypted channel? And what about this:

not all devices ready after 30 seconds
jteeuw commented 11 years ago

I have removed the -B0 switch , in the /dev/dv/adapter directory i have tree files :

frontend0 dvr0 demux0

must i patch the kernel ? this is the out put from uname -a

Linux NAS01 3.2.0-4-kirkwood #1 Debian 3.2.41-2 armv5tel GNU/Linux

In the oscam log i don't see anyting happening when i record a program , the only thing i see in oscam is 2013/04/25 10:35:39 F24A60 c plain dvbapi-client granted (vdr, au=auto (6 reader)) 2013/04/25 10:35:40 F24A60 c Detected /dev/dvb/adapter0/demux0 Api: 0

this is the log from vdr:

pr 25 12:13:43 NAS01 vdr: [5503] DVBAPI: 0.0: doReply changed, reset triggered Apr 25 12:13:43 NAS01 vdr: [5503] DVBAPI: 0.0: now using CAIDs version 16843009 Apr 25 12:13:43 NAS01 vdr: [5503] DVBAPI: 0.0: status 'present' Apr 25 12:13:43 NAS01 vdr: [5503] CAM 1: module present Apr 25 12:13:43 NAS01 vdr: [5503] DVBAPI: 0.0: status 'reset' Apr 25 12:13:43 NAS01 vdr: [5503] CAM 1: module reset Apr 25 12:13:44 NAS01 vdr: [5503] DVBAPI: 0.0: status 'ready' Apr 25 12:13:44 NAS01 vdr: [5503] CAM 1: module ready Apr 25 12:13:55 NAS01 vdr: [5511] timer 1 (160 1148-1225 '30 Rock') set to event Thu 25.04.2013 11:50-12:15 '30 Rock' Apr 25 12:14:21 NAS01 vdr: [5496] not all devices ready after 30 seconds Apr 25 12:14:21 NAS01 vdr: [5496] switching to channel 2 Apr 25 12:14:21 NAS01 vdr: [5496] OSD size changed to 720x480 @ 1 Apr 25 12:14:21 NAS01 vdr: [5496] ERROR: no OSD provider available - using dummy OSD! Apr 25 12:14:22 NAS01 vdr: [5496] live timer 1 (160 1148-1225 '30 Rock') added Apr 25 12:14:22 NAS01 vdr: [5518] timer 1 (160 1148-1225 '30 Rock') set to event Thu 25.04.2013 11:50-12:15 '30 Rock' Apr 25 12:14:27 NAS01 vdr: [5496] timer 1 (160 1148-1225 '30 Rock') set to event Thu 25.04.2013 11:50-12:15 '30 Rock' Apr 25 12:14:32 NAS01 vdr: [5496] switching device 1 to channel 160 Apr 25 12:14:33 NAS01 vdr: [5501] channel 160 (Comedy C./Kindernet HD) event Thu 25.04.2013 11:50-12:15 '30 Rock' status 4 Apr 25 12:14:43 NAS01 vdr: [5496] switching device 1 to channel 160 Apr 25 12:14:56 NAS01 vdr: [5514] timer 1 (160 1148-1225 '30 Rock') set to event Thu 25.04.2013 11:50-12:15 '30 Rock' Apr 25 12:15:05 NAS01 vdr: [5496] switching device 1 to channel 160 Apr 25 12:15:09 NAS01 vdr: [5501] channel 160 (Comedy C./Kindernet HD) event Thu 25.04.2013 12:15-12:40 '30 Rock' status 4 Apr 25 12:15:27 NAS01 vdr: [5496] switching device 1 to channel 160 Apr 25 12:15:49 NAS01 vdr: [5496] switching device 1 to channel 160 Apr 25 12:15:59 NAS01 vdr: [5496] live timer 1 (160 1148-1225 '30 Rock') deleted

manio commented 11 years ago

Please mail me or catch me on irc. I'd like to help you and i think it will be better to instant contact then flood in this issue.

Preisschild-zz commented 11 years ago

hi manio, I wanted to write you a email but your email-server is not available?^^ i have the same problem... debian-system (raspberry pi). How i can adjust FFdecsa flags in Makefile? my linux and english skills is not so good xD

I hope you can help me, thank you and have a nice evening with friendly greetings Preisschild

manio commented 11 years ago

My email server should be fine (at least one MX).

What you mean by same problem? Problem with compilation? Let libdvbcsa a try. Compile with: 'make LIBDVBCSA=1 install-plugins'. Of course you need libdvbcsa library installed.

Preisschild-zz commented 11 years ago

ok. I had tried to write you a email and the error message came "access denied"... whatever xD maybe seems to be on my email server...

that's correct,i have problem with Compile.. Now i try to make Compile with"make VDRDIR=/usr/include/vdr LIBDIR=/usr/lib/vdr/plugins LIBDVBCSA=/usr/lib/vdr/plugins" and came this error message " In file included from DeCSA.cpp:19:0: DeCSA.h:28:27: fatal error: dvbcsa/dvbcsa.h: No such file or directory compilation terminated. make: *\ [DeCSA.o] Error 1 " need a additional libdvbcsa plugin (apt-get install)?

manio commented 11 years ago

http://packages.debian.org/wheezy/libdvbcsa-dev or install it manually (http://www.videolan.org/developers/libdvbcsa.html)

Preisschild-zz commented 11 years ago

yeah man, you rocks^^ thanks a lot

CReimer commented 11 years ago

Maybe it's time to drop ffdecsa...

libdvbcsa does a good job. And it's multi platform capable

manio commented 11 years ago

But it's not as fast as FFdecsa (look at my comment here: https://github.com/tvheadend/tvheadend/pull/54#issuecomment-4721369)

And the real issue is about a memory initialization on jteeuw's ARM architecture (i found a quick fix but i need to verify it).

@jteeuw You're still using VDR on your NAS? Any chances to test some code on your box?

jteeuw commented 11 years ago

@manio , i'am not using VDR annymore, but if you want to do some test you are welcome

stevie1512 commented 11 years ago

Hi Manio, I am using dvbapi on an iconnect base vdr server (should be similar to the hw Jeroen is using, ARM Kirkwood). As stated by another user here, libdvbcsa is performing better than ffdecsa - mostly starting good but dropouts occur more and more after a while. This is the only reason why I am still using my x86 server (with dvbapi) Is the memory initialization you mentioned above the reason why the memory alignment (echo 2 > /proc/cpu/alignment) needs to be changed to get dvbapi (and vdr-sc) working, without one can't switch to scrambled channels ? I will compile above test prog tonight and post the results.

Regards stevie1512

manio commented 11 years ago

@stevie1512 The memory initialization which I am diagnosing with @jteeuw is only for his specific problem ("not all devices ready after 30 seconds"). The libdvbcsa/ffdecsa performance is quite different story. Sorry - i didn't test it on ARM architecture but afaict the libdvbcsa should work better there.