Difference between revisions of "Cardinput table"

From MythTV Official Wiki
Jump to: navigation, search
(Mark table unused beginning with 0.28)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Note box|As of 0.28, this table is no longer used.}}
 
{{Wrongtitle|cardinput table}}
 
{{Wrongtitle|cardinput table}}
 
The '''cardinput table''' contains a row for each input listed in the [[capturecard table]]. It uses the [[videosource table]] as a reference. For example, a [[video capture card]] can have an RF input, an S-Video input and a composite video input.  This table also stores the binding between a [[Video Source]] and an input -- if the RF input is direct analog cable and the S-video input is digital cable through a box, this is where that information will live.
 
The '''cardinput table''' contains a row for each input listed in the [[capturecard table]]. It uses the [[videosource table]] as a reference. For example, a [[video capture card]] can have an RF input, an S-Video input and a composite video input.  This table also stores the binding between a [[Video Source]] and an input -- if the RF input is direct analog cable and the S-video input is digital cable through a box, this is where that information will live.
Line 5: Line 6:
 
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:#8eabd0; background:#e7edf5"
 
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:#8eabd0; background:#e7edf5"
 
|- style="background: lightsteelblue"
 
|- style="background: lightsteelblue"
!  Field name !! Type        !! Null !! Key !! Default !! Extras
+
!  Field name !! Type        !! Null !! Key !! Default !! Extras !! Schema-Version
 
|-
 
|-
 
|| cardinputid    || int(10) unsigned ||      || PRI || NULL    || auto_increment
 
|| cardinputid    || int(10) unsigned ||      || PRI || NULL    || auto_increment
 
|-
 
|-
|| cardid          || int(10) unsigned ||      ||    || 0        ||
+
|| cardid          || int(10) unsigned ||      ||    || 0        || REFERENCES [[capturecard table| capturecard]](cardid)
 
|-
 
|-
|| sourceid        || int(10) unsigned ||      ||    || 0        ||
+
|| sourceid        || int(10) unsigned ||      ||    || 0        || REFERENCES [[videosource table|videosource]](sourceid)
 
|-
 
|-
 
|| inputname      || varchar(32)      ||      ||    ||          ||
 
|| inputname      || varchar(32)      ||      ||    ||          ||
Line 17: Line 18:
 
|| externalcommand || varchar(128)    || YES  ||    || NULL    ||
 
|| externalcommand || varchar(128)    || YES  ||    || NULL    ||
 
|-
 
|-
|| preference      || int(11)          ||      ||    || 0        ||
+
|| <del>preference</del>     || int(11)          ||      ||    || 0        ||
 
|-
 
|-
|| shareable      || char(1)          || YES  ||    || N        ||
+
|| <del>shareable</del>       || char(1)          || YES  ||    || N        || || -1254
 +
|-
 +
|| changer_device  || varchar(128)    || YES ||    || NULL  || || +1282
 +
|-
 +
|| changer_model  || varchar(128)    || YES ||    || NULL  || || +1282
 
|-
 
|-
 
|| tunechan        || varchar(10)      || YES  ||    || NULL    ||
 
|| tunechan        || varchar(10)      || YES  ||    || NULL    ||
 
|-
 
|-
|| startchan      || varchar(10)      || YES  ||    || NULL    ||
+
|| startchan      || varchar(10)      || YES  ||    || NULL    || REFERENCES [[channel table|channel]](channum)
 
|-
 
|-
|| freetoaironly  || tinyint(1)      || YES  ||    || 1        ||
+
|| <del>freetoaironly</del>   || tinyint(1)      || YES  ||    || 1        || || -1244
 
|-
 
|-
|| diseqc_port    || smallint(6)      || YES  ||    || NULL    ||
+
|| <del>diseqc_port</del>     || smallint(6)      || YES  ||    || NULL    || || rowspan="5" | →[[diseqc_tree table|diseqc_tree]]
 
|-
 
|-
|| diseqc_pos      || float            || YES  ||    || NULL    ||
+
|| <del>diseqc_pos</del>     || float            || YES  ||    || NULL    ||
 
|-
 
|-
|| lnb_lof_switch  || int(11)          || YES  ||    || 11700000 ||
+
|| <del>lnb_lof_switch</del> || int(11)          || YES  ||    || 11700000 ||
 
|-
 
|-
|| lnb_lof_hi      || int(11)          || YES  ||    || 10600000 ||
+
|| <del>lnb_lof_hi</del>     || int(11)          || YES  ||    || 10600000 ||
 
|-
 
|-
|| lnb_lof_lo      || int(11)          || YES  ||    || 9750000  ||
+
|| <del>lnb_lof_lo</del>     || int(11)          || YES  ||    || 9750000  ||
 
|-
 
|-
 
|| displayname    || varchar(64)      ||      ||    ||          ||
 
|| displayname    || varchar(64)      ||      ||    ||          ||
 
|-
 
|-
|| radioservices  || tinyint(1)      || YES  ||    || 1        ||
+
|| <del>radioservices</del>   || tinyint(1)      || YES  ||    || 1        || || -1244
 
|-
 
|-
|| childcardid    || int(10)          ||      ||    || 0        ||
+
|| <del>childcardid</del>     || int(10)          ||      ||    || 0        ||
 
|-
 
|-
 
|| dishnet_eit    || tinyint(1)      ||      ||    || 0        ||
 
|| dishnet_eit    || tinyint(1)      ||      ||    || 0        ||
Line 47: Line 52:
 
|| recpriority    || int(11)          ||      ||    || 0        ||
 
|| recpriority    || int(11)          ||      ||    || 0        ||
 
