how to play the media file from the same point where it suspended in resume. | developer.brewmp.com how to play the media file from the same point where it suspended in resume. | developer.brewmp.com

Developer

how to play the media file from the same point where it suspended in resume.

Forums:

hi

I want to stop my media file during the suspend and resume at the same point...but in BREW qualcomm API it is mention that its better to release all media object during suspend and recreate during the resume..
well i have used IMEDIA_RegisterNotify() through which i get a callback and thru MM_STATUS_TICK_UPDATE event i m able to track the position upto which the media file has been played.i m storing the position...But in EVT_APP_SUSPEND before calling IMEDIA_Stop() if i m checking the state i m getting ECLASSNOTSUPPORT.and i m releasing the IMEDIA instance in suspend.. and in resume i m creating the instance.then in resume i have tried the IMEDIA_Fastforward() then it returns EBADSTATE and then when i call IMEDIA_Play() the media file start from the begining...

if there is other solution then send me..

Thanks

How are you creating the IMedia instance after you resume? Are you sure it's being created successfully?

How are you creating the IMedia instance after you resume? Are you sure it's being created successfully?

hi mohlendo
well i have made a seperate function inwhich i m creating instance it is returning SUCCESS...i m calling this function in EVT_APP_RESUME but on the next line when i m checking the IMEDIA_State it is returning ENOMEMORY...I couldn't understand how to proceed plz tell..if there is other way then also tell.
Thanks

hi mohlendo
well i have made a seperate function inwhich i m creating instance it is returning SUCCESS...i m calling this function in EVT_APP_RESUME but on the next line when i m checking the IMEDIA_State it is returning ENOMEMORY...I couldn't understand how to proceed plz tell..if there is other way then also tell.
Thanks

That's not ENOMEMORY, it's MM_STATE_READY. ;)
The only suggestion I have is that you might want to try experimenting with splitting this up a bit, rather than making all the IMedia calls sequentially. Try moving some of the operations to the notification function or otherwise splitting them up.

That's not ENOMEMORY, it's MM_STATE_READY. ;)
The only suggestion I have is that you might want to try experimenting with splitting this up a bit, rather than making all the IMedia calls sequentially. Try moving some of the operations to the notification function or otherwise splitting them up.

shaishav wrote:hi
I want to stop my media file during the suspend and resume at the same point...but in BREW qualcomm API it is mention that its better to release all media object during suspend and recreate during the resume..
well i have used IMEDIA_RegisterNotify() through which i get a callback and thru MM_STATUS_TICK_UPDATE event i m able to track the position upto which the media file has been played.i m storing the position...But in EVT_APP_SUSPEND before calling IMEDIA_Stop() if i m checking the state i m getting ECLASSNOTSUPPORT.and i m releasing the IMEDIA instance in suspend.. and in resume i m creating the instance.then in resume i have tried the IMEDIA_Fastforward() then it returns EBADSTATE and then when i call IMEDIA_Play() the media file start from the begining...
if there is other solution then send me..
Thanks
Hi Shaishav,
Can you please tell me how did you track the current play back position so that MM_STATUS_TICK_UPDATE is sent to the callback function? Also whre do you store the current position? :confused: Please help...it is urgent.
Thanks.

shaishav wrote:hi
I want to stop my media file during the suspend and resume at the same point...but in BREW qualcomm API it is mention that its better to release all media object during suspend and recreate during the resume..
well i have used IMEDIA_RegisterNotify() through which i get a callback and thru MM_STATUS_TICK_UPDATE event i m able to track the position upto which the media file has been played.i m storing the position...But in EVT_APP_SUSPEND before calling IMEDIA_Stop() if i m checking the state i m getting ECLASSNOTSUPPORT.and i m releasing the IMEDIA instance in suspend.. and in resume i m creating the instance.then in resume i have tried the IMEDIA_Fastforward() then it returns EBADSTATE and then when i call IMEDIA_Play() the media file start from the begining...
if there is other solution then send me..
Thanks
Hi Shaishav,
Can you please tell me how did you track the current play back position so that MM_STATUS_TICK_UPDATE is sent to the callback function? Also whre do you store the current position? :confused: Please help...it is urgent.
Thanks.