Hi all,

I am trying to store the content of a streaming to a buffer array and
then a file and try to play from the file. The problem now is the
buffer cannot store the input stream. My code is something like this:
    private void saveStreaming() throws IOException{

        InetAddress inetAddress = InetAddress.getByName(IP_ADDR);
        Socket client = new Socket(inetAddress,5544);
                InputStream stream = client.getInputStream();
                Log.d(TAG,"Connection is established...");

                File temp=File.createTempFile("mediaplayertmp","dat");
                tempPath=temp.getAbsolutePath();
                FileOutputStream out=new FileOutputStream(temp);

                byte buf[]=new byte[200];
                do
                {
                Log.d(TAG,"stuck here");
                int numread = stream.read(buf);
                if(numread<=0)
                        break;
                out.write(buf, 0, numread);
                }while(true);

                Log.d(TAG,"SO DIFFICULT...I AM DYING...");

                mMediaPlayer.stop();
                stream.close();
                out.close();
                client.close();
    }

I check the logcat and the connection to the host post is built and
the "stuck here" information appears only once, followed by the
message "error (1,-11)", then I check the PVMF elements. -11 means
PVMFErrTimeout. Does anyone know what does that error mean and how to
solve that problem? Many thanks!

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

Reply via email to