How to run video file on simulator? | developer.brewmp.com How to run video file on simulator? | developer.brewmp.com

Developer

How to run video file on simulator?

Please provide me some sample code to run a video file in brew simulator. It is very urgent. I am able to run an audio file.

Please provide more information. Is this through a widget? What APIs are you trying to use? Have you checked any error codes? What is the format of the video file?

Please provide more information. Is this through a widget? What APIs are you trying to use? Have you checked any error codes? What is the format of the video file?

Hi ,
// added code for playing video
int playVideo(unifiedComposer *pMe)
{
AEEMediaData md;
int result = 0;
AEECLSID Cls;
result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_MEDIASVG, (void **)&(pMe->m_pIMedia));
md.clsData = MMD_FILE_NAME;
md.pData = "myfile.svg";
md.dwSize = 0;
result = IMEDIA_SetMediaData(pMe->m_pIMedia, &md);
result = IMEDIA_RegisterNotify(pMe->m_pIMedia, mediaNotify, pMe);
result = IMEDIASVG_SetBackgroundColor(pMe->m_pIMedia, RGB_BLACK);
result = IMEDIA_Play(pMe->m_pIMedia);
return TRUE;
}
I want to play any video that is supported by BREW. I have found that AEECLSID_MEDIASVG is unsupported class kind of error.
Please let me know if any other video file type is supported, and what exactly need to be done for playing that or any other solution to play a video file.

Hi ,
// added code for playing video
int playVideo(unifiedComposer *pMe)
{
AEEMediaData md;
int result = 0;
AEECLSID Cls;
result = ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_MEDIASVG, (void **)&(pMe->m_pIMedia));
md.clsData = MMD_FILE_NAME;
md.pData = "myfile.svg";
md.dwSize = 0;
result = IMEDIA_SetMediaData(pMe->m_pIMedia, &md);
result = IMEDIA_RegisterNotify(pMe->m_pIMedia, mediaNotify, pMe);
result = IMEDIASVG_SetBackgroundColor(pMe->m_pIMedia, RGB_BLACK);
result = IMEDIA_Play(pMe->m_pIMedia);
return TRUE;
}
I want to play any video that is supported by BREW. I have found that AEECLSID_MEDIASVG is unsupported class kind of error.
Please let me know if any other video file type is supported, and what exactly need to be done for playing that or any other solution to play a video file.

Hi All,
Please help me.Please tell me some useful informations for video file to run in simulator.It is urgent.

Hi All,
Please help me.Please tell me some useful informations for video file to run in simulator.It is urgent.

hello
i m not sure but u can try 3gpp files using AEECLSID_MEDIAMPEG4
check if this helps

hello
i m not sure but u can try 3gpp files using AEECLSID_MEDIAMPEG4
check if this helps

Hello Friend,
I have tried the 3GP file to play & get suceeded to play . it is played using MPEG4 classid.
-Thax.
-Amit

Hello Friend,
I have tried the 3GP file to play & get suceeded to play . it is played using MPEG4 classid.
-Thax.
-Amit

amitnema wrote:Hello Friend,
I have tried the 3GP file to play & get suceeded to play . it is played using MPEG4 classid.
-Thax.
-Amit
What did you do to get this to work? Which version of BREW are you running?
Mike.

amitnema wrote:Hello Friend,
I have tried the 3GP file to play & get suceeded to play . it is played using MPEG4 classid.
-Thax.
-Amit
What did you do to get this to work? Which version of BREW are you running?
Mike.

hi amit,
im very new to brew platform. I could able to play an mp3 file succussfully but im unable to play video file, im trying with 3gp,mp4, can you please share the code for that?
I am trying like this..
ISHELL_CreateInstance(playAudio->a.m_pIShell, AEEIID_IMediaVideo, (void **)&pMediaUtil);
// i tried with the classId AEECLSID_MEDIAMPEG4,AEECLSID_MEDIAUTIL but in vain
sMediaData.clsData = MMD_FILE_NAME;
sMediaData.pData = (void *)& szFilename;
sMediaData.dwSize = 0;
IMEDIAUTIL_CreateMedia(pMediaUtil, &sMediaData, &playAudio->pIMediaObject);
IMEDIA_Play(playAudio->pIMediaObject);
please help me to sort out this..very urgent...
Venkat

