gst-sdk-tutorials android runtime eror

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gst-sdk-tutorials android runtime eror

mahendra0203
Hi,

trying to run android-tutorial-3 and androidtutorial-5 in gst-sdk-tutorials. App crashes everytime with the following stacktrace

11-22 05:45:39.164 4976-4976/org.freedesktop.gstreamer.tutorials.tutorial_3 E/GStreamer+ahs: 0:00:02.552870127 0x5ac0ef80 gst-android-hardware-sensor.c:598:_init_classes Failed to initialize Android classes: Failed to get static field ID TYPE_HEART_RATE (I): java.lang.NoSuchFieldError: no static field with name='TYPE_HEART_RATE' signature='I' in class Landroid/hardware/Sensor;
                                                                                             java.lang.NoSuchFieldError: no static field with name='TYPE_HEART_RATE' signature='I' in class Landroid/hardware/Sensor;
                                                                                                 at org.freedesktop.gstreamer.GStreamer.nativeInit(Native Method)
                                                                                                 at org.freedesktop.gstreamer.GStreamer.init(GStreamer.java:16)
                                                                                                 at org.freedesktop.gstreamer.tutorials.tutorial_3.Tutorial3.onCreate(Tutorial3.java:36)
                                                                                                 at android.app.Activity.performCreate(Activity.java:5372)
                                                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
                                                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
                                                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
                                                                                                 at android.app.ActivityThread.access$700(ActivityThread.java:159)
                                                                                              at android.app.ActivityThread$H.
11-22 05:45:39.164 4976-4976/org.freedesktop.gstreamer.tutorials.tutorial_3 E/GLib+stderr: **
                                                                                           ERROR:gst-android-hardware-sensor.c:157:gst_ah_sensor_sensor_sizes_deinit: 'sensor_sizes' should not be NULL
11-22 05:45:39.164 4976-4976/org.freedesktop.gstreamer.tutorials.tutorial_3 A/libc: Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 4976 (ials.tutorial_3)

This error also occurs in gst-player/android code. When I deleted all the files and then clone the repo again, error was not visible in gst-player/android.

Another interesting thing, if I manually delete the generated org.freedesktop.gstreamer.androidmedia and run ./gradlew assembleDebug from the command line , this error does not occur during run time.

Also, other times its not able to find GstreamerSurfaceView in the app, it is the classpath, compilation happens fine.

Does anyone know cause of these errors ?


Not sure what to do here, any help would be greatly appreciated ,

Thanks,
Mahendra Naik
Reply | Threaded
Open this post in threaded view
|

Re: gst-sdk-tutorials android runtime eror

Sebastian Dröge-3
On Mon, 2016-11-21 at 18:20 -0800, mahendra0203 wrote:
> Hi,
>
> trying to run android-tutorial-3 and androidtutorial-5 in gst-sdk-tutorials.
> App crashes everytime with the following stacktrace
> [...]

This should be fixed in 1.10.1:
https://bugzilla.gnome.org/show_bug.cgi?id=774048

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gst-sdk-tutorials android runtime eror

mahendra0203
Hey Sebastian,

Thanks for the reply.

The new release does not have this issue. Thanks for the new release.

I am trying to build a gstreamer pipeline viewer app in android on the lines of https://play.google.com/store/apps/details?id=pl.effisoft.rpicamviewer2&hl=en .
My videoviewer code is similar to android_tutorials_3 in the gst-sdk-examples repository. I was able to setup a working stream and view it on an android phone.

Now there is a new issue, the stream hangs after 7-10 seconds. The only error I received on the console was gstgdpdepay.c:565:gst_gdp_depay_decide_allocation:<gdpdepay2> Peer allocation query failed
gstgdpdepay.c:565:gst_gdp_depay_decide_allocation:<gdpdepay2> Peer allocation query failed

Also, the server is sending an EOS message to the app. And this happens only in this app, if I view the stream on a desktop client I don't receive an EOS. Also the rpi cam viewer mentioned earlier does not have this issue.
Client command
tcpclientsrc host=<IP> port=<PORT> ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false

Server command
gst-launch-1.0 fdsrc ! h264parse ! rtph264pay ! tspserversink host=<IP> port=<PORT>

Any idea why the server is sending EOS message to android app ? Or am I missing something else here ?

Thanks,
Mahendra Naik

Reply | Threaded
Open this post in threaded view
|

Re: gst-sdk-tutorials android runtime eror

Sebastian Dröge-3
On Fri, 2016-11-25 at 14:05 -0800, mahendra0203 wrote:

> Hey Sebastian,
>
> Thanks for the reply.
>
> The new release does not have this issue. Thanks for the new release.
>
> I am trying to build a gstreamer pipeline viewer app in android on the lines
> of
> https://play.google.com/store/apps/details?id=pl.effisoft.rpicamviewer2&hl=en
> .
> My videoviewer code is similar to android_tutorials_3 in the
> gst-sdk-examples repository. I was able to setup a working stream and view
> it on an android phone.
>
> Now there is a new issue, the stream hangs after 7-10 seconds. The only
> error I received on the console was
> gstgdpdepay.c:565:gst_gdp_depay_decide_allocation:<gdpdepay2> Peer
> allocation query failed
> gstgdpdepay.c:565:gst_gdp_depay_decide_allocation:<gdpdepay2> Peer
> allocation query failed
>
> Also, the server is sending an EOS message to the app. And this happens only
> in this app, if I view the stream on a desktop client I don't receive an
> EOS. Also the rpi cam viewer mentioned earlier does not have this issue. 
> Client command 
> tcpclientsrc host=<IP> port=<PORT> ! gdpdepay ! rtph264depay ! avdec_h264 !
> videoconvert ! autovideosink sync=false
>
> Server command
> gst-launch-1.0 fdsrc ! h264parse ! rtph264pay ! tspserversink host=<IP>
> port=<PORT>
>
> Any idea why the server is sending EOS message to android app ? Or am I
> missing something else here ?
Not without more details, like where the EOS comes from. Check the
debug logs.


Also better use rpicamsrc instead of something with fdsrc:
https://github.com/thaytan/gst-rpicamsrc


And using RTP together with GDP does not make much sense, just using
GDP alone will work the same way without another layer in between. But
you might just want to use gst-rtsp-server on the server and rtspsrc on
the client instead of something complicated around the TCP elements.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment