RTSP support in BMP | developer.brewmp.com RTSP support in BMP | developer.brewmp.com

Developer

RTSP support in BMP

Forums:

I would like to know whether RTSP protocol is supported by the IWEB APIs in Brew Mobile Platform. I was testing the Media actor provided with the MediaViewer trig application which is provided with the Softkey Application Suite package, I provided the RTSP URL to this Actor but it was not able to play it. The media actor is using the IWEB APIs to perform RTSP transaction somehow, but is not working. My aim is to make this MediaViewer play youtube videos. Please provide me with inputs if any.

any luck with this? plz share if you have any info/suggestion!
Appreciate your response!

any luck with this? plz share if you have any info/suggestion!
Appreciate your response!

IWeb does not supports download of rtsp urls. it supports http/https/ftp etc. if you try to hit a rtsp url, you would get - WEB_ERROR_UNSUPSCHEME.
 
you can plzy RTSP videos directly using IMedia.
see the sample code on this post for playing video:-
https://developer.brewmp.com/forum/video-playback
 
For playing a rtsp video link.
1. store/copy the rtsp url(only one in one file) in a plain txt file & save the file with the extension "*.url"
2. pass this filename as media data as below:
md.clsData = MMD_FILE_NAME;
md.pData = (
void*)"myrtspfile.url";

md.dwSize = 0;
 
3. Rest all is same as playing a normal video.
 

IMedia Engine will internally start streaming & will either play render or send the App the Media Frames whenever they are ready.

 
i think thereafter you should be able to link the IMedia object to the Mediaviewer.

IWeb does not supports download of rtsp urls. it supports http/https/ftp etc. if you try to hit a rtsp url, you would get - WEB_ERROR_UNSUPSCHEME.
 
you can plzy RTSP videos directly using IMedia.
see the sample code on this post for playing video:-
https://developer.brewmp.com/forum/video-playback
 
For playing a rtsp video link.
1. store/copy the rtsp url(only one in one file) in a plain txt file & save the file with the extension "*.url"
2. pass this filename as media data as below:
md.clsData = MMD_FILE_NAME;
md.pData = (
void*)"myrtspfile.url";

md.dwSize = 0;
 
3. Rest all is same as playing a normal video.
 

IMedia Engine will internally start streaming & will either play render or send the App the Media Frames whenever they are ready.

 
i think thereafter you should be able to link the IMedia object to the Mediaviewer.

Hi shivendra.
thank you for ur response! it is really descriptive, I was wondering if i can put youtube link in the save .uri file? not sure if it youtube videos support RTSP streaming?
primary goal for me is to be able to play youtube videos... any info appreciated!!

Follow shivendra 
Private Message

0 6
shivendra

member since04.28.08

Hi shivendra.
thank you for ur response! it is really descriptive, I was wondering if i can put youtube link in the save .uri file? not sure if it youtube videos support RTSP streaming?
primary goal for me is to be able to play youtube videos... any info appreciated!!

Follow shivendra 
Private Message

0 6
shivendra

member since04.28.08

yes youtube supports RTSP. You may dump those links to a file & play them. this may also be achieved on the run.
check http://m.youtube.com/ 
on this site the hyperlinks of videos are direct link to the rtsp video link.
 
here is one more way - check it:
http://www.google.com/support/forum/p/youtube/thread?tid=63d31799742e381...
also google "RTSP links for youtube videos" to get more options.

yes youtube supports RTSP. You may dump those links to a file & play them. this may also be achieved on the run.
check http://m.youtube.com/ 
on this site the hyperlinks of videos are direct link to the rtsp video link.
 
here is one more way - check it:
http://www.google.com/support/forum/p/youtube/thread?tid=63d31799742e381...
also google "RTSP links for youtube videos" to get more options.

Hi Shivendra,
I tried ur suggestion, i copy the rtsp link from m.youtube.com and put in url file and use that as source to play video, unfortunately, i get MM_STATUS_START in callback, i dont see any video playback, and in less than a minute, i get MM_STATUS_ABORT.
appreciate your suggestions!
static void youtubeplayer_streamMedia(youtubeplayer *pMe)
{
int nErr = AEE_EFAILED;
//int x, y, sizeX, sizeY;
AEECLSID cls;
AEEMediaData pmd ;
char szMIME[32 + 1];
char * psz ;
char * pszExt;

//x = 0; y = 0;
//sizeX = 170; sizeY = 100;
SETAEERECT(&pMe->pRect, 0,0, pMe->deviceInfo.cxScreen, pMe->deviceInfo.cyScreen);

pmd.clsData = MMD_FILE_NAME;
pmd.pData = "downloader.url";
pmd.dwSize = 0;

pszExt = (char *)MALLOC(sizeof(char)*10);

psz = (char *)pmd.pData;
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(pMe->applet.m_pIShell, AEECLSID_MediaVideo, szMIME);
if (!cls)
return;
}
FREE(pszExt);
nErr = ISHELL_CreateInstance(pMe->applet.m_pIShell, cls, (void **)&pMe->pIMedia);
// Create IMediaVideo object
if (SUCCESS != nErr)
return;

// Verify IMediaVideo
// Find out if this is the AEEIID_MediaVideo based media
nErr = IMEDIA_QueryInterface(pMe->pIMedia, AEEIID_IMediaVideo, (void **)&pMe->pIMediaVideo);
if (SUCCESS != nErr )
return;

// set display rectangle
nErr = IMEDIA_SetRect(pMe->pIMedia, &pMe->pRect, NULL);
if (SUCCESS != nErr )
return;
nErr = IMEDIA_EnableFrameCallback( pMe->pIMedia, TRUE );
if (SUCCESS != nErr)
return;

