jareens / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
0 stars 0 forks source link

VideoEncoder is different from Android code #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi folks

I found that, in SessionBuilder.java, VIDEO_H264 is defined to 1, VIDEO_H263 is 
defined to 2, see below code,

/** Can be used with {@link #setVideoEncoder}. */
    public final static int VIDEO_H264 = 1;

/** Can be used with {@link #setVideoEncoder}. */
public final static int VIDEO_H263 = 2;

However, in Android code, MediaRecorder.VideoEncoder.H263 is defined to 1, 
MediaRecorder.VideoEncoder.H264 is defined to 2;

If I set VideoEncoder as SessionBuilder.VIDEO_H264, in fact, VideoEncoder is 
MediaRecorder.VideoEncoder.H263.

I set VideoEncoder as H264(in fact, it is H263 in Android code) when 
spydroid-ipcamera is running on phone A as server, use Phone B as the client to 
play the video. From the ADB log, it shows me that the video format is H264. 
Why this happen?

Regards!

Original issue reported on code.google.com by sno.xu...@gmail.com on 25 Apr 2014 at 3:13