RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

How to support Android 5.1.1?

Open roybill opened this issue 3 years ago • 6 comments

roybill avatar Feb 11 '22 07:02 roybill

This library support API 16+ (Android 4.1). I don't understand your question

pedroSG94 avatar Feb 12 '22 17:02 pedroSG94

This library support API 16+ (Android 4.1). I don't understand your question

I ran it on x86 5.1.1, but it didn't work.

roybill avatar Feb 14 '22 06:02 roybill

You need to specify more.

  • Can you tell me device model used? If you are using emulator, which image and configuration is used exactly?
  • Which example did you test using my app example?
  • Can you tell me the fail produced and how to reproduce it?

pedroSG94 avatar Feb 14 '22 08:02 pedroSG94

1.I'm running on an emulator for Pixel 2,x86; 2.I use it like this:
<SurfaceView android:id="@+id/surfaceView" android:layout_width="match_parent" android:layout_height="match_parent" />

SurfaceView surfaceView = findViewById(R.id.surfaceView); RtmpCamera1 rtmpCamera1 = new RtmpCamera1(surfaceView, new MyConnectCheckerRtmp());

    Button buttonStart = findViewById(R.id.b_start);
    buttonStart.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (rtmpCamera1.prepareAudio() && rtmpCamera1.prepareVideo()) {
                Toast.makeText(AcivityA.this, "开始推流", Toast.LENGTH_SHORT).show();
                rtmpCamera1.startStream(url);
                LogUtils.d("1527   11111111111");
            } else {
                /**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
                LogUtils.d("1527   222222222222");
            }
        }
    });

3.When I execute the code: rtmpCamera1.startStream(url); The simulator is stuck,There were no errors.

roybill avatar Feb 15 '22 00:02 roybill

Hello,

I tested using Pixel2 API 22 x86(goople api) emulator from Android studio and it is working so this seems a code error in your side. Can you test using Default RTMP example? If you have any problem share me a logcat.

pedroSG94 avatar Feb 17 '22 09:02 pedroSG94

@pedroSG94 ok, thank you!

roybill avatar Feb 18 '22 03:02 roybill