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

Developer

Forums

Forums:

Dear all,

I would like to play an mp3 file from server i.e. real time streaming.

I used brew's RoadWarrior example program to fetch the mp3 data from server.
The server data comming successfully. But I could not play it in real time.

I used IMedia interface for this purpose. But I failed to create IMedia Interface.

The AEEMediaUtil_CreateMedia(pMe->a.m_pIShell, &pMe->sMediaData, &pMe->pIMediaObject) method failes to create pIMediaObject.

Here is my sample code in RoadWarrior:
---------------------------------------------------

static void WebReadCB(void* cxt) // RoadWarrior's function
{
if (pWebRespInfo)
{
if (!WEB_ERROR_SUCCEEDED(pWebRespInfo->nCode))
{
xStatus(pMe, 1, IDS_ERR_NO_SERVICE);
pMe->m_bDownloadErr = TRUE;
}
else
{
pMe->m_pISource = pWebRespInfo->pisMessage;
ByteCount = ISOURCE_Read(pMe->m_pISource, (char*)buf, sizeof(buf));
pMe->bufSize = ByteCount;
if(!pMe->check)
InitMediaPlayer(pMe);
if(pMe->check)
PlayMediaFile(pMe);

}

void InitMediaPlayer(CRoadWarriorApp *pMe) // my function
{
pMe->sMediaData.clsData = MMD_ISOURCE;
pMe->sMediaData.pData = (void*)pMe->m_pISource;
pMe->sMediaData.dwSize = pMe->bufSize;

ret = AEEMediaUtil_CreateMedia(pMe->a.m_pIShell, &pMe->sMediaData, &pMe->pIMediaObject); // fails

if(!pMe->pIMediaObject)
{
IMEDIAUTIL_Release(pMe->pMediaUtil);
return;
}
IMEDIAUTIL_Release(pMe->pMediaUtil);
IMEDIA_RegisterNotify(pMe->pIMediaObject, (PFNMEDIANOTIFY)MediaEventHandler, (void *)pMe);
IMEDIA_GetTotalTime(pMe->pIMediaObject);
pMe->check = 1;

}
-----------------------------------------------------------

what is the actual thing to set the media data for ISource?
How ISource can be used for real time streaming?

Thanks
Tonmoy

Hi All,
Is there anybody to know exactly about this issue?
Please help me in this regard. There are lots of discussion in the forum but no exact solution.
Pls help!!!
Tonmoy

Hi All,
Is there anybody to know exactly about this issue?
Please help me in this regard. There are lots of discussion in the forum but no exact solution.
Pls help!!!
Tonmoy

I have a similar problem, and I don't know how to solve either. :(

I have a similar problem, and I don't know how to solve either. :(

Hi Tonmoy80
I have a similar problem. Since your this post was posted long back, I am pretty confident you must have achieved the solution for the same. can you please help me by sharing how did you achieve the real time streaming of the mp3 file received from the server??
Looking forward for your response....
Thanks in advance
SweetPal

Hi Tonmoy80
I have a similar problem. Since your this post was posted long back, I am pretty confident you must have achieved the solution for the same. can you please help me by sharing how did you achieve the real time streaming of the mp3 file received from the server??
Looking forward for your response....
Thanks in advance
SweetPal