INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Suspect MC COM API for PlayOrShow  (Read 1910 times)

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Suspect MC COM API for PlayOrShow
« on: December 16, 2004, 04:36:42 am »

Hi There

I'm new to Media Center and have spent the last week playing with the 30 day trials. So far I love it but have encountered a serious error when attempting to integrate with NetRemote.

I've posted the issue at NR forums and through a process of elimination, have been advised that the problem most likely resides with Media Centers implementation of the PlayOrShow command.

The relevant NR thread is here: http://www.promixis.com/phpBB2/viewtopic.php?p=107287#107287

In summary;

My music library comprises exclusively AAC encoded files originally imported via iTunes. When I browse my library in NetRemote and issue a PLAY command to start playback of an Album, playback of the first track starts OK but a subsequent click on the Next Track button in NetRemote will cause MC to freeze.

If I issue the same PLAY command on the same album from within MC, track navigation works fine in NetRemote.

Therefore, we have concluded that the issue of the PlayORShow command on AAC files from NetRemote to MC will cause NetRemote to crash on subsequent track navigation.

This problem is exclusive to AAC files. I ripped a CD as APE and the problem did not present. However, I have a LOT of files encoded as AAC and really don't want to have to rip my entire CD collection again :-(

NR people say there may be a difference in the internal and published MC COM API for the PlayORShow command. Is this the case? Anything else I can check out?

Problem exists in current versions of MC 10 and 11 and with all tested version of NetRemote with a variety of CCFs.

Any help appreciated.

Peter


Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42028
  • Shoes gone again!
Re: Suspect MC COM API for PlayOrShow
« Reply #1 on: December 16, 2004, 10:36:21 am »

PlayOrShow(...) does the same thing as if you started playback with MC's play button.  Can you duplicate a crash using only Media Center? (not controlled with NR)

Thanks.
Logged
Matt Ashland, JRiver Media Center

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Suspect MC COM API for PlayOrShow
« Reply #2 on: December 16, 2004, 10:53:58 am »

No

That's the odd thing.

If in NR I issue the PLAY command on an album dropdown in the library, MC commences playing the first track but a click on NR  NEXT TRACK button will casue MC to freeze necessitating a force quit.

If, however, I issue the PLAY command on an album dropdown in MC library (right mouse click), NR can skip tracks fine.

Also, if I choose ADD on the album dropdown in NR, I can similarily skip tracks with no error.

This behaviour led me to suspect the issue was with NR so I posted there first. You can see the discussion in the link above.

Note again, only happens with AAC encoded tracks.

Thanks for any help you can give. I can forward copies of the dumps that WinXp wants to send MS every time I force quite MC.

Peter
Logged

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Suspect MC COM API for PlayOrShow
« Reply #3 on: December 17, 2004, 05:57:32 am »

Bump

Really really want to make NR/MC my Christmas break project but this issue makes it a big no no. Would appreciate any feedback available.

Thanks

Peter
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71603
  • Where did I put my teeth?
Re: Suspect MC COM API for PlayOrShow
« Reply #4 on: December 17, 2004, 06:46:21 am »

See if you can learn anything by posting on the forum at promixis.com .

Logged

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Suspect MC COM API for PlayOrShow
« Reply #5 on: December 17, 2004, 04:40:14 pm »

Hi Jim

As per my posts in this thread, promixis was my first port of call as I suspected this to be a NetRemote issue.

In my first post above, i linked to the thread over at promixis forums where the issue was discussed and it was recommended I come over here!

Feel like I'm going around in circles on this!

Peter
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71603
  • Where did I put my teeth?
Re: Suspect MC COM API for PlayOrShow
« Reply #6 on: December 17, 2004, 05:27:44 pm »

In the Promixis thread, Ben Sweet, author of NetRemote said that it could be an MC bug, saying:
Quote
My guess is that there is a bug in the MC COM API with the "PlayOrShow" command, and that "under the hood", the MC application is using something slightly different than the API call they allow.

and in this thread, Matt, one of the principal authors of MC, said it was doubtful:
Quote
PlayOrShow(...) does the same thing as if you started playback with MC's play button.  Can you duplicate a crash using only Media Center? (not controlled with NR)

