Muhammad UMER wrote:
> hi skink,
>              Thanks for your reply, I am using server side code to receive 
> each frame is perfect. but when i use this server for mediaRecorder it gives 
> the invalid stream header: 00000000, i am using
> ObjectInputStream to receive the data. on client side (android), i  am using 
> the ParcelFileDescriptor.fromSocket(socket), is ParcelFileDescriptor send 
> video in object form?
>
> //// here is my server side code.
>
> try
>        {
>                  // create stream to Network
>                  ois = new ObjectInputStream(clientSocket.getInputStream());
>
>                // create stream to file
>                 FileOutputStream fos = new FileOutputStream("video.3gp", 
> true);
>                 ObjectOutputStream out = new ObjectOutputStream(fos);
>
>               while(true)
>               {
>
>                  // read data in object form from network
>                 byte [] byt = (byte[]) ois.readObject();
>
>                   // write data to file
>                  out.write(byt);
>                  out.flush();
>          }
> }
> catch (Exception e)
> {
>           System.out.println(e.getMessage());
>  }
>
>


Dont use ObjectInputStream, just use InputStream

pskink

-- 
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