Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webrtc android屏幕共享在realme、oppo等设备上崩溃_Android_Webrtc - Fatal编程技术网

Webrtc android屏幕共享在realme、oppo等设备上崩溃

Webrtc android屏幕共享在realme、oppo等设备上崩溃,android,webrtc,Android,Webrtc,我正在使用ScreenCapturerAndroid记录屏幕并创建视频捕获器。这就是我创建对等连接的方式 private void createPeerConnection(Context context) { PeerConnectionFactory.InitializationOptions initializationOptions = PeerConnectionFactory.InitializationOptions.builder(contex

我正在使用ScreenCapturerAndroid记录屏幕并创建视频捕获器。这就是我创建对等连接的方式

private void createPeerConnection(Context context) {


    PeerConnectionFactory.InitializationOptions initializationOptions =
            PeerConnectionFactory.InitializationOptions.builder(context)
                    .createInitializationOptions();
    PeerConnectionFactory.initialize(initializationOptions);

    if (rootEglBase == null) {
        rootEglBase = EglBase.create();
    }

    PeerConnectionFactory.Options options = new PeerConnectionFactory.Options();

    DefaultVideoEncoderFactory defaultVideoEncoderFactory = new DefaultVideoEncoderFactory(
            rootEglBase.getEglBaseContext(), true, true);


    for (int i = 0; i < defaultVideoEncoderFactory.getSupportedCodecs().length; i++) {
        Log.d("Codecs", "Supported codecs: " + defaultVideoEncoderFactory.getSupportedCodecs()[i].name);
    }

    DefaultVideoDecoderFactory defaultVideoDecoderFactory = new DefaultVideoDecoderFactory(rootEglBase.getEglBaseContext());



    final AudioDeviceModule adm = createJavaAudioDevice(context);
    peerConnectionFactory = PeerConnectionFactory.builder()
            .setOptions(options)
            .setAudioDeviceModule(adm)
            .setVideoEncoderFactory(defaultVideoEncoderFactory)
            .setVideoDecoderFactory(defaultVideoDecoderFactory)
            .createPeerConnectionFactory();
    adm.release();

}

使用glGetIntegerv?的设备最大纹理大小是多少?。如果设备的最大纹理大小小于视频文本大小,mediacodec可能会崩溃。我不认为这是问题所在。以下日志是主要错误,我无法找出原因。E/ACodec:[OMX.MTK.VIDEO.DECODER.VPX]错误(0x80001005)E/ACodec:signalError(omxError 0x80001005,internalError-2147483648)E/MediaCodec:Codec报告的错误0x80001005,操作码0,在状态6 E/org.webrtc.Logging:AndroidVideoDecoder:DeliverDecodeFrame失败时,假设您以原始分辨率录制屏幕,该分辨率可能大于1080p,我怀疑接收器端解码器无法处理该分辨率,因此无法配置编解码器。试着用较低的分辨率来代替怎么样?从直觉上看,表面已经被释放似乎最有可能感谢你们的帮助。发现错误是在缺少某些硬件解码器的设备中生成的。在只使用软件解码后就可以工作了。
I/org.webrtc.Logging: AndroidVideoDecoder: initDecodeInternal name: OMX.MTK.VIDEO.DECODER.VPX type: VP8 width: 1080 height: 2340
I/org.webrtc.Logging: SurfaceTextureHelper: Setting listener to org.webrtc.AndroidVideoDecoder@7ed50de
I/MediaCodec: CreateByComponentName(), name = OMX.MTK.VIDEO.DECODER.VPX
   new MediaCodec()
D/ACodec: ACodec() multimedia.audio.effect.type = dirac
I/OMXClient: IOmx service obtained
I/MediaCodec: configure()
D/SurfaceUtils: connecting to surface 0x745e04a010, reason connectToSurface
D/Surface: Surface::connect(this=0x745e04a000,api=3)
I/BufferQueueProducer: [SurfaceTexture-1-11591-0](this:0x745e1f9800,id:0,api:3,p:11591,c:11591) connect(P): api=3 producer=(11591:com.scrnshr.anyscrn) producerControlledByApp=true
I/MediaCodec: [OMX.MTK.VIDEO.DECODER.VPX] setting surface generation to 11869185
D/SurfaceUtils: disconnecting from surface 0x745e04a010, reason connectToSurface(reconnect)
D/Surface: Surface::disconnect(this=0x745e04a000,api=3)
I/BufferQueueProducer: [SurfaceTexture-1-11591-0](this:0x745e1f9800,id:0,api:3,p:11591,c:11591) disconnect(P): api 3
D/SurfaceUtils: connecting to surface 0x745e04a010, reason connectToSurface(reconnect)
D/Surface: Surface::connect(this=0x745e04a000,api=3)
I/BufferQueueProducer: [SurfaceTexture-1-11591-0](this:0x745e1f9800,id:0,api:3,p:11591,c:11591) connect(P): api=3 producer=(11591:com.scrnshr.anyscrn) producerControlledByApp=true
E/ACodec: [OMX.MTK.VIDEO.DECODER.VPX] configureCodec returning error -22
   signalError(omxError 0x80001001, internalError -22)
E/MediaCodec: Codec reported err 0xffffffea, actionCode 0, while in state 3
D/IAtlas: IAtlas::init CallingPid 11591
   IAtlas::init this 0x748b65f800
D/SurfaceUtils: disconnecting from surface 0x745e04a010, reason disconnectFromSurface
D/Surface: Surface::disconnect(this=0x745e04a000,api=3)
I/BufferQueueProducer: [SurfaceTexture-1-11591-0](this:0x745e1f9800,id:0,api:3,p:11591,c:11591) disconnect(P): api 3
E/MediaCodec: configure failed with err 0xffffffea, resetting...
I/MediaCodec: reset()
   Video release()
D/IAtlas: IAtlas::init CallingPid 11591
   IAtlas::init this 0x748b65f640
D/ACodec: ACodec() multimedia.audio.effect.type = dirac
I/OMXClient: IOmx service obtained
W/System.err: java.lang.IllegalArgumentException
W/System.err:     at android.media.MediaCodec.native_configure(Native Method)
       at android.media.MediaCodec.configure(MediaCodec.java:2023)
       at android.media.MediaCodec.configure(MediaCodec.java:1951)
       at org.webrtc.MediaCodecWrapperFactoryImpl$MediaCodecWrapperImpl.configure(MediaCodecWrapperFactoryImpl.java:37)
       at org.webrtc.AndroidVideoDecoder.initDecodeInternal(AndroidVideoDecoder.java:192)
       at org.webrtc.AndroidVideoDecoder.initDecode(AndroidVideoDecoder.java:157)
E/rtc: #
   # Fatal error in: gen/sdk/android/generated_metrics_jni/../../../../../../../../usr/local/google/home/sakal/code/webrtc-aar-release/src/sdk/android/src/jni/jni_generator_helper.h, line 94
   # last system error: 0
   # Check failed: !env->ExceptionCheck()
   # 
D/apitrace: apitrace: warning: caught signal 6
   call flush from exceptionCallback
A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11805 (DecodingQueue -), pid 11591 (scrnshr.anyscrn)