Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod: (8 Items)
   
Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
Hi,

Just found that if a track on an iPod is resumed playback by using  mme_play_resume_msid( ) function, it would fail to 
get the album art of track by using mme_metadata_image_load() function.  The function returned success and mdimage_rid 
was set, but the MME_EVENT_METADATA_IMAGE event reported the error as follows:


MME_EVENT_METADATA_IMAGE
ptMME_event_metadata_image>error = 22
ptMME_event_metadata_image>mdinfo_irid = 2
ptMME_event_metadata_image->url.len = 0

(ptMME_event_metadata_image  is a pointer pointed to mme_event_metadata_image_t)

No problem for the case of the track session is built up by client application which using appropriate API functions.

BTW, I am using mme_metadata_getinfo_current( ) with asynchronous way to get the album art info in all cases, all info 
can be achieved successfully. The Aviage I am using is version 1.2 alpha build 20.14.

Regards,
Chris
Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
On Tue, 26 May 2009, Chris Li wrote:

>Hi,
>
>Just found that if a track on an iPod is resumed playback by using
>mme_play_resume_msid( ) function, it would fail to get the album art of
>track by using mme_metadata_image_load() function.  The function returned
>success and mdimage_rid was set, but the MME_EVENT_METADATA_IMAGE event
>reported the error as follows:

Hi Chris,

This should be fixed in the final release. It was noted and corrected
around the Apr 24th time frame for a build. (PR 66925)

The 20.14 alpha looks like it was posted in March, so the next update
should have the fix for you.

Thanks for the feedback and detailed description.

Peter

>
>
>MME_EVENT_METADATA_IMAGE
>ptMME_event_metadata_image>error = 22
>ptMME_event_metadata_image>mdinfo_irid = 2
>ptMME_event_metadata_image->url.len = 0
>
>(ptMME_event_metadata_image is a pointer pointed to
>mme_event_metadata_image_t)
>
>No problem for the case of the track session is built up by client
>application which using appropriate API functions.
>
>BTW, I am using mme_metadata_getinfo_current( ) with asynchronous way to
>get the album art info in all cases, all info can be achieved
>successfully. The Aviage I am using is version 1.2 alpha build 20.14.
>
>Regards,
>Chris
>
>
>_______________________________________________
>General
>http://community.qnx.com/sf/go/post30103
>
>
Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
Hi,

Have tested it on the latest release of Aviage MM version 1.2 and the issue has been solved. That's great, however, it 
comes with another issue which about image splash on iPod.

Actually, I call mme_play_resume_msid() to resume playback right after the iPod is connected and with the album art 
loading routine follows on. If the resumed track is the one with the album art (size of 128X128 pixels), for a big color
 image (size of 310X136 pixels) which need to be splashed on iPod screen, it just fails to be splashed. For a small 
splash image like size of 166X71 pixels, it doesn't have such problem. So I thought the album art loading process might 
interrupt the image splashing process and cause the iPod can not splash the image on its screen.

Just wonder any advice for solving this problem, much thanks.

Regards,
Chris
Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
> Actually, I call mme_play_resume_msid() to resume playback right after the 
> iPod is connected and with the album art loading routine follows on. If the 
> resumed track is the one with the album art (size of 128X128 pixels), for a 
> big color image (size of 310X136 pixels) which need to be splashed on iPod 
> screen, it just fails to be splashed. For a small splash image like size of 
> 166X71 pixels, it doesn't have such problem. So I thought the album art 
> loading process might interrupt the image splashing process and cause the iPod
>  can not splash the image on its screen.
> 
> Just wonder any advice for solving this problem, much thanks.

Hi Chris,

