mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
libtriple: add getPesPids() and removePid() to cDemux
Origin commit data
------------------
Branch: master
Commit: ec0cd38962
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-02-05 (Sat, 05 Feb 2011)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -426,6 +426,28 @@ void cDemux::addPid(unsigned short Pid)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cDemux::removePid(unsigned short Pid)
|
||||||
|
{
|
||||||
|
if (dmx_type != DMX_TP_CHANNEL)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "cDemux::%s pes_type!=DMX_TP_CHANNEL (%s) not implemented yet! pid=%hx\n", __FUNCTION__, DMX_T[dmx_type], Pid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (std::vector<pes_pids>::iterator i = pesfds.begin(); i != pesfds.end(); ++i)
|
||||||
|
{
|
||||||
|
if ((*i).pid == Pid) {
|
||||||
|
lt_debug("cDemux::removePid: removing demux fd %d pid 0x%04x\n", (*i).fd, Pid);
|
||||||
|
if (ioctl((*i).fd, DEMUX_STOP) < 0)
|
||||||
|
perror("DEMUX_STOP");
|
||||||
|
if (close((*i).fd) < 0)
|
||||||
|
perror("close");
|
||||||
|
pesfds.erase(i);
|
||||||
|
return; /* TODO: what if the same PID is there multiple times */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fprintf(stderr, "cDemux::removePid: pid 0x%04x not found\n", Pid);
|
||||||
|
}
|
||||||
|
|
||||||
void cDemux::getSTC(int64_t * STC)
|
void cDemux::getSTC(int64_t * STC)
|
||||||
{
|
{
|
||||||
lt_debug("cDemux::%s #%d\n", __FUNCTION__, num);
|
lt_debug("cDemux::%s #%d\n", __FUNCTION__, num);
|
||||||
|
@@ -54,7 +54,10 @@ class cDemux
|
|||||||
void addPid(unsigned short pid);
|
void addPid(unsigned short pid);
|
||||||
void getSTC(int64_t * STC);
|
void getSTC(int64_t * STC);
|
||||||
int getUnit(void);
|
int getUnit(void);
|
||||||
int getFD(void) { return fd; }; /* needed by cPlayback class */
|
// TD only functions
|
||||||
|
int getFD(void) { return fd; }; /* needed by cPlayback class */
|
||||||
|
void removePid(unsigned short Pid); /* needed by cRecord class */
|
||||||
|
std::vector<pes_pids> getPesPids(void) { return pesfds; };
|
||||||
//
|
//
|
||||||
cDemux(int num = 0);
|
cDemux(int num = 0);
|
||||||
~cDemux();
|
~cDemux();
|
||||||
|
Reference in New Issue
Block a user