@Houdini
mit diesem Patch kann man die zapit mit dem Params -r aufrufen um den TS nach dem DVR zu leiten
Code: Alles auswählen
Index: apps/dvb/zapit/src/zapit.cpp
===================================================================
RCS file: /cvs/tuxbox/apps/dvb/zapit/src/zapit.cpp,v
retrieving revision 1.417
diff -a -u -p -r1.417 zapit.cpp
--- a/apps/dvb/zapit/src/zapit.cpp 9 Feb 2009 15:17:07 -0000 1.417
+++ b/apps/dvb/zapit/src/zapit.cpp 14 Feb 2009 09:54:03 -0000
@@ -98,6 +98,7 @@ xmlDocPtr scanInputParser = NULL;
/* the bouquet manager */
CBouquetManager *bouquetManager = NULL;
/* the mpeg2 ts->pes demux devices */
+dmx_output_t dvr = DMX_OUT_DECODER;
CDemux *audioDemux = NULL;
CDemux *pcrDemux = NULL;
CDemux *teletextDemux = NULL;
@@ -1076,7 +1077,7 @@ int change_audio_pid(uint8_t index)
audioDecoder->disableBypass();
/* set demux filter */
- if (audioDemux->pesFilter(cc->getAudioPid(), DMX_OUT_DECODER, DMX_PES_AUDIO) < 0)
+ if (audioDemux->pesFilter(cc->getAudioPid(), dvr, DMX_PES_AUDIO) < 0)
return -1;
/* start audio playback */
@@ -2367,7 +2368,7 @@ int startPlayBack(CZapitChannel *thisCha
if (have_pcr) {
if (!pcrDemux)
pcrDemux = new CDemux();
- if (pcrDemux->pesFilter(thisChannel->getPcrPid(), DMX_OUT_DECODER, DMX_PES_PCR) < 0)
+ if (pcrDemux->pesFilter(thisChannel->getPcrPid(), dvr, DMX_PES_PCR) < 0)
return -1;
if (pcrDemux->start() < 0)
return -1;
@@ -2375,7 +2376,7 @@ int startPlayBack(CZapitChannel *thisCha
if (have_audio) {
if (!audioDemux)
audioDemux = new CDemux();
- if (audioDemux->pesFilter(thisChannel->getAudioPid(), DMX_OUT_DECODER, DMX_PES_AUDIO) < 0)
+ if (audioDemux->pesFilter(thisChannel->getAudioPid(), dvr, DMX_PES_AUDIO) < 0)
return -1;
if (audioDemux->start() < 0)
return -1;
@@ -2383,7 +2384,7 @@ int startPlayBack(CZapitChannel *thisCha
if (have_video) {
if (!videoDemux)
videoDemux = new CDemux();
- if (videoDemux->pesFilter(thisChannel->getVideoPid(), DMX_OUT_DECODER, DMX_PES_VIDEO) < 0)
+ if (videoDemux->pesFilter(thisChannel->getVideoPid(), dvr, DMX_PES_VIDEO) < 0)
return -1;
if (videoDemux->start() < 0)
return -1;
@@ -2394,7 +2395,7 @@ int startPlayBack(CZapitChannel *thisCha
#else
if (!teletextDemux)
teletextDemux = new CDemux();
- if (teletextDemux->pesFilter(thisChannel->getTeletextPid(), DMX_OUT_DECODER, DMX_PES_TELETEXT) < 0)
+ if (teletextDemux->pesFilter(thisChannel->getTeletextPid(), dvr, DMX_PES_TELETEXT) < 0)
return -1;
if (teletextDemux->start() < 0)
return -1;
@@ -2695,6 +2696,10 @@ int main(int argc, char **argv)
printf("[zapit] lock loss check disabled\n");
check_lock=false;
}
+ else if (!strcmp(argv[i], "-r")) {
+ printf("[zapit] TS is set up to dvr for recording\n");
+ dvr = DMX_OUT_TS_TAP;
+ }
else {
fprintf(stderr,
"Usage: %s [-d] [-q] [-u] [-l]\n"
@@ -2702,6 +2707,7 @@ int main(int argc, char **argv)
"-q : quiet mode\n"
"-u : enable update on PMT change\n"
"-l : disable checking for lost lock\n"
+ "-r : set up /dev/dvb/adapterX/dvr0 for TS recording\n"
#ifdef HAVE_DREAMBOX_HARDWARE
"-n : disable FASTZAP\n"
#endif