eitd/dmx.cpp: unify code to open/close demux so ifdefs not needed

This commit is contained in:
[CST] Focus
2012-03-05 16:47:45 +04:00
parent f3d2895847
commit dec2ed2588

View File

@@ -119,12 +119,7 @@ void DMX::closefd(void)
#endif #endif
if (isOpen()) if (isOpen())
{ {
//close(fd);
#if HAVE_TRIPLEDRAGON
dmx->Close(); dmx->Close();
#else
dmx->Stop();
#endif
fd = -1; fd = -1;
} }
} }
@@ -484,13 +479,8 @@ int DMX::immediate_start(void)
if(dmx == NULL) { if(dmx == NULL) {
dmx = new cDemux(dmx_num); dmx = new cDemux(dmx_num);
#if !HAVE_TRIPLEDRAGON
dmx->Open(DMX_PSI_CHANNEL, NULL, dmxBufferSizeInKB*1024UL);
#endif
} }
#if HAVE_TRIPLEDRAGON
dmx->Open(DMX_PSI_CHANNEL, NULL, dmxBufferSizeInKB*1024UL); dmx->Open(DMX_PSI_CHANNEL, NULL, dmxBufferSizeInKB*1024UL);
#endif
fd = 1; fd = 1;
/* setfilter() only if this is no dummy filter... */ /* setfilter() only if this is no dummy filter... */
@@ -577,7 +567,6 @@ int DMX::request_pause(void)
return 0; return 0;
} }
int DMX::request_unpause(void) int DMX::request_unpause(void)
{ {
lock(); lock();