|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
SageAPI question - find active CaptureDevice?
How do i find if a specified Capture Device is currently recording a file? There is IsCaptureDeviceInUseByALiveClient but that seems to only apply to LiveTV. Or would i have to look for a null value for GetCaptureDeviceCurrentRecordFile?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#2
|
|||
|
|||
That sounds about right. If null, it's not recording, else it is currently recording something.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#3
|
||||
|
||||
Quote:
I'd also suggest looking in the default STV where it displays the System Information because one of the things it shows is the status of each capture device. Last thought, I'm not sure what you are doing but you may need to make sure the capture device is actually configured because the API that returns all of the capture devices will do just that, even if the device is not configured. (If you try to use a non-configured capture device it won't work.) I'm going from memory on this one as well so caveat emptor.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#4
|
|||
|
|||
Thanks Tom. What I am trying to do is to fix a problem that occurs when one of my STBs is powered down and I just get "black" recordings. This tuner is my SD digital cable encoder and is pretty much only used for kids' shows on channels like TreehouseTV (the Canadian version of Nickelodeon) or DisneyJr Canada that are cable only and not available in HD. Occasionally the box gets powered down - usually from something that happens at the headend by the cable company, or a power outage at my house (although it is on a UPS). Sometimes there will be a dozen or so black screen recordings before I notice (or someone tells me) that there is a problem.
The cable box is a SA3200. Unlike my HD boxes this box cannot be configured to "power on" in the event that it receives a channel change. Also, as far as I can determine (and I have done a lot of searching on this), there is no discrete PowerOn command for the box, just a PowerToggle. Therefore using something like STBKeepAlive may do more harm than good since it may shut the box down and cause the exact problem that I am trying to solve. So what I want to do is for all recordings where Encoder="Hauppauge 885 Video Capture" is to run them through Comskip with verbosity=1. I will then take the Comskip log file and parse it for fields like "Average Brightness" or "Dominant Aspect Ratio". If Average Brightness is very low and Dominant Aspect Ratio = 0 then it is likely that the recording occured with a powered off STB. In this event I will trigger a system message and which (via SageAlert) will notify me via an email and/or Twitter. If I want to try to have Sage automatically correct this fault then I can have it send a PowerToggle command to the box. Then I would create a short (say 5 min) manual recording and run this through the above process to determine whether the fault condition was fixed. The reason to look to see if an encoder was active is that I may not want to create a manual recording if Sage is using that encoder. But now that I think about it, if the encoder isn't working then how much harm can it do. The second issue would be that if te encoder is active then I would have to worry about conflicts and Sage tyring to use another encoder. On a related note - why doesn't the Sage MediaFile API have a call to tell you what the MediaEncoder is for a file? There is MediaFile.GetMediaFileEncoding but that combines the encoder and quality settings and gives you something like "Hauppauge WinTV 885 Video Capture Great" or "Hauppauge HD PVR Capture Device #2 Great-H.264".
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#5
|
||||
|
||||
Fancy stuff you're doing, I like it.
I have no idea why the encoding information is presented like it is. The only option you have is to parse the string. Edit: I'd have to look it up but I think there is another way to get the encoding. We had to get that info for the Boxee client so that code will show how it's done.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dumb Question, but can't find answer anywhere I looked.... | Beefcake550 | Diamond | 6 | 03-21-2011 08:28 PM |
DOS BAT Question (Find Movies) | joe123 | General Discussion | 4 | 07-07-2007 05:38 PM |
access SageAPI from standalone application | matrix35 | SageTV Studio | 16 | 02-21-2007 03:09 PM |
CaptureDevice question | drin | SageTV Studio | 0 | 05-17-2006 11:22 PM |
stupid question- where do I find version number? | buzzerbee | SageTV Software | 4 | 03-18-2005 02:49 PM |