Forums Register Login

Video Streaming Using MMAPI

+Pie Number of slices to send: Send
Hello
we can run the video file using MMAPI Player class in wireless toolkit.
but that is http so the whole file is downloaded first to the local system and then run from the local system.
does anyone know how can we run the video file using video streaming in J2ME in which video should be streming instead of downloaded to the local system.?
thanks
-gopal
+Pie Number of slices to send: Send
Hi,
I think with my code can help you.
//API media
import javax.microedition.media.*;
import javax.microedition.media.control.*;
import javax.microedition.media.protocol.*;
Player p;
void playMusicBuffer( in inputStream ){


try {


if(p==null){
p = Manager.createPlayer(in,"audio/mpeg");
p.start();

}else{
p.stop();
p.close();
p = Manager.createPlayer(isb,"audio/mpeg");
p.start();

}

}
catch (IException ie) {
//...
}
catch (Exception ioe) {
//....
}

}

OULD
+Pie Number of slices to send: Send
Hi,
Just a error in the stream. Now it's OK.
//API media
import javax.microedition.media.*;
import javax.microedition.media.control.*;
import javax.microedition.media.protocol.*;
Player p;
void playVideo( in inputStream ){

try {

if(p==null){
p = Manager.createPlayer(in,"audio/mpeg");
p.start();
}else{
p.stop();
p.close();
p = Manager.createPlayer(in,"audio/mpeg");
p.start();
}
}
catch (IException ie) {
//...
}
catch (Exception ioe) {
//....
}

}

OULD
+Pie Number of slices to send: Send
Hello
the code u provide is for audio only and not for video streaming right.
and what about inputstream where it comes from/
please clarify this
thanks
rakesh
+Pie Number of slices to send: Send
Hi,
the code u provide is for audio only and not for video streaming right!
You are right: change only with ,"video/mpeg");
and what about inputstream where it comes from/ ,
HttpConnection conn = ( HttpConnection )Connector.open( YOUR_URL );
InputStream in = conn.openDataInputStream();
please clarify this:
This URL can help you
http://developers.sun.com/techtopics/mobility/midp/articles/mmapioverview/
OULD NADIF
+Pie Number of slices to send: Send
Hello
But here In HttpConnection it downloads entire video file locally on the system.
can u tell me how to do video streaming like how to implement custom datasource for RTP?
so we can write creatPlayer(DataSource ds);
THANKS
-RAKESH
+Pie Number of slices to send: Send
Hello
To implement your custom DataSource you just have to develop all its methods. Take a look on the internet, I found many examples. You will need to defin a custom SourceStream too.
+Pie Number of slices to send: Send
"Take a look on the internet, I found many examples"

Really?

Can you list them?

Best regards.
+Pie Number of slices to send: Send
Hi Diana,

I was interested in doin something similar too. Can you please share some of the links on the internet that would provide some info on how to go about doin this.

I apologize but I guess my google skills arent as good these days ...:-)

Regards
His brain is the size of a cherry pit! About the size of this ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2569 times.
Similar Threads
Media format for video streaming
Using commons-fileupload-1.2.1.jar to upload file to MySQL
RTP DataSource in MMAPI
j2me: upload an image file captured by cell camera
playing MPEG format
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:32:35.