2016-01-28 206 views
0

我試圖使用GStreamer 1.7.1啓動具有身份驗證和TLS支持的RTSP服務器。我使用的代碼與file from source幾乎相同,只有#define WITH_AUTH#define WITH_TLS具有TLS示例的GStreamer RTSP服務器示例失敗

我在示例目錄內編譯後使用./test-video啓動服務器。

要訪問的流,我從同一臺機器上使用終端以下行連接: gst-launch-1.0 rtspsrc location=rtsps://127.0.0.1:8554/test user-id=user user-pw=password tls-validation-flags=generic-error ! rtph264depay ! avdec_h264 ! videoconvert ! osxvideosink

當我試圖啓動客戶端,服務器輸出的消息:

0:00:03.217216000 26896 0x7fe1248159e0 ERROR    rtspclient rtsp-client.c:733:find_media: client 0x7fe1240208e0: not authorized to see factory path /test 
0:00:03.217248000 26896 0x7fe1248159e0 ERROR    rtspclient rtsp-client.c:2276:handle_describe_request: client 0x7fe1240208e0: no media 

(test-video:26896): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_element_get_request_pad: assertion 'GST_IS_ELEMENT (element)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 

(test-video:26896): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_element_get_request_pad: assertion 'GST_IS_ELEMENT (element)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 

(test-video:26896): GLib-GObject-WARNING **: invalid (NULL) pointer instance 

(test-video:26896): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(test-video:26896): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_element_get_request_pad: assertion 'GST_IS_ELEMENT (element)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 

(test-video:26896): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_element_get_request_pad: assertion 'GST_IS_ELEMENT (element)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 

(test-video:26896): GLib-GObject-WARNING **: invalid (NULL) pointer instance 

(test-video:26896): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed 

(test-video:26896): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

雖然客戶端輸出是:

Setting pipeline to PAUSED ... 
Pipeline is live and does not need PREROLL ... 
Progress: (open) Opening Stream 
Progress: (connect) Connecting to rtsps://127.0.0.1:8554/test 
Progress: (open) Retrieving server options 
Progress: (open) Retrieving media info 

** (gst-launch-1.0:26910): CRITICAL **: gst_rtsp_message_take_header: assertion 'value != NULL' failed 
Progress: (request) SETUP stream 0 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: invalid (NULL) pointer instance 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: invalid (NULL) pointer instance 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gtype.c:4272: type id '0' is invalid 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gvalue.c:184: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gtype.c:4272: type id '0' is invalid 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gvalue.c:184: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_value_deserialize: assertion 'G_IS_VALUE (dest)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_value_deserialize: assertion 'G_IS_VALUE (dest)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_object_set_property: assertion 'G_IS_OBJECT (object)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_object_set_property: assertion 'G_IS_OBJECT (object)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_value_unset: assertion 'G_IS_VALUE (value)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_value_unset: assertion 'G_IS_VALUE (value)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_element_get_request_pad: assertion 'GST_IS_ELEMENT (element)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

** (gst-launch-1.0:26910): CRITICAL **: gst_rtsp_message_take_header: assertion 'value != NULL' failed 
Progress: (request) SETUP stream 1 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: invalid (NULL) pointer instance 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: invalid (NULL) pointer instance 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gtype.c:4272: type id '0' is invalid 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gvalue.c:184: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gtype.c:4272: type id '0' is invalid 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced 

(gst-launch-1.0:26910): GLib-GObject-WARNING **: gvalue.c:184: cannot initialize GValue with type '(null)', this type has no GTypeValueTable implementation 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_value_deserialize: assertion 'G_IS_VALUE (dest)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_value_deserialize: assertion 'G_IS_VALUE (dest)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_object_set_property: assertion 'G_IS_OBJECT (object)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_object_set_property: assertion 'G_IS_OBJECT (object)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_value_unset: assertion 'G_IS_VALUE (value)' failed 

(gst-launch-1.0:26910): GLib-GObject-CRITICAL **: g_value_unset: assertion 'G_IS_VALUE (value)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_element_get_request_pad: assertion 'GST_IS_ELEMENT (element)' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 

(gst-launch-1.0:26910): GStreamer-CRITICAL **: gst_object_ref: assertion 'object != NULL' failed 
Progress: (open) Opened Stream 
Setting pipeline to PLAYING ... 
New clock: GstSystemClock 
Progress: (request) Sending PLAY request 
Progress: (request) Sending PLAY request 
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc4: Internal data flow error. 
Additional debug info: 
gstbasesrc.c(2948): void gst_base_src_loop(GstPad *)(): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc4: 
streaming task paused, reason not-negotiated (-4) 
Execution ended after 0:00:00.001834000 
Setting pipeline to PAUSED ... 
Setting pipeline to READY ... 
Setting pipeline to NULL ... 
Freeing pipeline ... 

我目前正在嘗試OS X El Capitan機器,但我也有在Linux Mint 17.3盒子上試用並收到相同的消息。

有沒有人對我如何解決這個問題有任何想法?感謝您提前提供任何幫助。

回答

1

這些錯誤可能是由於gstreamer或glib無法動態加載模塊。

先檢查:

與任何TLS功能,油嘴動態加載TLS模塊中。通過defualt這是一個gnutls模塊。在Ubuntu上,這可在/usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so中找到。如果你想自己編譯,這個依賴是由glib-networking(https://github.com/GNOME/glib-networking)提供的。

第二次檢查:

TLS握手完成後,RTSP服務器然後繼續設置的SRTP通道。如果系統中不存在SRTP插件,程序將發佈CRITICAL錯誤。運行gst-inspect-1.0 srtpencgst-inspect-1.0 srtpdec驗證這些插件是否存在並且它們的依賴關係是否滿足。

+0

我錯過了gst-plugins-srtp插件 - 壞,因爲這兩臺機器都沒有安裝srtp。感謝您的幫助! – BurnerBoy