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 06-06-2006, 09:49 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Question about MediaPlayerFileLoadComplete hook

OK here is what I've seen and maybe this is normal - don't know. This was on a 5.0.4 Server and Client.

When Client is first opened and a video is selected from the library the MediaPlayerFileLoadComplete hook is apparently only called once on the first file to play - FullyLoaded is true so evidentally this is suppose to be the second call. All other video playback requests after that before exiting the Client appear to call the MediaPlayerFileLoadComplete hook 2 times like I would expect. Is this normal?

Now to the really weird:
Occasionally it is never called or at least not with FullyLoaded as true or false anyway. This can't be normal can it? I added another DebugLog out side of the 'If FullyLoaded' (see below) to see if it was executed with FullyLoaded equal to neither true or false but no luck yet - it always takes the true branch so far.

FYI: The IF I had looked similar to this (but I also included a graphic of the code as well):

Code:
DebugLog("Always Executed")   <---This is what was added after weirdness above.
If FullyLoaded
   true
      DebugLog("FullyLoaded=true")
   false
      DebugLog("FullyLoaded=false")
Edit: Opps should have specified which hook I'm using since there is one at the root level as well as in the MediaPlayer OSD menu. I was using the MediaPlayer OSD menu one. Also I just tried an experiment and copied the code to the root level one and now it appears to be working as expected except for one thing when I do that the code in the MediaPlayer OSD menu isn't executed at all now. (included a graphic of that code now as well)
Attached Images
File Type: jpg MediaPlayerFileLoadComplete-Code.JPG (28.0 KB, 263 views)
File Type: jpg MediaPlayerFileLoadComplete-Code2.JPG (72.0 KB, 315 views)

Last edited by BobPhoenix; 06-06-2006 at 11:05 PM.
Reply With Quote
  #2  
Old 06-07-2006, 12:28 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
A hook in a menu fires only if that menu is active. If the active menu does not have a hook of the right type, it falls through to the root-level hook of that type (if any). So you can't just put code in the OSD menu hook and expect it to catch all cases. You need to cover the fall-through case as well, for when some other menu is displayed.
__________________
-- Greg
Reply With Quote
  #3  
Old 06-07-2006, 06:30 AM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Thank you. That's what I thought especially after I realized that the media player load process is started before the MediaPlayer OSD menu is launched. This explains why the hook sometimes only gets called on the second call or not at all - it's already been through the process before the menu is displayed.

BobP.
Reply With Quote
  #4  
Old 06-21-2006, 01:44 AM
alon24 alon24 is offline
Sage Aficionado
 
Join Date: Jun 2004
Posts: 351
Is that true for a listener too?
I need to listen to the Custom2 event, from the second the application starts(in order to do forcedEpgUpdate).

Where should I place my event listener?
__________________
Server
SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1
Client
SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1

Using Nielm's Web server 2.22
Reply With Quote
  #5  
Old 06-21-2006, 02:36 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
The processing chain of events for a listener is described on p. 30 of the v5 Studio PDF manual; depending on the code, one or more listeners may be fired for a command. If you don't already have that document, it can be found in the stickies of this forum section. As it says there, you'll want to use a theme named "Global" (also see p. 51), but if the listener is also handled elsewhere in some menu, that Global listener may never be reached -- again, depending on the code in the listener's child widget tree.

- 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 06-21-2006, 07:11 AM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by Opus4
The processing chain of events for a listener is described on p. 30 of the v5 Studio PDF manual; depending on the code, one or more listeners may be fired for a command. If you don't already have that document, it can be found in the stickies of this forum section. As it says there, you'll want to use a theme named "Global" (also see p. 51), but if the listener is also handled elsewhere in some menu, that Global listener may never be reached -- again, depending on the code in the listener's child widget tree.

- Andy
This leads me to ask this question then and maybe it is in the manual but I don't remember it. Which would get executed first the listener loaded directly under the menu or the listener in the menu's theme - the Album theme for instance? I suspect it is the listener directly loaded in the menu.

BobP.
Reply With Quote
  #7  
Old 06-21-2006, 08:03 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
The best way to see if one or both of the listeners would be called in such a situation would be to make sure they both use PassiveListen() at some point, then put a debugging breakpoint under both listeners. Afer passing the first breakpoint, use Resume & see if it stops at the next one.

- 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 06-21-2006, 02:24 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by Opus4
The best way to see if one or both of the listeners would be called in such a situation would be to make sure they both use PassiveListen() at some point, then put a debugging breakpoint under both listeners. Afer passing the first breakpoint, use Resume & see if it stops at the next one.

- Andy
I'll try that next time I get a chance.

Thanks.
BobP.
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 09:10 AM.


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