|-
 
|-
 +
|| quicktune      || tinyint(4)      ||      ||    || 0        ||
 +
|-
 +
|| schedorder      || int(10) unsigned ||      ||    || 0        || || +1293
 +
|-
 +
|| liveorder      || int(10) unsigned ||      ||    || 0        || || +1293
 
|}
 
|}
  
 
==Fields==
 
==Fields==
*'''cardinputid''' is a unique identifier for the entries in the table.
+
;cardinputid: is a unique identifier for the entries in the table.
*'''cardid''' maps directly to entries in the [[capturecard table]].
+
;cardid: maps directly to entries in the [[capturecard table]].
*'''sourceid''' maps directly to entries in the [[videosource table]].
+
;sourceid: maps directly to entries in the [[videosource table]].
*'''inputname'''
+
;inputname: Example values: ''DVBInput'', ''Tuner 1''
** Example values: ''DVBInput'', ''Tuner 1''
+
;externalcommand:
*'''externalcommand'''
+
;changer_device:
*'''preference'''
+
;changer_model:
*'''shareable'''
+
;tunechan:
** Example values: ''N'', ''Y''
+
;startchan: contains the last channel tuned on this card.
*'''tunechan'''
+
;displayname: is user supplied free form text.
*'''startchan''' contains the last channel tuned on this card.
+
:*Example values: ''HD3000 Digital''
*'''freetoaironly'''
+
;dishnet_eit:
*'''diseqc_port'''
+
;recpriority:
*'''diseqc_pos'''
+
;quicktune:
*'''lnb_lof_switch'''
+
;schedorder: priority to find the next free input card for scheduled recordings. lower numer=higher priority. 0=do not use.
*'''lnb_lof_hi'''
+
;livetvorder: priority to find the next free input card for live TV. lower numer=higher priority. 0=do not use.
*'''lnb_lof_lo'''
 
*'''displayname''' is user supplied free form text.
 
**Example values: ''HD3000 Digital''
 
*'''radioservices'''
 
*'''childcardid'''
 
*'''dishnet_eit'''
 
*'''recpriority'''
 
  
The following will work as a command script to re-set the channel number. It's not pretty, but I cannot remember how to pipe command line input into mysql (which is possible but tricky). Remember to chmod to make it executable. Set the startchannel to something which works on your system and select the correct cardinputid for your DVB card.
+
==Tricks==
 +
The following command will re-set the channel number.
 +
Set the startchannel to something which works on your system and select the correct cardinputid for your DVB card.
  
 
<pre>
 
<pre>
#!/bin/bash
+
mysql -u mythtv -pmythtv mythconverg -e "UPDATE cardinput SET startchan=108 WHERE cardinputid=1;"
echo 'update cardinput set startchan = '108' where cardinputid = 1;' > /var/tmp/startchan-fix
 
mysql -u mythtv -pmythtv mythconverg < /var/tmp/startchan-fix
 
 
</pre>
 
</pre>
  
 
[[Category:DB Table]]
 
[[Category:DB Table]]

Latest revision as of 18:47, 30 April 2016

Important.png Note: As of 0.28, this table is no longer used.

Important.png Note: The correct title of this article is cardinput table. It appears incorrectly here due to technical restrictions.

The cardinput table contains a row for each input listed in the capturecard table. It uses the videosource table as a reference. For example, a video capture card can have an RF input, an S-Video input and a composite video input. This table also stores the binding between a Video Source and an input -- if the RF input is direct analog cable and the S-video input is digital cable through a box, this is where that information will live.

Table Description

Field name Type Null Key Default Extras Schema-Version
cardinputid int(10) unsigned PRI NULL auto_increment
cardid int(10) unsigned 0 REFERENCES capturecard(cardid)
sourceid int(10) unsigned 0 REFERENCES videosource(sourceid)
inputname varchar(32)
externalcommand varchar(128) YES NULL
preference int(11) 0
shareable char(1) YES N -1254
changer_device varchar(128) YES NULL +1282
changer_model varchar(128) YES NULL +1282
tunechan varchar(10) YES NULL
startchan varchar(10) YES NULL REFERENCES channel(channum)
freetoaironly tinyint(1) YES 1 -1244
diseqc_port smallint(6) YES NULL diseqc_tree
diseqc_pos float YES NULL
lnb_lof_switch int(11) YES 11700000
lnb_lof_hi int(11) YES 10600000
lnb_lof_lo int(11) YES 9750000
displayname varchar(64)
radioservices tinyint(1) YES 1 -1244
childcardid int(10) 0
dishnet_eit tinyint(1) 0
recpriority int(11) 0
quicktune tinyint(4) 0
schedorder int(10) unsigned 0 +1293
liveorder int(10) unsigned 0 +1293

Fields

cardinputid
is a unique identifier for the entries in the table.
cardid
maps directly to entries in the capturecard table.
sourceid
maps directly to entries in the videosource table.
inputname
Example values: DVBInput, Tuner 1
externalcommand
changer_device
changer_model
tunechan
startchan
contains the last channel tuned on this card.
displayname
is user supplied free form text.
  • Example values: HD3000 Digital
dishnet_eit
recpriority
quicktune
schedorder
priority to find the next free input card for scheduled recordings. lower numer=higher priority. 0=do not use.
livetvorder
priority to find the next free input card for live TV. lower numer=higher priority. 0=do not use.

Tricks

The following command will re-set the channel number. Set the startchannel to something which works on your system and select the correct cardinputid for your DVB card.

mysql -u mythtv -pmythtv mythconverg -e "UPDATE cardinput SET startchan=108 WHERE cardinputid=1;"