The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

TV Pack (Fiji) breaks the addins

Last post 1 hour, 36 minutes ago by andersswe. 28 replies.
Page 1 of 2 (29 items)   1 2 Next >
Sort Posts: Previous Next
  •  08-23-2008, 2:19 PM 8204

    TV Pack (Fiji) breaks the addins


    Hi,

    I installed TV Pack to check because I add feedback on my plugin so that it wouldn't work anymre, and this is true : it does not work anymore.

    First : the addin does not appear anymore in the more with this menu of the video section. What could have changed ?

    Secondly : I have a background addin (which is alsways active in wait state, based on the code from Stephen Toub) that does not receive the current MediaExperience anymore from the addinhost class.

    Any help will be very appreciated

    Regards,

    Damien BT (http://damienbt.free.fr)
  •  08-23-2008, 9:20 PM 8206 in reply to 8204

    Re: TV Pack (Fiji) breaks the addins

    There were some rather fundamental changes to the playback architecture which required some plumbing changes in the API level. Before this, MediaExperience would always be non-null even if the underlying objects were in fact null. This changed in the Media Center TV Pack -- if the underlying object is null then MediaExperience will also be null.
  •  08-24-2008, 12:15 AM 8208 in reply to 8206

    Re: TV Pack (Fiji) breaks the addins

    I understand that MediaExperience will be null if underlying objects are, but here this is not the case : I have a video playing, and MediaExperience is still null.

    Maybe this is due to the fact that I am in a background addin in which I put the Launch method into wait state (like in the positionchangeraddin from Stephen Toub) ?

    How could I retrieve the current experience (video playing with its name) ? (and without passing through the media state aggregation service which is gives information at one time)

    Thanks

    Regards,

    Damien
  •  08-24-2008, 12:30 PM 8213 in reply to 8208

    Re: TV Pack (Fiji) breaks the addins

    I've reported this umpteen times already, directly via email, via the Fiji beta program feedback links, as well as mentioned it several times here in the forums - all to no avail as noone has bothered replying to my emails, the feedback on the beta program I was enrolled in is non-public (so I can't see comments/resolutions) and they seem to get lost in the noise here on the forums.

    So once again; MediaExperience - which I had working fine earlier in the year is somehow broken. I can replicate this issue almost at will now.

    Start playback of a mediafile and check any of the MediaExperience members for a value. This will work great the first time you perform this action and indeed will continue to work great as long as the mediafile is playing. Stop the file however and wait 60+ seconds before starting another one - polling data from any of the ME objects will fail completely.

  •  08-25-2008, 12:49 AM 8216 in reply to 8213

    Re: TV Pack (Fiji) breaks the addins

    This sounds like a fairly serious bug - if MediaExperience is null even when something is playing you can't get a Transport object so you can't control playback at all, let alone know what is playing.  This means no bookmarking, metadata, program controlled pause/play, etc.  This has the potential to break all apps that control Media Center externally to some extent.

    Cheers,
    Andrew

  •  08-25-2008, 5:49 AM 8220 in reply to 8216

    Re: TV Pack (Fiji) breaks the addins

    There's also a host of other subtle issues with the TV Pack. I was lucky enough to get access to a machine with it legitimately installed today, and three things became immediately apparent:

    1. The security context for extenders is subtly different.
    2. If your IAddInEntryPoint.Launch implementation exits without a page navigation having occurred the application is closed (it used to be you could defer this).
    3. The extender context seems to exhibit a greater degree of divergence from the local context (event firing order and capture, among other things).

    I look forward to the updated documentation for all of the changes.
  •  08-25-2008, 7:30 AM 8228 in reply to 8220

    Re: TV Pack (Fiji) breaks the addins

    I think that the problems are related :

    Problem #1 : Start a video => Access to MediaExperience OK. Wait, start a second video => MediaExperience is null

    Problem #2 : If you don't launch a MCML page in the Launch method you loose the access.

    About 60 seconds after the entering in the Launch method the MediaExperience is released by Media Center if no page is loaded (whereas before as long as the Launch method was not exited you still had access to it).

    So it makes all the background addins useless.

    Another issue : the entry points are no more visible in the video/tv/audio sections (with the Info button > More...) where you could define them. You have to go into the program library.

    I am seriously thinking about leaving MS Media Center development for more opened projects such as Media Portal...

    Too bad, because until now Microsoft did some good job to open customization (on the interface actually, the customization concerning the media experience has always been limited)
  •  08-25-2008, 10:13 AM 8234 in reply to 8228

    Re: TV Pack (Fiji) breaks the addins

    Please continue to list the issues you have with the Media Center TV Pack here. Links to the minimal amount of code / markup which reproduces the issue is very helpful.

  •  08-25-2008, 10:33 AM 8237 in reply to 8234

    Re: TV Pack (Fiji) breaks the addins

    Untitled
    Well, here is the code that I am using : as you can see I initialize a ManualResetEvent to put the tread into wait state.
    Another thread is instanciated to receive keyboard hooks. With this code, and I know that several Media Center plugins are based on this (code has been written by Stephen Toub from MS when he posted the code of its addin PositionChangerAddin),
    you will realize that after a while you loose access to the MediaExperience data.



    public
    void Launch(AddInHost host) { // Store the host for use during this session _host = host; try { // Initialization code ... // When Launch returns, the add-in is unloaded, so use an MRE to keep it around until // MCE says it's time to uninitialize, at which point the MRE will be set and this will exit. using (_waitForExit = new ManualResetEvent(false)) { using (_timer = new System.Threading.Timer(new TimerCallback(UserEntryTimeout), null, Timeout.Infinite, Timeout.Infinite)) { logger.Log(Level.Debug, "Initializing the remote control or/and keyboard hooks...", null); // Install a keyboard hook for the process _waitForExit.WaitOne(); } } } catch (Exception e) { logger.Log(Level.Error, "Error in the background addin", e); } }

    Regards,

    Damien BT
  •  08-25-2008, 6:10 PM 8241 in reply to 8237

    Re: TV Pack (Fiji) breaks the addins

    Not broken, however changed behaviour:

    Previously if you registered an AddIn in the "Services\News" category it would appear in the "news+sports" category in the program library. Now it will also spawn a "Sports" start menu item.

    I've heard that regions who previously had the "Sports" start menu item were already seeing this, however I know from experience that regions that didn't receive that category didn't see this behaviour.

  •  08-26-2008, 10:27 AM 8258 in reply to 8241

    Re: TV Pack (Fiji) breaks the addins

    BUG: Had to setup a timer to poll PlayState to get PlayMedia to work if playing a second video after ~15min of playing first video from addin.

    This one was fun. From your addin play a video mediatype. Wait ~15min. Play another video from the same addin. VMC will crash the addin even when wrapped in a try/catch.

    Sounds like it is related to the previous bug in propertychanged.

  •  08-28-2008, 10:16 PM 8292 in reply to 8258

    Re: TV Pack (Fiji) breaks the addins

    BUG: ReturnToApplication does not return to application when in fullscreen video.

     

    if (host.MediaCenterEnvironment.MediaExperience.IsFullScreen)

    {

    host.ApplicationContext.ReturnToApplication();

    }

  •  08-31-2008, 11:07 AM 8304 in reply to 8292

    Re: TV Pack (Fiji) breaks the addins

    Another bug : Media State service does not work properly.

    Some of the events do not reach the sink :

    To reproduce, play 2 videos : video A, and video B
    1/ Play video A : video A (the first being played) appears in the events
    2/ Stop video A and play video B : video B does not appear in the events
    3/ Stop video B and play video A again : video A appears again in the events

    I used the mediastate.dll provided by Microsoft's sdk.

  •  09-03-2008, 11:06 AM 8313 in reply to 8206

    Re: TV Pack (Fiji) breaks the addins

    Charlie:
    There were some rather fundamental changes to the playback architecture which required some plumbing changes in the API level. Before this, MediaExperience would always be non-null even if the underlying objects were in fact null. This changed in the Media Center TV Pack -- if the underlying object is null then MediaExperience will also be null.


    While [probably] technically correct this statement is somewhat misleading.  There are cases where the MediaExperience should not be null but always is, like when watching Recorded TV. 
  •  09-03-2008, 2:41 PM 8317 in reply to 8234

    Re: TV Pack (Fiji) breaks the addins

    Charlie:

    Please continue to list the issues you have with the Media Center TV Pack here. Links to the minimal amount of code / markup which reproduces the issue is very helpful.

    Hi Charlie!

    Are your intention to actually fix bugs reported in this thread?

    I know for sure that some bugs related to MediaExperience was reported in the beta group of TV Pack 2008. But it seems like the ehome team are unwilling to respond.

    Basicly every type of video library add-in are broken now cause of this. And patience are running a bit low in the developing community.

Page 1 of 2 (29 items)   1 2 Next >
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems