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
  #21  
Old 08-05-2011, 12:34 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by jpaddock3000 View Post
Kind of a novice here. Would this be a good way to go about waiting for the media player to be fully loaded?

Code:
if (eventName.startsWith("PlaybackStarted")) {
   if (sagex.api.MediaFileAPI.IsDVD(MediaFile)) {
      Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: DVDPlaybackStarted");
      while (!sagex.api.MediaPlayerAPI.IsMediaPlayerFullyLoaded()) {
         Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: DVDPlaybackStarted: Waiting for DVD to load");
      }
   }
}
Family is watching TV at the moment, so I'm not going to be able to test until tonight.

Thanks in advanced!
IIRC you will need to specify the UIContext in the IsMediaPlayerFullyLoaded() and then again in the api's to set the title and chapter. When you look at the api's available for DVD titles and chapters I think you will see there is no way to set it to chapter(x) and/or title(y). You need to check where you're at and move to the next title and/or chapter. I forget the details off the top of my head but I do recall that after looking at these complications I decided to put the code to set the title and chapter in the watch() api because it was a lot easier.

If you do decide to keep the code in the sageEvent don't forget to take out the code I have in the watch() api.
__________________

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.
Reply With Quote
  #22  
Old 08-06-2011, 11:33 PM
jpaddock3000 jpaddock3000 is offline
Sage Aficionado
 
Join Date: Dec 2006
Location: San Diego, CA
Posts: 341
Quote:
Originally Posted by tmiranda View Post
IIRC you will need to specify the UIContext in the IsMediaPlayerFullyLoaded() and then again in the api's to set the title and chapter. When you look at the api's available for DVD titles and chapters I think you will see there is no way to set it to chapter(x) and/or title(y). You need to check where you're at and move to the next title and/or chapter. I forget the details off the top of my head but I do recall that after looking at these complications I decided to put the code to set the title and chapter in the watch() api because it was a lot easier.

If you do decide to keep the code in the sageEvent don't forget to take out the code I have in the watch() api.
Tom,
Turns out that I don't need to worry about the current chapter as I'm able to perform a seek and that will automatically adjust the chapters. You are correct from what I can tell about Title's though. It seems very odd that there isn't a setDVDTitle API call.
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII),
Clients - 2 x HD-300, 3 x MediaMVP
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video Length ddaggett1 SageTV Beta Test Software 6 03-01-2011 12:54 PM
Buffer Max Length and Duration? ktuimala SageTV Software 2 07-23-2009 10:48 PM
Favorites by length of show? wayner SageTV Software 1 01-12-2009 02:47 AM
Ethernet Cable length viperdiablo SageTV Media Extender 10 06-13-2008 12:21 AM
HAVA content - 16:9 content is letter and pillar boxed by sage dwalton22 SageTV Software 14 10-16-2007 08:57 AM


All times are GMT -6. The time now is 12:57 PM.


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