SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-28-2006, 02:54 PM
beelzerob beelzerob is offline
Sage Advanced User
 
Join Date: May 2006
Posts: 163
Console outputting, and stopping playback via the API.

Is there some way to capture the console output into a file, especially without having to go into the registry to enable the console? I'm assuming that System.out messages in java go SOMEWHERE and can be captured and output even if the console isn't visible.

Also, what is the api call to stop playback of a media file? I can find Play() and Pause() easy enough...but no stop(). I am currently using CloseAndWaitUntilClosed(). However, this doesn't have the same effect as clicking the Stop button in the media player. When I click stop, it takes me back to the video selection menu. When I stop via the CloseAndWaitUntilClosed() api call, it just turns the screen blank...then I have to hit escape to bring up a menu, and from that menu I choose "Halt playback", and then I get the menu. So, maybe I'm not using the right api call to stop playback?

Thanks for all the help!
Reply With Quote
  #2  
Old 07-28-2006, 03:06 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by beelzerob
Also, what is the api call to stop playback of a media file? I can find Play() and Pause() easy enough...but no stop(). I am currently using CloseAndWaitUntilClosed(). However, this doesn't have the same effect as clicking the Stop button in the media player. When I click stop, it takes me back to the video selection menu. When I stop via the CloseAndWaitUntilClosed() api call, it just turns the screen blank...then I have to hit escape to bring up a menu, and from that menu I choose "Halt playback", and then I get the menu. So, maybe I'm not using the right api call to stop playback?
CloseAndWaitUntilClosed() is what is called when you use the Stop command during playback, but the STV then executes additional code after that to determine what to do after playback stops. I'm not sure how you are doing this, but perhaps you could just try sending the Stop command via SageCommand().

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 07-28-2006, 03:15 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by beelzerob
Is there some way to capture the console output into a file, especially without having to go into the registry to enable the console? I'm assuming that System.out messages in java go SOMEWHERE and can be captured and output even if the console isn't visible.
If you set debug_logging=TRUE in your properties file, all of Sage's debug output (including calls to DebugLog()) gets logged to a file.

But if you want a log of just your own debug output, open a PrintWriter onto a file and use that instead of System.out or DebugLog().
__________________
-- Greg
Reply With Quote
  #4  
Old 07-28-2006, 03:56 PM
beelzerob beelzerob is offline
Sage Advanced User
 
Join Date: May 2006
Posts: 163
Quote:
Originally Posted by Opus4
CloseAndWaitUntilClosed() is what is called when you use the Stop command during playback, but the STV then executes additional code after that to determine what to do after playback stops. I'm not sure how you are doing this, but perhaps you could just try sending the Stop command via SageCommand().

- Andy
All I'm doing in my java to execute the CloseAndWaitUntilClosed() command is:

sage.SageTV.api("CloseAndWaitUntilClosed", null);

I don't know how I'd tell it what to do next. However, that all sounds moot since I can use the Sagecommand() for this. Where is a list of valid commands? I can guess "Stop" is one of them, but who knows what else might prove useful!

Gkusnik, thanks...that's exactly what I wanted.
Reply With Quote
  #5  
Old 07-28-2006, 04:32 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by beelzerob
Where is a list of valid commands? I can guess "Stop" is one of them, but who knows what else might prove useful!
As far as I know, the command name text you would use for that call is the same text listed in Detailed Setup -> Commands -> Link Command. All commands are listed there.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #6  
Old 07-28-2006, 04:51 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by beelzerob
Where is a list of valid commands?
P. 198 of the manual. (I can't believe Andy didn't say that.)
__________________
-- Greg
Reply With Quote
  #7  
Old 07-28-2006, 04:58 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
I referenced the commands in the SageTV UI because that should be the actual text to use with SageCommand(), in case I wrote any of them slightly differently in the manual.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #8  
Old 07-28-2006, 05:12 PM
beelzerob beelzerob is offline
Sage Advanced User
 
Join Date: May 2006
Posts: 163
Well, either way Stop appears to be Stop. thanks a lot. Looks like most other commands I can probably just use a direct api call, but that Stop command had me stumped.
Reply With Quote
  #9  
Old 07-29-2006, 02:09 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
if you want to manually call 'CloseFileAndWaitUntilClosed()' then call the code that goes back to the appropriate screen (as 'stop' is sometimed used for other things, like backspace when inputting NTE), then search and link the action tree labled:

"Return to menu where media may have come from"

(which should be in Stop listener in MediaPlayerOSD)
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #10  
Old 08-02-2006, 04:29 PM
beelzerob beelzerob is offline
Sage Advanced User
 
Join Date: May 2006
Posts: 163
Well, I went with the SageCommand("Stop"), and it works just great...just like hitting Stop manually. That works for me!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.