require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_DEV_DTV_DTVIO_DEMUX_H)) {
    eval 'sub _DEV_DTV_DTVIO_DEMUX_H () {1;}' unless defined(&_DEV_DTV_DTVIO_DEMUX_H);
    require 'sys/types.ph';
    require 'sys/ioccom.ph';
    eval("sub DMX_OUT_DECODER () { 0; }") unless defined(&DMX_OUT_DECODER);
    eval("sub DMX_OUT_TAP () { 1; }") unless defined(&DMX_OUT_TAP);
    eval("sub DMX_OUT_TS_TAP () { 2; }") unless defined(&DMX_OUT_TS_TAP);
    eval("sub DMX_OUT_TSDEMUX_TAP () { 3; }") unless defined(&DMX_OUT_TSDEMUX_TAP);
    eval("sub DMX_IN_FRONTEND () { 0; }") unless defined(&DMX_IN_FRONTEND);
    eval("sub DMX_IN_DVR () { 1; }") unless defined(&DMX_IN_DVR);
    eval("sub DMX_PES_AUDIO0 () { 0; }") unless defined(&DMX_PES_AUDIO0);
    eval("sub DMX_PES_VIDEO0 () { 1; }") unless defined(&DMX_PES_VIDEO0);
    eval("sub DMX_PES_TELETEXT0 () { 2; }") unless defined(&DMX_PES_TELETEXT0);
    eval("sub DMX_PES_SUBTITLE0 () { 3; }") unless defined(&DMX_PES_SUBTITLE0);
    eval("sub DMX_PES_PCR0 () { 4; }") unless defined(&DMX_PES_PCR0);
    eval("sub DMX_PES_AUDIO1 () { 5; }") unless defined(&DMX_PES_AUDIO1);
    eval("sub DMX_PES_VIDEO1 () { 6; }") unless defined(&DMX_PES_VIDEO1);
    eval("sub DMX_PES_TELETEXT1 () { 7; }") unless defined(&DMX_PES_TELETEXT1);
    eval("sub DMX_PES_SUBTITLE1 () { 8; }") unless defined(&DMX_PES_SUBTITLE1);
    eval("sub DMX_PES_PCR1 () { 9; }") unless defined(&DMX_PES_PCR1);
    eval("sub DMX_PES_AUDIO2 () { 10; }") unless defined(&DMX_PES_AUDIO2);
    eval("sub DMX_PES_VIDEO2 () { 11; }") unless defined(&DMX_PES_VIDEO2);
    eval("sub DMX_PES_TELETEXT2 () { 12; }") unless defined(&DMX_PES_TELETEXT2);
    eval("sub DMX_PES_SUBTITLE2 () { 13; }") unless defined(&DMX_PES_SUBTITLE2);
    eval("sub DMX_PES_PCR2 () { 14; }") unless defined(&DMX_PES_PCR2);
    eval("sub DMX_PES_AUDIO3 () { 15; }") unless defined(&DMX_PES_AUDIO3);
    eval("sub DMX_PES_VIDEO3 () { 16; }") unless defined(&DMX_PES_VIDEO3);
    eval("sub DMX_PES_TELETEXT3 () { 17; }") unless defined(&DMX_PES_TELETEXT3);
    eval("sub DMX_PES_SUBTITLE3 () { 18; }") unless defined(&DMX_PES_SUBTITLE3);
    eval("sub DMX_PES_PCR3 () { 19; }") unless defined(&DMX_PES_PCR3);
    eval("sub DMX_PES_OTHER () { 20; }") unless defined(&DMX_PES_OTHER);
    eval 'sub DMX_PES_AUDIO () { &DMX_PES_AUDIO0;}' unless defined(&DMX_PES_AUDIO);
    eval 'sub DMX_PES_VIDEO () { &DMX_PES_VIDEO0;}' unless defined(&DMX_PES_VIDEO);
    eval 'sub DMX_PES_TELETEXT () { &DMX_PES_TELETEXT0;}' unless defined(&DMX_PES_TELETEXT);
    eval 'sub DMX_PES_SUBTITLE () { &DMX_PES_SUBTITLE0;}' unless defined(&DMX_PES_SUBTITLE);
    eval 'sub DMX_PES_PCR () { &DMX_PES_PCR0;}' unless defined(&DMX_PES_PCR);
    eval 'sub DMX_FILTER_SIZE () {16;}' unless defined(&DMX_FILTER_SIZE);
    eval 'sub DMX_CHECK_CRC () {0x1;}' unless defined(&DMX_CHECK_CRC);
    eval 'sub DMX_ONESHOT () {0x2;}' unless defined(&DMX_ONESHOT);
    eval 'sub DMX_IMMEDIATE_START () {0x4;}' unless defined(&DMX_IMMEDIATE_START);
    eval 'sub DMX_KERNEL_CLIENT () {0x8000;}' unless defined(&DMX_KERNEL_CLIENT);
    eval("sub DMX_SOURCE_FRONT0 () { 0; }") unless defined(&DMX_SOURCE_FRONT0);
    eval("sub DMX_SOURCE_FRONT1 () { 1; }") unless defined(&DMX_SOURCE_FRONT1);
    eval("sub DMX_SOURCE_FRONT2 () { 2; }") unless defined(&DMX_SOURCE_FRONT2);
    eval("sub DMX_SOURCE_FRONT3 () { 3; }") unless defined(&DMX_SOURCE_FRONT3);
    eval("sub DMX_SOURCE_DVR0 () { 16; }") unless defined(&DMX_SOURCE_DVR0);
    eval("sub DMX_SOURCE_DVR1 () { 17; }") unless defined(&DMX_SOURCE_DVR1);
    eval("sub DMX_SOURCE_DVR2 () { 18; }") unless defined(&DMX_SOURCE_DVR2);
    eval("sub DMX_SOURCE_DVR3 () { 19; }") unless defined(&DMX_SOURCE_DVR3);
    eval 'sub DMX_START () { &_IO(ord(\'D\'), 100);}' unless defined(&DMX_START);
    eval 'sub DMX_STOP () { &_IO(ord(\'D\'), 101);}' unless defined(&DMX_STOP);
    eval 'sub DMX_SET_FILTER () { &_IOW(ord(\'D\'), 102, \'struct dmx_sct_filter_params\');}' unless defined(&DMX_SET_FILTER);
    eval 'sub DMX_SET_PES_FILTER () { &_IOW(ord(\'D\'), 103, \'struct dmx_pes_filter_params\');}' unless defined(&DMX_SET_PES_FILTER);
    eval 'sub DMX_SET_BUFFER_SIZE () { &_IO(ord(\'D\'), 104);}' unless defined(&DMX_SET_BUFFER_SIZE);
    eval 'sub DMX_GET_STC () { &_IOWR(ord(\'D\'), 105, \'struct dmx_stc\');}' unless defined(&DMX_GET_STC);
    eval 'sub DMX_ADD_PID () { &_IOW(ord(\'D\'), 106,  &uint16_t);}' unless defined(&DMX_ADD_PID);
    eval 'sub DMX_REMOVE_PID () { &_IOW(ord(\'D\'), 107,  &uint16_t);}' unless defined(&DMX_REMOVE_PID);
    eval 'sub DMX_GET_CAPS () { &_IOR(ord(\'D\'), 108,  &dmx_caps_t);}' unless defined(&DMX_GET_CAPS);
    eval 'sub DMX_SET_SOURCE () { &_IOW(ord(\'D\'), 109,  &dmx_source_t);}' unless defined(&DMX_SET_SOURCE);
}
1;