nErr = IMEDIA_SetMediaData(pMe->pIMedia, &pmd);
if (SUCCESS != nErr)
return;

// Register CApp_MediaNotify() function as callback.
nErr = IMEDIA_RegisterNotify(pMe->pIMedia, youtubeplayer_MediaNotify, pMe);
if (SUCCESS != nErr )
return;

nErr = IMEDIA_Play(pMe->pIMedia);
if (SUCCESS != nErr )
return;
IDISPLAY_ClearScreen(pMe->applet.m_pIDisplay);
IDISPLAY_Update(pMe->applet.m_pIDisplay);

Hi Shivendra,
I tried ur suggestion, i copy the rtsp link from m.youtube.com and put in url file and use that as source to play video, unfortunately, i get MM_STATUS_START in callback, i dont see any video playback, and in less than a minute, i get MM_STATUS_ABORT.
appreciate your suggestions!
static void youtubeplayer_streamMedia(youtubeplayer *pMe)
{
int nErr = AEE_EFAILED;
//int x, y, sizeX, sizeY;
AEECLSID cls;
AEEMediaData pmd ;
char szMIME[32 + 1];
char * psz ;
char * pszExt;

//x = 0; y = 0;
//sizeX = 170; sizeY = 100;
SETAEERECT(&pMe->pRect, 0,0, pMe->deviceInfo.cxScreen, pMe->deviceInfo.cyScreen);

pmd.clsData = MMD_FILE_NAME;
pmd.pData = "downloader.url";
pmd.dwSize = 0;

pszExt = (char *)MALLOC(sizeof(char)*10);

psz = (char *)pmd.pData;
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(pMe->applet.m_pIShell, AEECLSID_MediaVideo, szMIME);
if (!cls)
return;
}
FREE(pszExt);
nErr = ISHELL_CreateInstance(pMe->applet.m_pIShell, cls, (void **)&pMe->pIMedia);
// Create IMediaVideo object
if (SUCCESS != nErr)
return;

// Verify IMediaVideo
// Find out if this is the AEEIID_MediaVideo based media
nErr = IMEDIA_QueryInterface(pMe->pIMedia, AEEIID_IMediaVideo, (void **)&pMe->pIMediaVideo);
if (SUCCESS != nErr )
return;

// set display rectangle
nErr = IMEDIA_SetRect(pMe->pIMedia, &pMe->pRect, NULL);
if (SUCCESS != nErr )
return;
nErr = IMEDIA_EnableFrameCallback( pMe->pIMedia, TRUE );
if (SUCCESS != nErr)
return;

nErr = IMEDIA_SetMediaData(pMe->pIMedia, &pmd);
if (SUCCESS != nErr)
return;

// Register CApp_MediaNotify() function as callback.
nErr = IMEDIA_RegisterNotify(pMe->pIMedia, youtubeplayer_MediaNotify, pMe);
if (SUCCESS != nErr )
return;

nErr = IMEDIA_Play(pMe->pIMedia);
if (SUCCESS != nErr )
return;
IDISPLAY_ClearScreen(pMe->applet.m_pIDisplay);
IDISPLAY_Update(pMe->applet.m_pIDisplay);

did u try it on a simulator or device. which simulator or which devce?
also u may try this once:- get the class by setting the mime type as the actual video format i.e. mp4,3gp, etc..

did u try it on a simulator or device. which simulator or which devce?
also u may try this once:- get the class by setting the mime type as the actual video format i.e. mp4,3gp, etc..

I tried on simulator, I am using .url file with "rtsp://v3.cache5.c.youtube.com/CjYLENy73wIaLQny30_7Py1AVRMYJCAkFEIJbXYtZ..." a rtsp link in it.
so mime type i put manually is "video/url"
 
I tried to use ISHELL_DetectType() to get mime type for the url file, but i get API unsupported error.

I tried on simulator, I am using .url file with "rtsp://v3.cache5.c.youtube.com/CjYLENy73wIaLQny30_7Py1AVRMYJCAkFEIJbXYtZ..." a rtsp link in it.
so mime type i put manually is "video/url"
 
I tried to use ISHELL_DetectType() to get mime type for the url file, but i get API unsupported error.

somehow the rtsp links we try to get from m.youtube.com are not playable even on Windows players like Itunes, VLC.
looking for other ways!

somehow the rtsp links we try to get from m.youtube.com are not playable even on Windows players like Itunes, VLC.
looking for other ways!

HI Shivendra
 
I want to know what would be the approach for the devices which doesnt support rtsp streaming for youtube applciation. can you please what would be the appraoch for this???
 
Regards
Gatuam

HI Shivendra
 
I want to know what would be the approach for the devices which doesnt support rtsp streaming for youtube applciation. can you please what would be the appraoch for this???
 
Regards
Gatuam

it seems the rtsp URLs we get from m.youtube.com work only on mobile devices.
they are not working on Windows & simulator but will work on mobile devices.
tried on CDM 8999 & VX11K & the same rtsp links work fine.
 
Gatum plz discuss here:
https://developer.brewmp.com/forum/streaming-video-youtube-without-using...

it seems the rtsp URLs we get from m.youtube.com work only on mobile devices.
they are not working on Windows & simulator but will work on mobile devices.
tried on CDM 8999 & VX11K & the same rtsp links work fine.
 
Gatum plz discuss here:
https://developer.brewmp.com/forum/streaming-video-youtube-without-using...