IMediaVideo interface | developer.brewmp.com IMediaVideo interface | developer.brewmp.com

Developer

IMediaVideo interface

Forums:

Hi all,

I have some question about IMediaVideo interface. This interface typically will provide great abilities to manipulate with video playback named video rotation, scaling, and positioning. As I understood, I need to install special extension IMediaMpeg4 to get these functions worked in emulator.

My question is - do I need to install something extra on real handset to get these functions worked on handset? IOW - if I will create a programm using IMediaVideo interface functions, do I need to install some extra extension as well?

My device running with BREW version 3.1.3.17. As far I know AEEMediaVideo was released on Q4 2006.

Thanks in advance for any information

First you need to check if your target device supports MPEG4, if yes (that means OEM enabled IMEDIA Mpeg4 interface) then you are okay, no extra step is necessary on your part, otherwise you wouldn't be able to run any video.

First you need to check if your target device supports MPEG4, if yes (that means OEM enabled IMEDIA Mpeg4 interface) then you are okay, no extra step is necessary on your part, otherwise you wouldn't be able to run any video.

Ruben, you lose me totally...
Let's me explain. First, I created very simple program to check is my target device supports MPEG4 or not. The code snippet is below:
// Create IMediaVideo object
if (SUCCESS != ISHELL_CreateInstance(pApp->a.m_pIShell, AEECLSID_MEDIAMPEG4, (void **)&pApp->m_pMedia))
return;
SETAEERECT( &pApp->m_MediaPlaceHolder, x, y, sizeX, sizeY );
// set display rectangle
if (SUCCESS != IMEDIA_SetRect(pApp->m_pMedia, &pApp->m_MediaPlaceHolder, NULL))
return;
if (SUCCESS != IMEDIA_SetMediaData(pApp->m_pMedia, &md)
return;
// Register CApp_MediaNotify() function as callback.
if (SUCCESS != IMEDIA_RegisterNotify(pApp->m_pMedia, PlayEx_MediaNotify, pApp);)
return;
if (AEE_SUCCESS == IMEDIA_Play(pApp->m_pMedia))
pApp->m_AppState = PLAY_IN_PROGRESS;
As you see, this code doesn't reference to any IMediaVideo interface method. I'm absolutely OK to play MP4 and 3GP files on both my target devices and in emulator.
Then, I have modified the code above and added references to the IMediaVideo. I just copied code snippets from BREW API reference and added some modifications. The new code snippet is below:
// just for reference - m_pMedia is IMedia *, m_pMediaVideo is IMediaVideo *
md.pData = pList->m_pSongs[pList->ActualSong]; // Media filename, e.g. "egypt.mp4"
psz = (char *)md.pData;
// Check the extension...
pszExt = STRRCHR(psz, '.');
if (pszExt)
pszExt++;
if (pszExt && *pszExt)
{
// Check MediaVideo MIME base
STRLCPY(szMIME, VIDEO_MIME_BASE, sizeof(szMIME));
STRLCAT(szMIME, pszExt, (sizeof(szMIME) - STRLEN(szMIME)));
// Find AEECLSID_MediaVideo based handler class ID for MIME
cls = ISHELL_GetHandler(pApp->a.m_pIShell, AEECLSID_MediaVideo, szMIME);
if (!cls)
return;
}
// Create IMediaVideo object
if (SUCCESS != ISHELL_CreateInstance(pApp->a.m_pIShell, cls, (void **)&pApp->m_pMedia))
return;
// Verify IMediaVideo
// Find out if this is the AEEIID_MediaVideo based media
if (SUCCESS != IMEDIA_QueryInterface(pApp->m_pMedia, AEEIID_IMediaVideo, (void **)&pApp->m_pMediaVideo))
return;
// the code below is still the same ...
This code works OK in emulator (IOW - I able to see video) but failed on target device. I found that this line
cls = ISHELL_GetHandler(pApp->a.m_pIShell, AEECLSID_MediaVideo, szMIME);
works OK in emulator (return 0x0103D3A0 - video/mp4 defined in aeemediavideo.mif, "Exported MIME Types" section) but return 0 on target device.
AEECLSID_MediaVideo is defined in aeemediavideo.bid. I found aeemediavideo.mif and aeemediavideo.dll in installed BREW SDK package, under extensions directory... So my assumption was that I must install some extension on target device to get code above worked...
But, based on your answer, I don't need to install something extra on handset. The question now is - why code below works in emulator and failed for real device?
Thanks for your time and help

Ruben, you lose me totally...
Let's me explain. First, I created very simple program to check is my target device supports MPEG4 or not. The code snippet is below:
// Create IMediaVideo object
if (SUCCESS != ISHELL_CreateInstance(pApp->a.m_pIShell, AEECLSID_MEDIAMPEG4, (void **)&pApp->m_pMedia))
return;
SETAEERECT( &pApp->m_MediaPlaceHolder, x, y, sizeX, sizeY );
// set display rectangle
if (SUCCESS != IMEDIA_SetRect(pApp->m_pMedia, &pApp->m_MediaPlaceHolder, NULL))
return;
if (SUCCESS != IMEDIA_SetMediaData(pApp->m_pMedia, &md)
return;
// Register CApp_MediaNotify() function as callback.
if (SUCCESS != IMEDIA_RegisterNotify(pApp->m_pMedia, PlayEx_MediaNotify, pApp);)
return;
if (AEE_SUCCESS == IMEDIA_Play(pApp->m_pMedia))
pApp->m_AppState = PLAY_IN_PROGRESS;
As you see, this code doesn't reference to any IMediaVideo interface method. I'm absolutely OK to play MP4 and 3GP files on both my target devices and in emulator.
Then, I have modified the code above and added references to the IMediaVideo. I just copied code snippets from BREW API reference and added some modifications. The new code snippet is below:
// just for reference - m_pMedia is IMedia *, m_pMediaVideo is IMediaVideo *
md.pData = pList->m_pSongs[pList->ActualSong]; // Media filename, e.g. "egypt.mp4"
psz = (char *)md.pData;
// Check the extension...
pszExt = STRRCHR(psz, '.');
if (pszExt)
pszExt++;
if (pszExt && *pszExt)
{
// Check MediaVideo MIME base
STRLCPY(szMIME, VIDEO_MIME_BASE, sizeof(szMIME));
STRLCAT(szMIME, pszExt, (sizeof(szMIME) - STRLEN(szMIME)));
// Find AEECLSID_MediaVideo based handler class ID for MIME
cls = ISHELL_GetHandler(pApp->a.m_pIShell, AEECLSID_MediaVideo, szMIME);
if (!cls)
return;
}
// Create IMediaVideo object
if (SUCCESS != ISHELL_CreateInstance(pApp->a.m_pIShell, cls, (void **)&pApp->m_pMedia))
return;
// Verify IMediaVideo
// Find out if this is the AEEIID_MediaVideo based media
if (SUCCESS != IMEDIA_QueryInterface(pApp->m_pMedia, AEEIID_IMediaVideo, (void **)&pApp->m_pMediaVideo))
return;
// the code below is still the same ...
This code works OK in emulator (IOW - I able to see video) but failed on target device. I found that this line
cls = ISHELL_GetHandler(pApp->a.m_pIShell, AEECLSID_MediaVideo, szMIME);
works OK in emulator (return 0x0103D3A0 - video/mp4 defined in aeemediavideo.mif, "Exported MIME Types" section) but return 0 on target device.
AEECLSID_MediaVideo is defined in aeemediavideo.bid. I found aeemediavideo.mif and aeemediavideo.dll in installed BREW SDK package, under extensions directory... So my assumption was that I must install some extension on target device to get code above worked...
But, based on your answer, I don't need to install something extra on handset. The question now is - why code below works in emulator and failed for real device?
Thanks for your time and help

sdmitry wrote:But, based on your answer, I don't need to install something extra on handset. The question now is - why code below works in emulator and failed for real device?
Thanks for your time and help The device pack for the target will have information on whether IMediaVideo is supported or not.
Check the target device pack file -- DeviceSpecification->MediaVideoConfiguration->Supported

sdmitry wrote:But, based on your answer, I don't need to install something extra on handset. The question now is - why code below works in emulator and failed for real device?
Thanks for your time and help The device pack for the target will have information on whether IMediaVideo is supported or not.
Check the target device pack file -- DeviceSpecification->MediaVideoConfiguration->Supported

Oceans eleven, thank you. The only problem is that my target devices are Siemens SXG75 and Benq Siemens EF81 running on BREW 3.1.3.17 (MSM 6250 and MSM6250A, appropriately)
I don't belive I'm able to find any device pack file for both devices at all :D
Although, thank you very much for your response. If you or Ruben will have any other idea I can do in my case - please let me know.
Thanks again!

Oceans eleven, thank you. The only problem is that my target devices are Siemens SXG75 and Benq Siemens EF81 running on BREW 3.1.3.17 (MSM 6250 and MSM6250A, appropriately)
I don't belive I'm able to find any device pack file for both devices at all :D
Although, thank you very much for your response. If you or Ruben will have any other idea I can do in my case - please let me know.
Thanks again!

Hi,
Where can I find this Imediavideo interface on BREW extranet?
is it available to brew developers or just oems ?
-Ash

Hi,
Where can I find this Imediavideo interface on BREW extranet?
is it available to brew developers or just oems ?
-Ash

How can i play the video after creating Imediavideo object.
I am trying to play as shown below.
IMEDIA_SetMediaData(pMe->m_pMediaVideo,&md);
IMEDIA_RegisterNotify(pMe->m_pMediaVideo,PFNMEDIANOTIFY)player_Callback,(void*)pMe);
IMediaVideo_Play(pMe->m_pMediaVideo);
I shows blank screen.but its returning SUCCESS after calling IMediaVideo_Play(pMe->m_pMediaVideo);
its calling player_callback also but there it going to MM_STATUS_TICK_UPDATE.
is there any posibility to work the same code in target device?
Thanks in Advance
Vijay

How can i play the video after creating Imediavideo object.
I am trying to play as shown below.
IMEDIA_SetMediaData(pMe->m_pMediaVideo,&md);
IMEDIA_RegisterNotify(pMe->m_pMediaVideo,PFNMEDIANOTIFY)player_Callback,(void*)pMe);
IMediaVideo_Play(pMe->m_pMediaVideo);
I shows blank screen.but its returning SUCCESS after calling IMediaVideo_Play(pMe->m_pMediaVideo);
its calling player_callback also but there it going to MM_STATUS_TICK_UPDATE.
is there any posibility to work the same code in target device?
Thanks in Advance
Vijay

