In the interests of keeping things together here is the
link<http://groups.google.com/group/android-developers/browse_thread/thread/f963e8f7ac35b75b>for
my thread I started in the developers thread just a few days ago
related
to this.

I will file a bug request sometime soon unless anybody else can shed any
light (although I don't know if there will be much attention paid to it). It
is more a feature enhancement than a bug I think, but
it's definitely causing me difficulty.

The functionality to decode RTP streams is already built into OpenCore but
unfortunately you can't pass an SDP file to the MediaPlayer (OpenCore
Wrapper) unless it contains an RTSP stream link inside it. This is a bit
dumb really... what's the point in passing an SDP file in that case? but ah.

There seems to be a limitation that means that it will only accept SDP
information with RTP streams inside if it gets them from the RTSP stream
(e.g. it gets this information from SETUP in the RTSP protocal).

Thus far it seems the only solution is to dump the RTP packets to a file
(periodically close the file and write a new one) then periodically open
these files in mediaplayer. A pretty ugly hack really!

-- 
"The greatest challenge to any thinker is stating the problem in a way that
will allow a solution"
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Tue, May 25, 2010 at 2:19 PM, debelyoo <jean.ross...@gmail.com> wrote:

> Hi Andy,
>
> Good to see that the problem is not only specific to my environment :)
> And I hope we could find a solution, or at least one Android engineer
> will take a look at this post.
>
> I still stuck on it... I tried on Android 1.6 (G1) and Android 2.1
> (HTC Desire). Both do not work.
>
> I'm currently looking into the MediaPlayer sources, to see if I can
> get more details about the error and maybe fix the bug myself.
>
> Cheers
> Jean
>
> On May 24, 9:45 am, Andy Savage <a...@bluewire.net.nz> wrote:
> > Hi there,
> >
> > Any answer to this question? It's bugging me too. Jean, can you tell
> > us what version you are testing this on? Have you tried 2.1?
> >
> > Cheers,
> > Andy
> >
> > On May 6, 3:32 pm, debelyoo <jean.ross...@gmail.com> wrote:
> >
> >
> >
> > > Hi dillirao,
> >
> > > I don't receive onPrepared callback.
> >
> > > After requesting the live stream through the SDP file (http://
> > > server_ip/live.sdp) I receive the following callbacks:
> > > - onBufferingUpdate --> Buffering 100%
> > > - onErrorCallback --> Command PLAYER_INIT completed with an error or
> > > info PVMFErrCorrupt
> >
> > > My file is encoded in MPEG-4 part 2, audio is AAC, file format
> > > is .mp4, resolution is 320x240. I have a bitrate of 700kbps but bw
> > > should not be a problem since I'm on Wi-Fi.
> > > I can stream the same file with a RTSP request from the Darwin server.
> > > It works smoothly.
> >
> > > Any idea why the device returns this error ? evn though it can play
> > > the same stream via RTSP ?
> >
> > > Jean
> >
> > > On May 5, 3:06 pm, dillirao malipeddi <dillir...@arijasoft.com> wrote:
> >
> > > > did u received OnPrepared callback.
> > > > Plz write a onErrorcallback and see, if you get error callback.
> >
> > > > whats video profile and audio profile you are using.
> >
> > > > use : h263/h264 15fps; 176x144 or 320x240  and use low bit rate , on
> > > > internet ; if lan, bw is not issu
> > > > for audio: use aac/ again try low bit rate encoding;... amr/ is ok...
> >
> > > > Thanks
> >
> > > > On Thu, Apr 29, 2010 at 6:32 PM, debelyoo <jean.ross...@gmail.com>
> wrote:
> > > > > I try to play a live stream on my android phone using the
> MediaPlayer
> > > > > object. But I definitely see a black screen. Does anybody have any
> > > > > experience with streaming on Android ?
> >
> > > > > Here is what I'm doing:
> > > > > I broadcast a stream with Darwin streaming server (via
> > > > > PlaylistBroadcast) to my Android phone. The stream is sent over RTP
> to
> > > > > the IP of my device (unicast). A .sdp file describes my stream.
> >
> > > > > In my app, I try to play the stream with the following code where
> url
> > > > > is "rtsp://server_ip/live.sdp"
> >
> > > > > private void playVideo(String url) {
> > > > >        try {
> > > > >                //media.setEnabled(false);
> >
> > > > >                if (player==null) {
> > > > >                        //System.out.println("create MediaPlayer");
> > > > >                        player=new MediaPlayer();
> > > > >                        player.setScreenOnWhilePlaying(true);
> > > > >                } else {
> > > > >                        player.stop();
> > > > >                        player.reset();
> > > > >                }
> >
> > > > >                player.setDataSource(url);
> > > > >                //holder.setFixedSize(320, 240);
> > > > >                player.setDisplay(holder);
> >
> > > > >
>  player.setAudioStreamType(AudioManager.STREAM_MUSIC);
> > > > >                player.setOnPreparedListener(this);
> > > > >                player.prepareAsync();
> > > > >                player.setOnBufferingUpdateListener(this);
> > > > >                player.setOnCompletionListener(this);
> > > > >        } catch (Throwable t) {
> > > > >                System.out.println("Exception in media prep:
> > > > > "+t.toString());
> > > > >        }
> > > > >    }
> >
> > > > > public void onPrepared(MediaPlayer mp) {
> > > > >                //System.out.println("onPrepared");
> >
> > > > >                int width=player.getVideoWidth();
> > > > >                int height=player.getVideoHeight();
> >
> > > > >                if (width!=0 && height!=0) {
> > > > >                         holder.setFixedSize(width, height);
> > > > >                         player.start();
> > > > >                }
> > > > > }
> >
> > > > > I always have a black screen, buffering remains at 0%.
> > > > > I checked that I can play this live stream on VLC and QT on a
> desktop,
> > > > > and it works fine. If I request the same file via a direct RTSP
> > > > > request (rtsp://server_IP/myVideo.mp4) the file plays correctly on
> my
> > > > > android phone.
> >
> > > > > I also tried to request the .sdp file by an HTTP request (http://
> > > > > server_IP/live.sdp) but the result is the same (black screen).
> >
> > > > > Does anybody have already succeeded in playing a live stream on an
> > > > > android phone ?
> >
> > > > > Cheers
> > > > > Jean
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.> > To post to this group, send
> email to android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to> >
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@googlegroups.com>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > Thank you,
> > > > Dilli Rao. Mwww.arijasoft.com
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.> To post to this group, send email
> to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to>
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> > > > For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email
> toandroid-developers+unsubscr...@googlegroups.com<toandroid-developers%2bunsubscr...@googlegroups.com>
> > > For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> > For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to