1. Download our Official Android App: Forums for Android!

Making a basic RTSP APP

Discussion in 'Android Development' started by Jo_Han_Solo, Oct 4, 2017.

  1. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Hey guys,

    I'm currently employed as a software engineer at my current workplace but my expertise doesn't lie with Android or Java, I'm a C++ engineer that normally works with robotics, so this is all quite new to me.

    Basically I was wondering if anyone could help me out with some instructions/tips/github code or anything else that could help me create a very basic RTSP stream app.

    All it needs to do is open an RTSP stream from a webcam and play it until the app is turned off without interruptions.

    It doesn't need any fancy controls or specific GUI, the RTSP address can be hardcoded into the app so long as the app opens the stream upon launch and plays the stream.

    The only thing that would be useful is if the opening screen had the option to open two different webcam streams, so that from the main stream you had say Button 1 and Button 2 leading to "Camera 1" and "Camera 2" but honestly I would settle with just an app that could view the RTSP stream at all.

    Can you guys help me figure this out?

    I've found a bunch of links online of people saying "this code works" and "it's very simple" but I've tried like 10-15 different codes and I can't get it to work.

    The camera I am using is a LevelOne FCS-1131 running RTSP.

    FYI, the stream is viewable using VLC or RTSP Player, but it's very important that the stream is integrated in our app and doesn't simply use an "intent" to move to another app.

    Thanks Guys!
     

    Advertisement

  2. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
    Unforgiven likes this.
  3. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
  4. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Thanks for your reply I will check that out and hopefully it will work.
     
  5. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    So I tried the: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java solution and it seems to have imported correctly by adding the gradle files:
    Code (Text):
    1.  
    2. I put this in the project level gradle file:
    3. allprojects {
    4.   repositories {
    5.    maven { url 'https://jitpack.io' }
    6.   }
    7. }
    8.  
    9. And this in the app level build gradle file:
    10.  
    11. dependencies {
    12.   compile 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:1.1.5'
    13. }
    14.  
    15. I then tried some of the source code and I simplified it to the following:
    16. import android.support.v7.app.AppCompatActivity;
    17. import android.os.Bundle;
    18. import android.view.SurfaceView;
    19.  
    20. import com.pedro.rtplibrary.rtsp.RtspCamera1;
    21. import com.pedro.rtsp.utils.ConnectCheckerRtsp;
    22.  
    23. public class MainActivity extends AppCompatActivity {
    24.     ConnectCheckerRtsp connectCheckerRtsp;
    25.     [USER=1021285]@override[/USER]
    26.     protected void onCreate(Bundle savedInstanceState) {
    27.         super.onCreate(savedInstanceState);
    28.         setContentView(R.layout.activity_main);
    29.  
    30.         //default
    31.         SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surfaceView);
    32.  
    33. //create builder
    34. //by default TCP protocol.
    35.         RtspCamera1 rtspCamera1 = new RtspCamera1(surfaceView,connectCheckerRtsp);
    36. //start stream
    37.         rtspCamera1.startStream("MY URL");
    38.     }
    39. }
    40.  


    Where my URL is replaced by the actual rtsp:// url that I know to be working through testing on RTSP Player and VLC on the phone itself as well as on the PC and the webcam shows up.

    When I run this app the app crashes, any idea why?

    My permissions are:
    Code (Text):
    1.  
    2. <uses-permission android:name="android.permission.INTERNET" />
    3. <uses-permission android:name="android.permission.RECORD_AUDIO" />
    4. <uses-permission android:name="android.permission.CAMERA" />
    5. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    6. <!--some devices need it-->
    7. <uses-feature android:name="android.hardware.camera" />
    8. <uses-feature android:name="android.hardware.camera2.full" />
    9. <uses-feature android:name="android.hardware.camera2.autofocus" />
    10.  


    in the AndroidManifest.xml file.
     
    #5 Jo_Han_Solo, Oct 5, 2017
    Last edited by a moderator: Oct 11, 2017
  6. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
    Can you paste the stacktrace? Won't be able to test tonight but can tomorrow. Stacktrace I may be able to figure out what's going on in the meantime.
     
  7. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Since I am a bit green (no pun intended) I'm not sure if this is what you wanted but I hope this is the right thing:

    Code (Text):
    1.  
    2. 10-05 16:01:55.234 15632-15632/au.com.httppraesidiumglobal.stream_app_test E/AndroidRuntime: FATAL EXCEPTION: main
    3.                                                                                              Process: au.com.httppraesidiumglobal.stream_app_test, PID: 15632
    4.                                                                                              java.lang.RuntimeException: Unable to start activity ComponentInfo{au.com.httppraesidiumglobal.stream_app_test/au.com.httppraesidiumglobal.stream_app_test.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.pedro.rtsp.utils.ConnectCheckerRtsp.onConnectionFailedRtsp()' on a null object reference
    5.                                                                                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
    6.                                                                                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
    7.                                                                                                  at android.app.ActivityThread.access$1100(ActivityThread.java:221)
    8.                                                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
    9.                                                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
    10.                                                                                                  at android.os.Looper.loop(Looper.java:158)
    11.                                                                                                  at android.app.ActivityThread.main(ActivityThread.java:7225)
    12.                                                                                                  at java.lang.reflect.Method.invoke(Native Method)
    13.                                                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    14.                                                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    15.                                                                                               Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.pedro.rtsp.utils.ConnectCheckerRtsp.onConnectionFailedRtsp()' on a null object reference
    16.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    17.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    18.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    19.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onCreate(MainActivity.java:24)
    20.                                                                                                  at android.app.Activity.performCreate(Activity.java:6876)
    21.                                                                                                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
    22.                                                                                                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
    23.                                                                                                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
    24.                                                                                                  at android.app.ActivityThread.access$1100(ActivityThread.java:221)
    25.                                                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
    26.                                                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
    27.                                                                                                  at android.os.Looper.loop(Looper.java:158)
    28.                                                                                                  at android.app.ActivityThread.main(ActivityThread.java:7225)
    29.                                                                                                  at java.lang.reflect.Method.invoke(Native Method)
    30.                                                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    31.                                                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    32.  
     
    #7 Jo_Han_Solo, Oct 5, 2017
    Last edited by a moderator: Oct 11, 2017
    steve likes this.
  8. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
    Oh, it looks like your not initializing the connect checker object.
     
  9. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
    Jo_Han_Solo likes this.
  10. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Oh right thank you so much for your help! I'll get right on that this morning and hopefully that sorts it out. I think I mentioned above but I'm a total java/android noob so all this is super new to me, but I'm starting to wrap my head around it now, mostly thanks to helpful people like yourself!
     
    steve likes this.
  11. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Okay so it is still not working, digging through the stack trace I'm thinking that the problem might be that the video encoder is not enabled... I'm running a very barebones version of the code from the link you posted earlier steve.

    The code is below:
    Code (Java):
    1. [/B][/B][/B]
    2. package au.com.httppraesidiumglobal.stream_app_test;
    3.  
    4. import android.support.v7.app.AppCompatActivity;
    5. import android.os.Bundle;
    6. import android.view.SurfaceView;
    7. import android.view.WindowManager;
    8. import android.widget.Toast;
    9.  
    10. import com.pedro.rtplibrary.rtsp.RtspCamera1;
    11. import com.pedro.rtsp.utils.ConnectCheckerRtsp;
    12.  
    13. public class MainActivity extends AppCompatActivity implements ConnectCheckerRtsp {
    14.     private RtspCamera1 rtspCamera1;;
    15.  
    16.     [USER=1021285]@override[/USER]
    17.     protected void onCreate(Bundle savedInstanceState) {
    18.         super.onCreate(savedInstanceState);
    19.         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    20.         setContentView(R.layout.activity_main);
    21.         SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surfaceView);
    22.         rtspCamera1 = new RtspCamera1(surfaceView, this);
    23.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    24.  
    25.     }
    26.     public void onConnectionSuccessRtsp(){
    27.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    28.         Toast.makeText(this, "Rtsp Connection Success", Toast.LENGTH_SHORT).show();
    29.     }
    30.     public void onConnectionFailedRtsp(){
    31.         rtspCamera1.stopStream();
    32.         Toast.makeText(this, "Rtsp Connection Failed", Toast.LENGTH_SHORT).show();
    33.     }
    34.     public void onDisconnectRtsp(){
    35.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    36.         Toast.makeText(this, "Rtsp Disconnected", Toast.LENGTH_SHORT).show();
    37.     }
    38.     public void onAuthSuccessRtsp(){
    39.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    40.         Toast.makeText(this, "Rtsp Auth Success", Toast.LENGTH_SHORT).show();
    41.     }
    42.     public void onAuthErrorRtsp(){
    43.         rtspCamera1.stopStream();
    44.         Toast.makeText(this, "Rtsp Auth Error", Toast.LENGTH_SHORT).show();
    45.     }
    46. }
    47. [B][B]


    The part of the stack trace I'm concerned with is:
    Code (Text):
    1.  
    2. 10-06 12:57:31.793 8781-8781/au.com.httppraesidiumglobal.stream_app_test E/VideoEncoder: VideoEncoder need be prepared, VideoEncoder not enabled
    3. 10-06 12:57:31.793 8781-8781/au.com.httppraesidiumglobal.stream_app_test E/AudioEncoder: AudioEncoder need be prepared, AudioEncoder not enabled
    4. 10-06 12:57:31.793 8781-8781/au.com.httppraesidiumglobal.stream_app_test E/Camera1ApiManagerGl: Camera1ApiManager need be prepared, Camera1ApiManager not enabled
    5. 10-06 12:57:31.793 8781-8781/au.com.httppraesidiumglobal.stream_app_test E/MicrophoneManager: Microphone no created, MicrophoneManager not enabled
    6.  



    Do you think that this would be the reason for the crashes? or is there something wrong in my code that you could spot?
     
    #11 Jo_Han_Solo, Oct 5, 2017
    Last edited by a moderator: Oct 11, 2017
  12. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    This is another problem that I can see, highlighted in red:
    Code (Text):
    1.  
    2. 10-06 12:57:31.803 8781-9018/au.com.httppraesidiumglobal.stream_app_test E/AndroidRuntime: FATAL EXCEPTION: Thread-964
    3.                                                                                            Process: au.com.httppraesidiumglobal.stream_app_test, PID: 8781
    4.                                                                                            java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
    5.                                                                                                at android.os.Handler.<init>(Handler.java:200)
    6.                                                                                                at android.os.Handler.<init>(Handler.java:114)
    7.                                                                                                at android.widget.Toast$TN.<init>(Toast.java:693)
    8.                                                                                                at android.widget.Toast.<init>(Toast.java:143)
    9.                                                                                                at android.widget.Toast.makeText(Toast.java:456)
    10.                                                                                                at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:31)
    11.                                                                                                at com.pedro.rtsp.rtsp.RtspClient$1.run(RtspClient.java:209)
    12.                                                                                                at java.lang.Thread.run(Thread.java:818)
    13.  

     
    #12 Jo_Han_Solo, Oct 5, 2017
    Last edited by a moderator: Oct 11, 2017
  13. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
    This is from trying to run code on a background thread that is trying to update the UI. You can use this:

    Code (Java):
    1.  
    2. activity.runOnUiThread(new Runnable() { public void run() {
    3.  // Your UI code that is failing
    4. } });
    5.  
    There are other ways too that get the same result... like using a Handler that gets the looper thread.

    EDIT: It's probably the Toast code trying to be called in the worker thread.
     
  14. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Okay I got rid of toast completely, app still crashes, now I'm just legit trying to force the stream in every possibly scenario but it just crashes.

    Code:
    Code (Java):
    1. [/B]
    2. package au.com.httppraesidiumglobal.stream_app_test;
    3.  
    4. import android.support.v7.app.AppCompatActivity;
    5. import android.os.Bundle;
    6. import android.view.SurfaceView;
    7. import android.view.WindowManager;
    8. import android.widget.Toast;
    9.  
    10. import com.pedro.rtplibrary.rtsp.RtspCamera1;
    11. import com.pedro.rtsp.utils.ConnectCheckerRtsp;
    12.  
    13. public class MainActivity extends AppCompatActivity implements ConnectCheckerRtsp {
    14.     private RtspCamera1 rtspCamera1;
    15.  
    16.     [USER=1021285]@override[/USER]
    17.     protected void onCreate(Bundle savedInstanceState) {
    18.         super.onCreate(savedInstanceState);
    19.         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    20.         setContentView(R.layout.activity_main);
    21.         SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surfaceView);
    22.         rtspCamera1 = new RtspCamera1(surfaceView, this);
    23.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    24.  
    25.     }
    26.     public void onConnectionSuccessRtsp(){
    27.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    28.     }
    29.     public void onConnectionFailedRtsp(){
    30.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    31.     }
    32.     public void onDisconnectRtsp(){
    33.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    34.     }
    35.     public void onAuthSuccessRtsp(){
    36.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    37.     }
    38.     public void onAuthErrorRtsp(){
    39.         rtspCamera1.startStream("rtsp://root:0000@169.254.13.222:554/h264");
    40.     }
    41. }
    42. [B]


    Full Stack Trace (with red text in bold):
    Code (Text):
    1.  
    2. 10-06 13:47:52.743 11619-11619/? E/Zygote: v2
    3. 10-06 13:47:52.743 11619-11619/? I/libpersona: KNOX_SDCARD checking this for 10200
    4. 10-06 13:47:52.743 11619-11619/? I/libpersona: KNOX_SDCARD not a persona
    5. 10-06 13:47:52.743 11619-11619/? W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0029
    6. 10-06 13:47:52.743 11619-11619/? E/Zygote: accessInfo : 0
    7. 10-06 13:47:52.743 11619-11619/? W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=au.com.httppraesidiumglobal.stream_app_test
    8. 10-06 13:47:52.743 11619-11619/? I/art: Late-enabling -Xcheck:jni
    9. 10-06 13:47:52.773 11619-11619/? D/TimaKeyStoreProvider: TimaSignature is unavailable
    10. 10-06 13:47:52.773 11619-11619/? D/ActivityThread: Added TimaKeyStore provider
    11. 10-06 13:47:52.873 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
    12. 10-06 13:47:53.063 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
    13. 10-06 13:47:53.133 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
    14. 10-06 13:47:53.183 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
    15. 10-06 13:47:53.243 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
    16. 10-06 13:47:53.333 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
    17. 10-06 13:47:53.393 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
    18. 10-06 13:47:53.443 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
    19. 10-06 13:47:53.503 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
    20. 10-06 13:47:53.553 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
    21. 10-06 13:47:53.623 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/au.com.httppraesidiumglobal.stream_app_test-2/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@au.com.httppraesidiumglobal.stream_app_test-2@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
    22. 10-06 13:47:53.623 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/System: ClassLoader referenced unknown path: /data/app/au.com.httppraesidiumglobal.stream_app_test-2/lib/arm
    23. 10-06 13:47:53.643 11619-11619/au.com.httppraesidiumglobal.stream_app_test I/InstantRun: starting instant run server: is main process
    24. 10-06 13:47:53.753 11619-11619/au.com.httppraesidiumglobal.stream_app_test W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
    25. 10-06 13:47:54.253 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/AndroidRuntime: Shutting down VM
    26. 10-06 13:47:54.343 11619-11619/au.com.httppraesidiumglobal.stream_app_test E/AndroidRuntime: FATAL EXCEPTION: main
    27.                                                                                              Process: au.com.httppraesidiumglobal.stream_app_test, PID: 11619
    28.                                                                                              java.lang.StackOverflowError: stack size 8MB
    29.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    30.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    31.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    32.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    33.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    34.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    35.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    36.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    37.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    38.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    39.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    40.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    41.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    42.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    43.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    44.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    45.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    46.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    47.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    48.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    49.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    50.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    51.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    52.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    53.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    54.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    55.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    56.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    57.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    58.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    59.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    60.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    61.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    62.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    63.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    64.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    65.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    66.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    67.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    68.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    69.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    70.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    71.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    72.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    73.                                                                                                  at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    74.                                                                                                  at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    75.                                                                                                  at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    76.                                                                                                  at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    77.                                                                                                 at au.com.httppraesidiumglobal.stream_app_test.Mai
    78. 10-06 13:47:54.403 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: exClass=java.lang.StackOverflowError
    79. 10-06 13:47:54.403 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: exMsg=stack size 8MB
    80. 10-06 13:47:54.403 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: file=MainActivity.java
    81. 10-06 13:47:54.403 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: class=au.com.httppraesidiumglobal.stream_app_test.MainActivity
    82. 10-06 13:47:54.403 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: method=onConnectionFailedRtsp line=29
    83. 10-06 13:47:54.413 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: stack=java.lang.StackOverflowError: stack size 8MB
    84.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    85.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    86.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    87.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    88.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    89.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    90.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    91.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    92.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    93.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    94.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    95.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    96.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    97.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    98.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    99.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    100.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    101.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    102.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    103.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    104.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    105.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    106.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    107.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    108.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    109.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    110.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    111.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    112.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    113.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    114.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    115.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    116.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    117.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    118.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    119.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    120.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    121.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    122.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    123.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    124.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    125.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    126.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    127.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    128.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    129.                                                                                         at com.pedro.rtsp.rtsp.RtspClient.setUrl(RtspClient.java:106)
    130.                                                                                         at com.pedro.rtplibrary.rtsp.RtspCamera1.startStreamRtp(RtspCamera1.java:65)
    131.                                                                                         at com.pedro.rtplibrary.base.Camera1Base.startStream(Camera1Base.java:193)
    132.                                                                                         at au.com.httppraesidiumglobal.stream_app_test.MainActivity.onConnectionFailedRtsp(MainActivity.java:29)
    133.                                                                                         at com.pedro.rtsp.rtsp.RtspCl
    134. 10-06 13:47:54.413 11619-11619/au.com.httppraesidiumglobal.stream_app_test D/Error: ERR: TOTAL BYTES WRITTEN: 1241228
    135. 10-06 13:47:54.413 11619-11619/au.com.httppraesidiumglobal.stream_app_test E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 1241312)
    136. 10-06 13:47:54.413 11619-11619/au.com.httppraesidiumglobal.stream_app_test E/AndroidRuntime: Error reporting crash
    137.                                                                                              android.os.TransactionTooLargeException: data parcel size 1241312 bytes
    138.                                                                                                  at android.os.BinderProxy.transactNative(Native Method)
    139.                                                                                                  at android.os.BinderProxy.transact(Binder.java:503)
    140.                                                                                                  at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:5455)
    141.                                                                                                  at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:96)
    142.                                                                                                  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
    143.                                                                                                  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
    144. 10-06 13:47:54.413 11619-11619/au.com.httppraesidiumglobal.stream_app_test I/Process: Sending signal. PID: 11619 SIG: 9
    145.  


     
    #14 Jo_Han_Solo, Oct 5, 2017
    Last edited by a moderator: Oct 11, 2017
  15. steve

    steve Developer
    Administrator
    Rank:
    None
    Points:
    573
    Posts:
    1,086
    Joined:
    Apr 19, 2011

    Apr 19, 2011
    1,086
    1,178
    573
    Male
    Android Developer
    York, PA
    What's your latest status on this? I could try a good test today. Sorry for the delay but I had very little extra time over the last view days :)
     
  16. Jo_Han_Solo

    Jo_Han_Solo Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    21
    Joined:
    Oct 4, 2017

    Oct 4, 2017
    21
    2
    26
    Male
    Right well basically I revamped the entire thing, and got the app running with LibVLC that maffen has pushed to JCenter (https://github.com/mrmaffen/vlc-android-sdk).

    and using some sample code from this dude: https://bitbucket.org/edwardcw/libvlc-android-sample

    So at least it works now but however I'm still looking for a better and more "real-time" response, and I'm not sure I'll achieve that with LibVLC. If you've got any suggestions I'd be happy to take a look elsewhere, but I needed to get something working ASAP to make my boss happy.
     

Share This Page

Loading...