CanGolden / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
GNU General Public License v3.0
0 stars 0 forks source link

Issues Using new Lib #101

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
how to use the new library?, i had the previous lib working, so i tried to use 
the new one for the rtcp support. i'm using the same surfaceview as before

i added the lines 

Session session = SessionBuilder.getInstance()
            .setSurfaceHolder(mSurfaceView.getHolder())
            .setContext(getApplicationContext())
            .setAudioEncoder(SessionBuilder.AUDIO_AAC)
            .setVideoEncoder(SessionBuilder.VIDEO_H264)
            .build();

session.setDestination(destination);
String sdp = session.getSessionDescription();
session.start();

then 

// Starts the RTSP server
context.startService(new Intent(this,RtspServer.class));

as your documentation says, but i get 

"Application lost the surface
 java.io.IOException: invalid preview surface"

at mMediaRecorder.prepare(); (Mediastream.java, line 187)

help :(!

Original issue reported on code.google.com by redondog...@gmail.com on 22 Apr 2013 at 10:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i got video working via:

RtspServer rtsp = new RtspServer();
        rtsp.setPort(8086);
        try {
            Session session = SessionBuilder.getInstance()
                    .setSurfaceHolder(mSurfaceHolder)
                    .setContext(getApplicationContext())
                    .setAudioEncoder(SessionBuilder.AUDIO_AMRNB)
                    .setVideoEncoder(SessionBuilder.VIDEO_H264)
                    .build();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        rtsp.start();

but audio drops almost instantly, i guess it's not using the rtcp. what can i 
do?

Original comment by redondog...@gmail.com on 22 Apr 2013 at 11:37

GoogleCodeExporter commented 9 years ago
help :(

Original comment by redondog...@gmail.com on 28 Apr 2013 at 3:31