Origin commit data
------------------
Branch: master
Commit: 53ca350af4
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-11-07 (Sun, 07 Nov 2021)

Origin message was:
------------------
- re-formatting code using astyle; see https://github.com/neutrino-images/ni-buildsystem/blob/master/support/scripts/astyle.sh

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-11-07 21:22:27 +01:00
parent 37d5fc0f21
commit 9d9bd38d6a
12 changed files with 88 additions and 62 deletions

View File

@@ -107,7 +107,8 @@ void cCA::write_ci_info(int slot, CaIdVector caids)
snprintf(fname, sizeof(fname), "/tmp/ci-slot%d", slot);
ModuleName(CA_SLOT_TYPE_CI, slot, mname);
FILE *fd = fopen(fname, "w");
if (fd == NULL) return;
if (fd == NULL)
return;
snprintf(buf, sizeof(buf), "%s\n", mname);
fputs(buf, fd);
if (caids.size() > 40)
@@ -129,7 +130,8 @@ void cCA::del_ci_info(int slot)
{
char fname[20];
snprintf(fname, sizeof(fname), "/tmp/ci-slot%d", slot);
if (access(fname, F_OK) == 0) remove(fname);
if (access(fname, F_OK) == 0)
remove(fname);
}
/* helper function to call the cpp thread loop */
@@ -645,7 +647,8 @@ bool cCA::SendCAPMT(u64 tpid, u8 source, u8 camask, const unsigned char *cabuf,
bool sid_found = false;
bool recordUse_found = false;
printf("%s -> %s\n", FILENAME, __func__);
if (!num_slots) return true; /* stb's without ci-slots */
if (!num_slots)
return true; /* stb's without ci-slots */
#if x_debug
printf("TP: %llX\n", TP);
printf("SID: %04X\n", SID);

View File

@@ -469,13 +469,16 @@ bool cDemux::sectionFilter(unsigned short _pid, const unsigned char *const filte
if (debuglevel == 2)
{
fprintf(stderr, "filt: ");
for (int i = 0; i < len; i++) fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
for (int i = 0; i < len; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mask: ");
for (int i = 0; i < len; i++) fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
for (int i = 0; i < len; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mode: ");
for (int i = 0; i < len; i++) fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
for (int i = 0; i < len; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
fprintf(stderr, "\n");
}

View File

@@ -29,10 +29,14 @@ hw_caps_t *get_hwcaps(void)
memset(&caps, 0, sizeof(hw_caps_t));
caps.pip_devs = 0;
if (access("/dev/dvb/adapter0/video1", F_OK) != -1) caps.pip_devs = 1;
if (access("/dev/dvb/adapter0/video2", F_OK) != -1) caps.pip_devs = 2;
if (access("/dev/dvb/adapter0/video3", F_OK) != -1) caps.pip_devs = 3;
if (caps.pip_devs > 0) caps.can_pip = 1;
if (access("/dev/dvb/adapter0/video1", F_OK) != -1)
caps.pip_devs = 1;
if (access("/dev/dvb/adapter0/video2", F_OK) != -1)
caps.pip_devs = 2;
if (access("/dev/dvb/adapter0/video3", F_OK) != -1)
caps.pip_devs = 3;
if (caps.pip_devs > 0)
caps.can_pip = 1;
#if BOXMODEL_VUSOLO4K
caps.has_CI = 1;

View File

@@ -918,11 +918,13 @@ void cVideo::QuadPiP(bool active, int _x, int _y, int _w, int _h)
{
char buffer[64];
int _a = 1;
if (active) {
if (active)
{
#if BOXMODEL_VUSOLO4K || BOXMODEL_VUDUO4K || BOXMODEL_VUDUO4KSE || BOXMODEL_VUULTIMO4K || BOXMODEL_VUUNO4KSE || BOXMODEL_VUUNO4K
proc_put("/proc/stb/video/decodermode", "mosaic", strlen("mosaic"));
#endif
for (unsigned int i = 0; i < 4; i++) {
for (unsigned int i = 0; i < 4; i++)
{
sprintf(buffer, "%x", _x);
proc_put(VMPEG_dst_left[i], buffer, strlen(buffer));
sprintf(buffer, "%x", _y);
@@ -934,8 +936,11 @@ void cVideo::QuadPiP(bool active, int _x, int _y, int _w, int _h)
sprintf(buffer, "%x", _a);
proc_put(VMPEG_dst_apply[i], buffer, strlen(buffer));
}
} else {
for (unsigned int i = 0; i < 4; i++) {
}
else
{
for (unsigned int i = 0; i < 4; i++)
{
sprintf(buffer, "%x", 0);
proc_put(VMPEG_dst_left[i], buffer, strlen(buffer));
sprintf(buffer, "%x", 0);

View File

@@ -203,7 +203,8 @@ int cDemux::Read(unsigned char *buff, int len, int timeout)
* return from read(), so as a "emergency exit" for e.g. NIT scan, set a (long)
* timeout here */
int to = timeout;
if (dmx_type == DMX_PSI_CHANNEL && timeout <= 0){
if (dmx_type == DMX_PSI_CHANNEL && timeout <= 0)
{
to = 60 * 1000;
}
@@ -363,13 +364,16 @@ bool cDemux::sectionFilter(unsigned short _pid, const unsigned char *const filte
if (debuglevel == 2)
{
fprintf(stderr, "filt: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mask: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mode: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
fprintf(stderr, "\n");
}

View File

@@ -29,10 +29,14 @@ hw_caps_t *get_hwcaps(void)
memset(&caps, 0, sizeof(hw_caps_t));
caps.pip_devs = 0;
if (access("/dev/dvb/adapter0/video1", F_OK) != -1) caps.pip_devs = 1;
if (access("/dev/dvb/adapter0/video2", F_OK) != -1) caps.pip_devs = 2;
if (access("/dev/dvb/adapter0/video3", F_OK) != -1) caps.pip_devs = 3;
if (caps.pip_devs > 0) caps.can_pip = 1;
if (access("/dev/dvb/adapter0/video1", F_OK) != -1)
caps.pip_devs = 1;
if (access("/dev/dvb/adapter0/video2", F_OK) != -1)
caps.pip_devs = 2;
if (access("/dev/dvb/adapter0/video3", F_OK) != -1)
caps.pip_devs = 3;
if (caps.pip_devs > 0)
caps.can_pip = 1;
#if BOXMODEL_VUDUO
caps.has_CI = 2;

View File

@@ -350,13 +350,16 @@ bool cDemux::sectionFilter(unsigned short _pid, const unsigned char *const filte
if (debuglevel == 2)
{
fprintf(stderr, "filt: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.filter[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mask: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mask[i]);
fprintf(stderr, "\n");
fprintf(stderr, "mode: ");
for (int i = 0; i < DMX_FILTER_SIZE; i++)fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
for (int i = 0; i < DMX_FILTER_SIZE; i++)
fprintf(stderr, "%02hhx ", s_flt.filter.mode[i]);
fprintf(stderr, "\n");
}