So _maybe_ it's an MC bug, but it doesn't look like it at this point.  You could report back there what you learned here, or you could try a work around.
Logged

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Suspect MC COM API for PlayOrShow
« Reply #7 on: December 18, 2004, 07:57:32 am »

Thanks Jim

I'd be happy for the moment to establish where the bug lies so I don't need to maintain two threads. Here's some more info;

Frustration is mounting. I can't believe we still cannot identify where the problem lies never mind finding a fix!

I'm posting this message in both threads to expedite matters.

Did some more testing over the past few days and established the following....

-Problem exhibited with AAC files only (personally ripped on iTunes, no commercial tracks). Tested .APE, .MP3 and CD Audio and all work fine.

-Problem only exhibits if PLAY command is issued on an Album from NetRemote library. Selecting an album in MC and selecting PLAY does not result in problem.

-Freeze occurs as soon as user clicks next track button. It makes no difference if this is done in NR or MC, freeze will occur as long as album is playing as result if PLAY command issued from NR.

-After force quit of MC and restart, if MC is set up to retain position, track skipping buttons work fine, even though album got there in previous MC session as result NR PLAY command.

I'd be happy to forward a folder containing 2/3 of my tracks for the purposes of testing. I know a big part of bug fixing is being able to repro the bug.

There is no doubt in my mind that there is a bug in either MC or NR. as stated, this combo meets ALL of my requirmernts for HTPC audio but I will obviously not be purchasing until I can resolve this somehow. Yes, I know there are work arounds but that is certainly inelegant.

Thanks for all the help so far.

Peter
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71603
  • Where did I put my teeth?
Re: Suspect MC COM API for PlayOrShow
« Reply #8 on: December 18, 2004, 09:21:45 am »

Peter,
You're operating out on the outer limits of this area of technology.  If AAC is the difference, your best bet is to switch your encoding.  If you're looking for quality, try Monkey's Audio (APE ) or any lossless format.  Convert if necessary to other formats when needed.

I hope you'll understand that we don't have the time to chase this right now.

Jim
Logged

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Suspect MC COM API for PlayOrShow
« Reply #9 on: December 18, 2004, 09:26:56 am »

Thanks Jim

I was kind of hoping not to have to change encoding as we have our entire CD collection encoded at this point and AAC is what we need to stick with as we use iPods and find it provides the best balance of compression over quality with compatibility.

Cheers

Peter
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71603
  • Where did I put my teeth?
Re: Suspect MC COM API for PlayOrShow
« Reply #10 on: December 18, 2004, 09:34:23 am »

As a work-around, try setting up a second library.  Clone it from your first, then convert a few files (being careful to check the option on whether to delete originals).  Confirm that you're not destroying the originals before you go on.

Logged

WickedEwok

  • Regular Member
  • Recent member
  • *
  • Posts: 34
  • Software Architect
Re: Suspect MC COM API for PlayOrShow
« Reply #11 on: December 18, 2004, 11:55:29 am »

I believe this to be some sort of possible threading issue within MC that Matt and I have touched on before. As soon as the "PlayOrShow" call is made, MC locks up (it does not require hitting next for me to lock MC). Note that the "Play" call also exhibits this behavior.

None the less, a workaround corrects this issue for now, it just means that adding large numbers of tracks takes a bit longer in m4a format.

Workaround (from RemoteServer.dll) is as follows:

Code: [Select]
IMJFileAutomationPtr pFile = pFiles->GetFile(0);
char type[50];
strcpy(type,(char *) pFile->GetFiletype());
if (!strcmp(type,"m4a")){
playback->Stop();
playlist->RemoveAllFiles();
for(int j=0; j < pFiles->GetNumberFiles();j++)
{
IMJFileAutomationPtr pFile = pFiles->GetFile(j);
playlist->AddFile(pFile->GetFilename(),pos++);
}
playlist->PutPosition(0);
playback->Play();
}else{
pFiles->PlayOrShow();
}
Logged

meep

  • Junior Woodchuck
  • **
  • Posts: 61
Re: Suspect MC COM API for PlayOrShow
« Reply #12 on: December 18, 2004, 01:28:06 pm »

I can confirm this fix works great.

If you guys need any further assistance testing to permanently fix this issue, I'd be happy to help out.

Thanks to all for thye input & assistance.

Peter
Logged
Pages: [1]   Go Up