sdmitry wrote:
AEECLSID_MediaVideo is defined in aeemediavideo.bid. I found aeemediavideo.mif and aeemediavideo.dll in installed BREW SDK package, under extensions directory... So my assumption was that I must install some extension on target device to get code above worked...
But, based on your answer, I don't need to install something extra on handset. The question now is - why code below works in emulator and failed for real device?
Thanks for your time and help
Hi, I'm currently using Brew 3.1.5 SP02 and it doesn't appear like IMediaVideo is supported in this version. Is this correct? According to this thread, it appears folks here have been able to get it to work with SP01, but in SP02, I don't see a aeemediavideo.dll and when I call ISHELL_GetHandler on AEECLSID_MediaVideo, the clsid returned is 0
Does anyone have the same problems witn BREW 3.1.5 SP02?

sdmitry wrote:
AEECLSID_MediaVideo is defined in aeemediavideo.bid. I found aeemediavideo.mif and aeemediavideo.dll in installed BREW SDK package, under extensions directory... So my assumption was that I must install some extension on target device to get code above worked...
But, based on your answer, I don't need to install something extra on handset. The question now is - why code below works in emulator and failed for real device?
Thanks for your time and help
Hi, I'm currently using Brew 3.1.5 SP02 and it doesn't appear like IMediaVideo is supported in this version. Is this correct? According to this thread, it appears folks here have been able to get it to work with SP01, but in SP02, I don't see a aeemediavideo.dll and when I call ISHELL_GetHandler on AEECLSID_MediaVideo, the clsid returned is 0
Does anyone have the same problems witn BREW 3.1.5 SP02?

rcp2278 wrote:Hi, I'm currently using Brew 3.1.5 SP02 and it doesn't appear like IMediaVideo is supported in this version. Is this correct? According to this thread, it appears folks here have been able to get it to work with SP01, but in SP02, I don't see a aeemediavideo.dll and when I call ISHELL_GetHandler on AEECLSID_MediaVideo, the clsid returned is 0
Does anyone have the same problems witn BREW 3.1.5 SP02?
download it from extranet

rcp2278 wrote:Hi, I'm currently using Brew 3.1.5 SP02 and it doesn't appear like IMediaVideo is supported in this version. Is this correct? According to this thread, it appears folks here have been able to get it to work with SP01, but in SP02, I don't see a aeemediavideo.dll and when I call ISHELL_GetHandler on AEECLSID_MediaVideo, the clsid returned is 0
Does anyone have the same problems witn BREW 3.1.5 SP02?
download it from extranet