RTSP Server Windows
Angel Martin
amartin at vicomtech.org
Wed May 30 08:41:40 PDT 2012
Dear all,
I am also trying to run RTSP Server on Windows XP 32bits.
I am using GStreamer WinBuilds v0.10.7, Beta 04 Winbuild and SDK packages.
(Gstreamer 0.10.31)
I have downloaded the source code of OSSBuild to perform the changes that
Matt suggest:
a) *https://bugzilla.gnome.org/show_bug.cgi?id=663300*
b) *https://bugzilla.gnome.org/show_bug.cgi?id=663298*
This means:
a) some minor changes on rtsp_server.c and rtsp_client.c
Deal with some Linux includes by adding:
#include <winsock2.h>
#include <ws2tcpip.h>
Change socket creation
@ gst_rtsp_server_get_io_channel @ rtsp_server.c
unsigned long flags = 1; //To make non-blocking:1 blocking:0
WSADATA wsaData;
int iResult;
:
// Initialize Winsock to avoid error
iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (iResult != 0) {
GST_ERROR_OBJECT (server, "WSAStartup failed: %d\n", iResult);
return FALSE;
}
:
// fcntl (sockfd, F_SETFL, O_NONBLOCK); // LINUX
if (ioctlsocket (sockfd, FIONBIO, &flags) != 0) // WIN32
GST_WARNING_OBJECT (server, "Error creating socket!");
:
/* create IO channel for the socket */
// channel = g_io_channel_unix_new (sockfd); // LINUX
channel = g_io_channel_win32_new_socket (sockfd); // WIN32
b) some minor changes on gstrtspconnection.c
http://bugzilla-attachments.gnome.org/attachment.cgi?id=200575
I see that socket watching problems lays on Glib issues (also tackeld in
other distribution list thread):
https://bugzilla.gnome.org/show_bug.cgi?id=661530
After compiling all and overwrite the dlls, and libs corresponding to
gstrtsp and gstsdp (I suppose that some changes have been done in the svn
working copy from the beta version, because I had runtime errors due to
that).
I use the test-launch example for the server:
test-launch.exe "( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )"
And for the client:
gst-launch rtspsrc location=rtsp://127.0.0.1:8554/test latency=100 !
rtph264depay ! decodebin ! fakesink
It seems to work but It still gets frozen after these logs on the server:
0:00:11.146027000 2376 003D2C38 INFO rtspclient
rtsp-client.c:1939:gst_rtsp_client_accept: client 00CD2010 connected to
server ip 127.0.0.1, ipv6 = 0
0:00:11.156041000 2376 003D2C38 INFO rtspclient
rtsp-client.c:1942:gst_rtsp_client_accept: added new client 00CD2010 ip
127.0.0.1:43269
0:00:11.156041000 2376 003D2C38 INFO rtspclient
rtsp-client.c:1956:gst_rtsp_client_accept: attaching to context 00CF5580
0:00:11.166056000 2376 003D2C38 DEBUG rtspserver
rtsp-server.c:742:manage_client:<GstRTSPServer at 00AE23F8> manage client
00CD2010
0:00:11.166056000 2376 003D2C38 DEBUG GST_POLL
gstpoll.c:1141:gst_poll_wait: timeout :0:00:00.000000000
0:00:11.166056000 2376 003D2C38 DEBUG GST_POLL
gstpoll.c:979:gst_poll_fd_can_read_unlocked: 00AE70E0: fd (fd:1908, idx:0)
0:00:11.176070000 2376 003D2C38 DEBUG GST_POLL
gstpoll.c:1049:gst_poll_fd_can_write: 00AE70E0: fd (fd:1908, idx:0)
RTSP request message 00CF8690
request line:
method: 'OPTIONS'
uri: 'rtsp://127.0.0.1:8554/test'
version: '1.0'
headers:
key: 'CSeq', value: '1'
key: 'Date', value: 'Wed, 30 May 2012 13:35:27 GMT'
body:
0:00:11.186084000 2376 003D2C38 INFO rtspclient
rtsp-client.c:13
13:handle_request: client 00CD2010: received a request
RTSP response message 0012FB94
status line:
code: '200'
reason: 'OK'
version: '1.0'
headers:
key: 'CSeq', value: '1'
key: 'Public', value: 'OPTIONS, DESCRIBE, GET_PARAMETER, PAUSE, PLAY,
SETUP,
SET_PARAMETER, TEARDOWN'
key: 'Server', value: 'GStreamer RTSP server'
body: length 0
An the log in the client:
0:00:01.782563000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:3310:gst_rtsp_conninfo_connect:<rtspsrc0> connecting (rtsp://
127.0.0.1:8554/test)...
0:00:01.822621000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:5388:gst_rtspsrc_retrieve_sdp:<rtspsrc0> create options...
0:00:01.832635000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:5396:gst_rtspsrc_retrieve_sdp:<rtspsrc0> send options...
0:00:01.832635000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:4330:gst_rtspsrc_try_send:<rtspsrc0> sending message
0:00:01.932779000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:4359:gst_rtspsrc_try_send:<rtspsrc0> received response message
0:00:01.932779000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:4370:gst_rtspsrc_try_send:<rtspsrc0> got response message 200
0:00:01.942794000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:5406:gst_rtspsrc_retrieve_sdp:<rtspsrc0> create describe...
0:00:01.942794000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:5418:gst_rtspsrc_retrieve_sdp:<rtspsrc0> send describe...
0:00:01.942794000 3884 00332C48 DEBUG rtspsrc
gstrtspsrc.c:4330:gst_rtspsrc_try_send:<rtspsrc0> sending message
0:00:21.951565000 3884 00332C48 WARN rtspsrc
gstrtspsrc.c:4419:gst_rtspsrc_try_send:<rtspsrc0> error: Could not receive
message. (Timeout while waiting for server response)
I have also tried different combinations and changes from the proposed
modifications, but the malfunction persist.
Could someone (Matthias Dodt or Matteo) publish or attached the whole code
for the libgstrtspserver and the libgstrtsp to perform a RTSP session?
Thank you in advance,
Best regards,
Angel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120530/1ce058f8/attachment.htm>
More information about the gstreamer-devel
mailing list