rtsp server from android to pc
yoyosuper8
yoyosuper8 at yahoo.com
Thu Oct 3 08:45:57 PDT 2013
Chuck, thanks for the info. However, the code I've posted works on linux as
well. In fact, the code I posted is part of an example in the rtsp-server
folder. So, if it works just like that in linux, I would have thought that
it would work fine in android.
When I launch my app in my phone, I can tell that it opens a port and its
listening on port 8554 (default). From my computer, I monitor the traffic
using wireshark and I can see that my computer and my phone perform the tcp
handshake and all is well there. But when my computer sends the rtsp packet
requesting the video feed, the phone does not respond with a rtsp 200 OK
packet. It just hangs and nothing happens. The code posted above works well
in linux. I've tested using vlc as the requestor to view the streaming
video. So why isn't working in android? There has got to be something out
there that I'm missing.
Someone please help :)
Here is the code again:
loop = g_main_loop_new (NULL, FALSE);
server = gst_rtsp_server_new ();
gst_rtsp_server_set_address(server, "192.168.1.10"); <-- IP address on
the phone
gst_rtsp_server_set_service(server, "8554");
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 ! ffenc_mpeg4 ! rtpmp4vpay send-config=true
name=pay0 pt=96 )");
gst_rtsp_media_factory_set_launch (factory,
"( videotestsrc is-live=1 ! x264enc ! rtph264pay name=pay0 pt=96 )");
gst_rtsp_media_factory_set_shared (factory, TRUE);
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
g_object_unref (mapping);
g_timeout_add_seconds (2, (GSourceFunc) timeout, server);
g_main_loop_run (loop);
Thank you
Andy
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/rtsp-server-from-android-to-pc-tp4662269p4662355.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list