Hdhomerun Development

download Hdhomerun Development

of 24

Transcript of Hdhomerun Development

  • 8/13/2019 Hdhomerun Development

    1/24

    HDHomeRun Development Guide

    (20110518)

    HDHomeRun Software release 20100213 contains enhancements and improvements used in

    this guide.

    The latest HDHomeRun drivers, code, and firmware can e found on the Silicondust wesite!http!""www.silicondust.com"downloads

    http://www.silicondust.com/wiki/downloadshttp://www.silicondust.com/wiki/downloads
  • 8/13/2019 Hdhomerun Development

    2/24

    I. Scripting - HDHomeRun Conig

    The HDHomeRun can e scripted using the hdhomerun#config command line utilit$.

    This utilit$ is cross%platform!

    &indows, 'inu(, )ac, *+SD, Solaris.

    32%it or -%it operating s$stems.

    +ig%endian and little%endian /s.

    / or emedded platforms.

    Compiling hdhomerun_config

    !indo"# (pre-compiled)$

    Download and install the HDHomeRun software for &indows. The hdhomerun#config.e(ee(ecutale can e found in the program director$ % default !/rogram

    ilesSilicondustHDHomeRun.

    !indo"# (%S&C'')$

    Download and e(tract the lihdhomerun archive. reate a new empt$ proect and include allthe .c and .h files. rom the proect properties page under "44 advanced, change the ompile

    5s t$pe to , clic6 appl$ and then change it ac6 to 44 %% this is a wor6around for a ug in)S744. nder the 'in6er input, add &s2#32.li and iphlpapi.li as 5dditional Dependencies.

    ompile.

    Cg"in*inu+%,cSD$

    Download and e(tract the lihdhomerun archive.Run 8ma6e8

  • 8/13/2019 Hdhomerun Development

    3/24

    Using hdhomerun_config

    The list of supported commands can e otained $ running hdhomerun#config without an$parameters!

    hdhomerun_config discover hdhomerun_config get help

    hdhomerun_config get hdhomerun_config set hdhomerun_config scan [] hdhomerun_config save hdhomerun_config upgrade

    Di#cover t/e HDHomeRun device# on t/e net"or$

    The discover command will find HDHomeRun devices that are on the same sunet as the host!

    hdhomerun_config discover

    Sending comm,nd# to , #peciic HDHomeRun$

    The 9:id;< shown aove represents a uni=ue identifier for a HDHomeRun device, this can eeither Device >D, or >/ address!

    hdhomerun_config get help hdhomerun_config get help

    To address $ Device >D the HDHomeRun must e on the same sunet as the host.

    5 Device >D of can e used as a wild card for the first HDHomeRun device found on the

    networ6. Do not use this s$nta( if there are multiple HDHomeRun devices on the networ6, as thedevice used will e random ased on discover$ order, which ma$ change etween commands.

    uer t/e li#t o option# #upported , HDHomeRun device$

    The get"set options supported $ a specific HDHomeRun device can e =ueried using the get helpcommand!

    hdhomerun_config get help

    ?(ample output!

    Supported configuration options: /tuner/channel : Get/set modulation and frequency /tuner/channelmap Get/set channel to frequency map /tuner/filter !"! [###] Get/set $%& filter /tuner/program

  • 8/13/2019 Hdhomerun Development

    4/24

    C/,nnelm,p$

    The channelmap is used to configure the auto%modulation detection and channel scan. This shoulde configured correctl$ for each tuner.

    The channelmap configuration is stored in non%volatile memor$ so onl$ needs to e set once.

    format: hdhomerun_config get /tuner/channelmapformat: hdhomerun_config set /tuner/channelmap

    eg: hdhomerun_config -------- get /tuner/channelmapeg: hdhomerun_config -------- set /tuner/channelmap us"'cast

    hannel maps supported $ HDHR%S hardware!

    3,me De#cription *oc,tion

    us-bcast Digital Antenna (ATSC). US, Canada

    us-cable Digital Cable - Normal frequency layout. US, Canada

    us-rc Digital Cable - !"C frequency layout. US, Canada

    us-irc Digital Cable - #"C frequency layout. US, Canada

    hannel maps supported $ HDHR%? hardware!

    3,me De#cription *oc,tion

    au-bcast Digital Antenna (Australia). Australia

    au-cable Digital Cable (Australia). Australia

    eu-bcast Digital Antenna ($uro%e). $uro%e, Ne& 'ealand

    eu-cable Digital Cable ($uro%e). $uro%e, Ne& 'ealand

    t&-bcast Digital Antenna (Tai&an). Tai&an

    t&-cable Digital Cable (Tai&an). Tai&an

    C/,nnel #c,n$

    To run a channel scan!

    format: hdhomerun_config scan /tuner []eg: hdhomerun_config -------- scan /tuner scan#log

    This command will scan all channels on the selected channelmap plus an$ additional channelmaps

    associated with the selected channelmap. 5ll standard modulation t$pes for the selectedchannelmap are tested.

    &hen a digital channel is found it will identif$ the programs on the channel.

    The log filename is optional@ if included it will log to the given filename.

    4uning , p/#ic,l c/,nnel$

    To set a channel use the set channel command!

    format: hdhomerun_config set /tuner/channel :format: hdhomerun_config set /tuner/channel :eg: hdhomerun_config -------- set /tuner/channel auto:.0eg: hdhomerun_config -------- set /tuner/channel auto:.

    Supported modulation t$pes can e =ueried with the get s$s%features command!

  • 8/13/2019 Hdhomerun Development

    5/24

    hdhomerun_config get /sys/features

    To stop the tuner set the channel to none!

    format: hdhomerun_config set /tuner/channel noneeg: hdhomerun_config -------- set /tuner/channel none

    C/ecing t/e #ign,l #trengt/$

    The asic signal information can e otained $ using the get status command!

    format: hdhomerun_config get /tuner/statuseg: hdhomerun_config -------- get /tuner/status

    ?(ample output!

    ch1qam:22 loc*1qam3. ss142 snq15 seq10 'ps12446603 pps1

    ch A channel re=uested

    loc6 A actual modulation detected

    ss A signal strength. B0C is appro(imatel$ %12d+m7.

    sn= A signal to noise =ualit$ ased on analog signal to noise ratioE.

    se= A s$mol error =ualit$ numer of uncorrectale digital errors detectedE.

    ps A raw channel its per second.

    pps A pac6ets per second sent through the networ6.

    )ore advanced information can e otained $ using the get deug command!

    format: hdhomerun_config get /tuner/de'ugeg: hdhomerun_config -------- get /tuner/de'ug

    ?(ample output!

    tun: ch1qam:22 loc*1qam3. ss147 snq144 seq10 d'g13340".52

    dev: resync1 overflo,1ts: 'ps1244530. ut157 te1 miss1 crc1flt: 'ps1244530.net: pps1 err1 stop1

    ?ach line contains a prefi( to indicate the t$pe of data, followed $ the values.

    tun A tuner status

    see aove section

    dev A device status

    ts A transport stream

    ps A its per second ut A utiliFation percentage 100C is filled to capacit$E

    te A transport error counter uncorrectale reception errorE

    miss A missed pac6et counter ump in se=uence numersE

    crc A crc error counter

    flt A results after pid filtering

    ps A its per second

  • 8/13/2019 Hdhomerun Development

    6/24

    net A networ6 status

    pps A pac6ets per second

    err A pac6ets or TS frames dropped efore transmission.

    stop A reason for stopping the stream

    The counters are reset to Fero upon a channel change, ut ma$ indicate a small numer of errors

    caused efore the tuner loc6s on the channel. 5s a result, diagnostics should e ased on thechange in values over time, and not the initial values.

  • 8/13/2019 Hdhomerun Development

    7/24

    Detecting t/e progr,m# on , p/#ic,l c/,nnel$

    The HDHomeRun will detect the programs su%channelsE. se the get streaminfo command to=uer$ the detected programs!

    format: hdhomerun_config get /tuner/streaminfoeg: hdhomerun_config -------- get /tuner/channel streaminfo

    The output format is!

    eg: hdhomerun_config -------- set /tuner/program 2

    &hen filtering $ program the /5T and /)T tales are generated $ the HDHomeRun. The result

    is a valid single%program transport stream.The program filter is cleared when a set channel or a set filter command is received.

    Advanced:+$ default the /5T and /)T are generated. To also generate a 5TS%st$le T7T use!

    hdhomerun_config set /tuner/program C

  • 8/13/2019 Hdhomerun Development

    8/24

    S,ving , #tre,m$

    The hdhomerun#config command can e used to automate the process of saving to the localfiles$stem!

    format: hdhomerun_config save /tuner eg: hdhomerun_config -------- save /tuner capture#ts

    &hile saving the stream, a single period 9.< will e displa$ed ever$ second. 5dditionall$, as of the200B00G release, the hdhomerun#config will detect reception and networ6 errors, replacing the9.< with an alternative character to indicate the prolem.

    ?(ample output!

    ############n###############################n##########ts##########"" Dideo statistics ""32232 pac*ets recievedE 3 net,or* errorsE 0 transport errorsE 0 sequence errors

    Advanced:5 filename of 9null< indicates no file should e created, allowing the use of the save

    command as a diagnostic tool.

    Advanced:9%< ma$ e used as a filename to indicate standard output, allowing the save

    command to e used as a pipe on supported platforms.eg: hdhomerun_config -------- save /tuner " | vlc "

    Stre,ming to , t,rget m,c/ine$

    Set the target >/ address and port numer using the set target command!

    format: hdhomerun_config set /tuner/target udp://:format: hdhomerun_config set /tuner/target rtp://:eg: hdhomerun_config -------- set /tuner/target udp://053#0.4#0#0:eg: hdhomerun_config -------- set /tuner/target rtp://053#0.4#0#0:

    The target machine must e listening on the given D/ port. The HDHomeRun will automaticall$clear the target if a >)/ port unreachale message is received.

    5 gloal roadcast 2.2.2.2E or sunet roadcast can e specified however care must eta6en to ensure that the roadcast traffic will not cause prolems with other devices on the

    networ6. >f the local networ6 is ridged to a wireless networ6 then the 5/ will t$picall$ transmit ata low roadcast speed saturating the wireless networ6.

    7+,mple$ Stre,ming to &*C$

    Run 7'! ile, Ipen Jetwor6 Stream. Select D/"RT/. Specif$ port 000.

    Discover the HDHomeRun!

    hdhomerun_config discover

    Run a channel scan!

    hdhomerun_config -------- scan /tuner scan#log

    Set the ph$sical channel!

    hdhomerun_config -------- set /tuner/channel auto:.0

    hec6 su%programs!

    hdhomerun_config -------- get /tuner/streaminfo

  • 8/13/2019 Hdhomerun Development

    9/24

    Select a su%program!

    hdhomerun_config -------- set /tuner/program 2

    Set the target!

    hdhomerun_config -------- set /tuner/target :

  • 8/13/2019 Hdhomerun Development

    10/24

    II.!indo"# D Driver#

    The HDHomeRun &indows software include +D5 drivers 32%it and -%itE for use with third

    part$ software.

    Direct Show filter:

    The +D5 driver consists of a single Direct Show filter. The Direct Show filter is registered oth as

    a 8+D5 Source ilter8 KS5T?LIRM#+D5#J?T&IRK#TJ?RE and as a 8+D5 Receiveromponent8 KS5T?LIRM#+D5#R??>7?R#I)/IJ?JTE for compatiilit$. Inl$ one instance

    should e used t$picall$ KS5T?LIRM#+D5#J?T&IRK#TJ?RE.

    BDA Demodulator type:

    &indows N/ includes the older 9)icrosoft NNNN Jetwor6 /rovider< components. These 9)icrosoft

    NNNN Jetwor6 /rovider< components will not wor6 with a driver that pulishes multipledemodulator nodes.

    &indows )? 200 and 7ista support oth the 9)icrosoft NNNN Jetwor6 /rovider< components

    and the newer universal 9)icrosoft Jetwor6 /rovider< component. This newer universalcomponent supports drivers that pulish multiple demodulator nodes.

    &indows )edia enter T7 /ac6 &)T7/E and later re=uire that a S%O5) driver pulish oth an

    B7S+ demodulator node and a O5) demodulator node. This re=uirement means a driver thatsupports S%O5) for &)T7/ will not wor6 with the older 9)icrosoft NNNN Jetwor6 /roviderD filtering. &hen used this reduces the networ6 andwidthto that of the su%channel eing watched"recorded. This is useful for S%O5) as the HDHomeRun

    will stream B0)ps of networ6 traffic if oth tuners are streaming unfiltered.

    There are three options for using the hardware />D filter support % filtering $ program numer,

    custom />D handling, or uilt in &indows />D handling.

    ilter progr,m numer$

    The HDHomeRun driver supports a custom >HDHomeRun#/rogramilter interface to allow the +D5

    application to select a program su%channelE of interest. The HDHomeRun will automaticall$detect the re=uired />Ds and set the />D filter appropriatel$.

    The 5/> consists of two functions % put#/rogramJumer and get#/rogramJumer.

    1E 'ocate the KSJID?#+D5#/>D#>'T?R node of the HDHomeRun tuner.

    2E Let the >HDHomeRun#/rogramilter interface.

    3E Set the program numer 1%3E $ calling put#/rogramJumer. To pass all programs

    unfiltered pass 0 as the program numer. To disale program filtering and return to />Dfiltering pass %1 as the program numer.

    Cu#tom 6ID /,ndling$

    The HDHomeRun driver supports the )icrosoft >)/?L2/>D)ap interface for configuring thehardware />D filter.

    -E 'ocate the KSJID?#+D5#/>D#>'T?R node of the HDHomeRun tuner.

    E Let the >)/?L2/>D)ap interface.

    E all )ap/>D and nmap/>D 5/>s are needed.

    or 5TS, t$picall$ the application will set he />D filter to /5T0(0000E 4 /S>/0(1+E on a

    channel change.

    Ince the /5T has een detected and processed the application will enale the /)T />Ds identified

    in the /5T.

    Then, once the desired /)T has een detected and processed the application will enale the ?S/>Ds audio and videoE identified in the /)T.

    uilt in !indo"# 6ID /,ndling$

    XP:The &indows +D5 s$stem supports the />D filtering 5/>s ut does not set the />D filter.

    XP + MCE 2005:The &indows +D5 s$stem supports the />D filtering 5/>s and will set the />Dfilter automaticall$ when using the standard &indows +D5 components.

    Vista:The &indows +D5 s$stem supports the />D filtering 5/>s and will attempt to set the />D

  • 8/13/2019 Hdhomerun Development

    12/24

    filter automaticall$. There is a ug in one of the standard &indows +D5 components that prevents

    this from wor6ing.

    Windows 7:The &indows +D5 s$stem supports the />D filtering 5/>s and will set the />D filterautomaticall$ when using the standard &indows +D5 components.

    HDHomeRun Setup will auto%detect if the IS has wor6ing uilt in />D filter support and canconfigure the driver appropriatel$.

    )? 200 or &indows P is re=uired to test the uilt in &indows hardware />D filter handling. >t isimportant to test oth changing to a new fre=uenc$ and changing to a different su%channel on

    the same fre=uenc$.

    +uilt in &indows />D handling cannot e used with normal N/ non )? 200E or normal 7ista

    non &)T7/E.

    US digital ca#le support:

    The HDHomeRun +D5 driver supports native S%O5) learO5)E operation, as well as providing

    a channel remap mechanism to allow S digital cale to e used with legac$ 5TS%onl$applications.

    The modulation is auto%detected $ the HDHomeRun. The onl$ application change t$picall$needed to tune a native digital cale channel is to pass a cale fre=uenc$ rather than an IT5

    fre=uenc$.

    %odul,tion$

    S digital cale providers mostl$ use O5)2 modulation, however can also use O5)- and"or

    B7S+ modulation.

    The HDHomeRun uses the modulation t$pe set $ the application as a hint, ut alwa$s auto%

    detects the modulation t$pe.

    The general%purpose method for detecting if a driver supports auto%modulation detection is to

    =uer$ the 8>+D5#5utoDemodulate8 interface. >f this interface e(ists, call put#5utoDemodulate. >fthis function returns IK then the tuner supports automatic modulation detection.

    C/,nnel m,p$

    There are three common channel numer to fre=uenc$ tales used $ S cale providers % ale,

    >R, and HR.

    The ale and >R channel maps are almost identical. &ith the e(ception of channels and , all>R channels are within 26HF of the matching ale channels less than the tuning resolution of

    a t$pical tunerE.

    To test all S cale channels an application must test all ale channels, all HR channels, and

    >R channels and .

    The HDHomeRun driver can operate in one of four modes!

    Native:the application is responsile for setting the fre=uenc$. The HDHomeRun will tune there=uested fre=uenc$ plus 1.P)HF to convert the re=uested fre=uenc$ from JTS video carrier

    fre=uenc$ to digital center fre=uenc$E.

    AutoUCa!leMa":used for legac$ applications onl$ support the ale channel map. The

    HDHomeRun driver will loo6 up the re=uested fre=uenc$ and compare with the channelconfiguration recorded $ HDHomeRun Setup. The re=uested fre=uenc$ is converted to a HR or

    >R fre=uenc$ as needed.

  • 8/13/2019 Hdhomerun Development

    13/24

    AutoUCa!leMa"#ilte$ed:used for legac$ applications that onl$ support the ale channel

    map. The HDHomeRun driver will loo6 up the re=uested fre=uenc$ and compare with the channelconfiguration recorded $ HDHomeRun Setup. The re=uested fre=uenc$ is converted to a HR or

    >R fre=uenc$ as needed.

    >f the re=uested fre=uenc$ is 6nown not to contain unencr$pted digital video then the channel wille set to 9nonef a match is found it will tune the fre=uenc$4program specified in the lineup file. &hen

    operating in this mode the HDHomeRun will generate the /5T, /)T, and 7T information neededto wor6 with 5TS onl$ applications. &hen using this mode onl$ B channels can e used as there

    are B IT5 fre=uencies channels 2 to GE.

    C/,nnel identiic,tion$

    S Digital ale providers t$picall$ do not sent a 7T with the stream. >n cases where a 7T isincluded in the stream this information often incorrect.

    Silicondust maintains a lineup server that trac6s unencr$pted digital cale channels to match with

    guide data. Silicondust provides access to this information via a we 5/> Q see following 'ineupServer chapter.

    Dri$er configuration:

    The user specifies the application the$ intend to use with the HDHomeRun when the runHDHomeRun Setup. This selection sets a numer of registr$ options to adust the driver ehavior

    to suit the specified application.

    or development the 5pplication can e set to 9Ither! Registr$J?SIT&5R?SilicondustHDHomeRunTuners:device id;%:tuner inde(;

    7alues are case sensitive.

    3,me &,lid &,lue#

    /odel 4irm&are model string from te !D!ome"un ard&are.Used by te DA drier to configure deice s%ecific features.

    SourceTy%e 5Digital Antenna6, 5Digital Cable6, 5Disabled6.Used by !D!ome"un Setu% to enable source s%ecific features3o%tions.Used by te DA drier to select auto-modulation grou% if not s%ecified by te a%%lication.

    Source Name of te source. Sould be set to 5Digital Antenna6, 5Digital Cable6, or 5Disabled6unless tere are multi%le directional antennas or multi%le cable systems.Used by !D!ome"un Setu% to manage cannel lineu%s.Used by Dynamic Tuner Allocation feature to identify intercangeable tuners.

  • 8/13/2019 Hdhomerun Development

    14/24

    Used by DA drier to select te lineu% 7/0 file to use &en a lineu%-a&are o%tion sucas AutoUSCable/a% or "ema% mode is enabled.

    A%%lication Name of a%%lication 8no&n to !D!ome"un Setu%, or 5*ter9 "egistry6.Used by !D!ome"un Setu% :U# to store user selection.

    DADemodulator De%recated - not used by drier.

    DA;#D4ilter 5$nabled6 - enable ard&are ;#D filter su%%ort.

    5Disabled6 - disable ard&are ;#D filter su%%ort.Cannel/a%%ing 5Natie6, 5AutoUSCable/a%6, 5AutoUSCable/a%4iltered6, 5"ema%;rogram6,

    5"ema%4requency6 - see cannel ma% section under US digital cable su%%ort.

  • 8/13/2019 Hdhomerun Development

    15/24

    III.*ineup Server

    Silicondust maintains a lineup server to trac6 and identif$ antenna and cale channels. The main

    focus is on identif$ing unencr$pted digital cale channels in the S.

    or end%customers the lineup information is availale from the Silicondust wesite!

    http!""www.silicondust.com"hdhomerun"channels

    or application use the lineup information is availale via a N)'"HTT/S ased we 5/>.

    u!)c*annel t$acing:

    The lineup server trac6s and groups su%channels $ comparing the video content using a real%

    time video hash. )atching is automatic and is not dependent on the fre=uenc$ or the stream

    la$out.

    7ideo matching allows the lineup server to automaticall$ match and trac6 names from 5TSchannels, DT5%identified channels, /S>/%identified channels, and user%identified channels.

    The server is currentl$ trac6ing G0,000 unencr$pted cale su%channels and t$picall$ identifies100,000 tuner%to%tuner video matches per minute.

    Enc$("ted vs Unenc$("ted:

    The lineup server uses >%rame detection from HDHomeRun devices to detect unencr$pted su%

    channels. This improves the reliailit$ of reporting which su%channels are unencr$pted.

    ,ineu" t$acing:

    The lineup server automaticall$ identifies and trac6s cale lineups. ?ach lineup is a collection ofcale head%ends with the identical unencr$pted channels, e(cluding on%demand channels. This

    information is used to locate the correct lineup for a user re=uest for channel identification.

    A-C:

    5TS over the airE channels are validated against a dictionar$ of latitude"longitude, callsign,transport stream >D, and virtual channel numers. The output of the dictionar$ is the T)S%st$le

    callsign for matching guide data.

    A-C $e!$oadcast on ca!le:

    The lineup server automaticall$ matches over%the%air su%channels with cale su%channels $matching the video content. This allows the 5TS channel name to e applied to the cale channel

    without rel$ing on user feedac6. 'i6ewise if a cale provider changes the channel la$out the5TS%reroadcast channels are automaticall$ detected and named.

    Co&cast .-A in/o$&ation:

    The lineup server processes omcast DT5 information to aid with channel identification.

    Su%channels identified via omcast DT5 information are automaticall$ matched with su%channels on non%DT5 ased headends ased on the video content.

    Use$ /eed!ac:The lineup server accepts and processes user feedac6 for trac6ing channels that cannot e

    automaticall$ identified using 5TS, DT5, or /S>/ matching.

    Su%channels are automaticall$ matched etween head ends ased on video content. The user

    feedac6 is anal$Fed oth at the local level for the specific head%end and at a wider level for allhead%ends that roadcast the specific video feed.

    e$vice:

    or application use the lineup information is availale via a N)'"HTT/S ased we 5/>.

    http://www.silicondust.com/hdhomerun/channelshttp://www.silicondust.com/hdhomerun/channels
  • 8/13/2019 Hdhomerun Development

    16/24

    The we 5/> is availale for use with HDHomeRun tuners at no cost.

    or non%HDHomeRun tuners the service is availale for a nominal cost ased on the numer of

    users. This helps cover andwidth and operating costs.

    The we 5/> documentation follows.

    !e 6I$ C/,nnel #c,nn,me re#olution$

    >n most cases a D7R application will re=uest name resolution directl$ after a channel scan. Thisma$ e due to a user initiated channel scan or ma$ e a ac6ground tas6 that runs a channel

    scan periodicall$.

    %e'uest U%,:

    https!""www.silicondust.com"hdhomerun"lineupuimdA>dentif$/rograms2

    %e'uest /o$&at:

  • 8/13/2019 Hdhomerun Development

    17/24

    9Bvs< case sensitiveE.

    re=uenc$! Digital center fre=uenc$ in HF. or e(ample, S cale channel 100 is

    91000000f the JTS video carrier fre=uenc$ is used internall$ $ the D7R application-G20000 for channel 100E then add 1.P)HF to get the digital center fre=uenc$.

    TransportStream>D! 1%it transport stream >D as detected from the /5T. This ma$ especified as an integer 91P3

  • 8/13/2019 Hdhomerun Development

    18/24

    !e 6I$ Correctioneed,c$

    >f the application provides a mechanism to manuall$ enter or correct the name of a channel thenthis information should e sent to the lineup server using the feedac6 5/>. This feedac6 is used

    to improve the results and to avoid overwriting user corrections if the user runs another channelscan.

    %e'uest U%,:https!""www.silicondust.com"hdhomerun"lineupuimdA>dentif$eedac62

    %e'uest /o$&at:

  • 8/13/2019 Hdhomerun Development

    19/24

    9e tec/nic,l term# o u#e$

    HTT/S to e used for re=uests.

    N)' encoding to e T%B.

    The script or D7R application to identif$ itself in the re=uest including the version.

    Re=uests to the lineup server to e made from the user"client application, not from a

    central server. Support for the correction"feedac6 5/> is re=uired if the application provides a wa$ for the

    user to edit channel names.

    +usiness and Technical contact information to e registered with Silicondust.

  • 8/13/2019 Hdhomerun Development

    20/24

    I&.*ir,r 6I

    The lihdhomerun lirar$ can e used for direct programmatic control of the HDHomeRun.

    See 9Scripting % HDHomeRun onfig< for platform compatiilit$ and information on compiling.

    Disco$ery A"The discover$ 5/> is used to find HDHomeRun units on the networ6 % documented in

    hdhomerun#discover.h.

    or repetitive ac6ground polling use hdhomerun#discover#createE and

    hdhomerun#discover#find#devicesE.

    or less fre=uent use the hdhomerun#discover#find#devices#customE 5/> provides discover$

    using a single call.

    Jote! the Discover$ 5/> will return the list of HDHomeRun units on the networ6 ut does not

    indicate the numer of tuners associated with each HDHomeRun unit. This will e addressed in thefuture. >f this affects $our application please contact supportUsilicondust.com.

    De$ice A"

    The Device 5/> is the primar$ 5/> for controlling a HDHomeRun tuner % documented inhdhomerun#device.h.

    Cre,te$

    all hdhomerun#device#createE or hdhomerun#device#create#from#strE to create a deviceoect. See hdhomerun#device.h for parameters and usage.

    T$picall$ a device oect will e created for each tuner to e controlled.

    GetSet$

    The get"set 5/>s can e used in a similar wa$ to the get"set commands of hdhomerun#config. See

    hdhomerun#device.h for the complete list of get"set functions.

    or e(ample, to set a channel call!

    hdhomerun#device#createE

    hdhomerun#device#set#tuner#channelE

    hdhomerun#device#set#tuner#programE

    Jote! for Let functions that return a string the string is valid until another lihdhomerun 5/> call.

    &ideo #tre,m$

    Iption 1! lihdhomerun video soc6et support!

    The device%video 5/> handles the video D/ soc6et, target configuration, uffering, se=uence

    chec6ing, etc.

    5fter setting the channel call hdhomerun#device#stream#startE to create the video D/ soc6et

    and start the video service thread.

    all hdhomerun#device#stream#recvE periodicall$ to receive the video stream.

  • 8/13/2019 Hdhomerun Development

    21/24

    The hdhomerun#device#stream#start"stopE 5/>s call hdhomerun#device#set#tuner#targetE

    internall$ as needed.

    Iption 2! e(ternal video soc6et support!

    or applications with e(isting D/ or RT/ video support use

    hdhomerun#device#set#tuner#targetE to set the target to the listening D/ port.

    &hen streaming is no longer re=uired use the same function to set the target to 9none is used to prevent conflicts when there are multiple hosts on the networ6controlling the same set of tuners.

    'ow level! use hdhomerun#device#tuner#loc66e$#re=uestE to re=uest e(clusive control of thetuner. This function will return success 1E if the re=uest was successful, reect 0E if the tuner is

    in use $ anther host, or error %1E if a communication error occurs.

    &hen the tuner loc6 is no longer re=uired use hdhomerun#device#tuner#loc66e$#releaseE torelease the resource loc6.

    The hdhomerun#device#tuner#loc66e$#forceE 5/> will cause a resource loc6 to e released

    regardless of which host owns the loc6. This function should onl$ e called if the user has eenpresented with a dialog and the user has e(plicitl$ re=uested that the loc6 e overridden.

    The HDHomeRun will self e(pire the resource loc6 if not streaming and no commands are receivedin a 30s period. >f the host application crashes without releasing the resource loc6 this timeout will

    allow the tuner to e used again. The e(ception % if the tuner is streaming video and the host hasa firewall that prevents >)/ port unreachale messages the tuner will not e informed that the

    video is no longer eing accepted $ the host. Streaming will continue and the tuner will maintainthe loc6.

    To avoid this situation use the Device Selector 5/> to re=uest the resource loc6. This will auto%detect and release dead loc6s % see Device Selector 5/> section elow.

    Jote! the detection and automatic release of dead resource loc6s is planned to e moved to

    hdhomerun#device#tuner#loc66e$#re=uestE. >f this affects $our application please contactsupportUsilicondust.com

    De$ice Selector A"

    The Device Selector 5/> is used to automaticall$ select and loc6 an availale tuner from a pool oftuners % documented in device#selector.h.

    5 pool is t$picall$ all tuners on the local networ6 that have the same signal source.

    Setup$

    se hdhomerun#device#selector#createE to create the selector oect.

    se hdhomerun#device#selector#add#deviceE to add a device to the selection pool.

    4uner #election$

    Start! use hdhomerun#device#selector#choose#and#loc6E to find and loc6 an availale tuner.

    Stop! use hdhomerun#device#tuner#loc66e$#releaseE to release the loc6 when the tuner is nolonger re=uired.

    hannel change! there are two options for handling the resource loc6 when changing channel!

  • 8/13/2019 Hdhomerun Development

    22/24

    1E Release the resource loc6 $ calling hdhomerun#device#tuner#loc66e$#releaseE, then call

    hdhomerun#device#selector#choose#and#loc6E to find and loc6 an availale tuner.

    2E Refresh the e(isting loc6 $ calling hdhomerun#device#tuner#loc66e$#re=uestE. >f the

    application still holds the resource loc6 the re=uest function will return success 1E. >f the loc6 haseen lost at some point ut the tuner is availale the re=uest function will reac=uire the loc6 and

    return success 1E. >f the loc6 as een lost at some point and the tuner is now loc6ed $ anotherhost the re=uest function will return us$ 0E. >n this situation the application should call

    hdhomerun#device#tuner#loc66e$#releaseE to release the local loc6 state and callhdhomerun#device#selector#choose#and#loc6E to find another tuner.

  • 8/13/2019 Hdhomerun Development

    23/24

    &.%odul,tion tpe#

    4SC

    ATSC modulation sb

    ATSC auto-modulation auto

  • 8/13/2019 Hdhomerun Development

    24/24

    version. Ilder firmware versions will test Bvs, =am2, and =am- slowerE. Jewer firmware

    versions choose the modulation ased on the channel map set fasterE!

    us-cable us-rc us-irc auto