خرید بک لینک

Vote count: 0

I want how to exactly use Video codec on android.

recently I modify webRTC.

this origin source ,perfectly work in my phone.

but my tablet not showing video screen.

I think VIDEO CODEC problem. of course, another problem.

in other word. I want my webRTC source perfectly work my tablet thanks

recently I use this

private static final String VIDEO_CODEC_VP9 = "VP9";  //global variable
private static final String AUDIO_CODEC_OPUS = "opus"; //global variable
private GLSurfaceView vsv;   //global variable

@Override
vsv = (GLSurfaceView) findViewById(R.id.glvlew_call);
vsv.setPreserveEGLContextOnPause(true);
vsv.setKeepScreenOn(true);
VideoRendererGui.setView(vsv, new Ruable() {
  @Override
  public void run() {
      init();
  }
});

private void init() {
Point displaySize = new Point();
getWindowManager().getDefaultDisplay().getSize(displaySize);
PeerCoectionParameters params = new PeerCoectionParameters( 
      true, false, displaySize.x, displaySize.y, 30, 1, VIDEO_CODEC_VP9, true, 1, AUDIO_CODEC_OPUS, true);

}

PeerCoectionParameters.java

public class PeerCoectionParameters {
public final boolean videoCallEnabled;
public final boolean loopback;
public final int videoWidth;
public final int videoHeight;
public final int videoFps;
public final int videoStartBitrate;
public final String videoCodec;
public final boolean videoCodecHwAcceleration;
public final int audioStartBitrate;
public final String audioCodec;
public final boolean cpuOveruseDetection;
public PeerCoectionParameters(
        boolean videoCallEnabled, boolean loopback,
        int videoWidth, int videoHeight, int videoFps, int videoStartBitrate,
        String videoCodec, boolean videoCodecHwAcceleration,
        int audioStartBitrate, String audioCodec,
        boolean cpuOveruseDetection) {
    this.videoCallEnabled = videoCallEnabled;
    this.loopback = loopback;
    this.videoWidth = videoWidth;
    this.videoHeight = videoHeight;
    this.videoFps = videoFps;
    this.videoStartBitrate = videoStartBitrate;
    this.videoCodec = videoCodec;
    this.videoCodecHwAcceleration = videoCodecHwAcceleration;
    this.audioStartBitrate = audioStartBitrate;
    this.audioCodec = audioCodec;
    this.cpuOveruseDetection = cpuOveruseDetection;
}

}

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 10 تير 1395 ساعت: 9:15

صفحه بندی