-#ifndef HAVE_ADD_PID
- int fd = m_demux->openDemux();
- if (fd < 0)
- {
- eDebug("FAILED to open demux in ts recoder (%m)");
- return -1;
- }
-
-#if HAVE_DVB_API_VERSION < 3
- dmxPesFilterParams flt;
-
- flt.pesType = DMX_PES_OTHER;
-#else
- dmx_pes_filter_params flt;
-
- flt.pes_type = DMX_PES_OTHER;
-#endif
-
- flt.pid = pid;
- flt.input = DMX_IN_FRONTEND;
- flt.output = DMX_OUT_TS_TAP;
-
- flt.flags = DMX_IMMEDIATE_START;
-
- int res = ::ioctl(fd, DMX_SET_PES_FILTER, &flt);
- if (res < 0)
- {
- eDebug("set pes filter failed!");
- ::close(fd);
- return -1;
- }
- m_pids[pid] = fd;
-#else