hi amit,
im very new to brew platform. I could able to play an mp3 file succussfully but im unable to play video file, im trying with 3gp,mp4, can you please share the code for that?
I am trying like this..
ISHELL_CreateInstance(playAudio->a.m_pIShell, AEEIID_IMediaVideo, (void **)&pMediaUtil);
// i tried with the classId AEECLSID_MEDIAMPEG4,AEECLSID_MEDIAUTIL but in vain
sMediaData.clsData = MMD_FILE_NAME;
sMediaData.pData = (void *)& szFilename;
sMediaData.dwSize = 0;
IMEDIAUTIL_CreateMedia(pMediaUtil, &sMediaData, &playAudio->pIMediaObject);
IMEDIA_Play(playAudio->pIMediaObject);
please help me to sort out this..very urgent...
Venkat

hi Venkat,
U can use the following set of line to run the vieo file. But it is supporting only 3x & higher end device supporting 3Gp files:
if(pMe->m_pMedia)
{
IMEDIA_Release(pMe->m_pMedia);
pMe->m_pMedia=NULL;
}
ISHELL_CreateInstance(pMe->m_Applet.m_pIShell,AEECLSID_MEDIAMPEG4, (void **)&pMe->m_pMedia);
pMe->ad.clsData = MMD_FILE_NAME;
pMe->ad.pData ="media/livedarsh1.3gp";
pMe->ad.dwSize = 0;
IMEDIA_SetMediaData(pMe->m_pMedia,&pMe->ad );
IMEDIA_SetVolume( pMe->m_pMedia, 100 );
IMEDIA_Play(pMe->m_pMedia);
-Amit nema

hi Venkat,
U can use the following set of line to run the vieo file. But it is supporting only 3x & higher end device supporting 3Gp files:
if(pMe->m_pMedia)
{
IMEDIA_Release(pMe->m_pMedia);
pMe->m_pMedia=NULL;
}
ISHELL_CreateInstance(pMe->m_Applet.m_pIShell,AEECLSID_MEDIAMPEG4, (void **)&pMe->m_pMedia);
pMe->ad.clsData = MMD_FILE_NAME;
pMe->ad.pData ="media/livedarsh1.3gp";
pMe->ad.dwSize = 0;
IMEDIA_SetMediaData(pMe->m_pMedia,&pMe->ad );
IMEDIA_SetVolume( pMe->m_pMedia, 100 );
IMEDIA_Play(pMe->m_pMedia);
-Amit nema

Hi Amit,
Thanks alot for your reply. i copied and tried that code in simulator but getting exception.
when i try this code,
ISHELL_CreateInstance(pMe->m_Applet.m_pIShell,AEECLSID_MEDIAMPEG4, (void **)&pMe->m_pMedia);
the result is not equals to SUCCESS, when i use AEECLSID_MEDIAUTIL then only the result will be SUCCESS. And it is not working any ways.
i would like to request you that it would be very grateful if you give me your mail id to contact u then i can able to send u the code sothat u wil be able to get the problem exactly where it is.
and one more thing im testing in emulator (version 3.1.5)only.
Thanks,
Venkat

Hi Amit,
Thanks alot for your reply. i copied and tried that code in simulator but getting exception.
when i try this code,
ISHELL_CreateInstance(pMe->m_Applet.m_pIShell,AEECLSID_MEDIAMPEG4, (void **)&pMe->m_pMedia);
the result is not equals to SUCCESS, when i use AEECLSID_MEDIAUTIL then only the result will be SUCCESS. And it is not working any ways.
i would like to request you that it would be very grateful if you give me your mail id to contact u then i can able to send u the code sothat u wil be able to get the problem exactly where it is.
and one more thing im testing in emulator (version 3.1.5)only.
Thanks,
Venkat

