libtriple: change cDemux::addPid to type bool

This commit is contained in:
Stefan Seyfried
2011-10-01 20:27:15 +02:00
parent 7d4305e67e
commit feafc20789
2 changed files with 5 additions and 5 deletions

View File

@@ -386,7 +386,7 @@ void *cDemux::getChannel()
return NULL; return NULL;
} }
void cDemux::addPid(unsigned short Pid) bool cDemux::addPid(unsigned short Pid)
{ {
pes_pids pfd; pes_pids pfd;
int ret; int ret;
@@ -394,7 +394,7 @@ void cDemux::addPid(unsigned short Pid)
if (dmx_type != DMX_TP_CHANNEL) if (dmx_type != DMX_TP_CHANNEL)
{ {
lt_info("%s pes_type %s not implemented yet! pid=%hx\n", __FUNCTION__, DMX_T[dmx_type], Pid); lt_info("%s pes_type %s not implemented yet! pid=%hx\n", __FUNCTION__, DMX_T[dmx_type], Pid);
return; return false;
} }
if (fd == -1) if (fd == -1)
lt_info("%s bucketfd not yet opened? pid=%hx\n", __FUNCTION__, Pid); lt_info("%s bucketfd not yet opened? pid=%hx\n", __FUNCTION__, Pid);
@@ -402,7 +402,7 @@ void cDemux::addPid(unsigned short Pid)
if (pfd.fd < 0) if (pfd.fd < 0)
{ {
lt_info("%s #%d Pid = %hx open failed (%m)\n", __FUNCTION__, num, Pid); lt_info("%s #%d Pid = %hx open failed (%m)\n", __FUNCTION__, num, Pid);
return; return false;
} }
lt_debug("%s #%d Pid = %hx pfd = %d\n", __FUNCTION__, num, Pid, pfd); lt_debug("%s #%d Pid = %hx pfd = %d\n", __FUNCTION__, num, Pid, pfd);
@@ -430,7 +430,7 @@ void cDemux::addPid(unsigned short Pid)
else else
/* error! */ /* error! */
close(pfd.fd); close(pfd.fd);
return; return (ret != -1);
} }
void cDemux::removePid(unsigned short Pid) void cDemux::removePid(unsigned short Pid)

View File

@@ -51,7 +51,7 @@ class cDemux
void * getBuffer(); void * getBuffer();
void * getChannel(); void * getChannel();
DMX_CHANNEL_TYPE getChannelType(void) { return dmx_type; }; DMX_CHANNEL_TYPE getChannelType(void) { return dmx_type; };
void addPid(unsigned short pid); bool addPid(unsigned short pid);
void getSTC(int64_t * STC); void getSTC(int64_t * STC);
int getUnit(void); int getUnit(void);
// TD only functions // TD only functions