hi~~
I am using a notebook (ubuntu 14.04), using the v4l2src element and rtsp server, It succeeded in real-time image reproduction. But here there is a problem. Only one client can be connected. During the client connects to the server, other clients access impossible. The following error is output. Multiple clients are designed to be connected ..... I really do not help me ------------------------------------------------------------------------------------------------------------ Impossible to access client error: [0x7f7ab4000ed8] live555 demux error: Failed to connect with rtsp: // LocalIP: 8554 / test [0x7f7abc0009b8] main input error: open of `rtsp: // LocalIP: 8554 / test 'failed ------------------------------------------------------------------------------------------------------------ server error: libv4l2: error setting pixformat: Device or resource busy ------------------------------------------------------------------------------------------------------------ here is my c program code: ---------------------------------------------------------------------------- #include <gst/gst.h> #include <gst/rtsp-server/rtsp-server.h> #undef WITH_AUTH static gboolean timeout (GstRTSPServer * server, gboolean ignored) { //g_print("server 2second timeout \n"); GstRTSPSessionPool *pool; pool = gst_rtsp_server_get_session_pool (server); gst_rtsp_session_pool_cleanup (pool); g_object_unref (pool); return TRUE; } int main (int argc, char *argv[]){ g_print("main start\n"); GMainLoop *loop; GstRTSPServer *server; GstRTSPMountPoints *mount; GstRTSPMediaFactory *factory; #ifdef WITH_AUTH GstRTSPAuth *auth; gchar *basic; #endif gst_init (&argc, &argv); loop = g_main_loop_new (NULL, FALSE); server = gst_rtsp_server_new (); mount = gst_rtsp_server_get_mount_points(server); auth = gst_rtsp_auth_new (); basic = gst_rtsp_auth_make_basic ("user", "admin"); gst_rtsp_auth_set_basic (auth, basic); g_free (basic); gst_rtsp_server_set_auth (server, auth); #endif factory = gst_rtsp_media_factory_new (); gst_rtsp_media_factory_set_launch (factory, "( " "v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1 ! x264enc ! queue ! rtph264pay name=pay0 pt=96 ! audiotestsrc ! audio/x-raw,rate=8000 ! alawenc ! rtppcmapay name=pay1 pt=97 "")"); gst_rtsp_mount_points_add_factory (mount, "/test", factory); g_print("media add factory success \n"); g_object_unref (mount); if (gst_rtsp_server_attach (server, NULL) == 0) goto failed; g_timeout_add_seconds (2, (GSourceFunc) timeout, server); g_print("main end\n"); g_main_loop_run (loop); return 0; failed: { g_print ("failed to attach the server\n"); return -1; } } |
Le mercredi 13 juillet 2016 à 00:32 -0700, JongIlLee a écrit :
> Impossible to access client error: > [0x7f7ab4000ed8] live555 demux error: Failed to connect with rtsp: // > LocalIP: 8554 / test > [0x7f7abc0009b8] main input error: open of `rtsp: // LocalIP: 8554 / > test > 'failed > ------------------------------------------------------------------- > ----------------------------------------- > server error: > libv4l2: error setting pixformat: Device or resource busy > ------------------------------------------------------------ What you most likely want is to use: gst_rtsp_media_factory_set_shared() This will ensure that for a certain rtsp path, the same pipeline will be used. This is specificly needed for live pipelines. Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (188 bytes) Download Attachment |
Free forum by Nabble | Edit this page |