libtriple: hack different notify sizes for subs and ttx into cDemux

This commit is contained in:
Stefan Seyfried
2010-08-21 15:48:57 +02:00
parent 9c10719f91
commit ebf0803f82
2 changed files with 6 additions and 2 deletions

View File

@@ -88,6 +88,7 @@ bool cDemux::Open(DMX_CHANNEL_TYPE pes_type, void * /*hVideoBuffer*/, int uBuffe
if (ioctl(fd, DEMUX_SET_BUFFER_SIZE, uBufferSize) < 0) if (ioctl(fd, DEMUX_SET_BUFFER_SIZE, uBufferSize) < 0)
fprintf(stderr, "cDemux::Open DEMUX_SET_BUFFER_SIZE failed (%m)\n"); fprintf(stderr, "cDemux::Open DEMUX_SET_BUFFER_SIZE failed (%m)\n");
} }
buffersize = uBufferSize;
return true; return true;
} }
@@ -348,13 +349,15 @@ bool cDemux::pesFilter(const unsigned short pid)
break; break;
case DMX_PES_CHANNEL: case DMX_PES_CHANNEL:
flt.unloader.unloader_type = UNLOADER_TYPE_PAYLOAD; flt.unloader.unloader_type = UNLOADER_TYPE_PAYLOAD;
flt.unloader.threshold = 64; if (buffersize <= 0x10000) // dvbsubtitle, instant delivery...
flt.unloader.threshold = 1;
else
flt.unloader.threshold = 8; // 1k, teletext
flt.pesType = DMX_PES_OTHER; flt.pesType = DMX_PES_OTHER;
flt.output = OUT_MEMORY; flt.output = OUT_MEMORY;
default: default:
flt.pesType = DMX_PES_OTHER; flt.pesType = DMX_PES_OTHER;
} }
return (ioctl(fd, DEMUX_FILTER_PES_SET, &flt) >= 0); return (ioctl(fd, DEMUX_FILTER_PES_SET, &flt) >= 0);
} }

View File

@@ -28,6 +28,7 @@ class cDemux
private: private:
int num; int num;
int fd; int fd;
int buffersize;
DMX_CHANNEL_TYPE dmx_type; DMX_CHANNEL_TYPE dmx_type;
std::vector<int> pesfds; std::vector<int> pesfds;
public: public: