Difference between revisions of "Capture Service"
From MythTV Official Wiki
Iamlindoro (talk | contribs) |
Iamlindoro (talk | contribs) |
||
Line 49: | Line 49: | ||
:<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 102: | ||
:<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 141: | ||
</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: | ||
+ | |||
+ | Simple integer return. Returns the cardid of the card if successfully created, -1 if card creation failed. | ||
+ | |||
+ | <pre><int>7</int></pre> |
Revision as of 16:41, 2 October 2011
Contents
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:
Example Return:
Simple integer return. Returns the cardid of the card if successfully created, -1 if card creation failed.
<int>7</int>