Difference between revisions of "Capture Service"

From MythTV Official Wiki
Jump to: navigation, search
(Intro)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
=What is this?=
 +
See [[Services API]]
 +
 +
 
=Capture Service API List=
 
=Capture Service API List=
  
Line 28: Line 32:
 
| style="background:silver" | Remove a particular capture device from the database, by card id.
 
| style="background:silver" | Remove a particular capture device from the database, by card id.
 
|-  
 
|-  
| [[Capture_Service#GAddCardInput | AddCardInput]]
+
| [[Capture_Service#AddCardInput | AddCardInput]]
 
| align="center"  | Yes
 
| align="center"  | Yes
 
| Add a new card input to the database, and associate it with a video listings source.
 
| Add a new card input to the database, and associate it with a video listings source.
Line 49: Line 53:
  
 
:<span style="color:SteelBlue">HostName</Span> ('''Optional''')
 
:<span style="color:SteelBlue">HostName</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 
:: The backend host name you wish to see a capture card list for.
 
:: The backend host name you wish to see a capture card list for.
  
 
:<span style="color:SteelBlue">CardType</Span> ('''Optional''')
 
:<span style="color:SteelBlue">CardType</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 
:: Filter results by a particular capture card type (HDHOMERUN, DEMO, etc.)
 
:: Filter results by a particular capture card type (HDHOMERUN, DEMO, etc.)
  
Line 100: Line 106:
  
 
:<span style="color:SteelBlue">CardId</Span> ('''Required''')
 
:<span style="color:SteelBlue">CardId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 
:: The database card ID for the device you want informaion for.
 
:: The database card ID for the device you want informaion for.
  
Line 138: Line 145:
 
</CaptureCard>
 
</CaptureCard>
 
</pre>
 
</pre>
 +
 +
==AddCaptureCard==
 +
 +
The <span style="color:LimeGreen">AddCaptureCard</span> API takes the following arguments:
 +
 +
:<span style="color:SteelBlue">VideoDevice</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The device path (/dev/video1) or device string (12345678-0) used to address the device.
 +
 +
:<span style="color:SteelBlue">CardType</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The capture card type being created (HDHOMERUN, DEMO, etc.).
 +
 +
:<span style="color:SteelBlue">DefaultInput</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The default physical input for the device being created (Component, MPEG2TS, Television, etc.).
 +
 +
:<span style="color:SteelBlue">HostName</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The backend hostname which houses this new capture device.
 +
 +
:<span style="color:SteelBlue">AudioDevice</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: The device path (/dev/dsp) or device string (ALSA:input) used to address the audio capture device. Usually only useful for framegrabber cards.
 +
 +
:<span style="color:SteelBlue">VBIDevice</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: The device path (/dev/vbi1) used for VBI/CC capture.  Usually only useful for a limited number of analog capture devices.
 +
 +
:<span style="color:SteelBlue">AudioRateLimit</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: The maximum audio sampling rate for captured audio. Usually only useful for framegrabber cards.
 +
 +
:<span style="color:SteelBlue">SkipBTAudio</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Boolean
 +
:: Used only for quirky BT878 DVB cards to prevent the backend adjusting their volume.
 +
 +
:<span style="color:SteelBlue">DVBSWFilter</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: No longer used.  Left as a parameter for legacy purposes.
 +
 +
:<span style="color:SteelBlue">DVBSatType</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: No longer used.  Left as a parameter for legacy purposes.
 +
 +
:<span style="color:SteelBlue">DVBWaitForSeqStart</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Boolean
 +
:: Wait for the SEQ start header.  Only useful for DVB capture devices.
 +
 +
:<span style="color:SteelBlue">DVBOnDemand</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Boolean
 +
:: Only open the capture device when used for recording or EIT.  Allow other programs to access the device when not actively used.  Enabling can cause recording issues if multiple applications contend for the same device.
 +
 +
:<span style="color:SteelBlue">DVBDiSEqCType</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: No longer used.  Left as a parameter for legacy purposes.
 +
 +
:<span style="color:SteelBlue">FirewireModel</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: The model of the firewire device, as defined in firewiredevices.cpp.  Used to determine which AVC command set to use when changing channels and capturing.
 +
 +
:<span style="color:SteelBlue">FirewireSpeed</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Firewire speed to use.  For firewire capture devices.
 +
 +
:<span style="color:SteelBlue">FirewireConnection</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: The Firewire communication method to use.  For firewire capture devices.
 +
 +
:<span style="color:SteelBlue">SignalTimeout</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Number of milliseconds to wait upon tuning a frequency before signal is found.  If this timer expires, tuning has failed.
 +
 +
:<span style="color:SteelBlue">ChannelTimeout</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Number of milliseconds to wait upon finding signal before the desired channel is found.  If this timer expires, tuning has failed.
 +
 +
:<span style="color:SteelBlue">DVBTuningDelay</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Workaround for quirky capture devices.  Introduce a delay to the tuning process in milliseconds.
 +
 +
:<span style="color:SteelBlue">Contrast</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Used to adjust picture attributes on capture for framegrabber capture devices.
 +
 +
:<span style="color:SteelBlue">Brightness</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Used to adjust picture attributes on capture for framegrabber capture devices.
 +
 +
:<span style="color:SteelBlue">Colour</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Used to adjust picture attributes on capture for framegrabber capture devices.
 +
 +
:<span style="color:SteelBlue">Hue</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Used to adjust picture attributes on capture for framegrabber capture devices.
 +
 +
:<span style="color:SteelBlue">DiSEqCId</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Cross reference this device with a DiSEqC tree found in the diseqc_config table.
 +
 +
:<span style="color:SteelBlue">DVBEITScan</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Boolean
 +
:: Permit this device to scan for EIT programming data (digital capture devices only).
 +
 +
Example Query:
 +
 +
<code>http://BackendServerIP:6544//Capture/AddCaptureCard?VideoDevice=12345678-0&CardType=HDHOMERUN&DefaultInput=MPEG2TS&HostName=localhost&SignalTimeout=3000&ChannelTimeout=10000&DVBEITScan=0</code>
 +
 +
Example Return:
 +
 +
Integer return.  Returns the cardid of the card if successfully created, -1 if card creation failed.
 +
 +
<pre><int>7</int></pre>
 +
 +
==UpdateCaptureCard==
 +
 +
The <span style="color:LimeGreen">UpdateCaptureCard</span> API takes the following arguments:
 +
 +
:<span style="color:SteelBlue">CardId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 +
:: The cardid you wish to modify.
 +
 +
:<span style="color:SteelBlue">Setting</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The database column you wish to modify for the card.
 +
 +
:<span style="color:SteelBlue">Value</Span> ('''Required''')
 +
:: '''Parameter Type:''' String or Integer
 +
:: The new value for the database field.
 +
 +
Example Query:
 +
 +
<code>http://BackendServerIP:6544/Capture/UpdateCaptureCard?CardId=1&Setting=audiodevice&Value=ALSA:input</code>
 +
 +
Example Return:
 +
 +
Boolean return.  Returns true if the value was modified, false if the change failed.
 +
 +
<pre><bool>true</bool></pre>
 +
 +
==RemoveCaptureCard==
 +
 +
The <span style="color:LimeGreen">RemoveCaptureCard</span> API takes the following arguments:
 +
 +
:<span style="color:SteelBlue">CardId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 +
:: The database card ID for the device you are deleting.
 +
 +
Example Query:
 +
 +
<code>http://BackendServerIP:6544/Capture/RemoveCaptureCard?CardId=3</code>
 +
 +
Example Return:
 +
 +
Boolean return.  Returns true if the device was removed from the database, false if the delete failed.
 +
 +
<pre><bool>true</bool></pre>
 +
 +
==AddCardInput==
 +
 +
Each configured capture card needs at least one card input to tie a video source and a capture device together.
 +
 +
The <span style="color:LimeGreen">AddCardInput</span> API takes the following arguments:
 +
 +
:<span style="color:SteelBlue">CardId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 +
:: The database card number this input belongs to.
 +
 +
:<span style="color:SteelBlue">SourceId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 +
:: The database video source number bound to this card input.
 +
 +
:<span style="color:SteelBlue">HostName</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The backend hostname where this card input is located.
 +
 +
:<span style="color:SteelBlue">InputName</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The text name of the input (Component, MPEG2TS, Television, etc.)
 +
 +
:<span style="color:SteelBlue">ExternalCommand</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: The path and command for an external channel changing script. 
 +
 +
:<span style="color:SteelBlue">ChangerDevice</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: If "Internal" is used as the channel change script, the internal firewire changer will be used, and a ChangerDevice is required.  This is the GUID for the attached Firewire set top box.
 +
 +
:<span style="color:SteelBlue">ChangerModel</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: If "Internal" is used as the channel change script, the internal firewire changer will be used, and a ChangerModel is required, as defined in firewiredevice.cpp.
 +
 +
:<span style="color:SteelBlue">TuneChan</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: For coaxial inputs, it may be necessary to set the tuned channel to 3 or 4, and rely on the external device to perform tuning.
 +
 +
:<span style="color:SteelBlue">StartChan</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: Tune to this channel the next time the backend starts.  This value is updated when the user uses LiveTV.
 +
 +
:<span style="color:SteelBlue">DisplayName</Span> ('''Optional''')
 +
:: '''Parameter Type:''' String
 +
:: The "User Friendly" name for a card input, like "My HD-PVR" or "HDHomeRun Prime 1".
 +
 +
:<span style="color:SteelBlue">DishnetEIT</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Boolean
 +
:: Enable the use of long-term EIT data if using a DVB-S tuner and Dish Network.
 +
 +
:<span style="color:SteelBlue">RecPriority</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: A recording priority modification for this card input.
 +
 +
:<span style="color:SteelBlue">Quicktune</Span> ('''Optional''')
 +
:: '''Parameter Type:''' Integer
 +
:: Use quick tuning (on devices which accept it). ''0 = never, 1 = Live TV Only, 2 = Always''
 +
 +
Example Query:
 +
 +
<code>http://BackendServerIP:6544/Capture/AddCardInput?CardId=1&SourceId=1&InputName=MPEG2TS&DisplayName=My%20Source</code>
 +
 +
Example Return:
 +
 +
Integer return.  Returns the cardinputid if successfully created, -1 if card creation failed.
 +
 +
<pre><int>1</int></pre>
 +
 +
==UpdateCardInput==
 +
 +
The <span style="color:LimeGreen">UpdateCardInput</span> API takes the following arguments:
 +
 +
:<span style="color:SteelBlue">CardInputId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 +
:: The card input id you wish to modify.
 +
 +
:<span style="color:SteelBlue">Setting</Span> ('''Required''')
 +
:: '''Parameter Type:''' String
 +
:: The database column you wish to modify for the card input.
 +
 +
:<span style="color:SteelBlue">Value</Span> ('''Required''')
 +
:: '''Parameter Type:''' String or Integer
 +
:: The new value for the database field.
 +
 +
Example Query:
 +
 +
<code>http://BackendServerIP:6544/Capture/UpdateCardInput?CardId=1&Setting=externalcommand&Value=/usr/bin/6200ch</code>
 +
 +
Example Return:
 +
 +
Boolean return.  Returns true if the value was modified, false if the change failed.
 +
 +
<pre><bool>true</bool></pre>
 +
 +
==RemoveCardInput==
 +
 +
The <span style="color:LimeGreen">RemoveCardInput</span> API takes the following arguments:
 +
 +
:<span style="color:SteelBlue">CardInputId</Span> ('''Required''')
 +
:: '''Parameter Type:''' Integer
 +
:: The database card input ID for the input you are deleting.
 +
 +
Example Query:
 +
 +
<code>http://BackendServerIP:6544/Capture/RemoveCardInput?CardInputId=3</code>
 +
 +
Example Return:
 +
 +
Boolean return.  Returns true if the input was removed from the database, false if the delete failed.
 +
 +
<pre><bool>true</bool></pre>
 +
 +
[[Category:Services_API]]

Revision as of 11:45, 19 July 2013

What is this?

See Services API


Capture Service API List

API Command POST Required? Description
GetCaptureCardList No Get a list of configured capture devices globally, on a certain host, or of a certain type.
GetCaptureCard No Get info on a specific capture device, by card id.
AddCaptureCard Yes Add a brand new capture device to the database.
UpdateCaptureCard Yes Change a specific setting value for a specific capture device.
RemoveCaptureCard Yes Remove a particular capture device from the database, by card id.
AddCardInput Yes Add a new card input to the database, and associate it with a video listings source.
UpdateCardInput Yes Change a specific setting value for a specific card input id.
RemoveCardInput Yes Remove a particular card input from the database, by card input id.

Capture APIs

GetCaptureCardList

The GetCaptureCardList API takes the following arguments:

HostName (Optional)
Parameter Type: String
The backend host name you wish to see a capture card list for.
CardType (Optional)
Parameter Type: String
Filter results by a particular capture card type (HDHOMERUN, DEMO, etc.)

Example Query:

http://BackendServerIP:6544/Capture/GetCaptureCardList?HostName=localhost&CardType=HDHOMERUN

Example Return:

<CaptureCardList version="1.0" serializerVersion="1.1">
    <CaptureCards>
        <CaptureCard>
            <CardId>3</CardId>
            <VideoDevice>13100674-0</VideoDevice>
            <AudioDevice></AudioDevice>
            <VBIDevice></VBIDevice>
            <CardType>HDHOMERUN</CardType>
            <DefaultInput>MPEG2TS</DefaultInput>
            <AudioRateLimit>0</AudioRateLimit>
            <HostName>localhost</HostName>
            <DVBSWFilter>0</DVBSWFilter>
            <DVBSatType>0</DVBSatType>
            <DVBWaitForSeqStart>true</DVBWaitForSeqStart>
            <SkipBTAudio>false</SkipBTAudio>
            <DVBOnDemand>false</DVBOnDemand>
            <DVBDiSEqCType>0</DVBDiSEqCType>
            <FirewireSpeed>0</FirewireSpeed>
            <FirewireModel></FirewireModel>
            <FirewireConnection>0</FirewireConnection>
            <SignalTimeout>1000</SignalTimeout>
            <ChannelTimeout>3000</ChannelTimeout>
            <DVBTuningDelay>0</DVBTuningDelay>
            <Contrast>0</Contrast>
            <Brightness>0</Brightness>
            <Colour>0</Colour>
            <Hue>0</Hue>
            <DiSEqCId>0</DiSEqCId>
            <DVBEITScan>true</DVBEITScan>
        </CaptureCard>
    </CaptureCards>
</CaptureCardList>

GetCaptureCard

The GetCaptureCard API takes the following arguments:

CardId (Required)
Parameter Type: Integer
The database card ID for the device you want informaion for.

Example Query:

http://BackendServerIP:6544/Capture/GetCaptureCard?CardId=3

Example Return:

<CaptureCard>
    <CardId>3</CardId>
    <VideoDevice>13100674-0</VideoDevice>
    <AudioDevice></AudioDevice>
    <VBIDevice></VBIDevice> 
    <CardType>HDHOMERUN</CardType>
    <DefaultInput>MPEG2TS</DefaultInput>
    <AudioRateLimit>0</AudioRateLimit>
    <HostName>localhost</HostName>
    <DVBSWFilter>0</DVBSWFilter>
    <DVBSatType>0</DVBSatType>
    <DVBWaitForSeqStart>true</DVBWaitForSeqStart>
    <SkipBTAudio>false</SkipBTAudio>
    <DVBOnDemand>false</DVBOnDemand>
    <DVBDiSEqCType>0</DVBDiSEqCType>
    <FirewireSpeed>0</FirewireSpeed>
    <FirewireModel></FirewireModel>
    <FirewireConnection>0</FirewireConnection>
    <SignalTimeout>1000</SignalTimeout>
    <ChannelTimeout>3000</ChannelTimeout>
    <DVBTuningDelay>0</DVBTuningDelay>
    <Contrast>0</Contrast> 
    <Brightness>0</Brightness>
    <Colour>0</Colour>
    <Hue>0</Hue>
    <DiSEqCId>0</DiSEqCId>
    <DVBEITScan>true</DVBEITScan>
</CaptureCard>

AddCaptureCard

The AddCaptureCard API takes the following arguments:

VideoDevice (Required)
Parameter Type: String
The device path (/dev/video1) or device string (12345678-0) used to address the device.
CardType (Required)
Parameter Type: String
The capture card type being created (HDHOMERUN, DEMO, etc.).
DefaultInput (Required)
Parameter Type: String
The default physical input for the device being created (Component, MPEG2TS, Television, etc.).
HostName (Required)
Parameter Type: String
The backend hostname which houses this new capture device.
AudioDevice (Optional)
Parameter Type: String
The device path (/dev/dsp) or device string (ALSA:input) used to address the audio capture device. Usually only useful for framegrabber cards.
VBIDevice (Optional)
Parameter Type: String
The device path (/dev/vbi1) used for VBI/CC capture. Usually only useful for a limited number of analog capture devices.
AudioRateLimit (Optional)
Parameter Type: Integer
The maximum audio sampling rate for captured audio. Usually only useful for framegrabber cards.
SkipBTAudio (Optional)
Parameter Type: Boolean
Used only for quirky BT878 DVB cards to prevent the backend adjusting their volume.
DVBSWFilter (Optional)
Parameter Type: Integer
No longer used. Left as a parameter for legacy purposes.
DVBSatType (Optional)
Parameter Type: Integer
No longer used. Left as a parameter for legacy purposes.
DVBWaitForSeqStart (Optional)
Parameter Type: Boolean
Wait for the SEQ start header. Only useful for DVB capture devices.
DVBOnDemand (Optional)
Parameter Type: Boolean
Only open the capture device when used for recording or EIT. Allow other programs to access the device when not actively used. Enabling can cause recording issues if multiple applications contend for the same device.
DVBDiSEqCType (Optional)
Parameter Type: Integer
No longer used. Left as a parameter for legacy purposes.
FirewireModel (Optional)
Parameter Type: String
The model of the firewire device, as defined in firewiredevices.cpp. Used to determine which AVC command set to use when changing channels and capturing.
FirewireSpeed (Optional)
Parameter Type: Integer
Firewire speed to use. For firewire capture devices.
FirewireConnection (Optional)
Parameter Type: Integer
The Firewire communication method to use. For firewire capture devices.
SignalTimeout (Optional)
Parameter Type: Integer
Number of milliseconds to wait upon tuning a frequency before signal is found. If this timer expires, tuning has failed.
ChannelTimeout (Optional)
Parameter Type: Integer
Number of milliseconds to wait upon finding signal before the desired channel is found. If this timer expires, tuning has failed.
DVBTuningDelay (Optional)
Parameter Type: Integer
Workaround for quirky capture devices. Introduce a delay to the tuning process in milliseconds.
Contrast (Optional)
Parameter Type: Integer
Used to adjust picture attributes on capture for framegrabber capture devices.
Brightness (Optional)
Parameter Type: Integer
Used to adjust picture attributes on capture for framegrabber capture devices.
Colour (Optional)
Parameter Type: Integer
Used to adjust picture attributes on capture for framegrabber capture devices.
Hue (Optional)
Parameter Type: Integer
Used to adjust picture attributes on capture for framegrabber capture devices.
DiSEqCId (Optional)
Parameter Type: Integer
Cross reference this device with a DiSEqC tree found in the diseqc_config table.
DVBEITScan (Optional)
Parameter Type: Boolean
Permit this device to scan for EIT programming data (digital capture devices only).

Example Query:

http://BackendServerIP:6544//Capture/AddCaptureCard?VideoDevice=12345678-0&CardType=HDHOMERUN&DefaultInput=MPEG2TS&HostName=localhost&SignalTimeout=3000&ChannelTimeout=10000&DVBEITScan=0

Example Return:

Integer return. Returns the cardid of the card if successfully created, -1 if card creation failed.

<int>7</int>

UpdateCaptureCard

The UpdateCaptureCard API takes the following arguments:

CardId (Required)
Parameter Type: Integer
The cardid you wish to modify.
Setting (Required)
Parameter Type: String
The database column you wish to modify for the card.
Value (Required)
Parameter Type: String or Integer
The new value for the database field.

Example Query:

http://BackendServerIP:6544/Capture/UpdateCaptureCard?CardId=1&Setting=audiodevice&Value=ALSA:input

Example Return:

Boolean return. Returns true if the value was modified, false if the change failed.

<bool>true</bool>

RemoveCaptureCard

The RemoveCaptureCard API takes the following arguments:

CardId (Required)
Parameter Type: Integer
The database card ID for the device you are deleting.

Example Query:

http://BackendServerIP:6544/Capture/RemoveCaptureCard?CardId=3

Example Return:

Boolean return. Returns true if the device was removed from the database, false if the delete failed.

<bool>true</bool>

AddCardInput

Each configured capture card needs at least one card input to tie a video source and a capture device together.

The AddCardInput API takes the following arguments:

CardId (Required)
Parameter Type: Integer
The database card number this input belongs to.
SourceId (Required)
Parameter Type: Integer
The database video source number bound to this card input.
HostName (Required)
Parameter Type: String
The backend hostname where this card input is located.
InputName (Required)
Parameter Type: String
The text name of the input (Component, MPEG2TS, Television, etc.)
ExternalCommand (Optional)
Parameter Type: String
The path and command for an external channel changing script.
ChangerDevice (Optional)
Parameter Type: String
If "Internal" is used as the channel change script, the internal firewire changer will be used, and a ChangerDevice is required. This is the GUID for the attached Firewire set top box.
ChangerModel (Optional)
Parameter Type: String
If "Internal" is used as the channel change script, the internal firewire changer will be used, and a ChangerModel is required, as defined in firewiredevice.cpp.
TuneChan (Optional)
Parameter Type: String
For coaxial inputs, it may be necessary to set the tuned channel to 3 or 4, and rely on the external device to perform tuning.
StartChan (Optional)
Parameter Type: String
Tune to this channel the next time the backend starts. This value is updated when the user uses LiveTV.
DisplayName (Optional)
Parameter Type: String
The "User Friendly" name for a card input, like "My HD-PVR" or "HDHomeRun Prime 1".
DishnetEIT (Optional)
Parameter Type: Boolean
Enable the use of long-term EIT data if using a DVB-S tuner and Dish Network.
RecPriority (Optional)
Parameter Type: Integer
A recording priority modification for this card input.
Quicktune (Optional)
Parameter Type: Integer
Use quick tuning (on devices which accept it). 0 = never, 1 = Live TV Only, 2 = Always

Example Query:

http://BackendServerIP:6544/Capture/AddCardInput?CardId=1&SourceId=1&InputName=MPEG2TS&DisplayName=My%20Source

Example Return:

Integer return. Returns the cardinputid if successfully created, -1 if card creation failed.

<int>1</int>

UpdateCardInput

The UpdateCardInput API takes the following arguments:

CardInputId (Required)
Parameter Type: Integer
The card input id you wish to modify.
Setting (Required)
Parameter Type: String
The database column you wish to modify for the card input.
Value (Required)
Parameter Type: String or Integer
The new value for the database field.

Example Query:

http://BackendServerIP:6544/Capture/UpdateCardInput?CardId=1&Setting=externalcommand&Value=/usr/bin/6200ch

Example Return:

Boolean return. Returns true if the value was modified, false if the change failed.

<bool>true</bool>

RemoveCardInput

The RemoveCardInput API takes the following arguments:

CardInputId (Required)
Parameter Type: Integer
The database card input ID for the input you are deleting.

Example Query:

http://BackendServerIP:6544/Capture/RemoveCardInput?CardInputId=3

Example Return:

Boolean return. Returns true if the input was removed from the database, false if the delete failed.

<bool>true</bool>