- libarmbox/libmipsbox: some manual code nicenings

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-11-07 00:57:01 +01:00
committed by Thilo Graf
parent 3d7716ef08
commit 4e78667ace
8 changed files with 182 additions and 180 deletions

View File

@@ -198,8 +198,8 @@ static bool _open(cDemux *thiz, int num, int &fd, int &last_source, DMX_CHANNEL_
hal_info_z("%s %s: %m\n", __FUNCTION__, devname(0, devnum));
return false;
}
hal_debug_z("%s #%d pes_type: %s(%d), uBufferSize: %d fd: %d\n", __func__,
num, DMX_T[dmx_type], dmx_type, buffersize, fd);
hal_debug_z("%s #%d pes_type: %s(%d), uBufferSize: %d fd: %d\n",
__func__, num, DMX_T[dmx_type], dmx_type, buffersize, fd);
/* this would actually need locking, but the worst that weill happen is, that
* we'll DMX_SET_SOURCE twice per device, so don't bother... */
@@ -465,8 +465,8 @@ bool cDemux::sectionFilter(unsigned short _pid, const unsigned char *const filte
if (timeout == 0 && negmask == NULL)
s_flt.timeout = to;
hal_debug("%s #%d pid:0x%04hx fd:%d type:%s len:%d to:%d flags:%x flt[0]:%02x\n", __func__, num,
pid, fd, DMX_T[dmx_type], len, s_flt.timeout, s_flt.flags, s_flt.filter.filter[0]);
hal_debug("%s #%d pid:0x%04hx fd:%d type:%s len:%d to:%d flags:%x flt[0]:%02x\n",
__func__, num, pid, fd, DMX_T[dmx_type], len, s_flt.timeout, s_flt.flags, s_flt.filter.filter[0]);
if (debuglevel == 2)
{

View File

@@ -689,9 +689,7 @@ void hdmi_cec::Receive(int what)
case CEC_OPCODE_DEVICE_VENDOR_ID:
case CEC_OPCODE_VENDOR_COMMAND_WITH_ID:
{
uint64_t iVendorId = ((uint64_t)rxmessage.data[1] << 16) +
((uint64_t)rxmessage.data[2] << 8) +
(uint64_t)rxmessage.data[3];
uint64_t iVendorId = ((uint64_t)rxmessage.data[1] << 16) + ((uint64_t)rxmessage.data[2] << 8) + (uint64_t)rxmessage.data[3];
hal_info(GREEN "[CEC] decoded message '%s' (%s)\n" NORMAL, ToString((cec_opcode)rxmessage.opcode), ToString((cec_vendor_id)iVendorId));
break;
}

View File

@@ -236,8 +236,8 @@ bool cPlayback::Start(char *filename, int vpid, int vtype, int apid, int ac3, in
free(TrackList);
}
}
*/
//Chapters
if (player && player->manager && player->manager->chapter)
{
@@ -652,7 +652,8 @@ void cPlayback::FindAllTeletextsubtitlePids(int */*pids*/, unsigned int *numpids
//int max_numpids = *numpids;
*numpids = 0;
/* if (player && player->manager && player->manager->teletext)
/*
if (player && player->manager && player->manager->teletext)
{
char **TrackList = NULL;
player->manager->teletext->Command(player, MANAGER_LIST, &TrackList);
@@ -681,7 +682,8 @@ void cPlayback::FindAllTeletextsubtitlePids(int */*pids*/, unsigned int *numpids
free(TrackList);
*numpids = j;
}
} */
}
*/
}
int cPlayback::GetTeletextPid(void)
@@ -689,7 +691,8 @@ int cPlayback::GetTeletextPid(void)
hal_info("%s\n", __func__);
int pid = -1;
/* if (player && player->manager && player->manager->teletext)
/*
if (player && player->manager && player->manager->teletext)
{
char **TrackList = NULL;
player->manager->teletext->Command(player, MANAGER_LIST, &TrackList);
@@ -713,7 +716,8 @@ int cPlayback::GetTeletextPid(void)
}
free(TrackList);
}
} */
}
*/
printf("teletext pid id %d (0x%x)\n", pid, pid);
return pid;

View File

@@ -286,8 +286,8 @@ void cRecord::RecordThread()
if (toread > readsize)
toread = readsize;
ssize_t s = dmx->Read(buf + buf_pos, toread, 50);
hal_debug("%s: buf_pos %6d s %6d / %6d\n", __func__,
buf_pos, (int)s, bufsize - buf_pos);
hal_debug("%s: buf_pos %6d s %6d / %6d\n",
__func__, buf_pos, (int)s, bufsize - buf_pos);
if (s < 0)
{
if (errno != EAGAIN && (errno != EOVERFLOW || !overflow))