Just to explain the process. When loading a splash screen, we try to do it as a background task (it can take several 
seconds or more, especially on serial connections, but even on USB it we still need to wait for iPod ACKs for data 
packets and what not, so it isn't just a simple transfer at 400 mbits/second). Anyway, all this to say that usually time
 to audio is what is important and we try to allow other commands into the iPod while loading the splash screen. This 
does have the potential to delay the splash screen loading.

Can you specify which iPod model you are using? Apple has put some limitation in *some* models of iPods that if the 
splash screen isn't loaded completely in the first 15 seconds, it will not show. As a second note, I've noticed that the
 iPods tend to be single minded when requesting album art, they don't send time updates or respond to any of our 
requests until they are done transmitting the album art.

My initial guess would be that you are using something like an nano 3rg Gen or Classic 5th gen, and it simply isn't 
showing the splash screen because it took too long to load. Also, if you have verbosity on the ipod driver command line 
(i.e. especially level 5 say) and it logs every byte of data it sends/receives, this slows things down as well.

Regards,
Gilles

One 

Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
Hi Gilles,

Thanks your info.
Yes, the iPods I am using are 3rd Gen Nano, iPod Classic and 5th Gen iPod, they all have the same problem. From the 
Apple spec, it claims the splash image must be loaded with 15 seconds,  according to the transmit rate of high speed USB
 port, it should satisfy the time requirement.  
However,  it seems the fact is that it not only needs to load the whole image data on iPod within 15 seconds but also 
can not interrupt the whole loading process like insert an get album art process which significant take long for iPod to
 finish the whole job. I got a feeling for that from the Apple spec about the saying of use of SetDisplayImage command 
should be limited to drawing bitmap image only immediately after entering extended mode. So I thought its process is not
 interruptable, not sure whether my assumption is correct or not, thanks.

Regards,
Chris
Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
> Yes, the iPods I am using are 3rd Gen Nano, iPod Classic and 5th Gen iPod, 
> they all have the same problem. From the Apple spec, it claims the splash 
> image must be loaded with 15 seconds,  according to the transmit rate of high 
> speed USB port, it should satisfy the time requirement.

It isn't quite that fast. We also wait for acknowledgement that the iPod accepted each image segment sent. Just like 
when we read an image from the iPod it doesn't go at wire rate neither.
  
> However,  it seems the fact is that it not only needs to load the whole image 
> data on iPod within 15 seconds but also can not interrupt the whole loading 
> process like insert an get album art process which significant take long for 
> iPod to finish the whole job.

Well, you can query the iPod in between image segments, or sent it commands, and it does still work, as long as the 
whole things gets there in the first 15 seconds.

> I got a feeling for that from the Apple spec 
> about the saying of use of SetDisplayImage command should be limited to 
> drawing bitmap image only immediately after entering extended mode. So I 
> thought its process is not interruptable, not sure whether my assumption is 
> correct or not, thanks.

The iPod does allow interleaved commands, this works and has been tested, so we do allow this in the driver. We could 
have chosen to lock out any iPod calls at the driver level until the whole thing is transmitted, but this would affect 
time to audio. In many applications (especially automotive comes to mind) time to audio is critical and if you asked the
 automotive customers I know that some might favour time to audio over a splash screen. Splash screens don't even work 
on iPod touch or iPhone anyway.

If you said that the splash screen is more important than early audio to you, we could consider an option to the iPod 
driver to immediately fully load the splash screen before it allows any other commands. Or perhaps a way to determine if
 the splash screen is done loading (i.e. you might want to issue the resume() command but only load the artwork form the
 iPod once you knew the splash screen was loaded, to get some form of early audio). Unfortunately we've just released 1.
2, and it doesn't have these features. I think the best option for MW 1.2 driver is to perhaps delay slightly after you 
call mme_play_resume_msid() before you request artwork.

Regards,
Gilles

Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
Hi Gilles,

Much thanks your detail explanation.

Yes, the current workaround for my application is it has to be added a time delay (like 2 seconds) before calling  
mme_play_resume_msid() to allow the iPod finishes the splash process first and then do the resume playing a track with 
an album art later while plug in the iPod. 

Hopefully  in the future Aviage release, it will has much option for that like the client has a way to know when the 
iPod finishes splashing an image,  or maybe just fix the issue of it can not splash an image on iPod and get an album 
art from the iPod simultaneously if both processes are finished within 15 seconds.

Regards
Chris
Re: Failed to get album art from the track which resumed by mme_play_resume_msid( ) on iPod  
> Hopefully  in the future Aviage release, it will has much option for that like
>  the client has a way to know when the iPod finishes splashing an image,  or 
> maybe just fix the issue of it can not splash an image on iPod and get an 
> album art from the iPod simultaneously if both processes are finished within 
> 15 seconds.

Hi Chris,

I've filled a problem report internally so that we don't lose track of the issue.

Regards,
Gilles