@Seife, thank You for fast reply.
Well, I was just now take an fast look into stuff an make diff ... guess what, image was compiled and it work on My test 7000.
Code: Alles auswählen
--- apps/dvb/zapit/src/controld.cpp
+++ apps/dvb/zapit/src/controld.cpp
@@ -41,9 +41,7 @@
#include <sys/types.h>
#include <sys/un.h>
-#if defined HAVE_DBOX_HARDWARE || defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE
#include <dbox/fp.h>
-#endif
#include <zapit/audio.h>
#include <zapit/channel.h>
@@ -70,17 +68,8 @@
#define CONF_FILE CONFIGDIR "/controld.conf"
#define FORMAT_16_9_FILE CONFIGDIR "/16:9.start"
#define FORMAT_4_3_FILE CONFIGDIR "/4:3.start"
-
-#ifndef HAVE_TRIPLEDRAGON
#define AVS_DEVICE "/dev/dbox/avs0"
#define SAA7126_DEVICE "/dev/dbox/saa0"
-#else
-#include <tddevices.h>
-#define AVS_DEVICE "/dev/" DEVICE_NAME_AVS
-#define SAA7126_DEVICE "/dev/" DEVICE_NAME_VIDEO
-#define SAA_MODE_FBAS VID_OUTFMT_CVBS
-#endif
-
extern CAudio *audioDecoder;
extern CVideo *videoDecoder;
@@ -131,15 +120,7 @@
};
avs_vendor_settings current_avs_settings;
-// char aspectRatio_vcr;
-// char aspectRatio_dvb;
-// bool vcr;
-// bool videoOutputDisabled;
-
-#if defined HAVE_DBOX_HARDWARE || defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE
void routeVideo();
-#endif
-
void sig_catch(int);
#include "avs_settings.cpp"
@@ -350,51 +331,17 @@
controldSaveSettings();
}
-#ifdef HAVE_DBOX_HARDWARE
-void setRGBCsync(int val)
-{
- int fd;
- settings.csync = val;
- if ((fd = open(SAA7126_DEVICE, O_RDWR|O_NONBLOCK)) < 0)
- perror("[controld] " SAA7126_DEVICE);
-
- else {
- if ((ioctl(fd, SAAIOSCSYNC, &settings.csync) < 0))
- perror("[controld] SAAIOSCSYNC");
-
- close(fd);
- }
- controldconfig->setInt32("csync", settings.csync);
-}
-#else
void setRGBCsync(int)
{
fprintf(stderr, "[controld] SAAIOSCSYNC only implemented on dbox\n");
}
-#endif
char getRGBCsync()
{
-#ifdef HAVE_DBOX_HARDWARE
- int fd, val=0;
- if ((fd = open(SAA7126_DEVICE, O_RDWR|O_NONBLOCK)) < 0)
- perror("[controld] " SAA7126_DEVICE);
-
- else {
- if ((ioctl(fd, SAAIOGCSYNC, &val) < 0))
- perror("[controld] SAAIOGCSYNC");
-
- close(fd);
- }
- return val;
-#else
fprintf(stderr, "[controld] SAAIOGCSYNC only implemented on dbox\n");
return 0;
-#endif
-}
-
-#if defined HAVE_DBOX_HARDWARE
-/* AFAIK only the dbox can put different signals on VCR and TV SCART */
+}
+
void setvcroutput(CControld::video_format format) {
if ((format != CControld::FORMAT_CVBS) && (format != CControld::FORMAT_SVIDEO)) {
printf("[controld] illegal format (=%d) specified for VCR output (using CVBS)!", format);
@@ -404,13 +351,7 @@
controldconfig->setInt32("vcroutput", settings.vcroutput);
routeVideo();
}
-#else
-void setvcroutput(CControld::video_format)
-{
-}
-#endif
-
-#if defined HAVE_DBOX_HARDWARE || defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE
+
void setvideooutput(CControld::video_format format, bool bSaveSettings)
{
int fd;
@@ -441,17 +382,19 @@
case CControld::FORMAT_SVIDEO:
arg = SAA_MODE_SVIDEO;
break;
+#if HAVE_DVB_API_VERSION < 3
+ case CControld::FORMAT_YUV_VBS:
+ case CControld::FORMAT_YUV_CVBS:
+ fprintf(stderr, "[controld] FORMAT_YUV_VBS/FORMAT_YUV_CVBS not supported on dreambox\n");
+ return;
+ break;
+#else
case CControld::FORMAT_YUV_VBS:
arg = SAA_MODE_YUV_V;
break;
-#ifdef HAVE_DBOX_HARDWARE
case CControld::FORMAT_YUV_CVBS:
arg = SAA_MODE_YUV_C;
break;
-#else
- case CControld::FORMAT_YUV_CVBS:
- fprintf(stderr, "[controld] FORMAT_YUV_CVBS not supported\n");
- return;
#endif
}
@@ -464,60 +407,9 @@
close(fd);
}
-
-#ifdef HAVE_DBOX_HARDWARE
if(format == CControld::FORMAT_RGB || format == CControld::FORMAT_YUV_VBS || format == CControld::FORMAT_YUV_VBS)
setRGBCsync(settings.csync);
-#endif
-}
-#endif
-
-#if defined HAVE_GENERIC_HARDWARE || defined HAVE_COOL_HARDWARE
-/* not implemented yet */
-void setvideooutput(CControld::video_format, bool)
-{
-}
-#endif
-
-#ifdef HAVE_TRIPLEDRAGON
-void setvideooutput(CControld::video_format format, bool bSaveSettings)
-{
- if ((format < 0) || (format >= CControld::no_video_formats))
- {
- printf("[controld] illegal format %d specified (using default)\n", format);
- format = CControld::FORMAT_RGB; // FORMAT_CVBS switches off RGB - bad default.
- }
-
- if (bSaveSettings) // only set settings if we dont come from watchdog
- {
- settings.videooutput = format;
- controldconfig->setInt32("videooutput", settings.videooutput);
- }
-
- vidOutFmt_t arg;
- switch (format)
- {
- case CControld::FORMAT_SVIDEO: // not used on TD
- arg = VID_OUTFMT_SVIDEO_SVIDEO;
- break;
- case CControld::FORMAT_YUV_VBS: // not used on TD
- case CControld::FORMAT_YUV_CVBS:
- arg = VID_OUTFMT_YBR_SVIDEO;
- break;
- case CControld::FORMAT_CVBS:
- arg = VID_OUTFMT_RGBKILL_CVBS;
- break;
- // case CControld::FORMAT_RGB: // this one is best.
- default:
- arg = VID_OUTFMT_RGBC_SVIDEO;
- break;
- };
-
- //fprintf(stderr, "%s:%d CControld::video_format: %d arg %d\n",__FUNCTION__,__LINE__, format, arg);
- if (videoDecoder)
- videoDecoder->setVideoOutput(arg);
-}
-#endif
+}
void execute_start_file(const char *filename)
{
@@ -530,7 +422,6 @@
}
}
-#ifdef HAVE_DBOX_HARDWARE
void routeVideo(int v1, int a1,
int v2, int a2,
int v3, int a3, int fblk)
@@ -559,16 +450,6 @@
if (ioctl(fd, AVSIOSASW2, &a2) < 0)
perror("[controld] AVSIOSASW2");
-
- // Sagem does not have v3, see CXA2126 data sheet
- if (settings.boxtype != CControld::TUXBOX_MAKER_SAGEM)
- if (ioctl(fd, AVSIOSVSW3, &v3) < 0)
- perror("[controld] AVSIOSVSW3");
-
- // Only Nokia has a3
- if (settings.boxtype == CControld::TUXBOX_MAKER_NOKIA)
- if (ioctl(fd, AVSIOSASW3, &a3) < 0)
- perror("[controld] AVSIOSASW3");
}
if (fd != -1)
@@ -622,92 +503,7 @@
routeVideo(v1, f.a1, v2, f.a2, v3, f.a3, fblk);
}
-#endif
-
-#if defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE
-void routeVideo()
-{
- /* i deduced the fblk and scart setting from the enigma code */
- int scart[6];
- if (settings.vcr)
- {
- scart[0] = 3;
- scart[1] = 2;
- scart[2] = 1;
- scart[3] = 0;
- scart[4] = 1;
- scart[5] = 1;
- }
- else
- {
- scart[0] = 5;
- scart[1] = 1;
- scart[2] = 1;
- scart[3] = 1;
- scart[4] = 1;
- scart[5] = 1;
- }
-
- switchvalue fblk = 0;
- if (!settings.videoOutputDisabled &&
- !settings.vcr &&
- (settings.videooutput == CControld::FORMAT_RGB ||
- settings.videooutput == CControld::FORMAT_YUV_VBS))
- fblk = 1;
-
- int fd = open(AVS_DEVICE, O_RDWR);
- if (fd < 0)
- perror("[controld] " AVS_DEVICE);
- else
- {
- if (ioctl(fd, AVSIOSFBLK, &fblk) < 0)
- perror("[controld] AVSIOSFBLK");
- ioctl(fd, AVSIOSVSW1, scart[0]);
- ioctl(fd, AVSIOSASW1, scart[1]);
- ioctl(fd, AVSIOSVSW2, scart[2]);
- ioctl(fd, AVSIOSASW2, scart[3]);
- ioctl(fd, AVSIOSVSW3, scart[4]);
- ioctl(fd, AVSIOSASW3, scart[5]);
- }
-}
-#endif
-
-#ifdef HAVE_TRIPLEDRAGON
-void routeVideo()
-{
- int fd;
- printf("[controld] %s VCR SCART\n", settings.vcr?"enabling":"disabling");
-
- fd = open(AVS_DEVICE, O_RDWR);
- if (fd < 0)
- {
- perror("routeVideo: "AVS_DEVICE);
- return;
- }
-
- if (settings.vcr)
- {
- printf("[controld] setting FASTBLANK to follow VCR SCART\n");
- if (ioctl(fd, IOC_AVS_FASTBLANK_SET, (unsigned char)3) < 0)
- perror("IOC_AVS_FASTBLANK_SET, 3");
- /* TODO: should probably depend on aspect ratio setting */
- printf("[controld] setting SCART_PIN_8 to follow VCR SCART\n");
- if (ioctl(fd, IOC_AVS_SCART_PIN8_FOLLOW_VCR) < 0)
- perror("IOC_AVS_SCART_PIN8_FOLLOW_VCR");
- printf("[controld] routing VCR to TV SCART\n");
- if (ioctl(fd, IOC_AVS_ROUTE_VCR2TV) < 0)
- perror("IOC_AVS_ROUTE_VCR2TV");
- }
- else
- {
- printf("[controld] routing TV encoder to TV SCART\n");
- if (ioctl(fd, IOC_AVS_ROUTE_ENC2TV) < 0)
- perror("IOC_AVS_ROUTE_ENC2TV");
- }
-}
-#endif
-
-#if defined HAVE_DREAMBOX_HARDWARE || defined HAVE_DBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE || defined HAVE_TRIPLEDRAGON
+
void switch_vcr( bool vcr_on)
{
int activeAspectRatio;
@@ -757,20 +553,12 @@
{
if(onoff)
{
- /* we might need to mute / unmute the AVS */
- //lcdd.setMode(CLcddTypes::MODE_SCART);
}
else
{
- //lcdd.setMode(CLcddTypes::MODE_TVRADIO);
}
switch_vcr( onoff );
}
-#else
-void setScartMode(bool)
-{
-}
-#endif
void disableVideoOutput(bool disable)
{
@@ -791,29 +579,11 @@
close(fd);
}
#endif
- /*
- arg=disable?0:0xf;
- if((fd = open("/dev/dbox/fp0",O_RDWR|O_NONBLOCK)) < 0)
- {
- perror("[controld] FP DEVICE: ");
- return;
- }
-
- if ( (ioctl(fd,FP_IOCTL_LCD_DIMM,&arg) < 0))
- {
- perror("[controld] IOCTL: ");
- close(fd);
- return;
- }
- close(fd);
- */
-
if (!disable)
{
//zapit.setStandby(false);
- if (!settings.mute)
- audioDecoder->unmute();
-#if defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE
+ audioDecoder->unmute();
+#if HAVE_DVB_API_VERSION < 3
startPlayBack(cc);
#endif
setvideooutput(settings.videooutput, false);
@@ -821,16 +591,11 @@
}
else
{
-#ifdef HAVE_TRIPLEDRAGON
- if (videoDecoder)
- videoDecoder->setVideoOutput(VID_OUTFMT_DISABLE_DACS);
-#else
setvideooutput(CControld::FORMAT_CVBS, false);
-#endif
videoDecoder->setVideoFormat(-1);
//zapit.setStandby(true);
audioDecoder->mute();
-#if defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE
+#if HAVE_DVB_API_VERSION < 3
stopPlayBack();
#endif
}
@@ -841,21 +606,9 @@
#ifdef USE_LIBTUXBOX
switch ( tuxbox_get_vendor() )
{
- case TUXBOX_VENDOR_SAGEM:
- settings.boxtype = CControld::TUXBOX_MAKER_SAGEM;
- break;
- case TUXBOX_VENDOR_PHILIPS:
- settings.boxtype = CControld::TUXBOX_MAKER_PHILIPS;
- break;
- case TUXBOX_VENDOR_NOKIA:
- settings.boxtype = CControld::TUXBOX_MAKER_NOKIA;
- break;
case TUXBOX_VENDOR_DREAM_MM:
settings.boxtype = CControld::TUXBOX_MAKER_DREAM_MM;
break;
- case TUXBOX_VENDOR_TECHNOTREND:
- settings.boxtype = CControld::TUXBOX_MAKER_TECHNOTREND;
- break;
default:
settings.boxtype = CControld::TUXBOX_MAKER_UNKNOWN;
}
@@ -865,11 +618,7 @@
#endif
const char * maker_str[] = {
"unknown",
- "Nokia",
- "Philips",
- "Sagem",
- "Dream Multimedia",
- "Technotrend"
+ "Dream Multimedia"
};
char * strmID = getenv("mID");
@@ -886,15 +635,6 @@
case 11:
case 12:
settings.boxtype= CControld::TUXBOX_MAKER_DREAM_MM;
- break;
- case 3:
- settings.boxtype= CControld::TUXBOX_MAKER_SAGEM;
- break;
- case 2:
- settings.boxtype= CControld::TUXBOX_MAKER_PHILIPS;
- break;
- case 1:
- settings.boxtype= CControld::TUXBOX_MAKER_NOKIA;
break;
default:
settings.boxtype = CControld::TUXBOX_MAKER_UNKNOWN;
@@ -923,9 +663,7 @@
settings.volume = controldconfig->getInt32("volume", 100);
settings.volume_avs = controldconfig->getInt32("volume_avs", 100);
settings.mute = controldconfig->getBool("mute", false);
-// settings.mute_avs = controldconfig->getBool("mute_avs", false);
settings.scale_logarithmic = controldconfig->getBool("scale_logarithmic", true);
-// settings.scale_logarithmic_avs = controldconfig->getBool("scale_logarithmic_avs", true);
settings.vcroutput = (CControld::video_format) controldconfig->getInt32("vcroutput", CControld::FORMAT_CVBS);
settings.videooutput = (CControld::video_format) controldconfig->getInt32("videooutput", CControld::FORMAT_RGB);
settings.videoformat = controldconfig->getInt32("videoformat", 2); // fnc2 - 4:3
@@ -960,7 +698,6 @@
void CControldAspectRatioNotifier::aspectRatioChanged( int newAspectRatio )
{
- //printf("[controld] CControldAspectRatioNotifier::aspectRatioChanged( %x ) \n", newAspectRatio);
/* the videodecoder gets initialized after the watchdog thread is started */
if (!videoDecoder)
return;
@@ -972,12 +709,6 @@
else
activeAspectRatio = settings.aspectRatio_dvb;
-#ifdef HAVE_TRIPLEDRAGON
- // probably not correct for VCR scart
- videoDecoder->setZoomAspect(activeAspectRatio != 0);
- videoDecoder->setZoom(-1);
- videoDecoder->setVideoFormat(settings.videoformat);
-#else
if (settings.videoformat == 0 && (settings.vcr || !settings.videoOutputDisabled))
{
switch (activeAspectRatio)
@@ -997,6 +728,5 @@
else
videoDecoder->setVideoFormat(settings.videoformat);
#endif
-#endif
-}
-
+}
+
Not an "clean" patch but it work now.
It's not point in that, that image work or not on 7000/56x0/500 as I don't have idea how in real that image must work.... Anything I know about Neutrino is from dissasembling russian image... This one scan and show programs. It is not so fast on 7000 but work, let's say stable for now. Will tell You more tomorrow. Anything else I must take a look/care for?
EDIT: sorry for edit but rules don't allow name of image what I was mentioned, so was must to rename it