spksrc icon indicating copy to clipboard operation
spksrc copied to clipboard

tvheadend recording

Open justme1968 opened this issue 14 years ago • 17 comments

whenever i try to record or play live dvb i get an

Jul 11 22:25:43 MKV: /volume1/dvb/Hörspiel.mkv: Unable to write -- Invalid argument Jul 11 22:25:43 MKV: /volume1/dvb/Hörspiel.mkv: Unable to write -- Invalid argument

error.

justme1968 avatar Jul 11 '12 20:07 justme1968

found the problem...

in src/dvr/dvr_db.c the call to sysconf(_SC_IOV_MAX) fails and gives a value of -1. if i add a fallback to use 16 instead recording and live video/audio works.

justme1968 avatar Jul 11 '12 21:07 justme1968

I have a ds211 and have absolute no problems recording stuff

schumi2004 avatar Jul 12 '12 22:07 schumi2004

@schumi2004 Again he's box is the successor to my box, and therefor is a x86_x64 as well. There could be some differences when compiling for the different architectures, though I don't see why there should be.

But it's weird nonetheless.

BlueWombat avatar Jul 12 '12 23:07 BlueWombat

And where is the patch? And how to stop the spk properly and kill all child processes?

jjLDN avatar Jul 12 '12 23:07 jjLDN

@schumi2004 i have a ds710+ and a ds1510+ and both have the problem. this is with the 2.6.32.12 #2228 kernel i think it is kernel related an not model related. the sysconf() just gives -1.

@jjLDN no official patch. just add

if( dvr_iov_max == -1 )                        
#ifdef IOV_MAX                    
      dvr_iov_max = IOV_MAX;                                           
#else                                                                    
    dvr_iov_max = 16;                       
#endif

after line 381 dvr_iov_max = sysconf(_SC_IOV_MAX); in src/dvr/dvr_db.c

i have just added a brute force

killall -9 tvheadend
wait_for_status 1 20

after the regular kill and wait in stop_daemon() in /var/packages/tvheadend/scripts/start-stop-status

justme1968 avatar Jul 13 '12 07:07 justme1968

@justme1968 The kernel might be right, because all Atom has migrated to kernel 3.2.11

Where exactly is location: src/dvr/dvr_db.c The other one var/packages... I can find, but the upper one not really...

jjLDN avatar Jul 13 '12 09:07 jjLDN

@jjLDN it is in the source of tvheadend

justme1968 avatar Jul 13 '12 09:07 justme1968

And where is that source of tvheadend? Does it mean I have to compile the package?

jjLDN avatar Jul 13 '12 09:07 jjLDN

@jjLDN it is here: https://www.lonelycoder.com/tvheadend/

yes. if you have the recording problem and if the synocommunigy package will not include the fix.

justme1968 avatar Jul 13 '12 09:07 justme1968

Ok. Thank you. So the patch is for compileing the apk itself and not to fix the existing one. Anyway thank you for patch for killing the ap. That's helpfull. :)

jjLDN avatar Jul 13 '12 09:07 jjLDN

I'm missing something, what patch?

For SynoCommunity package, you could make a new package which then will include latest git source.

schumi2004 avatar Jul 13 '12 10:07 schumi2004

@schumi2004 please see 7 posts above

justme1968 avatar Jul 13 '12 10:07 justme1968

Is this a real fix or a hack?

Diaoul avatar Jul 14 '12 09:07 Diaoul

I think a hack since i don't have issues recording.

schumi2004 avatar Jul 14 '12 09:07 schumi2004

Anyway, @justme1968 did great job with this fix so I include it

Fixed in b058faf99a68c3defabacd4bbb8ad22239246fc4

Diaoul avatar Jul 14 '12 10:07 Diaoul

Great news. So when we can expect the pixed package?

jjLDN avatar Jul 14 '12 13:07 jjLDN

I still have this error with latest version from SynoCommunity repository. When is this fix going to be added to the tvheadend package?

Your hard work is much appreciated! I got everything working now and tvheadend is the last thing I need to be able to watch TV via my NAS.

meinaart avatar Aug 21 '12 17:08 meinaart