Playing video files | developer.brewmp.com Playing video files | developer.brewmp.com

Developer

Playing video files

Forums:

Hi All,

I'm trying to play video files on the simulator. The problem is whenever I try to play video files, the simulator opens a new window and plays the file in that, whereas I want the files to be played in simulator only.

AEEMediaData pmd;
AEERect rect;
IMedia* pMedia = NULL;

if(SUCCESS != ISHELL_CreateInstance(m_pIShell, AEECLSID_MEDIAMP3, (void**)&pMedia))
{
bErr = FALSE;
goto Release;
}
pmd.clsData = MMD_FILE_NAME;
pmd.pData = (void*)pFileName;
pmd.dwSize =0;

SETAEERECT(&rect,0,0,50,40);
int iErrc = IMEDIA_SetRect(pMedia,&rect,NULL);
IMEDIA_GetState(pMedia,FALSE);
IMEDIA_SetMediaData(pMedia,&pmd);
IMEDIA_Play(pMedia);
IMEDIA_RegisterNotify(pMedia, MediaCallBack, this);

nState = IMEDIA_GetState(pMedia,&bChg);

Please note that IMEDIA_SetRect(pMedia,&rect,NULL) is returning error code 20, i.e. API not supported.

Am I getting it wrong somewhere.

Any pointers would be helpful.

Thanks,
Ambarish

Hi ambarish,
Isn't AEECLSID_MEDIAMP3 to be used for playing audio as opposed to video? Is this the code snippet you intended to paste?
Thanks,
Anand

Hi ambarish,
Isn't AEECLSID_MEDIAMP3 to be used for playing audio as opposed to video? Is this the code snippet you intended to paste?
Thanks,
Anand

Hi Anand,
I intended to paste the same code. It's playing video as well as audio using AEECLSID_MEDIAMP3.
AEECLSID_MEDIAMPEG4 is getting failed.
Thanks,
Ambarish

Hi Anand,
I intended to paste the same code. It's playing video as well as audio using AEECLSID_MEDIAMP3.
AEECLSID_MEDIAMPEG4 is getting failed.
Thanks,
Ambarish