#compdef mediaclient mediaclient.video mediaclient.radio mediaclient.dvb local curcontext="$curcontext" state state_descr line typeset -A opt_args local service_opts service_opts=( '--help[help]' {'(--enumdevices)-e','(-e)--enumdevices'}'[show up devices]' {'(--mode)-m+','(-m)--mode='}'[use specified device mode]:device mode:(DVBT DVBT2 DVBC DVBS DVBS2 ATSC ATV RADIO)' {'(--tuner)-t+','(-t)--tuner'}'[use specified tuner id]:tuner id:->tunerid' {'(--setdtvmode)-D+','(-D)--setdtvmode='}'[use specified dtv mode]:dtv mode:(DVBT DVBT2 DVBC ATSC)' {'(--listatvstd)-L','(-L)--listatvstd'}'[list analog TV standards]' '--crc=[switch crc check for PSI to specified status]:check active:(on off)' {'(--vmode)-v+','(-v)--vmode='}'[set analog TV to specified mode]:tv mode:(PAL-BG PAL-DK PAL-I PAL-M NTSC-M Secam-L Secam-LC Secam-K Secam-B Secam-G Secam-H)' '--setvcr=[lock specified device]:video device:(/dev/video*)' {'(--inputs)-i','(-i)--inputs'}'[list analog TV inputs]' {'(--size)-s+','(-s)--size='}'[sec scalar size to specified dimension]:dimension:(720x576)' {'(--Input)-I+','(-I)--Input='}'[set specified TV inut]:input:(Television Composite S-Video)' {'(--frequency)-f+','(-f)--frequency='}'[set specified frequency in Hz]:frequency in Hz:()' '--rawfreq=[set specified raw DVB-S/S2 frequency in khz]:frequency in khz:()' {'(--listarea)-a','(-a)--listarea'}'[list Area]' {'(--setarea)-A+','(-A)--setarea='}'[set specified area)]:Area:()' {'(--Modulation)-M+','(-M)--Modulation='}'[set specified modulation (DVB-C)]:Modulation:(Q16 Q32 Q64 Q128 Q256)' {'(--Symbolrate)-S+','(-S)--Symbolrate='}'[set specified symbolrate in Hz (DVB-C)]:Symbolrate:()' {'(--voltage)-V+','(-V)--voltage='}'[set specified DVB-S/S2 polarisation voltage]:voltage:->voltage' '--band=[set specified band]:band:(C-BAND UNIVERSAL)' {'(--fec)-E','(-E)--fec'}'[forward error connection]' {'(--polarisation)-p+','(-p)--polarisation='}'[set specified polarization direction]:polarisation:->polarisation' {'(--bandwidth)-b+','(-b)--bandwidth='}'[set specified bandwith for DVB-T in MHZ]:bandwidth:(6 7 8)' {'(--rds)-r','(-r)--rds'}'[get RDS information]' {'(--properties)-C','(-C)--properties'}'[list device properties]' '--loglevel=[set specified log verbosity]:loglevel:(off min max)' '--signalreporting=[set specified signal mode]:signal reporting:->signalreporting' '--readsignal=[read signalstrength specified number of times)]:signalstrength:()' '--powerlevel=[read powerlevel specified number of times)]:powerlevel:()' '--lockstatus[check dvb/atsc channel lock]' '--enable5v=[switch specified 5V output to specified on/off (DVB-C/T/T2)]:enable 5V output:(on off)' '--sid=[select specified service id (use with -f) (DAB/DAB+)]:service id:()' '--scandabservices=[scan DAB/DAB+ frequency on specified device]:debdevice:()' '--scandabfrequencies=[scan DAB/DAB+ frequency on specified device]:debdevice:()' '--wssdecoder=[use VBU for wss for specified VBI device]:VBI device:(dev/vbi*)' '--dumpvbi=[dump VBI of specified device]:VBI device:(dev/vbi*)' '--wsscallback=[Aspect ratio change wss use specified script]:aspect ratio script:_files' '--stopwdd[stop background wss server]' '--cc-list[list closed caption]' '--cc-flush[clear closed caption settings]' '--cc-enable[enable specified closed caption]:closed caption:(CC1 CC2 T1 T2)' '--cc-disable[disable specified closed caption]:closed caption:(CC1 CC2 T1 T2)' {'(--pidfilter)-P+','(-P)--pidfilter='}'[set DVB pidfilter to specified on/off)]:pidfilter:(on off)' {'(--addpid)-H+','(-H)--addpid='}'[add specified DVB pids]:pids:("0x10" 16 "0x10,16")' {'(--removepid)-x+','(-x)--removepid='}'[remove specified DVB pids]:pids:("0x10" 16 "0x10,16")' {'(--listpids)-w','(-w)--listpids'}'[list filtered DVB pids]' {'(--flushpids)-F+','(-F)--flushpids='}'[flush specified DVB pidtable]' '--softpidfilter=[set software DVB PID filter to specified mode]:pidfilter mode:(on off passthrough)' {'(--internalaudio)-c+','(-c)--internalaudio='}'[set internal audio to specified mode]:internal audio:->internalaudio' '--audiothreshold=[set audio threshold to specified ms]:audio threshold:(0 2000)' '--loudness=[set loudness to specified level (0-15)]:loudness:(0 15)' '--volume=[set volume to specified level (0-255)]:volume:(0 255)' '--treble=[set treble to specified level (0-255)]:treble:(0 255)' '--audiomode=[set specified mono/stereo audio]:audio mode:(mono stereo)' {'(--mute)-g+','(-g)--mute='}'[set FM mute to specified on/off]:FM mute mode:(on off)' '--diseqc-support=[specified disqc mode]:diseqc mode:(on off)' '--diseqc=[specified diseqc command]:diseqc command:(E0 10 38 F0)' '--list-diseqc[list diseqc dish configuration]' '--set-diseqc=[set diseqc dish specified configuration]:diseqc dish configuration:(S19.2E)' '--setmini=[set burs to specified SEC_MINI_A/B]:burst tone:(A B)' {'(--listrc)-l','(-l)--listrc'}'[list rc protocols]' {'(--setrc)-s+','(-s)--setrc='}'[set specified rc protocol]:protocol:()' '--enablerc=[enable rc polling on specified device]:rc device:(/dev/mediainput*)' '--disablerc=[disable rc polling on specified device]:rc device:(/dev/mediainput*)' '--pollrc[poll raw rc]' '--dumprcmap[dump rc map]' '--setrcmap=[use specified file as rc map]:rc map:_files' '--updaterc=[update rc layout]:rc layout:->rclayout' '--transfermode=[set specified usb transfer mode]:transfer mode:(bulk iso)' '--nullpackets=[set specified usb null packets mode]:pass null packets:->nullpackets' '--bulkpackets=[set usb bulk transfer to specified number]:bulk transfer number:()' '--ts-settle-timemout=[set usb timeout to specified ms]:timeout:(0 4000)' '--disable-dvb=[disable specified dvb adapter]:dvb adapter:(/dev/dvb/adapter*)' '--enable-dvb=[enable specified dvb adapter]:dvb adapter:(/dev/dvb/adapter*)' '--setver=[set specifified DVB API]:DVB API:(5.0)' '--vfilter=[set specified analog deinterlacer mode]:deinterlacer:(on off)' '--vfilterid=[set analog dinterlacer type to specified id]:deinterlacer id:->deinterlacerid' '--lc[list connected clients]' '--lc=[disconnect client with specified pid]:pid:_pids' '--shutdown[shutdown multimediastack]' '--start=[start multimediastack in specified seconds]:seconds:(1)' '--systemdcheck[start via systemd]' '--wait-for-devices[start when devices are ready]' '--enablenetwork=[set network listening to specified on/off]:network mode:(on off)' '--mount=[create virtual specified adapter]:virtual adapter:->createmount' '--unmount=[delete virtual specified adapter]:virtual adapter:(1)' '--lrc=[lst specified remote clients (rc)]:rc clients:(1 192.168.1.2:0)' '--tvdummy[add tv-dummydevice]' '--remove=[delete specified dummy adapter]:dummy adapter:(1)' '--scan-network[scan for IPTV devices]' '--nettransfermode=[set transfer to specified mode]:transfer mode:(tcp udp)' '--nti=[increase maximum package to specified number]:maximum packet:(0 10000)' '--netrecoverymode=[set specified net recover mode]:net recover mode:(on off)' '--enabledreambox=[connect vtuner to specified device]:vtuner device:(/dev/dvb/adapter*/frontend*)' '--disabledreambox=[disconnect vtuner from specified device]:vtuner device:(/dev/dvb/adapter*/frontend*)' '--nimbus[display dreambox nimbus]' '--avoffset=[set dreambox AV offset to specified ms]:AV PTS offset:()' '--audiooffset=[set dreambox audio offset to specified ms]:Audio PTS offset:()' '--videooffset=[set dreambox video offset to specified ms]:Video PTS offset:()' '--portforward=[set debugging to specified port]:port:()' '--pipecount=[read stdin specified seconds]:seconds:(1)' '--cat=[read specified file]:file:_files' '--strings=[strings specified file]:file:_files' '--lsusb=[print usb ids on specified device]:usb device:(/dev/bus/usb)' '--reset=[reset specified usb device]:usb device:(/dev/bus/usb/*)' '--tsscan=[scan channel on specified device]:transponder:(/dev/dvb/adapter*/dvr*)' '--nitscan=[scan NIT on specified device]:transponder:(/dev/dvb/adapter*/dvr*)' '--blindscan=[blindscan specified device]:transponder:(nim_socket /dev/dvb/adapter*/dvr*)' '--timeout=[set nitscan timeout to specified ms)]:timeout:()' '--zf=[set specified ZF/IF universal frequency]:frequency:()' '--frontendinfo=[get DVB API of specified device]:dvb device:(/dev/dvb/adapter*/frontend*)' '--createadapter[create dvb loopback]' '--remove=[remove dvb loopback of specified device]:loopback device:()' ) case $service in (*mediaclient) service_opts+=( {'(--device)-d+','(-d)--device='}'[use specified video device]:video device:(/dev/dvb/adapter*/frontend* /dev/radio* /dev/video*)' ); esac _arguments -C -s -S -A '-*' : $service_opts local ret=$? case $state in (tunerid) local tunerids tunerids=( '0:FM receiver' '1:FM transmitter' ) _describe -t tunerid 'tuner id' tunerids && ret=0;; (voltage) local voltages voltages=( 'H:18V' 'V:13V' 'OFF:0V' ) _describe -t voltage 'voltage' voltages && ret=0;; (polarisation) local polarisations polarisations=( 'H:horizontal' 'V:vertical' ) _describe -t polarisation 'polarisation' polarisations && ret=0;; (signalreporting) local signalreport signalreport=( '0:videodecoder (fast, default)' '1:demodulator (slow, detailed)' ) _describe -t signalreporting 'signal reporting' signalreport && ret=0;; (internalaudio) local internalaudios internalaudios=( 'auto:on if tvtime gets started' 'internal:use internal bridge' 'external:require external application' 'audioonly:only initialize audio transfer' ) _describe -t internalaudio 'internal audio' internalaudios && ret=0;; (rclayout) local rclayouts rclayouts=( '0:internal keymap for flat remote control' '1:internal keymap for black VCR remote control' ) _describe -t rclayout 'rc layout' rclayouts && ret=0;; (nullpackets) local nullpackets nullpackets=( 'on' 'off:default' ) _describe -t nullpackets 'pass null packets' nullpackets && ret=0;; (deinterlacerid) local deinterlacerids deinterlacerids=( '0:default' ) _describe -t deinterlacerid 'deinterlacer id' deinterlacerids && ret=0;; (createmount) local virtualadapters virtualadapters=( '0:local device' '192.168.1.2:0:remote device' ) _describe -t virtualadapter 'virtual adapter' virtualadapters && ret=0;; esac return ret