continue for the previous post...
typedef struct _PlayAudio {
AEEApplet a ;
AEEDeviceInfo DeviceInfo;
IShell * m_pIShell;
IMedia *pIMediaObject;
AEEMediaData sMediaData;
PlayAudio;
void playFile(AEEApplet* pMe){
PlayAudio* playAudio;
int result = 0;
playAudio = (PlayAudio *)pMe;
if(ISHELL_CreateInstance(playAudio->a.m_pIShell, AEECLSID_MEDIAUTIL, (void **)&playAudio->pIMediaObject) != SUCCESS)
{
DBGPRINTF("0");
}
playAudio->sMediaData.clsData = MMD_FILE_NAME;
playAudio->sMediaData.pData =(void *)& szFilename;
playAudio->sMediaData.dwSize = 0;
IMEDIA_SetMediaData(playAudio->pIMediaObject,&playAudio->sMediaData);
IMEDIA_SetVolume( playAudio->pIMediaObject, 100 );
IMEDIA_Play(playAudio->pIMediaObject);

this is my exact code.. every thing is fine till IMEDIA_Play(). when i debug the code by using VisualStudio, the excpetion at the play() function is like this..
Unhandled exception in BREW_Simulator.exe: 0xC0000005: Access Violation
is there any settings/configurations required to play a video in simulator?
Thanks,
Venkat

continue for the previous post...
typedef struct _PlayAudio {
AEEApplet a ;
AEEDeviceInfo DeviceInfo;
IShell * m_pIShell;
IMedia *pIMediaObject;
AEEMediaData sMediaData;
PlayAudio;
void playFile(AEEApplet* pMe){
PlayAudio* playAudio;
int result = 0;
playAudio = (PlayAudio *)pMe;
if(ISHELL_CreateInstance(playAudio->a.m_pIShell, AEECLSID_MEDIAUTIL, (void **)&playAudio->pIMediaObject) != SUCCESS)
{
DBGPRINTF("0");
}
playAudio->sMediaData.clsData = MMD_FILE_NAME;
playAudio->sMediaData.pData =(void *)& szFilename;
playAudio->sMediaData.dwSize = 0;
IMEDIA_SetMediaData(playAudio->pIMediaObject,&playAudio->sMediaData);
IMEDIA_SetVolume( playAudio->pIMediaObject, 100 );
IMEDIA_Play(playAudio->pIMediaObject);

this is my exact code.. every thing is fine till IMEDIA_Play(). when i debug the code by using VisualStudio, the excpetion at the play() function is like this..
Unhandled exception in BREW_Simulator.exe: 0xC0000005: Access Violation
is there any settings/configurations required to play a video in simulator?
Thanks,
Venkat

hi:
As far as i know, videos can not be played on simulator because the video codec is not implemented for simulator in brew version 3.1.5
you can use Audio for test instead and...to process frames, you may have to use a phone device, as what i am doing

hi:
As far as i know, videos can not be played on simulator because the video codec is not implemented for simulator in brew version 3.1.5
you can use Audio for test instead and...to process frames, you may have to use a phone device, as what i am doing

Ya it's true that we can not run the video on the simulator... pls chk the same on any 3x device.. it will work fine

Ya it's true that we can not run the video on the simulator... pls chk the same on any 3x device.. it will work fine

Hi buddies..
thanks for your useful replies...
Have a Gr8 day,
Venkat

Hi buddies..
thanks for your useful replies...
Have a Gr8 day,
Venkat

It would be appreciated if anybody shares the code which would play the video on device as well as on simulator.
I read all the responses of you guys, it is very helpful. But i am not able to play the video through the code you guys shared.
It will be great if you guys will share the complete example which will run on simulator / device as there is no example available to understand the video related things.
Thanks in advance.
swami

It would be appreciated if anybody shares the code which would play the video on device as well as on simulator.
I read all the responses of you guys, it is very helpful. But i am not able to play the video through the code you guys shared.
It will be great if you guys will share the complete example which will run on simulator / device as there is no example available to understand the video related things.
Thanks in advance.
swami