Kalyzee / react-native-gstreamer

React native Gstreamer Ios / Android.
49 stars 20 forks source link

GStreamer still alive even after popping the component. #13

Open prasadsawant5 opened 6 years ago

prasadsawant5 commented 6 years ago

Hi, I have been successful in streaming an RTSP stream using GStreamer. However, when I pop the component, the video still plays in the background (I'm able to hear the audio even after navigating to the previous screen). After this, if I try again to go to the component containing the GStreamer, the app freezes. Below are the logs.

(<unknown>:1334): GLib-GObject-WARNING **: cannot register existing type 'vtenc_h264'

(<unknown>:1334): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion 'node != NULL' failed

(<unknown>:1334): GStreamer-CRITICAL **: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed

(<unknown>:1334): GLib-GObject-WARNING **: cannot register existing type 'GstQTMux'

(<unknown>:1334): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion 'node != NULL' failed

(<unknown>:1334): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(<unknown>:1334): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(<unknown>:1334): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(<unknown>:1334): GStreamer-CRITICAL **: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed

** (<unknown>:1334): CRITICAL **: mxf_metadata_init_types: assertion '_mxf_metadata_registry == NULL' failed
testing rand_source...passed
cipher: aes cipher block chaining (cbc) mode
  instance count: 0
  self-test: passed
cipher: aes integer counter mode
  instance count: 0
  self-test: passed
cipher: null cipher
  instance count: 0
  self-test: passed
auth func: hmac sha-1 authentication function
  instance count: 0
  self-test: passed
auth func: null authentication function
  instance count: 0
  self-test: passed
debug modules loaded:
  srtp (off)
  hmac sha-1 (off)
  aes cbc (off)
  aes icm (off)
  alloc (off)
  stat test (off)
  cipher (off)
  auth func (off)
  crypto kernel (off)
Pipeline state requested : NULL
Error received from element source: Unhandled error
Pipeline state requested : NULL
2018-02-14 18:53:21.990 [info][tid:com.facebook.react.JavaScript] { target: 294, layout: { width: 80, x: 0, height: 80, y: 0 } }
2018-02-14 18:53:21.989966-0800 IntelligentHomeMonitoring[1334:388520] { target: 294, layout: { width: 80, x: 0, height: 80, y: 0 } }

(<unknown>:1334): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed
Validity : SUCCESS

(<unknown>:1334): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed
Validity : SUCCESS

(<unknown>:1334): GStreamer-CRITICAL **: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

(<unknown>:1334): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

(<unknown>:1334): GStreamer-CRITICAL **: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
2018-02-14 18:53:22.002490-0800 IntelligentHomeMonitoring[1334:388416] Removing video surface with pointer : 5646793424
createDrawableSurface
2018-02-14 18:53:22.002635-0800 IntelligentHomeMonitoring[1334:388416] Creating video surface with pointer : 5646813104

(<unknown>:1334): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GstObject'

(<unknown>:1334): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed

I suspect that after the component is popped, the GSTreamer is not killed which is causing the freeze when the same component is rendered the second time.

Thanks.

mjansrud commented 5 years ago

I experience the same problem, but haven't found a solution yet

sampathkumarch commented 1 month ago

hi, i am new to here, react native and Gstream, can you help me t how to integrate the Gstremer setup for react-native android app for RTSP stream.