|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Having trouble handling what an api call returns...
I've written a little java program, and what I'm trying to get it to do (as a test), is return the list of active encoding devices, via the "GetActiveCaptureDevices" api call. All I want to do is output the result to the system I/O (the Sage console window).
The file compiles, and runs fine up to this point: System.out.println(FileList[0]); The FileList is a result of: String[] FileList = (String[])sage.SageTV.api("GetActiveCaptureDevices", null); The error I get is very generic, and I'm not sure why my catch doesn't catch it. It just says "Exception in thread..." Basically, it doesn't like me treating it like an array of strings. Things I think I might be doing wrong: It could be returning a NULL if it doesn't think there are any active capture devices, though I've verified there are. I've compiled the .java file into a .class file, and it is run by Sage on startup. I get other system I/O message out fine. Any suggestions? |
#2
|
|||
|
|||
Quote:
Code:
System.out.println(FileList[0]); Code:
if (FileList.length > 0) { System.out.println(FileList[0]); } else { System.out.println("No active encoders found"); } |
#3
|
|||
|
|||
Doh!
It did show up as no encoders found, even though I could find one listed in the Setup screen. However, what I actually had is the Faker capture card (for development), and what I had failed to do was launch the java null encoder program first. So I did it this time, and NOW it's listed as Faker on etc. etc. Thanks! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|