rtsp server from android to pc
ducmaxime
maxime.duc at caliatys.com
Thu Dec 10 08:26:11 PST 2015
Hi, I try your code to make and rtsp server on android in C. I use
gstreamer-1.0-android-arm-1.6.1.
Client side is ok i can connect my device to VLC Rtsp server.
But when I try implement the server side : #include
<gst/rtsp-server/rtsp-server.h>
static void gst_native_server(JNIEnv *env, jobject thiz) {
/* Declarations */
GMainLoop *loop;
GstRTSPServer *server;
GstRTSPMediaMapping *mapping;
GstRTSPMediaFactory *factory;
/* Set debugging level */
gst_debug_set_default_threshold(3);
loop = g_main_loop_new (NULL, FALSE);
server = gst_rtsp_server_new ();
/* Specify the IP address of the android device. This is the wifi ip
address. */
gst_rtsp_server_set_address(server, "192.168.1.84");
/* Specify the port number */
gst_rtsp_server_set_service(server, "10000");
mapping = gst_rtsp_server_get_media_mapping (server);
factory = gst_rtsp_media_factory_new ();
gst_rtsp_media_factory_set_launch (factory,"( videotestsrc is-live=1 !
x264enc ! rtph264pay send-config=true name=pay0 pt=96 )");
/* Debug rtph264pay */
gst_debug_set_threshold_for_name("rtph264pay", 3);
gst_rtsp_media_factory_set_shared (factory, TRUE);
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
g_object_unref (mapping);
if (gst_rtsp_server_attach (server, NULL) == 0) {
GST_ERROR("FAILED TO ATTACH THE SERVER");
}
g_timeout_add_seconds (2, (GSourceFunc) timeout, server);
g_main_loop_run (loop);
};
But my problem : GstRTSPMediaMapping not found ???
Thanks,
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/rtsp-server-from-android-to-pc-tp4662269p4674857.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list