Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

hi friends,

 i am creating an rtsp video player i hv searched thru d forum..i got lots of topic about it and it helps me to code .i have used this link "https://developer.brewmp.com/forum/video-playback"

rtsp url that i have used in "link.url" already hinted...it plays good....but when i checked my code on phone...it just shows first frame and after that i got MM_STATUS_ABORT.

After getting this status. i end the application and try to play the url via phone's inbuilt browser...it shows me unsupported media type.

after this i swtchd offmy cell and swtchd it on...and now i try to play the same url via browser it play well...i just cant understand why it is happenning..

 

This may be device specific issue, Did you try to play other format as well? try to see their behavior as well.

This may be device specific issue, Did you try to play other format as well? try to see their behavior as well.

Encoding of frames also aborts the frame playback.Check with other media formats.

Encoding of frames also aborts the frame playback.Check with other media formats.

thanks smahesh,
no i am not encoded the frames..i have checked it for .3gp file format and .mp4 file format....both the files paly well when i m playing it via inbuilt browser  of the phone "rtsp://localhost:port/file.3gp".
but when i am trying to play this file via my code it shows only first frame..
 
this my code snippet for medianotify
 
void c_MediaNotify(exactlyonealarm *pMe, AEEMediaCmdNotify * pNotify){    IBitmap *pFrame;    AEEBitmapInfo pinfo;//    int nErr;    DBGPRINTF("Media Notify CMD %d SUB %d STATUS %d", pNotify->nCmd, pNotify->nSubCmd, pNotify->nStatus );    switch(pNotify->nCmd)    {    case MM_CMD_PLAY:        switch(pNotify->nStatus)        {        case MM_STATUS_START:            //pMe->currentTime = 0;            DBGPRINTF("in start");            IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);            IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback Started", -1, 0, 0, NULL, IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);            IDisplay_Update(pMe->a.m_pIDisplay);            break;        case MM_STATUS_ABORT:            DBGPRINTF("in abort");                    IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);            IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback Stopped", -1, 0, 0, NULL, IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);            IDisplay_Update(pMe->a.m_pIDisplay);            break;        case MM_STATUS_FRAME:            DBGPRINTF("******FRAME");            IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);            IMedia_GetFrame(pMe->pMedia, &pFrame);            if(pFrame) {                IBitmap_GetInfo(pFrame, &pinfo, sizeof(AEEBitmapInfo));                IDisplay_BitBlt(pMe->a.m_pIDisplay, 0, 0, pinfo.cx, pinfo.cy, pFrame, 0, 0, AEE_RO_COPY);                IDisplay_UpdateEx(pMe->a.m_pIDisplay, TRUE);                FREEIF(pFrame);                //RELEASEIF(pFrame);            }            IMedia_EnableFrameCallback(pMe->pMedia,  TRUE);        case MM_STATUS_DONE:            {                DBGPRINTF("in Done");                //IMedia_Stop(pMe->pMedia);                                IMedia_Release(pMe->pMedia);                break;            }                            default:            {                DBGPRINTF("%d",pNotify->nStatus);                break;            }        }        break;    case MM_CMD_RECORD:        break;    case MM_CMD_GETMEDIAPARM:        break;    case MM_CMD_SETMEDIAPARM:        break;    case MM_CMD_GETTOTALTIME:        DBGPRINTF("******Get Total Time");        if(pNotify->nStatus == MM_STATUS_DONE)        {            DBGPRINTF("******Get Total Time DONE");        //     ISHELL_PostEvent(pMe->a.m_pIShell,AEECLSID_MFVIDEOALARM,EVT_USER+1,NULL,NULL);        }        else if(pNotify->nStatus == MM_STATUS_ABORT) {                      DBGPRINTF("******Get Total Time ABORT");            IMedia_Stop(pMe->pMedia);        }        break;    default:        break;    }}i got mm_status_start once..
then it display MM_STATUS_FRAME...i got the first frame on my screen..but after that it shows MM_STATUS_ABORT

thanks smahesh,
no i am not encoded the frames..i have checked it for .3gp file format and .mp4 file format....both the files paly well when i m playing it via inbuilt browser  of the phone "rtsp://localhost:port/file.3gp".
but when i am trying to play this file via my code it shows only first frame..
 
this my code snippet for medianotify
 
void c_MediaNotify(exactlyonealarm *pMe, AEEMediaCmdNotify * pNotify){    IBitmap *pFrame;    AEEBitmapInfo pinfo;//    int nErr;    DBGPRINTF("Media Notify CMD %d SUB %d STATUS %d", pNotify->nCmd, pNotify->nSubCmd, pNotify->nStatus );    switch(pNotify->nCmd)    {    case MM_CMD_PLAY:        switch(pNotify->nStatus)        {        case MM_STATUS_START:            //pMe->currentTime = 0;            DBGPRINTF("in start");            IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);            IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback Started", -1, 0, 0, NULL, IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);            IDisplay_Update(pMe->a.m_pIDisplay);            break;        case MM_STATUS_ABORT:            DBGPRINTF("in abort");                    IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);            IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback Stopped", -1, 0, 0, NULL, IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);            IDisplay_Update(pMe->a.m_pIDisplay);            break;        case MM_STATUS_FRAME:            DBGPRINTF("******FRAME");            IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);            IMedia_GetFrame(pMe->pMedia, &pFrame);            if(pFrame) {                IBitmap_GetInfo(pFrame, &pinfo, sizeof(AEEBitmapInfo));                IDisplay_BitBlt(pMe->a.m_pIDisplay, 0, 0, pinfo.cx, pinfo.cy, pFrame, 0, 0, AEE_RO_COPY);                IDisplay_UpdateEx(pMe->a.m_pIDisplay, TRUE);                FREEIF(pFrame);                //RELEASEIF(pFrame);            }            IMedia_EnableFrameCallback(pMe->pMedia,  TRUE);        case MM_STATUS_DONE:            {                DBGPRINTF("in Done");                //IMedia_Stop(pMe->pMedia);                                IMedia_Release(pMe->pMedia);                break;            }                            default:            {                DBGPRINTF("%d",pNotify->nStatus);                break;            }        }        break;    case MM_CMD_RECORD:        break;    case MM_CMD_GETMEDIAPARM:        break;    case MM_CMD_SETMEDIAPARM:        break;    case MM_CMD_GETTOTALTIME:        DBGPRINTF("******Get Total Time");        if(pNotify->nStatus == MM_STATUS_DONE)        {            DBGPRINTF("******Get Total Time DONE");        //     ISHELL_PostEvent(pMe->a.m_pIShell,AEECLSID_MFVIDEOALARM,EVT_USER+1,NULL,NULL);        }        else if(pNotify->nStatus == MM_STATUS_ABORT) {                      DBGPRINTF("******Get Total Time ABORT");            IMedia_Stop(pMe->pMedia);        }        break;    default:        break;    }}i got mm_status_start once..
then it display MM_STATUS_FRAME...i got the first frame on my screen..but after that it shows MM_STATUS_ABORT

thanks smahesh,
no i am not encoded the frames..i have checked it for .3gp file
format and .mp4 file format....both the files paly well when i m playing
it via inbuilt browser  of the phone "rtsp://localhost:port/file.3gp".
but when i am trying to play this file via my code it shows only first frame..
 
this my code snippet for medianotify
 
void c_MediaNotify(exactlyonealarm *pMe, AEEMediaCmdNotify *
pNotify){   
IBitmap *pFrame;    AEEBitmapInfo pinfo;
//    int nErr; 
  
DBGPRINTF("Media Notify CMD %d SUB %d STATUS %d", pNotify->nCmd,
pNotify->nSubCmd, pNotify->nStatus );   

switch(pNotify->nCmd)    {
    case MM_CMD_PLAY: 
      
switch(pNotify->nStatus)        {
                case MM_STATUS_START:  
         
    //pMe->currentTime = 0; 
             DBGPRINTF("in start");
       
    IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
           
IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback
Started", -1, 0, 0, NULL,      IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);   
   
    IDisplay_Update(pMe->a.m_pIDisplay); 
           break; 
      
case MM_STATUS_ABORT:  
           DBGPRINTF("in abort");
      
    IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
           
IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback
Stopped", -1, 0, 0, NULL, IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);  
     
    IDisplay_Update(pMe->a.m_pIDisplay);
            break;  
     
case MM_STATUS_FRAME:  
          DBGPRINTF("******FRAME");  
         
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);   
       
IMedia_GetFrame(pMe->pMedia, &pFrame);
            if(pFrame) {
   
            IBitmap_GetInfo(pFrame, &pinfo,
sizeof(AEEBitmapInfo));                  
IDisplay_BitBlt(pMe->a.m_pIDisplay, 0, 0, pinfo.cx, pinfo.cy, pFrame,
0, 0, AEE_RO_COPY);               
IDisplay_UpdateEx(pMe->a.m_pIDisplay, TRUE);      
         
FREEIF(pFrame);
                //RELEASEIF(pFrame);
            }
       
    IMedia_EnableFrameCallback(pMe->pMedia,  TRUE);
        case
MM_STATUS_DONE:            { 
               DBGPRINTF("in Done");
       
        //IMedia_Stop(pMe->pMedia);  
                             
IMedia_Release(pMe->pMedia); 
               break;   
        } 
  
                        default:           { 
              
DBGPRINTF("%d",pNotify->nStatus);
                break;   
       
   
    }
        break; 
   case MM_CMD_RECORD: 
       break; 
   case
MM_CMD_GETMEDIAPARM: 
       break;  
  case MM_CMD_SETMEDIAPARM:
       
break;   
case MM_CMD_GETTOTALTIME:     
   DBGPRINTF("******Get Total
Time");
        if(pNotify->nStatus == MM_STATUS_DONE)        {
       
    DBGPRINTF("******Get Total Time DONE");   
    //   
 ISHELL_PostEvent(pMe->a.m_pIShell,AEECLSID_MFVIDEOALARM,EVT_USER+1,NULL,NULL);   
    }        else if(pNotify->nStatus == MM_STATUS_ABORT) {  
       
            DBGPRINTF("******Get Total Time ABORT");  
         
IMedia_Stop(pMe->pMedia);   
    }       
break;   
default:  
     
break;   
}
}
 
i got mm_status_start once..
then it display MM_STATUS_FRAME...i got the first frame on my screen..but after that it shows MM_STATUS_ABORT

RYANTech

0
2

thanks smahesh,
no i am not encoded the frames..i have checked it for .3gp file
format and .mp4 file format....both the files paly well when i m playing
it via inbuilt browser  of the phone "rtsp://localhost:port/file.3gp".
but when i am trying to play this file via my code it shows only first frame..
 
this my code snippet for medianotify
 
void c_MediaNotify(exactlyonealarm *pMe, AEEMediaCmdNotify *
pNotify){   
IBitmap *pFrame;    AEEBitmapInfo pinfo;
//    int nErr; 
  
DBGPRINTF("Media Notify CMD %d SUB %d STATUS %d", pNotify->nCmd,
pNotify->nSubCmd, pNotify->nStatus );   

switch(pNotify->nCmd)    {
    case MM_CMD_PLAY: 
      
switch(pNotify->nStatus)        {
                case MM_STATUS_START:  
         
    //pMe->currentTime = 0; 
             DBGPRINTF("in start");
       
    IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
           
IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback
Started", -1, 0, 0, NULL,      IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);   
   
    IDisplay_Update(pMe->a.m_pIDisplay); 
           break; 
      
case MM_STATUS_ABORT:  
           DBGPRINTF("in abort");
      
    IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
           
IDisplay_DrawText(pMe->a.m_pIDisplay, AEE_FONT_BOLD, L"Playback
Stopped", -1, 0, 0, NULL, IDF_ALIGN_CENTER |IDF_ALIGN_MIDDLE);  
     
    IDisplay_Update(pMe->a.m_pIDisplay);
            break;  
     
case MM_STATUS_FRAME:  
          DBGPRINTF("******FRAME");  
         
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);   
       
IMedia_GetFrame(pMe->pMedia, &pFrame);
            if(pFrame) {
   
            IBitmap_GetInfo(pFrame, &pinfo,
sizeof(AEEBitmapInfo));                  
IDisplay_BitBlt(pMe->a.m_pIDisplay, 0, 0, pinfo.cx, pinfo.cy, pFrame,
0, 0, AEE_RO_COPY);               
IDisplay_UpdateEx(pMe->a.m_pIDisplay, TRUE);      
         
FREEIF(pFrame);
                //RELEASEIF(pFrame);
            }
       
    IMedia_EnableFrameCallback(pMe->pMedia,  TRUE);
        case
MM_STATUS_DONE:            { 
               DBGPRINTF("in Done");
       
        //IMedia_Stop(pMe->pMedia);  
                             
IMedia_Release(pMe->pMedia); 
               break;   
        } 
  
                        default:           { 
              
DBGPRINTF("%d",pNotify->nStatus);
                break;   
       
   
    }
        break; 
   case MM_CMD_RECORD: 
       break; 
   case
MM_CMD_GETMEDIAPARM: 
       break;  
  case MM_CMD_SETMEDIAPARM:
       
break;   
case MM_CMD_GETTOTALTIME:     
   DBGPRINTF("******Get Total
Time");
        if(pNotify->nStatus == MM_STATUS_DONE)        {
       
    DBGPRINTF("******Get Total Time DONE");   
    //   
 ISHELL_PostEvent(pMe->a.m_pIShell,AEECLSID_MFVIDEOALARM,EVT_USER+1,NULL,NULL);   
    }        else if(pNotify->nStatus == MM_STATUS_ABORT) {  
       
            DBGPRINTF("******Get Total Time ABORT");  
         
IMedia_Stop(pMe->pMedia);   
    }       
break;   
default:  
     
break;   
}
}
 
i got mm_status_start once..
then it display MM_STATUS_FRAME...i got the first frame on my screen..but after that it shows MM_STATUS_ABORT

RYANTech

0
2

Remove  IMedia_EnableFrameCallback(pMe->pMedia,  TRUE); call and add in your init function.
Did you check your code working on any other device? If it working then may be the issue with device Api porting.
you can aslo refer the sample mediaplayer source code ships with SDK.
here you go
https://developer.brewmp.com/resources/tech-guides/media-technology-guide

Remove  IMedia_EnableFrameCallback(pMe->pMedia,  TRUE); call and add in your init function.
Did you check your code working on any other device? If it working then may be the issue with device Api porting.
you can aslo refer the sample mediaplayer source code ships with SDK.
here you go
https://developer.brewmp.com/resources/tech-guides/media-technology-guide

yeah its because IMedia_EnableFrameCallback(pMe->pMedia,  TRUE);
my problem is solved.
thanks for your help smahesh.
:)

yeah its because IMedia_EnableFrameCallback(pMe->pMedia,  TRUE);
my problem is solved.
thanks for your help smahesh.
:)

Glad to see it worked.

Glad to see it worked.

I am trying to use rtsp video streaming  and i study it from mediaplayer example demo, i changed some code line to work with rtsp as follows but it shows only duration of video on screen but not play it, Can any one heple me? my email is : ssmali1505@gmail.com
 
    md.clsData = MMD_FILE_NAME;    sprintf(pszBuf, "rtsp://192.168.5.1:554/abc.3gp");    md.pData = (void *)pszBuf;
 

I am trying to use rtsp video streaming  and i study it from mediaplayer example demo, i changed some code line to work with rtsp as follows but it shows only duration of video on screen but not play it, Can any one heple me? my email is : ssmali1505@gmail.com
 
    md.clsData = MMD_FILE_NAME;    sprintf(pszBuf, "rtsp://192.168.5.1:554/abc.3gp");    md.pData = (void *)pszBuf;
 

Here i have provided sample code, can you just follow steps here. In your current code you cn implement like this.Important point here is that you can get the status of playback in the callback and narrow down the error in playback. pls refer sample below.boolean MediaControl::playStream(char* a_URL){

DBGPRINTF("#########A");

IFileMgr* mgr = 0;
ISHELL_CreateInstance(shell,AEECLSID_FILEMGR,(void**)&mgr);
IFile* file = 0;
boolean flag = TRUE;

IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE);
file = IFILEMGR_OpenFile(mgr,RTSP_MEDIA_FILE,_OFM_CREATE);
IFILE_Write(file,a_URL,STRLEN(a_URL));
IFILE_Release(file);
IFILEMGR_Release(mgr);

m_pszBuf = (char*) STRDUP(RTSP_MEDIA_FILE);

int n = ISHELL_CreateInstance(shell,AEECLSID_MEDIAMPEG4,(void**)&m_pIMedia);
DBGPRINTF("####1=%d",n);

m_MediaData.clsData = MMD_FILE_NAME;
m_MediaData.pData = (void *) m_pszBuf;
m_MediaData.dwSize = 0;

n = IMEDIA_SetMediaData(m_pIMedia,&m_MediaData);
DBGPRINTF("####2=%d",n);

IMedia_IsFrameCallback(m_pIMedia, &flag);

if( IMEDIA_RegisterNotify( m_pIMedia,(PFNMEDIANOTIFY)MediaNotifyCallback, this ) != SUCCESS )
{
DBGPRINTF("###Failure IMEDIA_RegisterNotify ");
}

n= IMedia_EnableFrameCallback(m_pIMedia, TRUE);

DBGPRINTF("####3=%d",n);

AEEDeviceInfo info;
ISHELL_GetDeviceInfo(shell,&info);
AEERect rect;
SETAEERECT(&rect,0,0,info.cxScreen,info.cyScreen);
n = IMEDIA_SetRect(m_pIMedia,&rect,NULL);
DBGPRINTF("####4=%d",n);

int rev = IMEDIA_SetVolume(m_pIMedia,m_iVolume);
n = IMEDIA_Play(m_pIMedia);
DBGPRINTF("####5=%d",n);

return(true);

void MediaControl::SetVolume(int32 volume)
{

{

int r = IMEDIA_SetVolume(m_pIMedia,volume);
m_iVolume = volume;

}

void MediaControl::MediaNotifyCallback( void* pUser, AEEMediaCmdNotify * pCmdNotify)
{
//DBGPRINTF("MediaNotifyCallback");

if( pCmdNotify->nSubCmd == MM_PARM_VOLUME )
return;

switch (pCmdNotify->nCmd)
{
case MM_CMD_GETTOTALTIME:
{
DBGPRINTF("nCmd == MM_CMD_GETTOTALTIME");

break;
}
case MM_CMD_PLAY:
{
switch (pCmdNotify->nStatus)
{
case MM_STATUS_TICK_UPDATE:
DBGPRINTF("play.tickupdate");
break;

case MM_STATUS_DONE:
DBGPRINTF("play.done");
break;
case MM_STATUS_FRAME :
DBGPRINTF("frame got");
break;
case MM_STATUS_PAUSE:
DBGPRINTF("play.pause");
break;

case MM_STATUS_START:
case MM_STATUS_RESUME:
DBGPRINTF("play.playing");
break;

case MM_STATUS_SEEK:
break;

case MM_STATUS_ABORT:
DBGPRINTF("play.finalabort");;
break;

case MM_STATUS_SEEK_FAIL:
case MM_STATUS_PAUSE_FAIL:
case MM_STATUS_RESUME_FAIL:
DBGPRINTF("play.seekabort");
break;

default:
//DBGPRINTF("play.unhandled_status");
break;

}

break;
}

default:
DBGPRINTF("unhandled command");
break;
}

Here i have provided sample code, can you just follow steps here. In your current code you cn implement like this.Important point here is that you can get the status of playback in the callback and narrow down the error in playback. pls refer sample below.boolean MediaControl::playStream(char* a_URL){

DBGPRINTF("#########A");

IFileMgr* mgr = 0;
ISHELL_CreateInstance(shell,AEECLSID_FILEMGR,(void**)&mgr);
IFile* file = 0;
boolean flag = TRUE;

IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE);
file = IFILEMGR_OpenFile(mgr,RTSP_MEDIA_FILE,_OFM_CREATE);
IFILE_Write(file,a_URL,STRLEN(a_URL));
IFILE_Release(file);
IFILEMGR_Release(mgr);

m_pszBuf = (char*) STRDUP(RTSP_MEDIA_FILE);

int n = ISHELL_CreateInstance(shell,AEECLSID_MEDIAMPEG4,(void**)&m_pIMedia);
DBGPRINTF("####1=%d",n);

m_MediaData.clsData = MMD_FILE_NAME;
m_MediaData.pData = (void *) m_pszBuf;
m_MediaData.dwSize = 0;

n = IMEDIA_SetMediaData(m_pIMedia,&m_MediaData);
DBGPRINTF("####2=%d",n);

IMedia_IsFrameCallback(m_pIMedia, &flag);

if( IMEDIA_RegisterNotify( m_pIMedia,(PFNMEDIANOTIFY)MediaNotifyCallback, this ) != SUCCESS )
{
DBGPRINTF("###Failure IMEDIA_RegisterNotify ");
}

n= IMedia_EnableFrameCallback(m_pIMedia, TRUE);

DBGPRINTF("####3=%d",n);

AEEDeviceInfo info;
ISHELL_GetDeviceInfo(shell,&info);
AEERect rect;
SETAEERECT(&rect,0,0,info.cxScreen,info.cyScreen);
n = IMEDIA_SetRect(m_pIMedia,&rect,NULL);
DBGPRINTF("####4=%d",n);

int rev = IMEDIA_SetVolume(m_pIMedia,m_iVolume);
n = IMEDIA_Play(m_pIMedia);
DBGPRINTF("####5=%d",n);

return(true);

void MediaControl::SetVolume(int32 volume)
{

{

int r = IMEDIA_SetVolume(m_pIMedia,volume);
m_iVolume = volume;

}

void MediaControl::MediaNotifyCallback( void* pUser, AEEMediaCmdNotify * pCmdNotify)
{
//DBGPRINTF("MediaNotifyCallback");

if( pCmdNotify->nSubCmd == MM_PARM_VOLUME )
return;

switch (pCmdNotify->nCmd)
{
case MM_CMD_GETTOTALTIME:
{
DBGPRINTF("nCmd == MM_CMD_GETTOTALTIME");

break;
}
case MM_CMD_PLAY:
{
switch (pCmdNotify->nStatus)
{
case MM_STATUS_TICK_UPDATE:
DBGPRINTF("play.tickupdate");
break;

case MM_STATUS_DONE:
DBGPRINTF("play.done");
break;
case MM_STATUS_FRAME :
DBGPRINTF("frame got");
break;
case MM_STATUS_PAUSE:
DBGPRINTF("play.pause");
break;

case MM_STATUS_START:
case MM_STATUS_RESUME:
DBGPRINTF("play.playing");
break;

case MM_STATUS_SEEK:
break;

case MM_STATUS_ABORT:
DBGPRINTF("play.finalabort");;
break;

case MM_STATUS_SEEK_FAIL:
case MM_STATUS_PAUSE_FAIL:
case MM_STATUS_RESUME_FAIL:
DBGPRINTF("play.seekabort");
break;

default:
//DBGPRINTF("play.unhandled_status");
break;

}

break;
}

default:
DBGPRINTF("unhandled command");
break;
}

I am using this code and i got error :
Unhandled exception at 0x03d42522 in SimTargetExecutor.exe: 0xC0000005: Access violation reading location 0x772f2f42.
For following line:
    IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE);    file = IFILEMGR_OpenFile(mgr,RTSP_MEDIA_FILE,_OFM_CREATE);    IFILE_Write(file,a_URL,STRLEN(a_URL));
 
I am storing file name "stream.url" in RTSP_MEDIA_FILEa_URL contains whole url of video e.g "rtsp://192.168.5.1:554/abc.3gp"
 

I am using this code and i got error :
Unhandled exception at 0x03d42522 in SimTargetExecutor.exe: 0xC0000005: Access violation reading location 0x772f2f42.
For following line:
    IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE);    file = IFILEMGR_OpenFile(mgr,RTSP_MEDIA_FILE,_OFM_CREATE);    IFILE_Write(file,a_URL,STRLEN(a_URL));
 
I am storing file name "stream.url" in RTSP_MEDIA_FILEa_URL contains whole url of video e.g "rtsp://192.168.5.1:554/abc.3gp"
 

Can u check for Ifilemgr pointer if valid?
Comment out IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE); and see if still u get exception.
can you make sure taget simulator have IMediaMPEG4.dll installed under target.
for ex. C:\Brew MP\Targets\Jet (1.0.2.679 PRO)\fs\sys\mod\BREWSim\modules\IMediaMPEG4.dll
 

Can u check for Ifilemgr pointer if valid?
Comment out IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE); and see if still u get exception.
can you make sure taget simulator have IMediaMPEG4.dll installed under target.
for ex. C:\Brew MP\Targets\Jet (1.0.2.679 PRO)\fs\sys\mod\BREWSim\modules\IMediaMPEG4.dll
 

Hi Smahesh,
i am using following code to run video but still i get only time duration and not playing video , Please help me.  If you have any example source code can you share with me? my Email id is ssmali1505@gmail.com
 
static void CMediaPlayer_PlayFile(CMediaPlayer * pme, const char * pszFile){   AEEMediaData   md;   char *         pszBuf;    IFileMgr* mgr;    IFile* file=NULL;    boolean flag = TRUE;    char *         m_pszBuf;    char *         a_URL;    if (ISHELL_CreateInstance(pme->a.m_pIShell, AEECLSID_FILEMGR, (void **)&mgr) != SUCCESS)     {         mgr = NULL;    }else{    // to open a file.    //#define RTSP_MEDIA_FILE       "stream.url"    a_URL="";    IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE);    file=IFILEMGR_OpenFile(mgr,RTSP_MEDIA_FILE,_OFM_CREATE);    sprintf(a_URL, "rtsp://192.168.4.1:554/abc.3gp");    IFILE_Write(file,a_URL,STRLEN(a_URL));        }        m_pszBuf = (char*) STRDUP(RTSP_MEDIA_FILE);    md.clsData = MMD_FILE_NAME;       md.pData =(void *)m_pszBuf;    md.dwSize =0;         if (!CMediaPlayer_SetWindow(pme, MPW_PLAYER, MPPW_PLAY))   {      FREE(pszBuf);      return;   }   if (CPlayerWin_SetMediaData((CPlayerWin *)pme->m_pWin, &md))   {      ISHELL_PostEvent(pme->a.m_pIShell, AEECLSID_MEDIAPLAYER, EVT_CREATEMEDIA, 0, 0);      if (pme->m_bPlugin)         ISHELL_PostEvent(pme->a.m_pIShell, AEECLSID_MEDIAPLAYER, EVT_COMMAND, IDM_PM_PLAY, 0);   }}

Hi Smahesh,
i am using following code to run video but still i get only time duration and not playing video , Please help me.  If you have any example source code can you share with me? my Email id is ssmali1505@gmail.com
 
static void CMediaPlayer_PlayFile(CMediaPlayer * pme, const char * pszFile){   AEEMediaData   md;   char *         pszBuf;    IFileMgr* mgr;    IFile* file=NULL;    boolean flag = TRUE;    char *         m_pszBuf;    char *         a_URL;    if (ISHELL_CreateInstance(pme->a.m_pIShell, AEECLSID_FILEMGR, (void **)&mgr) != SUCCESS)     {         mgr = NULL;    }else{    // to open a file.    //#define RTSP_MEDIA_FILE       "stream.url"    a_URL="";    IFILEMGR_Remove(mgr,RTSP_MEDIA_FILE);    file=IFILEMGR_OpenFile(mgr,RTSP_MEDIA_FILE,_OFM_CREATE);    sprintf(a_URL, "rtsp://192.168.4.1:554/abc.3gp");    IFILE_Write(file,a_URL,STRLEN(a_URL));        }        m_pszBuf = (char*) STRDUP(RTSP_MEDIA_FILE);    md.clsData = MMD_FILE_NAME;       md.pData =(void *)m_pszBuf;    md.dwSize =0;         if (!CMediaPlayer_SetWindow(pme, MPW_PLAYER, MPPW_PLAY))   {      FREE(pszBuf);      return;   }   if (CPlayerWin_SetMediaData((CPlayerWin *)pme->m_pWin, &md))   {      ISHELL_PostEvent(pme->a.m_pIShell, AEECLSID_MEDIAPLAYER, EVT_CREATEMEDIA, 0, 0);      if (pme->m_bPlugin)         ISHELL_PostEvent(pme->a.m_pIShell, AEECLSID_MEDIAPLAYER, EVT_COMMAND, IDM_PM_PLAY, 0);   }}

for above problem: i am using emulator is Candy bar 1.0.4 6.0.1 pro and Media player sdk demo, Just i changed the above method, can i wrong any place?

for above problem: i am using emulator is Candy bar 1.0.4 6.0.1 pro and Media player sdk demo, Just i changed the above method, can i wrong any place?

Can you try running code once on device? It seems to have some issues with rtsp on simualtor. its working for me on pantech p6020 calix.

Can you try running code once on device? It seems to have some issues with rtsp on simualtor. its working for me on pantech p6020 calix.